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

Don't require a GitHub token #134

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

jku
Copy link
Member

@jku jku commented Mar 16, 2024

The new extremely-dangerous-public-oidc-beacon current-token branch allows us to fetch the JWT without a GitHub token. This makes local testing easy, which makes developing the suite easier.

Changes:

  • git clone the beacon repo to get the token
  • Do this in a loop until token is valid (95% of the time the first try succeeds)
  • Cache the token so we only do this once in a test run
  • Remove all mention of github token in arguments, comments and docs

Some additional notes:

  • retry times are tweaked from the values upstream (and special values are set for the interactive case)
  • The caching could be smarter (could return cached value only if it's valid) but maybe this simple thing works?

Release Note

  • --github-token is no longer required to run signing tests

@jku jku force-pushed the use-token-via-git branch from 01a39ca to c8e0d70 Compare March 16, 2024 09:29
The new extremely-dangerous-public-oidc-beacon current-token branch
allows us to fetch the JWT without a GitHub token. This makes local
tests much nicer.

Changes:
* git clone the beacon repo to get the token
* Do this in a loop until token is valid
* Cache the token so we only do this once in a test run
* Remove all mention of github token in arguments, comments and docs

Some additional notes:
* retry times are tweaked from the values upstream (and special
  values are set for the interactive case)
* The caching could be smarter (could return cached value only
  if it's valid) but maybe this simple thing works?

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku jku force-pushed the use-token-via-git branch from c8e0d70 to 3e31f93 Compare March 16, 2024 09:31
@jku
Copy link
Member Author

jku commented Mar 16, 2024

This makes the test run significantly faster as well.

That is just a result of the caching which we could have done with the previous approach as well so it's kind of unrelated.

@jku jku marked this pull request as ready for review March 18, 2024 08:14
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks @jku!

@woodruffw woodruffw merged commit 9271967 into sigstore:main Mar 18, 2024
3 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