Identities
Identities represent the user accounts or roles available from provider credentials. Configure identities in the auth.identities section of your atmos.yaml.
- AWS
- Azure
- GCP
Permission Set
For AWS SSO permission sets.
kind- Required. Must be
aws/permission-set. default- Optional. If
true, this identity is used when no identity is specified. via.provider- Required. Name of the provider to use for authentication.
principal.name- Required. Name of the permission set.
principal.account.name- Account name/alias (resolved via SSO ListAccounts API).
principal.account.id- Numeric account ID (used directly, no lookup required).
Assume Role
For assuming IAM roles, either directly from a provider or chained from another identity.
kind- Required. Must be
aws/assume-role. via.identity- Name of another identity to chain from (mutually exclusive with
via.provider). via.provider- Name of a provider to use directly (mutually exclusive with
via.identity). principal.assume_role- Required. ARN of the IAM role to assume.
principal.session_name- Optional. Session name for CloudTrail auditing.
Assume Root (Organizations)
For centralized root access in AWS Organizations using sts:AssumeRoot. This allows privileged operations on member accounts without enabling root user credentials.
kind- Required. Must be
aws/assume-root. via.identity- Required. Name of another identity to chain from (must provide AWS credentials).
principal.target_principal- Required. 12-digit AWS account ID of the member account to assume root on.
principal.task_policy_arn- Required. AWS-managed root task policy ARN. See supported policies below.
principal.duration- Optional. Session duration (max 15 minutes for AssumeRoot).
Supported task policies:
arn:aws:iam::aws:policy/root-task/IAMAuditRootUserCredentialsarn:aws:iam::aws:policy/root-task/IAMCreateRootUserPasswordarn:aws:iam::aws:policy/root-task/IAMDeleteRootUserCredentialsarn:aws:iam::aws:policy/root-task/S3UnlockBucketPolicyarn:aws:iam::aws:policy/root-task/SQSUnlockQueuePolicy
AssumeRoot requires AWS Organizations with centralized root access enabled and appropriate permissions on the base identity.
User (Break-glass)
For static IAM user credentials, typically used for emergency access.
kind- Required. Must be
aws/user. credentials.access_key_id- AWS access key ID. Use
!envto reference environment variables. credentials.secret_access_key- AWS secret access key. Use
!envto reference environment variables. credentials.region- AWS region for API calls.
credentials.mfa_arn- Optional. MFA device ARN. When set, Atmos prompts for TOTP code during authentication.
credentials.webflow_enabled- Optional. Defaults to
true. Set tofalseto disable browser-based authentication fallback. spec.endpoint_url- Optional. AWS-compatible base endpoint URL for SDK calls, useful for Floci, LocalStack, and other test endpoints.
Instead of storing credentials in configuration, use atmos auth user configure to store them securely in the system keyring.
Browser-Based Authentication (Automatic Fallback)
When neither configuration nor keyring entries provide credentials, Atmos automatically initiates an OAuth2 PKCE flow via the AWS sign-in service. This provides the same convenient web-based authentication that SSO users already enjoy, without requiring static access keys.
Authentication priority:
- Static credentials from
atmos.yaml(access_key_id+secret_access_key, including!envreferences) - Credentials stored in the system keyring (via
atmos auth user configure) - Browser-based OAuth2 PKCE flow (when
webflow_enabledistrue, which is the default)
To explicitly use the browser flow without removing or changing configured IAM access keys, add
--webflow to an aws/user login. This skips cached temporary sessions and configured credentials
only for that invocation, then writes the newly issued temporary credentials to the usual session cache:
atmos auth login --profile=legacy --identity=cp-root/admin --webflow
Atmos does not consult ambient AWS credentials (environment variables, ~/.aws/credentials, instance profiles) for aws/user identities — credentials must be supplied through one of the three sources above.
If the keyring is reachable but the stored entry is unreadable (corrupted, missing fields, permission denied), Atmos reports the keyring read failure directly instead of silently falling back to the browser flow. This makes it possible to diagnose keyring issues rather than guessing why the browser flow opened.
How it works:
- Atmos starts a local callback server on an ephemeral port
- Opens your default browser to the AWS sign-in authorization endpoint
- Exchanges the authorization code for temporary credentials using PKCE
- Caches a refresh token for 12-hour session reuse
Subsequent authentications within the 12-hour window reuse the cached refresh token, avoiding repeated browser prompts. Credentials refresh automatically every 15 minutes.
In non-interactive environments (CI/CD), Atmos displays a URL that can be opened manually.
Disabling browser authentication:
Credential Process
For credentials that come from an external helper such as okta-aws-cli, aws-sso-cli, aws-vault, Granted, or a corporate SAML tool. Atmos runs the helper, which follows the AWS credential_process protocol, and uses the credentials it prints.
kind- Required. Must be
aws/credential-process. credentials.credential_process- Required. The command to run. Atmos executes it through the platform shell, like the AWS SDK for Go does:
sh -con Linux and macOS, and%COMSPEC% /S /C "<command>"on Windows (the command line is passed verbatim, so quoted paths survive). A command copied from~/.aws/configtherefore runs as written, and shell features such as pipes and environment variable expansion work. The AWS CLI itself does not use a shell: it splits the command into arguments. Keep the command free of shell-only syntax if you want the same line to also work in an AWS CLI profile. The helper's stdin and stderr are passed through to your terminal, so it can prompt for MFA or print browser-login instructions when you run Atmos interactively. credentials.region- Optional. Default AWS region written to the Atmos-managed AWS config.
spec.endpoint_url- Optional. AWS-compatible base endpoint URL for SDK calls, useful for Floci, LocalStack, and other test endpoints.
This identity is standalone: it has no via, because its credentials come from the helper. Atmos rejects via, session, principal, access_key_id, secret_access_key, and mfa_arn on this kind, before running any helper in the chain. The helper owns the session, so a session.duration would have no effect. Use aws/user for IAM user access keys.
Behavior:
- Credentials are used as returned. Atmos makes no STS call and never prompts for MFA. The helper is responsible for any MFA prompt.
- Caching. Atmos writes the credentials to its managed AWS files together with their expiration, and reuses them instead of running the helper again while they have at least 15 minutes of lifetime left. Credentials with less time left than that are refreshed before they expire, so a helper that returns credentials valid for 15 minutes or less runs on every invocation.
atmos aws credential-processraises that threshold with--min-validity. - No expiration. If the helper returns credentials without an
Expiration, Atmos runs the helper on every invocation because it cannot know how long they stay valid. - No keyring storage. Helper output is never stored in the system keyring, on any command. The helper stays the source of truth, and
atmos auth logoutremoves any stale entry an older version left behind, without--keychain. - Timeout. The helper must finish within one minute, and this limit is not configurable. Atmos then stops it and returns within a few seconds, even when the helper started child processes that keep running. A helper that waits for an MFA code or a browser login can therefore time out. Complete that login in the helper first, or run
atmos auth login --identity=<name>in a terminal so the credentials are cached before a non-interactive caller needs them. - No prompts under a captured terminal. Atmos only prompts (identity selection, MFA, credentials) when both stdin and stderr are terminals. When a parent process such as the AWS CLI captures stderr, Atmos fails with an explanation and a hint instead of hanging. Log in first with
atmos auth login. - Web console.
atmos auth consoleworks with these identities only when the helper returns temporary credentials that include aSessionToken. Long-lived access keys fail with a session token error, because the AWS federation endpoint requires a session. - Safe errors. If the helper fails or prints invalid output, Atmos reports which fields are missing or invalid without echoing any credential values.
Chaining from a Credential Process
Credentials from a helper often represent a base session. Chain aws/assume-role identities from it to reach other accounts:
Each time prod-admin needs fresh credentials, Atmos asks corp-base for its credentials first. corp-base reuses its cached credentials while they have at least 15 minutes left, or runs the helper again when they are closer to expiring or carry no Expiration.
Using Atmos Identities from the AWS CLI
The opposite direction is also supported. Any Atmos identity can serve as an AWS CLI profile through the atmos aws credential-process command, which prints credentials in the same credential_process format. It never prompts, so log in first when the identity needs an interactive login.
Choosing Between User, Ambient, and Credential Process
aws/user- You have an IAM user with long-lived access keys. Atmos calls STS
GetSessionTokenand handles MFA for that user. aws/ambient- Credentials already exist in the environment, such as IRSA, an EC2 instance profile, an ECS task role, or an
AWS_PROFILE. Atmos passes them through. aws/credential-process- You already have a command that prints temporary credentials. Atmos runs that command and caches the result.
Ambient
For credentials that the environment already provides, such as IRSA on EKS, an EC2 instance profile, an ECS task role, or a profile selected with AWS_PROFILE. The aws/ambient identity resolves credentials through the AWS SDK default credential provider chain and does not clear credential environment variables or disable IMDS.
kind- Required. Must be
aws/ambient. principal.region- Optional. AWS region used for SDK calls.
Because aws/ambient returns real AWS credentials, other identities can chain from it:
For a cloud-agnostic passthrough that leaves the whole environment untouched, use the ambient kind. See the ambient credentials example for more.
Subscription
For targeting a specific Azure subscription using credentials from an Azure provider.
kind- Required. Must be
azure/subscription. via.provider- Required. Name of an Azure provider to obtain credentials from.
principal.subscription_id- Required. Azure subscription ID to target.
principal.location- Optional. Default Azure region for resources.
principal.resource_group- Optional. Default resource group for resources.
The Azure subscription identity inherits credentials from the provider and sets subscription-specific environment variables (AZURE_SUBSCRIPTION_ID, ARM_SUBSCRIPTION_ID, etc.) for Terraform and other Azure tools.
For a detailed walkthrough with examples, see the Azure Authentication Tutorial.
PIM Role Activation
For activating a PIM-eligible Azure resource role just-in-time. The identity chains from an existing Azure identity and, on authentication, runs the Azure Resource Manager PIM self-activation for a role the authenticated principal is eligible for.
kind- Required. Must be
azure/pim-role. via.identity- Required (or
via.provider). The Azure identity whose token holds the eligibility to activate.via.provideris also accepted but less common. principal.role_definition_id- Required. The full role definition id (the API needs the id, not a name).
principal.scope- Required. The scope to activate at - a subscription, resource group, or resource ARM id.
principal.duration- Optional. Go-style activation duration (for example
8h), converted to the ISO-8601 the API requires. Azure enforces the role's PIM activation-policy maximum server-side, so a longer value is rejected by Azure - Atmos does not pre-clamp it. When omitted, the role's policy default applies. principal.justification- Optional default justification recorded with the activation. A per-invocation justification from the
--justificationglobal flag or theATMOS_AUTH_JUSTIFICATIONenvironment variable overrides this default. Resolution order:--justification>ATMOS_AUTH_JUSTIFICATION>principal.justification> interactive prompt.
Unlike assume-role, azure/pim-role mints no new credentials. Azure RBAC evaluates roles by object id at request time, so the activation elevates the existing principal server-side and the identity returns the parent credentials unchanged, now carrying the active role. This lets it sit transparently in a chain ahead of atmos terraform, atmos auth exec, the AKS exec plugin, or an MCP server.
On authentication it short-circuits if an active assignment already covers the scope (so it does not re-request every command), attaches to a pending approval request instead of filing a duplicate, and reports a missing eligibility distinctly from a failed activation. In a non-interactive context with no justification, it fails fast with guidance to pass --justification or set ATMOS_AUTH_JUSTIFICATION.
This covers Azure resource roles. Entra directory roles and PIM for Groups activate through different APIs and are separate (future) identity kinds.
Service Account
For impersonating a GCP service account using credentials from a GCP provider.
kind- Required. Must be
gcp/service-account. via.provider- Required. Name of a GCP provider (
gcp/adcorgcp/workload-identity-federation). principal.service_account_email- Required. Email of the service account to impersonate.
principal.project_id- Optional. GCP project ID. If not set, extracted from service account email.
principal.scopes- Optional. OAuth scopes for the impersonated token. Defaults to
https://www.googleapis.com/auth/cloud-platform. principal.lifetime- Optional. Token lifetime (e.g.,
3600s,1h). Default is 1 hour, maximum is 12 hours. principal.delegates- Optional. Chain of service accounts for multi-hop impersonation.
The service account identity uses the IAM Credentials API to generate access tokens. Requires the base identity to have roles/iam.serviceAccountTokenCreator on the target service account.
Project
For setting GCP project context without authentication. Useful for targeting a specific project when credentials come from a provider or parent identity.
kind- Required. Must be
gcp/project. via.provider- Optional. Name of a GCP provider to obtain credentials from.
principal.project_id- Required. GCP project ID to target.
principal.region- Optional. Default GCP region for resources.
principal.zone- Optional. Default GCP zone for resources.
The project identity sets environment variables (GOOGLE_CLOUD_PROJECT, CLOUDSDK_CORE_PROJECT, GOOGLE_CLOUD_REGION, etc.) for Terraform and gcloud tools.
Atmos Pro
The atmos/pro identity is a passthrough over the atmos/pro provider: it forwards the provider's Atmos Pro session so linked integrations (e.g. github/sts) can use it. It requires via.provider.
kind- Required. Must be
atmos/pro. via.provider- Required. Name of the
atmos/proprovider this identity authenticates through.
You authenticate and run as this identity (atmos auth login --identity atmos-pro). The github/sts integration can reference it via via.identity, or bind to the provider directly via via.provider.
Identity Chaining
Identity chaining allows you to create complex authentication flows where one identity is used to obtain another.
Chain Rules:
- Chains can be arbitrarily deep:
provider → identity → identity → ... → identity via.providerandvia.identityare mutually exclusiveaws/user,aws/ambient, andaws/credential-processidentities don't require aviafield- Circular dependencies are detected and rejected
Session Configuration
Configure session durations at the identity level to override provider defaults.
IAM user limits: 15m-12h (no MFA) or 15m-36h (with MFA)
Component-Level Overrides
Override authentication settings for specific components in your stack configuration.
Component auth configuration is deep-merged with global auth. Component identities override global identities with the same name.
For components that need multiple identities authenticated simultaneously, see Required.
Default Identity
Mark one identity as the default to use when no identity is explicitly specified:
Only one identity should be marked as default. If multiple identities have default: true, the behavior is undefined.
Using Profiles for Role-Based Access
Use Atmos profiles to define different identity configurations for various team roles. Each profile is a directory containing YAML configuration files.
Profile structure:
profiles/
├── developer/
│ └── auth.yaml # Developer identity config
├── platform/
│ └── auth.yaml # Platform engineer identity config
└── ci/
└── auth.yaml # CI/CD identity config
Activate a profile based on your role:
# Developers use the developer profile
atmos --profile developer terraform plan myapp -s dev
# Platform engineers use the platform profile
atmos --profile platform terraform apply myapp -s prod --identity prod-deploy
# CI/CD uses the ci profile
ATMOS_PROFILE=ci atmos terraform apply myapp -s prod
OCI registry user
Use a standalone oci/user identity for registry username/password or personal access token
authentication. It requires no provider:
auth:
identities:
registry-reader:
kind: oci/user
spec:
registry: ghcr.io
username: company-bot
password_env: GHCR_TOKEN
spec.registry- Exact registry hostname, with a port if needed. Omit schemes and repository paths. Credentials are restricted to this host.
spec.username- Registry username or service account name.
spec.password_env- Optional name of an environment variable containing the password or token. If configured, it must be populated at login. Omit it to use a masked interactive prompt.
atmos auth login --identity registry-reader
atmos auth whoami --identity registry-reader
atmos auth logout --identity registry-reader --keychain --force
Credentials are stored in the configured realm-scoped keyring. The identity does not publish
passwords into shell environment variables, Docker configuration, or whoami output.
Reference it from plugins.registries.<name>.identity to enable
authenticated plugin registry operations.
For cloud-federated access, use an AWS or Azure identity with an ECR or ACR integration instead.
Related Commands
Authenticate with a configured identity
Show current authentication status
Start a shell with identity credentials
Execute a command with identity credentials
Export credentials as environment variables
List available identities
Store IAM user credentials in the keyring