External Secrets Operator integrates with 1Password Secrets Automation for secret management.
Consider using 1Password SDK provider instead. It uses an official SDK for 1Password created by 1Password. It's feature complete and has parity with this provider's capabilities.
The 1Password API calls the entries in vaults 'Items'. These docs use the same term.
remoteRef.key is equated to an Item's TitleremoteRef.property is equated to:
passwordremoteRef.version is currently not supported.Password and Document.
Password type can get data from multiple fields in the Item.Document type can get data from files.dataFrom:
find.path is equated to Item Title.find.name.regexp is equated to field Labels.find.tags fetches for Items with the same tags matching the keys of find.tags.Authentication requires a 1password-credentials.json file provided to the Connect Server, and a related 'Access Token' for the client in this provider to authenticate to that Connect Server. Both of these are generated by 1Password.
op connect server create syntax. This will create an Automation Environment in 1Password, and corresponding credentials for a Connect Server, nothing more.1password-credentials.json file to provide to a Connect Server Deployment, and an Access Token to provide as a Secret referenced by a SecretStore or ClusterSecretStore.yaml
{% include '1password-token-secret.yaml' %}
yaml
{% include '1password-secret-store.yaml' %}
yaml
{% include '1password-connect-server-secret.yaml' %}
yaml
{% include '1password-connect-server-deployment.yaml' %}
Also see examples below for matching SecretStore and ExternalSecret specs.
remoteRef.key to be.remoteRef.property to be in the field sections where is says 'label', and values where it says 'new field'.remoteRef.keyfile.json with the following contents, swapping in your keys and values. Note: section.name's and section.title's values are ignored by the Operator, but cannot be empty for the op CLI
json
{
"title": "my-title",
"vault": {
"id": "vault-id"
},
"category": "LOGIN",
"fields": [
{
"id": "username",
"type": "STRING",
"purpose": "USERNAME",
"label": "username",
"value": "a-username"
},
{
"id": "password",
"type": "CONCEALED",
"purpose": "PASSWORD",
"label": "password",
"password_details": {
"strength": "TERRIBLE"
},
"value": "a-password"
},
{
"id": "notesPlain",
"type": "STRING",
"purpose": "NOTES",
"label": "notesPlain",
"value": "notesPlain"
},
{
"id": "customField",
"type": "CONCEALED",
"purpose": "custom",
"label": "custom",
"value": "custom-value"
}
]
}
op item create --template file.jsonop CLI doesn't seem to support uploading multiple files to the same Item, and the current Go lib has a bug. op can be used to create a Document type Item with one file in it, but for now it's necessary to add multiple files to the same Document via the GUI.password on Password type Itemspassword, use the in-built one rather than the one in a fields Section.password on every Password type Item, whether it's created through a GUI or the API or op CLI.op CLI to create Items.)password field is not otherwise special for the purposes of ExternalSecrets. It can be ignored when not in use.Examples of using the my-env-config and my-cert Items seen above.
my-env-config is correlated to a ExternalSecret named my-env-config that results in a Kubernetes secret named my-env-config, all with matching names for the key/value pairs. This is a way to increase comprehensibility.
yaml
{% include '1password-secret-store.yaml' %}
yaml
{% include '1password-external-secret-my-env-config.yaml' %}
yaml
{% include '1password-external-secret-my-cert.yaml' %}
password field. Therefore, implementing version history in this provider would require one Item in 1Password per remoteRef in an ExternalSecret. Additionally remoteRef.property would be pointless/unusable.envFrom,) would require 15 Items in the 1Password vault, instead of 15 Fields in 1 Item. This would quickly get untenable for more than a few secrets, because:
secretKey couldn't match the Item name the remoteRef is targeting.An overlay can provide a SecretStore specific to that overlay, and then use JSON6902 to patch all the ExternalSecrets coming from base to point to that SecretStore. Here's an example overlays/staging/kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization
resources:
patchesJson6902:
To push a secret from Kubernetes cluster and create it as a secret in 1Password, a Kind=PushSecret resource is needed.
Updating the vault on an existing PushSecret is currently not supported. To update the vault, create a new PushSecret with the updated vault.
{% include '1password-push-secret.yaml' %}
Then it will create an item in onepassword op://staging/1pw-secret-name/password equal to my-secret.