Connect secrets managers
Your security team has a rule: credentials live in the vault, and nothing else keeps a copy. A security tool that demands its own copy of every token is an awkward first conversation.
So do not give Dwaar a copy. Connect your secrets manager, and other connections can read their credentials from it each time they need them. Dwaar keeps no copy of a vault secret.
Connect HashiCorp Vault
This works with Vault, OpenBao and HCP Vault, using AppRole.
Prerequisites
- A role that holds
integrations:create. - A Vault address reachable from Dwaar over https.
- An AppRole with a read-only policy on the paths Dwaar may use.
Steps
- Open Integrations, choose HashiCorp Vault, and name the connection.
- Enter the values below and press Test connection.
| Field | Required | Value |
|---|---|---|
| Server URL | Yes | For example https://vault.acme.com:8200. |
| Namespace | No | The Vault Enterprise or HCP namespace, for example admin/platform. Leave empty otherwise. |
| AppRole mount | No | Where the AppRole auth method is mounted, for example approle. |
| KV v2 mount | No | The KV version 2 secrets engine Dwaar reads from, for example secret. |
| Role ID | Yes | The AppRole role_id. |
| Secret ID | Yes | The AppRole secret_id. Dwaar seals it and only uses it to log in to your Vault. |
Connect AWS Secrets Manager
Method: IAM role, using the same external id flow as AWS accounts.
Prerequisites
- A role that holds
integrations:create. - Permission to create an IAM role in the AWS account.
Steps
- Open Integrations, choose AWS Secrets Manager, then Add connection.
- Follow the guide beside the form, Create a read-only IAM role for Secrets Manager. It offers Open CloudFormation quick-create, with your values filled in, or the policies to create the role by hand.
- Enter the values below and press Test connection.
The stack creates the role dwaar-secrets-read, which may only read secrets whose names start with dwaar/. Keep your secrets under another prefix? Change SecretNamePrefix in the stack's Parameters before you create it.
| Field | Required | Value |
|---|---|---|
| Role ARN | Yes | For example arn:aws:iam::<account-id>:role/dwaar-secrets-read. It must trust Dwaar's principal with your external id and allow secretsmanager:GetSecretValue on the secrets Dwaar may read, plus kms:Decrypt through Secrets Manager if their key is customer-managed. |
Test connection proves Dwaar can assume the role. It does not read a secret yet: a secret is read the first time a connection that uses it is tested or runs. | Region | Yes | The region of the secrets. Add one connection per region. |
Scope secretsmanager:GetSecretValue to specific secrets. Do not grant it on everything just because that is faster.
Use a vault secret in another connection
Once a secrets manager is connected, connect forms that take a secret offer two sources: Enter value and From vault.
- On the other connection's form, set the source to From vault.
- Choose the vault connection.
- Enter where the secret lives.
| Source | Where | Which field |
|---|---|---|
| HashiCorp Vault | Path in the vault's KV v2 mount, for example dwaar/github | Key: the field inside the secret that holds the value |
| AWS Secrets Manager | Secret name or ARN in the connection's region, for example prod/dwaar/github | JSON key (optional): the key of a JSON secret. Leave empty for a plain-text secret. |
A secrets manager's own login cannot come from a vault. Something has to be the first credential.
What you should see
The connection's Credential row says it is read from your vault each time Dwaar uses it. Rotate the secret in your vault and Dwaar picks up the new value on its next read.
Match Dwaar's reads to your audit log
The Access tab on a secrets manager connection lists every read Dwaar made, with its request id.
For Vault, Dwaar also sends that id in the X-Dwaar-Request-Id header. Add the header to Vault's audited request headers, and you can match each row to your Vault audit log. Your auditors can then check Dwaar's list of reads against yours, rather than taking anyone's word for it.
Try this next
Connect Vault, then move one existing token into it and replace that connection's credential using From vault. Run Test connection, then check the Access tab. You should see the read. Once you have seen it work once, move the rest.