Repository navigation
feat: 1Password secret integration - #316
Merged
Merged
Conversation
ChrisJBurns
marked this pull request as draft
May 1, 2025 22:05
JAORMX
reviewed
May 6, 2025
|
|
||
| // NewOnePasswordManager creates an instance of OnePasswordManager. | ||
| func NewOnePasswordManager() (Provider, error) { | ||
| token := os.Getenv("OP_SERVICE_ACCOUNT_TOKEN") |
Collaborator
There was a problem hiding this comment.
Let's add docs for this environment variable in the README. Let's also add this as a constant on the top of the file.
Collaborator
Author
There was a problem hiding this comment.
The OP_SERVICE_ACCOUNT_TOKEN string itself or the token?
Signed-off-by: ChrisJBurns <[email protected]>
ChrisJBurns
force-pushed
the
1password-secret-integration
branch
from
May 6, 2025 17:29
447ec05 to
be26024
Compare
JAORMX
approved these changes
May 6, 2025
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.
Description
This PR implements the 1Password secret integration with ToolHive. It currently only supports the retrieving of secrets and not the deleting/listing/setting of them (we leave the deleting/listing/setting methods as empty implementations until we get a demand for them). We also add some documentation showing how to use ToolHive with 1Password. We make use of the
go-sdkfor 1Password which was easy to use and only required a service account token.Use of 1Password as a Secrets Provider
$ thv config secrets-provider 1password # or $ thv secret provider 1passwordBoth methods work the same way and call the same code internally to modify the
toolhive/config.yamlfile.Example of using the secret with
thv run:I could then confirm that the MCP server started with the secret sourced as the environment variable by performing a
docker exec -it <containerId> bashand then runningenv.