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

OAuth2 via Environment Variable #489

Open
rejoshed opened this issue Jan 12, 2023 · 0 comments
Open

OAuth2 via Environment Variable #489

rejoshed opened this issue Jan 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@rejoshed
Copy link

rejoshed commented Jan 12, 2023

What happened?

I was trying to use an injected oauth2 token in an environment variable via a vault webhook and the following ProviderConfig

apiVersion: gcp.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
  name: gcp-nexus
  namespace: crossplane-system
spec:
  projectID: infrastructure-terraform-prj
  credentials:
    source: Environment
    env:
      name: GCP_INFRA_CROSSPLANE_POC

Currently OAuth2 tokens are supported if the input credentials cannot be parsed as JSON.

Unfortunately when using the source: Environment method of providing creds, the data goes through a different logic path and doesn't know to use OAuth2 if the data cannot be JSON parsed.

How can we reproduce it?

Use a provider config like above and put a valid oauth token into the env var.

What environment did it happen in?

Crossplane version:

Latest of Each -- Will flesh out shortly.

  • Cloud provider or hardware configuration
  • Kubernetes version (use kubectl version)
  • Kubernetes distribution (e.g. Tectonic, GKE, OpenShift)
  • OS (e.g. from /etc/os-release)
  • Kernel (e.g. uname -a)
@rejoshed rejoshed added the bug Something isn't working label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant