This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Grant Linville <[email protected]>
- Loading branch information
1 parent
ac8c0c5
commit 288c4f2
Showing
1 changed file
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,2 +1,48 @@ | ||
# gptscript-helper-sqlite | ||
A GPTScript credential helper for SQLite | ||
# gptscript-credential-sqlite | ||
|
||
This is a GPTScript [credential helper](https://docs.gptscript.ai/credentials) for SQLite. When the `sqlite` credential store | ||
is configured for GPTScript, it will use this helper to store credentials in a local SQLite file, located in the configuration directory. | ||
By default, all credentials are stored unencrypted. | ||
|
||
Only macOS and Linux are supported. | ||
|
||
## Default SQLite file location | ||
|
||
- macOS: `~/Library/Application Support/gptscript/credentials.db` | ||
- if the `XDG_CONFIG_HOME` environment variable is set, the file will be located at `$XDG_CONFIG_HOME/gptscript/credentials.db` | ||
- Linux: `$XDG_CONFIG_HOME/gptscript/credentials.db` | ||
|
||
## Encryption Configuration | ||
|
||
To enable encryption, you need to create an encryption configuration file. We use the same type of configuration | ||
as [Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/) does. | ||
|
||
This should allow you to use any Kubernetes-compatible KMS v2 providers, though we have not yet tested this. | ||
We have only tested the built-in `aesgcm` provider, which uses a key stored locally in the configuration file. | ||
|
||
### Default encryption configuration locations | ||
|
||
- macOS: `~/Library/Application Support/gptscript/encryptionconfig.yaml` | ||
- if the `XDG_CONFIG_HOME` environment variable is set, the file will be located at `$XDG_CONFIG_HOME/gptscript/encryptionconfig.yaml` | ||
- Linux: `$XDG_CONFIG_HOME/gptscript/encryptionconfig.yaml` | ||
|
||
### Example: AES-GCM configuration with a key in the config file | ||
|
||
```yaml | ||
kind: EncryptionConfiguration | ||
apiVersion: apiserver.config.k8s.io/v1 | ||
resources: | ||
- resources: | ||
# Note that the configuration here must be EXACTLY 'credentials' | ||
- credentials | ||
providers: | ||
- aesgcm: | ||
keys: | ||
- name: myKey | ||
secret: <key encoded in base64> | ||
``` | ||
## Environment Variables | ||
- `GPTSCRIPT_SQLITE_FILE` - can be used to override the path to the SQLite file. | ||
- `GPTSCRIPT_ENCRYPTION_CONFIG_FILE` - can be used to override the path to the encryption configuration file. |