Workload Identity Federation (WIF)RFC 8693 Token ExchangeAWS β€’ GCP β€’ Azure Multi-Cloud

CI/CD Pipeline to Cloud Resource Access

Eliminate static cloud credentials in automated deployment pipelines. Federate GitHub Actions, GitLab CI, and ArgoCD with AWS STS, Google Cloud, and Microsoft Azure using AuthHub RFC 8693 token exchange, fine-grained SpiceDB ReBAC governance, instant pipeline freeze kill-switches, and automated SHA-256 Merkle audit trails compliant with SOC 2, FINRA Rule 3110, and SEC Rule 17a-4.

1Architecture Overview & Threat Matrix

In algorithmic trading desks and quantitative finance platforms, automated deployment pipelines (Terraform, OpenTofu, Helm) require privileged access to provision production VPCs, trading compute instances, and market-data streaming infrastructure. Storing static, long-lived cloud credentials (such as AWS IAM access keys or GCP service account JSON keys) inside CI/CD secret vaults introduces catastrophic risks: secret sprawl, malicious pull-request runner exfiltration, unrevokable backdoors, and audit attribution gaps.

AuthHub replaces all static cloud credentials with Workload Identity Federation (WIF) powered by RFC 8693 OAuth 2.0 Token Exchange. Ephemeral OIDC JSON Web Tokens (JWTs) issued by CI/CD runners (GitHub Actions, GitLab CI, ArgoCD) are cryptographically validated by AuthHub, evaluated against fine-grained SpiceDB ReBAC policies, and exchanged for strictly short-lived (15–60 min) downstream cloud STS credentials.

Credential Strategy Comparisonsrc/services/token-exchange/
Security DimensionLegacy Static Keys (IAM Secrets)AuthHub WIF Token Exchange
Credential LifetimeInfinite (until manual rotation)Ephemeral (15–60 min TTL)
Exfiltration ResistanceZero: stolen keys work anywhereCryptographically bound to runner context
Branch / Env ProtectionManual secret scoping in repo UIZanzibar caveated branch policies
Emergency Kill-SwitchHours to locate and delete keys<50ms global pipeline freeze via Redis PDP
Audit AttributionGeneric IAM User or Service AccountExact Git SHA, actor, repo, & run ID in WORM

2OIDC Issuer Registration & Claim Normalization

AuthHub automatically performs OpenID Provider Configuration Discovery against registered CI/CD orchestrators. Incoming runner JWTs are verified against cached JWKS sets, and custom claims (repository, ref, environment) are normalized into standardized Workload Identity attributes.

Register GitHub Actions Issuer
curl -X POST https://fga.authhub.cloud/api/v1/workload-identity/issuers \
  -H "Authorization: Bearer ${AUTHHUB_ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "GitHub Actions (Algo Trading Repos)",
    "issuer_url": "https://token.actions.githubusercontent.com",
    "allowed_audiences": ["https://fga.authhub.cloud"],
    "claim_mappings": [
      { "source_claim": "repository", "target_attribute": "repo", "required": true },
      { "source_claim": "ref", "target_attribute": "git_ref", "required": true },
      { "source_claim": "environment", "target_attribute": "env", "default_value": "development" },
      { "source_claim": "actor", "target_attribute": "author", "required": true },
      { "source_claim": "job_workflow_ref", "target_attribute": "workflow", "required": true }
    ],
    "scope_restrictions": [
      { "pattern": "cloud:deploy:*", "action": "allow" },
      { "pattern": "admin:*", "action": "deny" }
    ],
    "max_token_lifetime_seconds": 1800,
    "auto_provision_enabled": true
  }'

3Deterministic Identity Resolution (UUIDv5)

Unlike human users with static email identifiers, CI/CD runner jobs are short-lived execution nodes. AuthHub deterministically computes a persistent Workload Identity UUIDv5 using the fixed namespace 6ba7b810-9dad-11d1-80b4-00c04fd430c8 combined with the canonical string issuer_url::subject.

Resolver Engine (UUIDv5 & SHA-256 Lookup)src/services/token-exchange/workload-identity-resolver.ts
// 1. Build canonical string from issuer and subject
const canonicalString = `${issuerConfig.issuer_url}::${subject}`;
const canonicalHash = createHash('sha256').update(canonicalString).digest('hex');

// 2. Derive deterministic UUIDv5 identity in AuthHub namespace
const workloadId = uuidv5(canonicalString, AUTHHUB_NAMESPACE_UUID);

// 3. Find or auto-provision workload identity record
const identity = await repository.findByCanonicalHash(tenantId, canonicalHash);
if (!identity && issuerConfig.auto_provision_enabled) {
  return await repository.create(tenantId, {
    id: workloadId,
    canonical_hash: canonicalHash,
    issuer_id: issuerConfig.id,
    display_name: String(claims.repository || subject),
    attributes: mappedAttributes
  });
}

4SpiceDB ReBAC Schema for Cloud Deployments

AuthHub evaluates pipeline access using Zanzibar relationships and contextual caveats. A repository runner cannot deploy to production unless its branch matches the strict release policy, the repository is bound to the target cloud role, and no active emergency freeze is in effect.

