Create Federated Identity On a Service Account
Federated identities link an identity provider to a specific service account, defining which tokens can impersonate that service account and what permissions they receive.
Prerequisites
Before creating a federated identity, ensure you have:
- An identity provider created (see Step 1 above)
- A service account with appropriate IAM roles (see Service Accounts)
- Knowledge of the token claims you want to match (subject, repository, branch, etc.)
Configuration Steps
Step 1: Navigate to Service Accounts
Navigate to IAM → Service Accounts in your Thalassa Cloud Console.
Step 2: Select Service Account
Select the service account you want to configure federation for.
Step 3: Create Federated Identity
Click “Add Federated Identity” or “Workload Identity Federation”.
Step 4: Configure Federated Identity
Fill in the federated identity configuration:
Identity Provider:
- Identity Provider: Select the identity provider you created in Step 1
- This links the federated identity to your configured OIDC issuer
Token Matching:
Configure how tokens are matched to this federated identity:
Subject Claim: Specify the expected
sub(subject) claim value- Example for GitHub Actions:
repo:myorg/myrepo:ref:refs/heads/main - Supports wildcards for pattern matching
- This is the primary claim used to match tokens
- Example for GitHub Actions:
Additional Claims (Optional): Configure additional claims to match
- Common claims:
repository,repository_owner,ref,environment - Use claim matching to restrict access to specific repositories, branches, or environments
- Example: Match tokens only from the
mainbranch by settingref: refs/heads/main
- Common claims:
API Scopes:
Set the Thalassa Cloud API scopes to include in the returned bearer token:
- API Scopes: Select one or more API scopes
- Common scopes:
read,write,admin - Scope selection determines what actions the bearer token can perform
- Follow the principle of least privilege: only grant the minimum scopes required
- Common scopes:
Expiry (Optional):
Configure when the federated identity should be revoked:
- Expiry Date: Set an optional expiration date
- Useful for temporary access or project-based workloads
- After expiry, token exchange will fail for this federated identity
- Plan ahead for long-running workloads and set reminders to rotate
Step 5: Review and Save
- Review your configuration
- Click “Create Federated Identity” or “Save”
- The federated identity is now active and ready to use