Skip to content

credctl auth

Synopsis

Terminal window
credctl auth [flags]

Description

credctl auth signs a JWT with the hardware-bound Secure Enclave key and exchanges it for short-lived AWS STS credentials via AssumeRoleWithWebIdentity. Touch ID prompts you to authorise the signing operation.

The default output format (credential_process) is compatible with the AWS CLI and SDKs. Add it to ~/.aws/config for transparent credential retrieval:

[profile credctl]
credential_process = credctl auth

Progress messages are written to stderr. Credential output goes to stdout.

Flags

FlagTypeDefaultDescription
--formatstringcredential_processOutput format: credential_process or env

Examples

Default output (credential_process format)

Terminal window
credctl auth
{
"Version": 1,
"AccessKeyId": "ASIAI...",
"SecretAccessKey": "...",
"SessionToken": "...",
"Expiration": "2026-03-04T12:30:00Z"
}

Stderr output:

Signing JWT with Secure Enclave...
Requesting temporary credentials from AWS STS...
Credentials valid until 2026-03-04T12:30:00Z

Environment variable export format

Terminal window
credctl auth --format env
Terminal window
export AWS_ACCESS_KEY_ID=ASIAI...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=...

Use with eval to set credentials in your current shell:

Terminal window
eval $(credctl auth --format env)
aws s3 ls

Exit codes

CodeMeaning
0Credentials retrieved successfully
1Error (device not initialised, AWS not configured, STS failure, or other error)

See also