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

Bitbucket Pipelines OIDC Provider Support #1257

Open
sled opened this issue Jul 4, 2023 · 3 comments
Open

Bitbucket Pipelines OIDC Provider Support #1257

sled opened this issue Jul 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@sled
Copy link

sled commented Jul 4, 2023

Bitbucket recently added OIDC support for Bitbucket Pipelines. However it doesn't allow the user to change any of the claims, this means the audience is automatically set to ari:cloud:bitbucket:workspace/<workspace uuid>.

Here's an example taken from the Bitbucket documentation:
image

Before I start to write a provider for Bitbucket, I'd like to know whether it's feasible at all because Fulcio's documentation states that the aud claim needs to be set to sigstore.

Further constraints:

  • the sub is dynamic and changes on each pipeline run because it includes the BITBUCKET_STEP_UUID
  • the iss is also dynamic because it includes the organization's name in the URL
@sled sled added the enhancement New feature or request label Jul 4, 2023
@sled
Copy link
Author

sled commented Jul 4, 2023

The dynamic issuer would be possible by using a wildcard (MetaIssuer)

@haydentherapper
Copy link
Contributor

Hey, thanks for reaching out. Audience not being customizable is a blocker, so we will need to ask bitbucket to support customized audiences. The subject of the certificate will need to be a stable identifier, but I think we can work around this and look at other claims that are available to see if we can construct one. Check out the OID documentation for some ideas on a suitable cert subject.

@sled
Copy link
Author

sled commented Jul 10, 2023

I've opened a discussion on Bitbucket's Community Board here regarding the configurable audience claim. Unfortunately Bitbucket is not too responsive from past experience.

In the meantime I'll try to use a token exchange with a Google Cloud service account, i.e. Bitbucket Token -> Google Token -> Fulcio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants