Repository navigation
Conversation
…orkload identity tenant ids
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds keyless authentication for GCP Pub/Sub destinations through Workload Identity Federation. Opt-in per Outpost instance: with it off (the default), the API, destination schema and behavior are unchanged.
A GCP Pub/Sub destination needs a service account key today. GCP organizations created since May 2024 block key creation by default, and some users can't get an exception. With Workload Identity Federation, Outpost signs a short-lived token for the tenant, the user's GCP project trusts Outpost's issuer, and Google exchanges the token for a short-lived access token. No key is created or stored.
How it works
WORKLOAD_IDENTITY_ISSUER(a public HTTPS URL) and a signing key. Outpost serves the discovery document and JWKS under/workload-identity.tenant:<tenant_id>), and grants that subjectroles/pubsub.publisheron the topic. The portal shows the issuer and subject to copy.sub = tenant:<tenant_id>, exchanges it at Google STS, and publishes.A tenant only ever gets a token with its own subject, so Google rejects it at another tenant's provider.
auth_methodselect (service_account_keydefault,workload_identity) + fields withvisible_whenauth_method= key)auth_method=workload_identitycredentials.service_account_jsonin responses""for workload identity destinations (stays required in OpenAPI so released SDKs still parse)^[A-Za-z0-9._:@-]+$, ≤120 chars (they go into the subject and IAM principal)GET /tenants/:tenant_id/workload-identityOperators who render destination forms themselves need to support
visible_whenand show the issuer/subject, only if they turn the feature on. Turning it off again makes workload identity destinations fail delivery until switched to a key (documented).Changes
internal/config,internal/workloadidentity):issuer,signing_key/signing_key_file,verification_keys/verification_keys_file(extra public keys for rotation). RSA ≥2048 (RS256) or EC P-256 (ES256);kid= RFC 7638 thumbprint. Partly configured = startup error.internal/destregistry): newvisible_whenfield property ({key, values[]}): a field applies only while another field holds one of those values.requiredapplies to visible fields only; a value in a hidden field is rejected. Generic, usable by other providers.auth_methodselect and credentialsworkload_identity_provider,service_account_email. Token exchange throughgolang.org/x/oauth2/google/externalaccountwith a supplier that mints the tenant's token. The emulatorendpointkeeps precedence.GET /tenants/:tenant_id/workload-identityreturns{issuer, subject}for UIs.visible_when, shows issuer and subject when Workload Identity Federation is selected, clears the other method's credentials on switch.visible_whenin the custom UI guide and OpenAPI. The portal setup guide for GCP Pub/Sub is rewritten to setup steps for both methods, like the other destinations' guides (334 → ~85 lines); its workload identity section is dropped when the feature is off.Other improvements:
CopyButtongetstype="button"; inside a form it submitted the form.Verification
main,auth_method=workload_identityis rejected, and the new routes return 404.visible_whenvalidation, create/update/switch, and token exchange against a fake STS.Not in this PR
service_account_jsonoptional in the spec (breaking for typed SDKs).AssumeRoleWithWebIdentityand Azure federated credentials).🤖 Generated with Claude Code