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

WIP: Add OIDC authentication #169

Closed
wants to merge 2 commits into from
Closed

WIP: Add OIDC authentication #169

wants to merge 2 commits into from

Conversation

rnpridgeon
Copy link
Contributor

@rnpridgeon rnpridgeon commented Jan 23, 2020

Transitioned to WIP as I investigate extending Jetty's existing Authenticator to more appropriately suite the needs of all our CP components. The existing implementation only supports promptable authorization code flows and client-credential (BYOT). At first I was thinking Bring Your Own Token was fine but in retrospect it's kind of annoying for things like POC or experimentation adding unnecessary friction. I'll also be adding support for resource owner password credential flow (ROPG).

ROPG will facilitate the use of HTTP Basic Authentication by clients backed by and OIDC provider. It's usage is highly discouraged and not supported by all OIDC providers. We will want to document this. ROPG takes away the biggest advantage provided by OAuth, no apis see your password, but still provides us with an authentication protocol independent of the backing IdPs.

Additional notes about the implementation:

Jetty's version is being bumped to 9.4.23.v20191118; this was done so we could include the jetty-openid package.

Jersey's version is being bumped to 2.3.0 to handle a breaking changed introduced by Jetty.
jetty/jetty.project#4121 (comment)

@rnpridgeon
Copy link
Contributor Author

rnpridgeon commented Jan 23, 2020

pom.xml Outdated Show resolved Hide resolved
return new ResourceCollection(Resource.newClassPathResource("static"));
}

public static void main(String[] args) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So looks like this was manually tested?

I.e. you can use this example call the main method and pass params.

Can you comment in this file or in the commit message

  • An example of how you ran this, (against Okta)?
  • What the expected behavior is if no creds are are passed, if the creds are wrong, if the creds are right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I wasn't super sure how to write a test for this. I'll see if there is a mock OIDC provider in the jetty code base somewhere. If memory serves they use google as a provider in their tests which isn't super awesome. I'll try to think of something

  1. OIDC (the protocol) isn't vendor specific, but their admin apis are. We could link their docs I suppose. In the long run(not the initial PR) I'd like to support dynamic client registration in rest utils but thats for another day.

  2. Ack will add some comments around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

found a mock OpenIdProvider I think 👍

pom.xml Outdated Show resolved Hide resolved
@rnpridgeon rnpridgeon changed the title Add OIDC authentication WIP: Add OIDC authentication Jan 24, 2020
@jeffhuang26
Copy link
Member

Hi @rnpridgeon , Is there one page for this PR?

This pull request was closed.
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