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

Add new Issuer and Principal abstractions #558

Merged
merged 1 commit into from
May 5, 2022

Conversation

nsmith5
Copy link
Contributor

@nsmith5 nsmith5 commented May 5, 2022

Summary

Adds identity package with Issuer and Principal abstractions as well as an IssuerPool implementation that matches a token against a pool is issuers to authenticate. This work is part of a larger refactor of our identity issuer code as described here.

Future work includes:

  • Reimplementing our existing issuer abstractions to fit this interface including
  • Changing our server to use the issuer pool instead of the current implementation
  • Removing all the dead code once the new abstraction is in place

Ticket Link

Partially addresses #275 along with the other future works describe above

Release Note

NONE

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2022

Codecov Report

Merging #558 (7256e2a) into main (05aa4bb) will increase coverage by 0.95%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #558      +/-   ##
==========================================
+ Coverage   35.68%   36.64%   +0.95%     
==========================================
  Files          18       19       +1     
  Lines        1415     1441      +26     
==========================================
+ Hits          505      528      +23     
- Misses        851      853       +2     
- Partials       59       60       +1     
Impacted Files Coverage Δ
pkg/identity/issuerpool.go 100.00% <100.00%> (ø)
pkg/ca/fileca/load.go 58.62% <0.00%> (-10.35%) ⬇️

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 05aa4bb...7256e2a. Read the comment docs.

dlorenc
dlorenc previously approved these changes May 5, 2022
pkg/identity/principal.go Outdated Show resolved Hide resolved
pkg/identity/issuer.go Show resolved Hide resolved
pkg/identity/issuer.go Outdated Show resolved Hide resolved
pkg/identity/principal.go Outdated Show resolved Hide resolved
pkg/identity/issuer.go Show resolved Hide resolved
pkg/identity/issuerpool.go Outdated Show resolved Hide resolved
pkg/identity/issuerpool.go Show resolved Hide resolved
haydentherapper
haydentherapper previously approved these changes May 5, 2022
Copy link
Contributor

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

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

Looks great! Just a couple nits and the other open comment on pointer vs val

pkg/identity/issuer.go Outdated Show resolved Hide resolved
pkg/identity/issuerpool_test.go Outdated Show resolved Hide resolved
pkg/identity/issuerpool_test.go Show resolved Hide resolved
haydentherapper
haydentherapper previously approved these changes May 5, 2022
pkg/identity/principal.go Outdated Show resolved Hide resolved
Includes principal and issuer abstracts and an issuerpool

Signed-off-by: Nathan Smith <[email protected]>
@nsmith5
Copy link
Contributor Author

nsmith5 commented May 5, 2022

Huh I can't merge. Maybe because I rerequested Dan's review? I don't have permissions to dismiss that unfortunately

@haydentherapper haydentherapper merged commit 152c20d into sigstore:main May 5, 2022
@haydentherapper
Copy link
Contributor

Merged, it needs write permissions.

@nsmith5 nsmith5 deleted the issuer-abstraction branch May 5, 2022 23:02
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.

None yet

4 participants