Skip to content
AnchrasDocumentation
Browse documentation

Integrations / User guide

Cloud and infrastructure

Available

Amazon Web Services

Connect AWS compute and S3 object storage to Anchras with a scoped cloud account.

On this page

Connect AWS compute and S3 object storage to Anchras with a scoped cloud account, using IAM access keys or keyless through web identity federation.

Before you begin

Use a dedicated IAM identity whose permissions cover the EC2 or S3 operations you intend to perform. An AWS root login is not a credential for this form. If your organization forbids long-lived access keys, connect keyless instead (see Keyless: web identity federation): Anchras then assumes an IAM role and stores no secret. You need permission to manage integrations in the intended Anchras organization.

Connection settings

SettingWhat to enter
Display nameA recognizable name for this account or environment.
Access key IDIAM access key ID for the account you intend to manage.
Secret access keyThe matching IAM secret access key.
Default regionAn enabled AWS region, such as eu-central-1.

Keyless: web identity federation

Keyless accounts store no secret. Anchras is an OpenID Connect issuer: for each exchange it signs a five-minute token for the one cloud account, and AWS STS AssumeRoleWithWebIdentity exchanges it for temporary credentials of your role. Anchras refreshes those credentials before they expire. The token's subject names your organization and the cloud account, and the role's trust policy admits only that subject, so a role you configure for one account accepts no other account's tokens.

SettingWhat to enter
Credential typeKeyless (workload identity).
Role ARNThe IAM role Anchras assumes, arn:aws:iam::<12-digit account>:role/<name>, with the permissions listed above.
Session nameOptional. The role session name CloudTrail records; defaults to anchras-<account id>.

The connection form (or anchras cloud-accounts workload-identity-setup --provider aws --aws-role-arn <role>) shows the values to configure in AWS and reserves the account's ID. In the account that owns the role:

  1. In IAM, add an OpenID Connect identity provider:
  2. Provider URL: the URL Anchras shows, ending in /workload-identity. AWS fetches <url>/.well-known/openid-configuration and <url>/jwks.json from it, so it must be reachable over public HTTPS (see Private and air-gapped installations).
  3. Audience: sts.amazonaws.com.
  4. Give the role the trust policy Anchras shows. It allows sts:AssumeRoleWithWebIdentity for that provider only when the token's aud is sts.amazonaws.com and its sub is this account's org:…:cloud-account:… subject.
  5. Save the account in Anchras with the same setup (the form carries the reserved ID; the CLI takes --account-id). Validation runs the exchange and calls sts:GetCallerIdentity as the role.
bash
anchras cloud-accounts workload-identity-setup --provider aws \
  --aws-role-arn arn:aws:iam::123456789012:role/anchras
anchras cloud-accounts create --region eu-west --provider aws --display-name aws-prod --default-region eu-central-1 \
  --account-id <account_id> --aws-role-arn arn:aws:iam::123456789012:role/anchras

Keyless access uses the global STS endpoint and supports roles in the standard aws partition. A keyless account also works as a Route 53 DNS connection; give the role the Route 53 permissions it needs. Anchras rotates its signing keys monthly and publishes each new key a day before it signs, so AWS never sees an unknown key.

Private and air-gapped installations

AWS has no way to upload an OIDC provider's keys: it always fetches them from the provider URL over public HTTPS. If your Anchras server is not reachable from the internet, publish the two documents at a static location you own that is, such as an S3 bucket behind CloudFront or a static website, and make that location the issuer:

  1. Set ANCHRAS_WORKLOAD_IDENTITY_ISSUER_URL on the server to the HTTPS address the documents will have, ending in /workload-identity (for example https://oidc.example.eu/workload-identity). Do this before you configure any keyless account: changing the issuer URL breaks every provider configured with the old one.
  2. Run anchras cloud-accounts workload-identity-jwks --out-dir ./anchras-issuer and publish the directory at that address, so that <issuer>/.well-known/openid-configuration and <issuer>/jwks.json serve the two files byte for byte, as application/json.
  3. Configure the IAM OIDC provider with that issuer URL, as above.

Anchras does not keep the copy in sync for you. Run the export at least daily and republish when it reports rotation_pending: the successor key must be published before the time it shows, or AWS refuses the tokens it signs. The JSON output (-o json) carries rotation_pending and successor_activates_at for scripting.

Connect to Anchras

  1. Open Amazon Web Services in the console and start the cloud account connection.
  2. Enter the fields above for the account that should own the resources. Select a supported default region where the form offers one.
  3. Save the account and inspect credential validation. Resolve authentication errors before configuring dependent resources.
  4. Choose the account in the relevant Anchras service and confirm that the required resource profile or storage option is available.

Verify the connection

Check the account identity and validation result in Anchras. Then perform a small resource operation in the target service and inspect its completed state in both Anchras and the provider. Remove test resources after verification; provider charges may apply while resources exist.

Availability and limits

An AWS cloud account does not automatically configure Route 53. Use the separate Amazon Route 53 guide for DNS.

Troubleshooting

Check IAM permissions, account restrictions and regional quotas. A valid key can still lack permission to create a particular resource.

  • STS refused to let the Anchras token assume the role (keyless): the IAM OIDC provider's URL or audience, or the trust policy's sub condition, does not match what the setup shows, or AWS cannot reach the provider URL over HTTPS. Compare them with anchras cloud-accounts workload-identity-setup --provider aws --account-id <id> --aws-role-arn <role>.

Operate and disconnect

Rotate credentials through the protected account configuration and revalidate afterward. You can rotate a key-based account to keyless: give a role in the same AWS account the trust policy for the account's existing ID, then rotate its credentials to that role. Revoke keyless access by removing the trust policy statement or the OIDC provider in IAM. Before removing the connection, identify workloads and storage that depend on it. Disconnecting an account is not the same as deleting resources at the provider.