-
Notifications
You must be signed in to change notification settings - Fork 84
@W-21581935: Add passthrough auth #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
377cf23
Add cookie-parser
anyoung-tableau 9e92200
Add passthrough middleware
anyoung-tableau b6834ec
Cache session response
anyoung-tableau dee5d97
Update restApiInstance tests
anyoung-tableau d619b80
Add docs
anyoung-tableau 63b9bdc
Add Passthrough auth test
anyoung-tableau f9d4b64
Add env vars to workflow
anyoung-tableau 53aafcb
Update Access-Control-Expose-Headers header
anyoung-tableau 60c1081
Merge remote-tracking branch 'origin/main' into anyoung/237
anyoung-tableau 1003b80
Add PASSTHROUGH_AUTH_USER_SESSION_CHECK_INTERVAL_IN_MINUTES
anyoung-tableau 667924b
Update tests
anyoung-tableau d8ab72f
Add comment
anyoung-tableau e88cb59
Allow for disabling cache, update docs
anyoung-tableau c023ffe
Add scope comment
anyoung-tableau 3384aea
Allow interval to be 0
anyoung-tableau b6194f7
Address copilot comments
anyoung-tableau 2f99955
Revert action.yml
anyoung-tableau 3970a0d
Revert ci.yml
anyoung-tableau 7cf8bcf
Merge remote-tracking branch 'origin/main' into anyoung/237
anyoung-tableau 6761c9b
Bump
anyoung-tableau 4b36d56
Guard against accidental usage of passthrough auth middleware
anyoung-tableau 52f133a
Add test to disallow passthrough auth for tools with no API scopes
anyoung-tableau 2aa3492
Fix typo
anyoung-tableau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
docs/docs/configuration/mcp-config/authentication/passthrough.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| sidebar_position: 5 | ||
| --- | ||
|
|
||
| # Passthrough Authentication | ||
|
|
||
| With passthrough authentication enabled, authentication to the MCP server acts similarly to the | ||
| Tableau REST APIs. The same | ||
| [`X-Tableau-Auth` header](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm#using_auth_token) | ||
| used to authenticate to the Tableau REST APIs can also be used to authenticate to the MCP server. | ||
|
|
||
| When a request is made to the MCP server, the `X-Tableau-Auth` header is read. | ||
|
|
||
| - When the header is present, the value will be "passed through" and re-used during MCP tool calls | ||
| when they authenticate to the Tableau REST APIs. | ||
| - When absent, normal authentication will resume as defined by the [`AUTH`](../env-vars.md#auth) | ||
| environment variable. This allows clients that do not provide the `X-Tableau-Auth` header to still | ||
| authenticate to the MCP server. | ||
|
|
||
| :::warning | ||
|
|
||
| When using passthrough authentication, the calling application is responsible for creating the | ||
| credential for the `X-Tableau-Auth` header and managing its lifecycle. The MCP server will not | ||
| automatically terminate the Tableau session associated with the credential after its use nor will it | ||
| refresh it after it expires. Providing an invalid or expired credential will result in downstream | ||
| authentication failures. | ||
|
|
||
| Additionally, if [`OAuth`](oauth.md) is enabled, all requests to the MCP server must include the | ||
| `X-Tableau-Auth` header, otherwise the client will be considered unauthorized and will be forced to | ||
| authenticate using OAuth. This even includes MCP lifecycle requests like the | ||
| [Initialization request](https://modelcontextprotocol.io/specification/2025-11-25/basic/lifecycle#initialization), | ||
| even though it does not make any downstream Tableau REST API calls. | ||
|
|
||
| ::: | ||
|
|
||
| :::danger | ||
|
|
||
| Do not use a Personal Access Token (PAT) to generate the `X-Tableau-Auth` credential when using | ||
| passthrough authentication since PATs cannot be used concurrently. Signing in multiple times with | ||
| the same PAT at the same time will terminate any prior session and will result in an authentication | ||
| error. See | ||
| [Understand personal access tokens](https://help.tableau.com/current/server/en-us/security_personal_access_tokens.htm#understand-personal-access-tokens) | ||
| for more details. | ||
anyoung-tableau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ::: | ||
|
|
||
| ## ENABLE_PASSTHROUGH_AUTH | ||
|
|
||
| - Default: `false` | ||
| - When `true`, passthrough authentication is enabled. | ||
| - Only applies when [`TRANSPORT`](../env-vars.md#transport) is `http`. | ||
|
|
||
| <hr /> | ||
|
|
||
| ## PASSTHROUGH_AUTH_USER_SESSION_CHECK_INTERVAL_IN_MINUTES | ||
|
|
||
| - Default: `10` minutes | ||
| - How often the server re-checks that a passthrough auth token is still valid. Between checks, | ||
| recently validated tokens are trusted without re-verification. Downstream requests to the Tableau | ||
| REST APIs could potentially fail if the token was invalidated during this interval. | ||
| - Valid range: `0` to `1440` (24 hours). Use `0` to verify the token on every request. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.