Skip to content

add support for --root-issuer when generating CCI claims#438

Merged
di merged 2 commits into
di:mainfrom
meeech:use-root-issuer-cci
Jan 29, 2026
Merged

add support for --root-issuer when generating CCI claims#438
di merged 2 commits into
di:mainfrom
meeech:use-root-issuer-cci

Conversation

@meeech

@meeech meeech commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

make this default behaviour

#437

@di

di commented Jan 28, 2026

Copy link
Copy Markdown
Owner

/gcbrun

@meeech meeech force-pushed the use-root-issuer-cci branch 2 times, most recently from 6a9442c to 2d57461 Compare January 28, 2026 22:30
@meeech

meeech commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

@di sorry - reviewing contrib rules, realized i hadnt signed or updated the changelog, so did some force pushing

@meeech meeech force-pushed the use-root-issuer-cci branch from 2d57461 to e06e769 Compare January 28, 2026 22:32
@di

di commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Hmm, looks like our circleci config was only configured to run on pushes to main, I've changed the trigger to be on pushes to PRs or the default branch.

Opening/closing to see if I can kick off that job.

@di di closed this Jan 28, 2026
@di di reopened this Jan 28, 2026
@di

di commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Doesn't seem like it worked. @meeech can you force-push here again?

@meeech meeech force-pushed the use-root-issuer-cci branch from e06e769 to e183c41 Compare January 28, 2026 22:37
@di

di commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Not sure what I'm missing. AFAICT circleci is configured to run on PRs: https://github.com/di/id/blob/main/.circleci/config.yml

Here's the settings:
image

@meeech

meeech commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

I dont know if it will kick off on my PR if you dont have this enabled -
image

@di

di commented Jan 28, 2026

Copy link
Copy Markdown
Owner

Aha, that should do it. Mind pushing again?

make this default behaviour

di#437
Signed-off-by: meeech <4623+meeech@users.noreply.github.com>
@meeech meeech force-pushed the use-root-issuer-cci branch from e183c41 to 8138558 Compare January 28, 2026 22:50
@meeech

meeech commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

@di let me set it up on my fork and see why the cci job failing

@meeech

meeech commented Jan 28, 2026

Copy link
Copy Markdown
Contributor Author

OOOOO - duh on me. @di this is working as expected. A fork is not allowed to access OIDC token for the parent project. So this is behaving as designed for security reasons.

You can see my run here https://app.circleci.com/pipelines/github/meeech/id/2

@di

di commented Jan 29, 2026

Copy link
Copy Markdown
Owner

Ah, makes sense. At the very least, I think we will want to fail more gracefully when the ambient credential is not present.

@meeech

meeech commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

@di So I've updated ambient to use stderr. I think that was the mistake. Otherwise, what sort of graceful fail would you like to see? There error seems pretty clear about the source of the fail

question: should I make the same change for the buildkite code? it also references process.stdout for the error message.

CircleCI: the `circleci` tool encountered an error: oidc: error: failed to get oidc token: this project does not allow issuing tokens to forks
Error: exit status 1: oidc: error: failed to get oidc token: this project does not allow issuing tokens to forks

as far as the pipeline goes, we could make that 'sniff' if its a fork (env var CIRCLE_OIDC_TOKEN would be missing from the pipeline), so we could deliver the same message in the pipeline, but that feel redundant since the circleci binary gives a pretty clear message about why it failed.

Anyhow, I'm pretty flexible so let me know what you prefer

@di

di commented Jan 29, 2026

Copy link
Copy Markdown
Owner

There error seems pretty clear about the source of the fail

Yes, this works, thanks! I think we're good.

@di

di commented Jan 29, 2026

Copy link
Copy Markdown
Owner

/gcbrun

@di

di commented Jan 29, 2026

Copy link
Copy Markdown
Owner

@meeech Looks like you need to update the tests to match c432b86.

@meeech

meeech commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

@di will do. what about buildkite? want to keep it stdout for the error?

…ircleci binary

This then produces an error message of

```
 CircleCI: the `circleci` tool encountered an error: oidc: error: failed to get oidc token: this project does not allow issuing tokens to forks
Error: exit status 1: oidc: error: failed to get oidc token: this project does not allow issuing tokens to forks
```

Signed-off-by: meeech <4623+meeech@users.noreply.github.com>
@meeech meeech force-pushed the use-root-issuer-cci branch from c432b86 to b49bae0 Compare January 29, 2026 14:30
@di

di commented Jan 29, 2026

Copy link
Copy Markdown
Owner

/gcbrun

@di di merged commit 4a95f5c into di:main Jan 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants