https://oidc.sailresearch.com, and they exchange a token for short-lived
credentials of their own.
You ask for tokens in the Sailbox’s egress policy.
Each entry under oidc_identity_tokens gives the audience, the service the
token is for, and the file in the Sailbox to keep the token in:
oidc_identity_tokens.
AWS
Create an identity provider for Sail in your AWS account, once:<account_id> and <org_id>.
GET /v1/whoami returns your
organization ID.
trust-policy.json
aws.json
env to Sailbox.create.
Google Cloud
Create a workload identity pool and a provider for Sail that accepts only your organization’s tokens:google-policy.json
roles/iam.workloadIdentityUser on the service account and add
--service-account=<name>@<project>.iam.gserviceaccount.com to the
create-cred-config command.
Other services
Any service that accepts OpenID Connect tokens can trust Sail’s issuer the same way. Use the audience the service expects, and have your code read the token from its file each time it calls the service.Token claims
Every token Sail signs identifies the Sailbox and your organization:When a policy changes
Setting a policy on a running Sailbox writes its token files before the call returns. When you remove an entry, or clear the policy, Sail stops rewriting that entry’s file. The token already in it stays valid until it expires, within an hour. A Sailbox that starts from another one’s checkpoint gets new tokens, which name the new Sailbox, before it can reach the network. Credentials that a process got with the other Sailbox’s token before the checkpoint stay in its memory until they expire.Who your cloud trusts
Anyone who can set an egress policy on one of your Sailboxes can ask for a token with any audience. A trust rule that matches your whole organization therefore trusts every Sailbox your organization runs. To trust fewer, match a specificsub, such as org:<org_id>:sailbox:<sailbox_id>.
Code in the Sailbox can read the token and the credentials the cloud gives
for it, and can use them anywhere until they expire. Give the role or
service account only what the work in the Sailbox needs.
Allowlists
The Sailbox exchanges its token with the cloud itself. Under an allowlist, add the hosts that exchange uses as well as the ones your code calls. For AWS, add*.amazonaws.com,
or list the STS host for your region, such as sts.us-west-2.amazonaws.com,
and the hosts of the services you use: AWS SDKs exchange the token with the
STS endpoint of the region they are configured for. For Google Cloud, add
sts.googleapis.com and the Google APIs you use.