-
Notifications
You must be signed in to change notification settings - Fork 299
feat: add sqlite credential store #853
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
Conversation
Signed-off-by: Grant Linville <[email protected]>
@@ -11,6 +11,7 @@ require ( | |||
github.com/docker/docker-credential-helpers v0.8.1 | |||
github.com/fatih/color v1.17.0 | |||
github.com/getkin/kin-openapi v0.124.0 | |||
github.com/glebarez/sqlite v1.11.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the pure Go SQLite driver for GORM.
k8s.io/apimachinery v0.31.1 | ||
k8s.io/apiserver v0.31.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got approval from Darren to include whatever k8s dependencies were necessary to do encryption the same way we did it in mink.
Signed-off-by: Grant Linville <[email protected]>
Temporarily moved back to draft because I found a bug in my stacked credentials implementation. Working on it... |
Signed-off-by: Grant Linville <[email protected]>
Should be good now. |
Signed-off-by: Grant Linville <[email protected]>
Closing this since I am going to reimplement it as a separate application that we use as a credential helper. |
This adds a new credential store option,
sqlite
, which uses a pure Go SQLite driver with GORM to store credentials in a local SQLite database file.By default, the SQLite file will be created at
<xdg config dir>/gptscript/credentials.db
, though this can be overridden with an environment variable. We also check for a KubernetesEncryptionConfiguration
file at<xdg config dir>/gptscript/encryptionconfig.yaml
(this path can also be overridden with an environment variable). If this config file is present, we use it for configuration. We can do AES-GCM with a locally stored key, or something fancier like a KMS v2 plugin to support AWS KMS or some other third party service.Here is an example encryptionconfig.yaml to use AES-GCM:
For now I think we want to leave this undocumented? Let me know if I should remove the references to it in the error output (the output we display to the user when they configure an invalid credential store in their config file).