Conversation
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2f856675483cb8b9378ee77ee0beb67955aca9d7 to 4696ba8babb6127d732c3c6dde519db15edab9ea. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@2f85667...4696ba8) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
JAORMX
approved these changes
Mar 24, 2025
This was referenced Oct 7, 2025
This was referenced Oct 22, 2025
flfeurmou-indeed
added a commit
to flfeurmou-indeed/toolhive
that referenced
this pull request
Jan 22, 2026
Address reviewer nit stacklok#3: DetectAuthenticationFromServer and discoverIssuerAndScopes were called in both tryRestoreFromCachedTokens and authenticateWithOAuth. Now these are called once in Authenticate and the results are passed to both tryRestoreFromCachedTokens and performOAuthFlow, avoiding redundant network calls. Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com>
amirejaz
added a commit
that referenced
this pull request
Jan 22, 2026
* feat(auth): persist OAuth tokens across workload restarts This change enables remote MCP servers (like Datadog and Glean) to restore their OAuth sessions after workload restarts without requiring a new browser-based login. Changes: - Add CachedAccessToken, CachedRefreshToken, CachedTokenExpiry fields to remote.Config for token persistence - Create PersistingTokenSource wrapper to save tokens when refreshed - Modify Handler.Authenticate to restore from cached tokens when available - Add token persister callback in runner to save tokens to config state Fixes #3331 Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * chore: retry CI Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor(auth): store OAuth tokens in secret manager Address reviewer feedback: - Store refresh tokens securely in secret manager instead of plain text config - Remove access token caching (can be regenerated from refresh token) - Add TokenTypeOAuthRefreshToken for proper secret categorization - Gracefully handle missing secret manager (tokens won't persist but OAuth works) Security improvement: tokens are now stored in OS keyring/encrypted storage, config only contains the secret reference (e.g., OAUTH_REFRESH_TOKEN_workload) Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor(auth): dedupe discovery calls in Authenticate Address reviewer nit #3: DetectAuthenticationFromServer and discoverIssuerAndScopes were called in both tryRestoreFromCachedTokens and authenticateWithOAuth. Now these are called once in Authenticate and the results are passed to both tryRestoreFromCachedTokens and performOAuthFlow, avoiding redundant network calls. Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor: only persist when refresh token changes Avoids unnecessary writes since refresh tokens are long-lived and usually don't change on every access-token refresh. * fix: re-register client dynamically when restoring cached tokens Some MCP servers require client credentials for token refresh. When no configured client_id exists and a registration endpoint is available, perform dynamic client registration before attempting to restore from cached tokens. This defers #3335 (persisting client credentials) to a separate PR while still allowing token restoration to work for servers that require client credentials. * Revert "fix: re-register client dynamically when restoring cached tokens" This reverts commit c82408a. --------- Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> Co-authored-by: Muhammad Amir Ejaz <amir@stacklok.com>
therealnb
pushed a commit
that referenced
this pull request
Jan 23, 2026
* feat(auth): persist OAuth tokens across workload restarts This change enables remote MCP servers (like Datadog and Glean) to restore their OAuth sessions after workload restarts without requiring a new browser-based login. Changes: - Add CachedAccessToken, CachedRefreshToken, CachedTokenExpiry fields to remote.Config for token persistence - Create PersistingTokenSource wrapper to save tokens when refreshed - Modify Handler.Authenticate to restore from cached tokens when available - Add token persister callback in runner to save tokens to config state Fixes #3331 Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * chore: retry CI Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor(auth): store OAuth tokens in secret manager Address reviewer feedback: - Store refresh tokens securely in secret manager instead of plain text config - Remove access token caching (can be regenerated from refresh token) - Add TokenTypeOAuthRefreshToken for proper secret categorization - Gracefully handle missing secret manager (tokens won't persist but OAuth works) Security improvement: tokens are now stored in OS keyring/encrypted storage, config only contains the secret reference (e.g., OAUTH_REFRESH_TOKEN_workload) Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor(auth): dedupe discovery calls in Authenticate Address reviewer nit #3: DetectAuthenticationFromServer and discoverIssuerAndScopes were called in both tryRestoreFromCachedTokens and authenticateWithOAuth. Now these are called once in Authenticate and the results are passed to both tryRestoreFromCachedTokens and performOAuthFlow, avoiding redundant network calls. Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> * refactor: only persist when refresh token changes Avoids unnecessary writes since refresh tokens are long-lived and usually don't change on every access-token refresh. * fix: re-register client dynamically when restoring cached tokens Some MCP servers require client credentials for token refresh. When no configured client_id exists and a registration endpoint is available, perform dynamic client registration before attempting to restore from cached tokens. This defers #3335 (persisting client credentials) to a separate PR while still allowing token restoration to work for servers that require client credentials. * Revert "fix: re-register client dynamically when restoring cached tokens" This reverts commit c82408a. --------- Signed-off-by: Frédéric LE FEURMOU <flfeurmou@indeed.com> Co-authored-by: Muhammad Amir Ejaz <amir@stacklok.com>
This was referenced Feb 6, 2026
3 tasks
This was referenced Apr 1, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bumps golangci/golangci-lint-action from 2f856675483cb8b9378ee77ee0beb67955aca9d7 to 4696ba8babb6127d732c3c6dde519db15edab9ea.
Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)