Basaltic to AWS
You can also use an authenticated Basaltic role or service-account session. Call the token API withaudience: "sts.amazonaws.com", then exchange its JWT with AWS STS. In the AWS trust policy below, use the exact role or service-account subject from that proof. The VM flow below uses the metadata endpoint and guest helper.
You need an administrator in the target AWS account, a Basaltic VM with an
attached role, and guest-agent 1.15.11-1 or later for automatic file refresh.
The VM must reach AWS STS over HTTPS. AWS must reach Basaltic’s public discovery
and JWKS endpoints.
Permit the VM to request an AWS proof
Grant the attached Basaltic roleiam:GetWebIdentityToken on its own CRN,
restricted to basalt:IdentityTokenAudience = sts.amazonaws.com. Use the
VM identity policy example, then obtain a token inside the VM.
Its subject has this immutable form:
Register Basaltic in AWS
In the target AWS account, register the issuerhttps://iam.basaltic.sh with
client ID (audience) sts.amazonaws.com. An administrator can run:
- CLI
sts.amazonaws.com. Use the issuer URL, not a JWKS URL.
AWS obtains the verification keys from Basaltic’s discovery document.
See AWS OIDC provider setup.
Create an AWS role with this trust policy, replacing 123456789012 with the
target AWS account ID and the subject with your VM’s exact subject:
aws-trust.json
- CLI
Configure the workload
Start the token-file helper as the application user. With the systemd example from that page, configure the application’s environment:AWS_EC2_METADATA_DISABLED=true prevents an AWS client from falling back to the
Basaltic metadata credential endpoint, whose credentials are for Basaltic.
Do not configure static AWS access keys or another credential profile in this
application: those can take precedence over the web-identity provider.
The AWS CLI and compatible SDKs exchange the file’s current JWT and refresh
AWS credentials as needed. The guest helper independently refreshes the file.
Check support in your SDK’s assume-role credential provider.
BasalticWorker in your
AWS account. This command proves which identity is in use; test one permitted
application operation too.
To inspect the exchange directly without an existing AWS credential:
aws-session.json as a credential and delete it after use. The returned
access key, secret key, and session token are AWS credentials. Basaltic does not
hold or refresh them on the application’s behalf.
AWS sessions default to one hour and can last from 900 seconds to the role’s
maximum. They may outlive the five-minute Basaltic proof. Removing a VM’s Basaltic
role prevents new metadata proofs; use AWS’s session revocation controls to stop AWS
sessions already issued. See AWS STS session behavior.
AWS to Basaltic
AWS outbound federation turns an existing AWS identity into a separate signed JWT. An EC2 workload uses its instance-profile credentials to authenticate that request. Other AWS credentials, including an assumed role or IAM Identity Center session, can authenticate it too when permitted.Enable AWS outbound federation
An AWS administrator enables this once for the source account:- CLI
IssuerIdentifier. It resembles
https://ACCOUNT-SPECIFIC-ID.tokens.sts.global.api.aws.
Do not substitute the ordinary STS API endpoint.
See AWS outbound federation setup.
Grant the source AWS role permission to mint proofs for your Basaltic audience.
This AWS policy permits only the chosen audience and at most five minutes:
Register the AWS issuer in Basaltic
Register that exact issuer in the Basaltic account containing the target role.- Console
- API
- CLI
Open IAM → OIDC providers → Create provider. Enter
aws, the
account-specific issuer, and urn:example:basaltic:production as the allowed
audience.aws-worker, attach its required Basaltic permission
policies, and use this trust policy with your actual source AWS IAM role ARN:
sub, including its path. It differs
from the STS arn:aws:sts::...:assumed-role/.../session ARN returned by
GetCallerIdentity. See AWS token claims.
Mint and exchange from AWS
Use a regional STS endpoint and an AWS CLI version that includesget-web-identity-token. Run this under the source AWS role:
RS256 and ES384 identity tokens. AWS proof lifetimes
range from 60 to 3600 seconds, defaulting to 300. The regional endpoint is
required; the global STS endpoint does not serve this mint operation.
See GetWebIdentityToken.
Use the returned Basaltic bearer token for APIs or its temporary access-key
credentials for Basaltic S3. Mint and exchange again before the Basaltic session
expires. Keep the response private and remove it when the session is no longer
needed.
Deleting the Basaltic provider or changing its audiences blocks new exchanges.
Revoke existing Basaltic sessions separately. Disabling AWS outbound federation
is an account-wide change, so use it only when no other integration needs it.
AWS-issued outbound JWTs cannot be exchanged back into AWS through
AssumeRoleWithWebIdentity.

