This guide covers two different secrets that both belong to 1Password. The first is a service account token, which lets a script or a CI job read and sometimes write the vaults that the service account was granted. The second is the account Secret Key, one of the two inputs (with the account password) used to unlock a 1Password account. A token alone is enough to read the secrets of its vaults. A Secret Key alone is not enough to open an account, because the password is still needed, but it removes half of the protection. Treat both as critical. Revoke the token first, then work out what it could read.
Check your GitHub account for leaked secrets — free
- Provider
- 1Password
- Severity
- Critical
- Impact
- Cloud infrastructure access
- Checked live by LeakWatch
- No
What a 1Password Secret Key and service account token look like
A service account token starts with ops_, followed by encoded text that begins with eyJ, which is how a serialized JSON object starts once encoded. It is long, several hundred characters:
ops_eyJ…XXXX 1Password service account token (masked, several hundred characters)
It usually sits in a variable called OP_SERVICE_ACCOUNT_TOKEN, which the op command-line tool and the 1Password SDKs read. The Secret Key is different: it starts with A3- and then groups of uppercase letters and digits separated by dashes, 34 characters not counting the dashes:
A3-…-XXXXX 1Password Secret Key (masked, uppercase letters and digits in dash-separated groups)
It is printed in the Emergency Kit PDF and shown in the 1Password apps. A third look-alike is the account password or the setup code, which have neither of these shapes. Connect tokens for 1Password Connect servers are also different and are not covered by these two patterns.
How 1Password secrets get leaked
- Service account token in CI.
OP_SERVICE_ACCOUNT_TOKENwritten in a workflow file, a Dockerfile or a deployment script instead of the CI platform’s secret store. - Committed environment files. A
.envfile used for local development that contains the token and ends up in a repository. - Shared scripts and notes. A setup guide or runbook that pastes a working token so that colleagues can copy it.
- Emergency Kit copies. The PDF, printed or saved, uploaded to a shared drive, a repository, an issue or a ticket attachment, with the Secret Key printed in it.
- Screenshots. A photo of the Emergency Kit or of the app’s account page, shared during support or onboarding.
- Logs. A debug option that prints environment variables, and so the token, into a public build log.
What to do in the first hour
- If a service account token leaked, revoke it first. Sign in to your 1Password account on the web and open the developer area where service accounts are managed (see the link below). Find the service account and delete it, or revoke the token it issued, depending on what the page offers.
- Create a new service account with access to only the vaults and permissions the job needs, read-only if it never writes. Deploy the new token to the CI secret store.
- Review the vaults the account could read. Every item in them must be treated as exposed: rotate the passwords, API keys and certificates stored there, starting with the ones that give the most access.
- Check the activity. Look at the account’s activity log or events report, if your plan includes it, for item reads by the service account, and for sign-ins from unknown places.
- If the Secret Key leaked, first confirm that the account password is strong and unique and that two-step verification is on. Then read the official 1Password documentation on what to do when your Secret Key may be exposed. A person has not confirmed this procedure for this guide, so do not assume a Secret Key can be replaced from a settings page.
- Remove the file or image from where it was shared, and check who could download it.
- Clean up the code and look for other secrets in the same commit. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at 1Password
A service account token is managed from your 1Password account on the web, after you sign in with a user allowed to manage service accounts. The 1Password developer documentation on service accounts describes how to create, inspect and delete them. A person has not confirmed the exact menu wording for this guide, and the interface can change, so look for the section where service accounts are listed. The Secret Key works differently: according to 1Password, nobody holds a copy and nobody can reset it for you, so the answer to its exposure is to follow the account-level guidance in 1Password’s support documentation, not to look for a revoke button.
How LeakWatch detects it
This guide covers two rules. The rule called 1Password Account Token looks for ops_eyJ followed by at least 250 characters from letters, digits, +, /, _ and -, optionally ending with up to three = signs. Shorter strings are not reported. The rule called 1password Secret Key looks for the uppercase prefix A3-, a group of 6, a middle part made either of one block of 11 or of two blocks of 6 and 5, then three groups of 5, in uppercase letters and digits. Lowercase text, or groups of the wrong length, are not reported. Both rules are rated critical, neither needs a variable name nearby, and neither is checked live: LeakWatch never sends a token or a Secret Key to 1Password.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Can someone open my 1Password account with only the Secret Key?
No, the account password is also required, and two-step verification may be required too. But the Secret Key is meant to protect you if your password is guessed or leaked, so its exposure weakens that protection and deserves a review.
Does deleting a service account invalidate its token?
Revoking or deleting the service account is the way to stop its token from working. Afterwards, try to use the old token with the command-line tool and confirm it is rejected, then look at the account activity.
Is a token in a private repository safe?
Not necessarily. Collaborators, forks, build logs and cached copies can expose it. Replace the token if you are unsure who could read the file.