Authentication¶
The CLI authenticates product commands only with AK/SK-shaped credentials. Every request is signed; the platform decides per command whether the signing principal is allowed to perform it.
Which credential kind you want¶
Kind |
Access-key id |
Who it is for |
|---|---|---|
Service user |
|
scripts, CI and automation inside one Account |
Workforce STS |
|
a human operator, time-bounded |
Workload identity |
— (token file) |
a deployed runtime or CI job with an OIDC token |
Service users¶
fgai configure \
--profile prod \
--account-id "$ACCOUNT_ID" \
--access-key-id "$ACCESS_KEY_ID" \
--secret-access-key-file /run/secrets/fgai-secret
A secret on the command line is refused: --secret-access-key would put it in
the process table. --secret-access-key-stdin and FGAI_SECRET_ACCESS_KEY are
the other two accepted sources; see Configure.
Service users do not get web-console access, and an Account owns them directly — they are not workforce users with a key attached. A service user that exists in the workforce directory only cannot sign a CLI request.
Temporary STS credentials¶
Temporary credentials use an ASIA… access-key id, a secret key, and a
mandatory session token:
fgai configure \
--profile prod \
--account-id "$ACCOUNT_ID" \
--access-key-id "$STS_ACCESS_KEY_ID" \
--secret-access-key-file /run/secrets/fgai-sts-secret \
--session-token "$STS_SESSION_TOKEN"
Static and temporary credentials sign the same canonical request. STS requests
additionally sign and send X-FGAI-Security-Token.
Human and platform-admin access¶
Human bearer tokens are not CLI credentials. Account root and workforce users
use the tenant web applications or a signed credential configured with fgai configure / fgai auth workforce login.
Platform administration is available on the web admin console and the
separate fgai-admin distribution (PLT-0092). Only creating a new standalone
Account and creating its root user are browser-only. fgai-admin is a different
binary with a different command surface; this tenant guide does not document its
operator verbs. An operator signs in with a workforce session whose permission
set carries platform-operator authority, or mints an ASIA session with
fgai-admin identity sts assume-role; a static AKIA… key is refused by the
server for operator verbs (PLT-0088).
Workload identity federation¶
Workload identities are for CI/CD and deployed runtimes. They exchange an external OIDC token for a short-lived platform access token:
fgai sts exchange-token \
--profile prod \
--subject-token-file ./github-oidc.jwt \
--audience hello-api \
--json
The token-exchange helper issues a workload JWT for the requested service
audience, and prints it for the runtime to use on its OWN HTTP calls. It is not
a stored CLI credential and it cannot drive a product command: those are
authenticated only with an AWS-shaped access key: a static AKIA… or a temporary ASIA… STS
credentials.
What the status codes mean¶
401 — the request was not authenticated. The credential is missing, malformed, expired, or signed for a different region. Start with
fgai auth status.403 — the request WAS authenticated and the action was refused for that principal. The credential is fine; the grant is not. Narrow principals are refused account-wide reads by design.
Authorization is decided by the platform on every call, not by the CLI, so a
403 is an answer rather than a client error.