1Password vs Bitwarden for DevOps Secrets Management

Compare 1Password service accounts and Bitwarden Secrets Manager machine accounts for CI/CD secrets: CLI usage, access scoping, self-hosting and pricing.

Published

At a glance

Last reviewed
Versions referenced
actions/checkout@v7 1password/load-secrets-action@v5
Reading time
5 min read

Code samples are not run in a live repository. See our editorial standards.

On this page

There is no single best password manager for DevOps secrets. Choose Bitwarden Secrets Manager if you need self-hosting or want machine-account pricing that is public and easy to budget. Choose 1Password if your team already uses it for credentials and you want service accounts, the op CLI and an official GitHub Action in the same product.

Both tools give pipelines a non-interactive token, scope that token to a limited set of secrets, and inject values at runtime. The differences are in how access is scoped, where you can host it and how it is priced.

Quick comparison

Aspect 1Password Bitwarden Secrets Manager
Automation identity Service account Machine account
Token variable OP_SERVICE_ACCOUNT_TOKEN BWS_ACCESS_TOKEN
CLI op bws (also Docker image ghcr.io/bitwarden/bws)
Access scope Vaults the service account is granted Projects the machine account is granted
Run a command with secrets op run or load-secrets-action bws run -- 'your-command'
Self-hosting Not covered by the references; check 1Password’s docs Secrets Manager Enterprise
Pricing Check the provider’s pricing page Public per-user and per-machine-account prices (see below)

Pull secrets in CI with 1Password

Use a service account token and the official 1password/load-secrets-action. The action reads secret references (op://vault/item/field) from environment variables and resolves them at job time.

# .github/workflows/deploy.yml
name: Deploy
on: push
jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - name: Load secrets from 1Password
        uses: 1password/load-secrets-action@v5
        with:
          export-env: true
        env:
          OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
          DB_PASSWORD: op://MyVault/DBPassword/password
      - name: Deploy
        run: ./deploy.sh

Store the service account token as a repository or environment secret. Grant the service account access only to the vaults the pipeline needs, because that vault grant is its entire scope.

The permissions block here is only for checkout. You do not need id-token: write, since the service account token is not exchanged through GitHub OIDC.

If you prefer the CLI, set OP_SERVICE_ACCOUNT_TOKEN in the environment and run op read "op://MyVault/DBPassword/password". Never write the result to a file in the workspace, where later steps or uploaded artifacts can expose it.

Pull secrets in CI with Bitwarden

Install bws, set BWS_ACCESS_TOKEN to a machine-account token and wrap your command in bws run. Linux and macOS installs use the script from bws.bitwarden.com, or you can use the ghcr.io/bitwarden/bws image as the base of a CI container.

# .github/workflows/deploy.yml
name: Deploy
on: push
jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      # Install bws first, following https://bitwarden.com/help/secrets-manager-cli/
      - name: Run deploy with secrets injected
        env:
          BWS_ACCESS_TOKEN: ${{ secrets.BWS_ACCESS_TOKEN }}
        run: bws run -- './deploy.sh'

bws run starts the command with the secrets the machine account can read set as environment variables. You can pass the token with -t or --access-token instead of the variable, but the environment variable keeps it out of the process list.

Do not echo the token to a file, and do not run the CLI in a container that cannot see your script. Either one adds risk without adding function.

I could not confirm an official Bitwarden GitHub Action from the reference material, so this article uses the CLI. Check Bitwarden’s documentation if you want an action.

Verify that injection works

Check that the secret reaches the process without printing it.

  1. Run a step that tests the variable, for example test -n "$DB_PASSWORD" && echo "DB_PASSWORD is set" for 1Password, or bws run -- 'test -n "$MY_SECRET" && echo set' for Bitwarden. Replace MY_SECRET with the key name of a secret in your project.
  2. Confirm that ./deploy.sh authenticates to the target system.
  3. Confirm that GitHub masks the value. A registered secret appears as *** in the log.

For Bitwarden, bws secret list with the token set also confirms that the machine account can see the expected secrets. For 1Password, a failure to resolve a reference usually means the vault, item or field name is wrong, or the service account was not granted that vault.

Access control and team management

Both products scope automation separately from human users, and both follow least privilege if you configure them that way.

  • 1Password: a service account is limited to the vaults you grant it. Create one per pipeline or environment so a leaked token exposes one environment only.
  • Bitwarden: secrets are organized into projects, and a machine account gets programmatic access to a discrete set of them. Mirror your environments in projects (for example staging and production) and grant each machine account only its own.

Secrets Manager Teams includes event logs and user groups. Secrets Manager Enterprise adds granular access control, passwordless SSO, SCIM, self-hosting and enterprise policies. For 1Password’s identity provider integrations, role model and audit features, check 1Password’s documentation, since the references here do not cover them.

Bitwarden Secrets Manager pricing

Secrets Manager is billed separately from the Bitwarden password manager. These figures come from Bitwarden’s Secrets Manager page. Confirm them on the pricing page before you budget, because billing terms and taxes are not covered here.

Plan Price Machine accounts Notable features
Free Free Up to 3 Up to 2 users
Teams $6 per user per month Up to 20, then $1 per additional Unlimited secrets, projects and users; event logs; user groups
Enterprise $12 per user per month Up to 50, then $1 per additional Granular access control, passwordless SSO, SCIM, self-hosting, enterprise policies

For 1Password plan names, limits and prices, check the provider’s pricing page. Whether the CLI and service accounts are available depends on your plan, so confirm that before you commit.

Pitfalls

  • Token in the wrong place. Keep OP_SERVICE_ACCOUNT_TOKEN and BWS_ACCESS_TOKEN in CI secret storage, never in the repository. Rotate them if a log or artifact ever exposes one.
  • Over-broad scope. One token that reads every vault or project defeats the point. Detect it by listing what each token can access and comparing that to what the job uses.
  • Secrets written to disk. Files in the workspace can be uploaded as artifacts or cached. Prefer environment variables scoped to a single step.
  • Pull requests from forks. GitHub does not pass repository secrets to workflows triggered from forks, so secret loading fails there. Do not work around this with pull_request_target unless you understand the exposure.
  • Budgeting only the password manager. With Bitwarden, Secrets Manager is a separate subscription, and machine accounts beyond the plan allowance cost extra.

Which should you pick

  • Need self-hosting: Bitwarden Secrets Manager Enterprise.
  • Small team, want to trial automation cheaply: Bitwarden Secrets Manager Free covers 2 users and 3 machine accounts.
  • Already standardized on 1Password for human credentials: use its service accounts and load-secrets-action to avoid running a second product.
  • Large number of pipelines: compare the cost of machine accounts against your 1Password plan on both pricing pages.

Spotted an error? Report it on our Contact page and see our editorial standards for how we correct articles.