Skip to content

Conversation

anyoung-tableau
Copy link
Collaborator

@anyoung-tableau anyoung-tableau commented Jul 23, 2025

These changes introduce two new concepts:

  1. The ability for server admins to protect their remotely-deployed servers that use the Streamable HTTP transport type with Tableau OAuth. This means to even use the MCP server, users must sign in to the Tableau Server or Cloud.
  2. The ability for server admins to configure their MCP server to no longer require a hard-coded PAT or CA info, but to use the access token issued by Tableau during OAuth dance to authenticate to the Tableau REST APIs. This also means the data returned by these APIs are scoped to the MCP client's user, NOT the user who owns the PAT configured by the MCP server admin.

To clarify, for MCP server admins who protect their server with Tableau OAuth, bullet 2 above is NOT a requirement. They can still provide a PAT or Connected Apps config to use for authenticating to the Tableau REST APIs.

In this implementation, the MCP server is functioning as the authorization server as well. This need not be the case though; the authorization server piece could be deployed as its own distinct service. If necessary, we can revisit the design based on customer feedback.

The OAuth 2.1 authorization flow is implemented as per the MCP spec version 2025-06-18:

This provider handles:

    • Step 1: Initial 401 response with WWW-Authenticate
    • Step 2: Resource metadata discovery
    • Step 3: Authorization server metadata
    • Step 4: Dynamic client registration
    • Step 5: Authorization with PKCE
    • Step 6: OAuth callback
    • Step 7: Token exchange
    • Step 8: Authenticated requests
Screenshot 2025-07-24 113435 Screenshot 2025-07-24 113606 Screenshot 2025-07-24 113756

src/config.ts Outdated
}

if (this.auth !== 'oauth') {
invariant(this.siteName, 'The environment variable SITE_NAME is not set');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. siteName can be empty for the default site on Server.

anyoung-tableau and others added 29 commits August 8, 2025 13:56
* Add back CA support

* Rename var

* s/replace/replaceAll

* Update readme

* Add tests

* Use jose instead of jsonwebtoken

* Update env examples

* Rename to JWT_ADDITIONAL_PAYLOAD

* Choose scopes per tool

* Fix tests

* Fix typo in readme

* Remove {OAUTH_USERNAME} when OAuth is not enabled

* Remove accessToken from AuthConfig

* Delete merge files

* Default additional payload to empty object

* Sign out for direct-trust too

* Add basePath to protected resource

* Use issuer instead

* Fix bad merge

* Again
)

* Use JWE instead of JWT

* Remove old code

* Remove more unused code

* Verify issuer and audience

* Fix manifest

* Add OAUTH_JWE_PRIVATE_KEY_PASSPHRASE

* Add OAUTH_JWE_PRIVATE_KEY_PASSPHRASE to readme

* Update readme

* Fix lint errors

* Make getters private
* Add basic session management

* Read originHost from token response

* Remove state

* Clean up

* Combine env var docs

* Change default access token timeout to 1 hour

* Revert registerRequestHandlers

* Add constant for TabCloud URL

* Fix OAuth tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants