UNIAC_PLATFORM_URL
selects the platform API origin for auth login and auth token, with
https://api.uniac.ai as the default.
Sign-in
login obtains a token through browser sign-in, where account creation is
also available. Sign-in requires user interaction. The CLI prints the sign-in
URL before opening the browser. Login continues independently of the browser
helper; the printed URL remains available to open manually.
Without
--manual, login receives the redirect through a listener on a random
localhost port and waits up to five minutes. The default platform uses
uniac.ai for sign-in. Another platform takes its sign-in website from
--host or UNIAC_AUTH_HOST.
A platform accepts only tokens from its own sign-in website. login checks
the returned token with the platform it signs in to, through the account-level
project listing. When that platform rejects the token, login fails and the
stored session is unchanged. Otherwise login stores the token in
~/.uniac/auth.json, with file permissions 0600, and reports whether the
platform accepted it or gave no answer. There is one stored session per
platform; signing in replaces that platform’s session and preserves the
others. The CLI stores the token as sign-in returns it.
Credential selection and renewal
project create, link, deploy, status and auth token use a nonempty
UNIAC_ACCESS_TOKEN first, otherwise the stored session for the addressed
platform. Linked deploy and status use the binding’s platform origin;
auth token uses UNIAC_PLATFORM_URL, independently of the project binding.
An override is used as given. A stored token is usable until 60 seconds
before its recorded expiry, and deployment needs a usable credential before
its first network call.
Deployment checks the selected credential with the platform before image
work and uses that credential throughout the operation. auth token reads the
local sessions only.
A stored token is used until it expires. uniac auth login stores the token
that sign-in returns, with the expiry sign-in sets.
Stored sessions
auth status checks the stored sessions and prints Logged in. when no
platform rejects its session; commands that use credentials read
UNIAC_ACCESS_TOKEN themselves. Logout removes the stored
sessions from this machine, and issued tokens stay valid at the platform until
they expire.
uniac auth -h lists subcommands; each subcommand’s -h prints its usage.
status, token and logout take no flags or arguments. Help and invalid
invocations leave sessions unchanged, and login and status are the
subcommands that use the network.
