LIGHT

  • News
  • Docs
  • Community
  • Reddit
  • GitHub

Tableau Authentication Handler

The light-proxy is used to bring legacy APIs to the light ecosystem by providing cross-cutting concerns on the network level. One of the cross-cutting concerns is the security with JWT verification. It helps to protect the downstream API which doesn’t support OAuth 2.0 with JWT access token; however, most APIs do have some security mechanisms to authenticate and authorize access. Some of them even have customized security with its login API and customized token like Tableau.

While working with one of our customers to integrate with downstream API exposed from Tableau server, we found that it is not comfortable and secure to authenticate the access from the B2B client. It would be much easier to build a security layer in the light-proxy so that we can shield the access from outside only to specific endpoints instead give them the site admin user privilege.

To meet the above requirement, we have built a customized authentication handler which can handle the login and pass the token to the downstream Tableau server.

The logic is straightforward in the handler. It requires the B2B client to pass the Tableau Content URL in the header named tableauContentUrl. Based on the passed in value in the header, it picks up the Tableau user from tableau.yml and credential from secret.yml to log in to the Tableau server. Then the token is retrieved from the response of the login request and put into the header for the current client request. When the request reaches the Tableau server, it has the authentication token in the header already.

The implementation is simple and enough for the use case (batch process) we have; however, it is not the most efficient way to handler the security as every request needs to go to the Tableau to log in.

If this is a real-time API proxy, we need to have a map to cache the token for each Tableau Content URL and reuse the cached token until it is expired. The logic is a little bit complex than the client module in light-4j as there are many tokens and expirations to be managed but it is doable.

Here is the configuration file for this handler.

tableau.yml

# Enable tableau handler or not, default to false
enabled: false
# The tableau server url.
serverUrl: http://127.0.0.1:8080
# The tableau signin API path
serverPath: /api/2.8/auth/signin
# Tableau Credentials for signin
# Tableau user name
tableauUsername: "admin"

  • About Light
    • Overview
    • Testimonials
    • What is Light
    • Features
    • Principles
    • Benefits
    • Roadmap
    • Community
    • Articles
    • Videos
    • License
    • Why Light Platform
  • Getting Started
    • Get Started Overview
    • Environment
    • Light Codegen Tool
    • Light Rest 4j
    • Light Tram 4j
    • Light Graphql 4j
    • Light Hybrid 4j
    • Light Eventuate 4j
    • Light Oauth2
    • Light Portal Service
    • Light Proxy Server
    • Light Router Server
    • Light Config Server
    • Light Saga 4j
    • Light Session 4j
    • Webserver
    • Websocket
    • Spring Boot Servlet
  • Architecture
    • Architecture Overview
    • API Category
    • API Gateway
    • Architecture Patterns
    • CQRS
    • Eco System
    • Event Sourcing
    • Fail Fast vs Fail Slow
    • Integration Patterns
    • JavaEE declining
    • Key Distribution
    • Microservices Architecture
    • Microservices Monitoring
    • Microservices Security
    • Microservices Traceability
    • Modular Monolith
    • Platform Ecosystem
    • Plugin Architecture
    • Scalability and Performance
    • Serverless
    • Service Collaboration
    • Service Mesh
    • SOA
    • Spring is bloated
    • Stages of API Adoption
    • Transaction Management
    • Microservices Cross-cutting Concerns Options
    • Service Mesh Plus
    • Service Discovery
  • Design
    • Design Overview
    • Design First vs Code First
    • Desgin Pattern
    • Service Evolution
    • Consumer Contract and Consumer Driven Contract
    • Handling Partial Failure
    • Idempotency
    • Server Life Cycle
    • Environment Segregation
    • Database
    • Decomposition Patterns
    • Http2
    • Test Driven
    • Multi-Tenancy
    • Why check token expiration
    • WebServices to Microservices
  • Cross-Cutting Concerns
    • Concerns Overview
  • API Styles
    • Light-4j for absolute performance
    • Style Overview
    • Distributed session on IMDG
    • Hybrid Serverless Modularized Monolithic
    • Kafka - Event Sourcing and CQRS
    • REST - Representational state transfer
    • Web Server with Light
    • Websocket with Light
    • Spring Boot Integration
    • Single Page Application
    • GraphQL - A query language for your API
    • Light IBM MQ
    • Light AWS Lambda
    • Chaos Monkey
  • Infrastructure Services
    • Service Overview
    • Light Proxy
    • Light Mesh
    • Light Router
    • Light Portal
    • Messaging Infrastructure
    • Centralized Logging
    • COVID-19
    • Light OAuth2
    • Metrics and Alerts
    • Config Server
    • Tokenization
    • Light Controller
  • Tool Chain
    • Tool Chain Overview
  • Utility Library
  • Service Consumer
    • Service Consumer
  • Development
    • Development Overview
  • Deployment
    • Deployment Overview
    • Frontend Backend
    • Linux Service
    • Windows Service
    • Install Eventuate on Windows
    • Secure API
    • Client vs light-router
    • Memory Limit
    • Deploy to Kubernetes
  • Benchmark
    • Benchmark Overview
  • Tutorial
    • Tutorial Overview
  • Troubleshooting
    • Troubleshoot
  • FAQ
    • FAQ Overview
  • Milestones
  • Contribute
    • Contribute to Light
    • Development
    • Documentation
    • Example
    • Tutorial
“Tableau Authentication Handler” was last updated: April 2, 2019: fixes #62 add Chinese language for the document site (5c820aa)
Improve this page
  • News
  • Docs
  • Community
  • Reddit
  • GitHub
  • About Light
  • Getting Started
  • Architecture
  • Design
  • Cross-Cutting Concerns
  • API Styles
  • Infrastructure Services
  • Tool Chain
  • Utility Library
  • Service Consumer
  • Development
  • Deployment
  • Benchmark
  • Tutorial
  • Troubleshooting
  • FAQ
  • Milestones
  • Contribute