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

Move domain validation checks for URI/Username to service startup #590

Merged
merged 2 commits into from
May 18, 2022

Conversation

haydentherapper
Copy link
Contributor

These checks were done once per request. These instead can be static
checks done on service startup. This enforces that the Username and URI
configs appropriately set the SubjectDomain and IssuerUrl fields, with
no scheme just for the SubjectDomain field for Username.

Signed-off-by: Hayden Blauzvern hblauzvern@google.com

Summary

Ticket Link

Fixes

Release Note


These checks were done once per request. These instead can be static
checks done on service startup. This enforces that the Username and URI
configs appropriately set the SubjectDomain and IssuerUrl fields, with
no scheme just for the SubjectDomain field for Username.

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2022

Codecov Report

Merging #590 (7659a0e) into main (f334c15) will increase coverage by 0.83%.
The diff coverage is 81.53%.

@@            Coverage Diff             @@
##             main     #590      +/-   ##
==========================================
+ Coverage   48.44%   49.28%   +0.83%     
==========================================
  Files          21       21              
  Lines        1515     1540      +25     
==========================================
+ Hits          734      759      +25     
  Misses        707      707              
  Partials       74       74              
Impacted Files Coverage Δ
pkg/challenges/challenges.go 40.45% <ø> (-2.90%) ⬇️
pkg/config/config.go 63.47% <81.53%> (+6.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f334c15...7659a0e. Read the comment docs.

Copy link
Contributor

@nsmith5 nsmith5 left a comment

Choose a reason for hiding this comment

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

😍 Heck yes. Failing fast on bad config is a way better operator experience than logging errors. Thanks for moving all the URI related validation early ❤️

Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

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

lgtm

@haydentherapper haydentherapper merged commit e1fe2f8 into sigstore:main May 18, 2022
@haydentherapper haydentherapper deleted the validate-confi branch May 18, 2022 07:15
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.

4 participants