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 a Basic Access Authentication Provider #766

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

andreaTP
Copy link
Contributor

I have a few "clean-up" tasks from removing the hand-written Client in Apicurio Registry.
This is an easy one, but I'm looking for guidance on how to port the Oidc one too.

The problem is that I need an HttpClient(or something like that / RequestAdapter etc.) to get the token(possibly during object creation), but this is used to construct the RequestAdapter object so we have a circular dependency.

Have you already faced this issue?
Do you have a solution that doesn't involve spinning a new, dedicated, HTTP client?

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I left a couple of comments.
Also if you want this published right away, maybe bump the minor?

@andreaTP
Copy link
Contributor Author

Fixed the spotBugs issues now.

Also if you want this published right away, maybe bump the minor?

Not needed, good to have in the long run but I don't strictly need it.

More interested in feedback regarding the Oidc one 🙂

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes!

@baywet baywet enabled auto-merge October 31, 2023 12:17
@baywet baywet merged commit abd2209 into microsoft:main Oct 31, 2023
8 checks passed
@baywet
Copy link
Member

baywet commented Oct 31, 2023

As for the OIDC provider, I agree that having support for it would be super interesting.
From what I've read in the code:

  • It depends on okHttp, so I don't think we could put it in abstractions, we might need to stand up another package.
  • The caching concern is mixed with the token acquisition concern, I'd deport that to a dedicated interface + class so people can store the cached tokens wherever they want (thinking about multiple web servers with a backplane scenario)
  • I'm not seeing code regarding the well known endpoints?

@andreaTP
Copy link
Contributor Author

Thanks a lot for getting back @baywet !

  • It depends on okHttp, so I don't think we could put it in abstractions

This is not a requirement, I can probably re-implement it based on the RequestAdapter

  • caching

I'm not 100% sure how it will look but we can work toward that, for sure

  • I'm not seeing code regarding the well known endpoints?

It's not used as the authentication mechanism that we are using depends only on a few variables that are passed through the constructor and they are not discovered dynamically.

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