SpiceDB Schema Definition
definition pipeline/repository {
    relation admin: identity/user
    relation allowed_environment: pipeline/environment
}

definition pipeline/environment {
    relation parent_repo: pipeline/repository
    relation target_cloud_role: cloud/role
}

definition cloud/role {
    relation tenant: tenant/organization
    relation authorized_repo: pipeline/repository
    relation emergency_freeze: system/kill_switch

    permission assume_role = (authorized_repo->allowed_environment->target_cloud_role) 
        with branch_matches_environment 
        - emergency_freeze->frozen
}

caveat branch_matches_environment(git_ref string, environment string) {
    (environment == "production" && git_ref == "refs/heads/main") ||
    (environment == "staging" && (git_ref == "refs/heads/main" || git_ref == "refs/heads/develop")) ||
    (environment == "development")
}

5Multi-Cloud STS Federation (AWS, GCP, Azure)

Once AuthHub approves the token exchange, it mints an ephemeral AuthHub JWT that the CI/CD runner presents directly to AWS STS, Google Cloud STS, or Azure Entra ID to assume the target deployment role without any persistent secrets.

GitHub Actions Workflow Example (AWS STS).github/workflows/deploy.yml
- name: Exchange GitHub OIDC for AuthHub Token
  id: authhub
  run: |
    # 1. Fetch raw OIDC token from runner
    RAW_JWT=$(curl -s -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" \
      "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=https://fga.authhub.cloud" | jq -r '.value')

    # 2. RFC 8693 Token Exchange with AuthHub
    RESP=$(curl -s -X POST https://fga.authhub.cloud/oauth/token \
      -d "grant_type=urn:ietf:params:oauth:grant-type:token-exchange" \
      -d "subject_token=${RAW_JWT}" \
      -d "subject_token_type=urn:ietf:params:oauth:token-type:jwt" \
      -d "resource=urn:cloud:aws:iam::123456789012:role/AlgoTradingDeployerProd" \
      -d "scope=cloud:deploy:algo-execution")

    echo "AUTHHUB_TOKEN=$(echo $RESP | jq -r '.access_token')" >> $GITHUB_OUTPUT

- name: Assume AWS Production Role
  run: |
    CREDS=$(aws sts assume-role-with-web-identity \
      --role-arn "arn:aws:iam::123456789012:role/AlgoTradingDeployerProd" \
      --role-session-name "GitHubRun-${GITHUB_RUN_ID}" \
      --web-identity-token "${{ steps.authhub.outputs.AUTHHUB_TOKEN }}" \
      --duration-seconds 900)

    export AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -r '.Credentials.AccessKeyId')
    export AWS_SECRET_ACCESS_KEY=$(echo $CREDS | jq -r '.Credentials.SecretAccessKey')
    export AWS_SESSION_TOKEN=$(echo $CREDS | jq -r '.Credentials.SessionToken')

    terraform apply -auto-approve

6Production Dual-Control & Environment Attestation

Financial regulatory mandates (such as FINRA Rule 3110 and SOC 2 CC6.2) require strict segregation of duties. Production deployment pipelines must enforce the Four-Eyes Principle. AuthHub integrates with GitHub Environment Reviewers and Okta/Entra SCIM to verify that approvals originate from active, authorized risk and engineering leads before minting cloud credentials.

1. GitHub Protected Env

Requires 2 distinct reviews from the designated algo-risk-approvers team before runner starts.

2. SCIM Identity Audit

AuthHub verifies that each approver has an active status and required certification tasks completed in the corporate IdP.

3. In-Toto Attestation

The release bundle is cryptographically attested with SLSA Level 3 provenance before cloud provisioning starts.

7Emergency Pipeline Freeze & Automated Kill-Switch

If an anomaly, supply chain tampering alert, or sudden market volatility halt is detected, security operators can trigger an instant pipeline freeze. AuthHub propagates the freeze across all multi-cloud environments in under 50ms via Redis PDP caches.

Trigger Global Pipeline Kill-Switch
curl -X POST https://fga.authhub.cloud/api/v1/governance/kill-switch \
  -H "Authorization: Bearer ${SECOPS_EMERGENCY_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "pipeline:deploy:*",
    "reason": "Supply chain compromise detected in dependency build",
    "duration_seconds": 3600
  }'

8Immutable WORM Audit Trail & Hardware Root-of-Trust

Every token exchange request, validation result, and cloud STS grant is recorded in a Write-Once-Read-Many (WORM) append-only Merkle tree satisfying SEC Rule 17a-4 electronic records preservation mandates.

Thales Luna Cloud HSM Root-of-TrustOptional Paid Enterprise Add-On

For financial institutions requiring dedicated FIPS 140-2 Level 3 hardware guarantees, AuthHub integrates with Thales Luna Cloud HSM via PKCS#11. Hourly Merkle batch root hashes are signed inside customer-allocated hardware security modules, creating a tamper-evident chain of custody that independent compliance auditors can mathematically verify without revealing pipeline source code.