Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OIDC login to Pulumi Cloud #697

Open
blampe opened this issue Oct 1, 2024 · 2 comments
Open

Add support for OIDC login to Pulumi Cloud #697

blampe opened this issue Oct 1, 2024 · 2 comments
Labels
kind/enhancement Improvements or new features

Comments

@blampe
Copy link
Contributor

blampe commented Oct 1, 2024

As a user, I would like to perform updates against the Pulumi Cloud backend without needing to hard-code an access token.

A possible implementation would be to automatically mount an OIDC service account token using a projected volume, as provided by Kubernetes:

      volumes:
        - name: oidc-token
          projected:
            sources:
              - serviceAccountToken:
                  audience: urn:pulumi:org:ORG_NAME
                  path: token
                  expirationSeconds: 3600
      containers:
        - name: pulumi
          volumeMounts:
            - name: oidc-token
              mountPath: /var/run/secrets/pulumi
          env:
            - name: PULUMI_OIDC_TOKEN_FILE
            - value: /var/run/secrets/pulumi/token

How would the audience value be determined? Perhaps a new top-level spec element in the Workspace and/or Stack? Would it be the literal audience or would it be higher-level parameter(s) like organization (similar to pulumi/auth-actions)?

spec:
  cloud:
    organization: contoso
    requested-token-type: urn:pulumi:token-type:access_token:organization

How is the token consumed by the CLI? Ideally an environment variable would be natively supported, similar to PULUMI_ACCESS_TOKEN. Otherwise one would need to exchange the token by hand on each RPC operation. Ideally we'd teach the CLI to exchange the token on-the-fly, to allow for long-running stacks (necessitating a mid-flight refresh).

@blampe blampe converted this from a draft issue Oct 1, 2024
@cleverguy25
Copy link

Added to epic #586

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Oct 1, 2024
@blampe blampe added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Oct 1, 2024
@blampe
Copy link
Contributor Author

blampe commented Oct 1, 2024

Need to follow up with Cloud to see if this is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
No open projects
Status: No status
Development

No branches or pull requests

3 participants