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

Improve OIDCIssuer abstraction #275

Closed
nsmith5 opened this issue Dec 12, 2021 · 7 comments
Closed

Improve OIDCIssuer abstraction #275

nsmith5 opened this issue Dec 12, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@nsmith5
Copy link
Contributor

nsmith5 commented Dec 12, 2021

Description

To add an new class of oidc issuer (eg. spiffe, github workflow...) to fulcio requires touching a lot of different areas of the code base. Here are all the locations I can think of

I feel like these OIDC issuer types would be easier to test and probably easier to write if we make a interface for them all to obey and make the implementation details of each one abstracted from the rest of the code base.

Not sure what that interface would be. Has anyone gave this idea some thought already? It seems like at a high level, the issuers need to

  • Match against the issuer from a token (i.e to check "is this the right issuer for this token?")
  • Map its claims into x509 details
  • Validate a token? (Not 100% on this one as it kinda of seems like we use the same OIDC machinery to do this for all providers really..)
@nsmith5 nsmith5 added the enhancement New feature or request label Dec 12, 2021
@mattmoor
Copy link
Member

I definitely agree this is overdue for a refactor. This is leftover from when there were 2-3 options, and just keeps growing.

I'd be happy to give feedback / discuss if you have ideas!

@nsmith5
Copy link
Contributor Author

nsmith5 commented Dec 13, 2021

Sweet, I'll give it a little thought and share a WIP PR or something if I brew up an idea.

@nsmith5
Copy link
Contributor Author

nsmith5 commented Jan 28, 2022

Drafted a proposal for this change here https://docs.google.com/document/d/1PKAou7wEmEob4VOLq6rFlx5maOM5hkJ3XffZizfwdFw/edit?usp=sharing. Looking for some eyeballs before diving in to implementing

@haydentherapper
Copy link
Contributor

@nsmith5 Do you have an estimate as to the amount of work left for this refactor? Context is determining when to make a new release of Fulcio.

@nsmith5
Copy link
Contributor Author

nsmith5 commented May 17, 2022

Yup remaining work is as follows:

  • Make FulcioConfig obey the Issuer interface
  • Stick that in an IssuerPool and replace the current FulcioConfig usage
  • Break up all the issuer implementations in FulcioConfig and ChallengeResults one by one

So maybe a week or two?

@haydentherapper
Copy link
Contributor

Thanks. We'll likely cut the prerelease candidate from before this then, cherry-picking in any bug fixes.

@haydentherapper
Copy link
Contributor

Closing as this has been wrapped up

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

3 participants