-
Notifications
You must be signed in to change notification settings - Fork 288
documentation of RS256/JWKS and OIDC id_token support #1337
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
Conversation
|
@jaredscheib Please review the content here related to Generic auth, and we can merge the changes to our recent changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting documentation with your feature changeset, @CXCV -- we really appreciate it. I've made a number of requests below in regards to organization of ideas and syntax.
I haven't tested this as I don't have an ADFS sandbox, so I'm just going to take it on faith that what you've written here is accurate and conceptually comprehensive :)
| ``` | ||
|
|
||
| **JWKS Signature Verification** | ||
| If the provider implements OpenID Connect with RS256 signatures (as Microsoft ADFS does), you need to provide a JWKS document (holding the ca certificates) so we can validate the RSA signatures against. These certificates are regularly rolled over, so we'll fetch them from the JWKS_URL on demand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- what is a
ca certificate? i don't see it mentioned at https://tools.ietf.org/html/rfc7517#section-4.7 so we can validate the RSA signatures against, as long as i understand the concept correctly, would more grammatically be replaced by, to validate the RSA signatures against.oragainst which the RSA signatures can be validated.- can you put in parenthesis after
rolled oversomething like(expired)or something else that clarifies what "rolled over" means? - could you add the concept of
id_token parsinghere somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CA = Certificate Authority; I'll replace it with "certificate chain" which is used in the RFC.
| #### Examples | ||
| ##### OpenID Connect (OIDC) / Active Directory Federation Services (ADFS) | ||
|
|
||
| See [Enabling OpenId Connect with AD FS 2016](https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/development/enabling-openid-connect-with-ad-fs) for a walk through of the server configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenId-->OpenID- could you either change
AD FS-->ADFSor otherwise change all of the other instances toAD FSfor consistency?
|
|
||
| Also, on the Chronograf login page, the text on the authentication button changes from `Log in with generic` to `Log in with GitLab`. | ||
|
|
||
| #### Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm fine with introducing an Examples section, but that's up to @stevebang. if we do, @stevebang, it may be good to add examples for the others in a separate PR.
|
|
||
| See [Enabling OpenId Connect with AD FS 2016](https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/development/enabling-openid-connect-with-ad-fs) for a walk through of the server configuration. | ||
|
|
||
| Exports for chronograf (e.g. in /etc/default.chronograf): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chronograf --> Chronograf
|
|
||
| The generic OAuth 2.0 provider is very similar to the GitHub provider, but | ||
| you are able to set your own authentication, token, and API URLs. | ||
| Additionally, this provider implements OpenID Connect (OIDC) id_token parsing, as implemented by Active Directory Federation Services (ADFS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure if this comment is necessary, since each export is required by different services and we don't direct attention to any other specific ones here. a user would still be able to see that ADFS is supported in the JWKS Signature Verification section. the only thing to keep is the concept of id_token parsing, which i have proposed moving to that section. could you move id_token parsing there and remove this comment?
| Exports for chronograf (e.g. in /etc/default.chronograf): | ||
| ```sh | ||
| PUBLIC_URL="https://example.com:8888" | ||
| GENERIC_CLIENT_ID="chronograf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a likely client id, or would we be more likely to see an arbitrary string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For AD FS, you need to keep it simple. AD FS is splitting this string on colons, resulting in server-side failures. Probably the use a url-parser here, but I think this is not required by the specs. I've added a info to the docs.
|
I am trying to make ADFS 4.0 work with chronograf oauth2. Does it mean that currently chronograf does not support oauth2 under Generic identity provider for ADFS 4.0? |
|
Hi @monitoringit, I believe once the work from influxdata/chronograf#2526 is merged into Chronograf (pending resolution of merge conflicts), Chronograf will support ADFS 4.0 as a Generic OAuth2 identity provider. |
|
Jared...may be my understanding is wrong about oauth2 ....but as i understand this PR is about using openid and oauth2 together...can we still purely use oauth2 with ADFS without using any openid reference? |
|
@monitoringit I've made the OpenID id_token handling optional, see USE_ID_TOKEN option |
|
cxcv, So is the inference here is that i should be able to use chronograf oauth2 with ADFS 4 if i dont use open id references. I am using chronograf v1.4.0.0 with below settings and i am having challenges making it work. Do you have any experience making it work with using only ADFS oauth2? |
|
@monitoringit as @jaredscheib mentions -- ADFS 4 isn't going to work with Chronograf v1.4.0.0. Once the work from influxdata/chronograf#2526 is merged into Chronograf, Chronograf will support ADFS 4.0 as a Generic OAuth2 identity provider. I believe this is planned for 1.4.3.0...and we are doing final testing on this week. Stay tuned for the release! Please let us know once you get a chance to try it out. |
|
Thanks timhall for clarification. Will checkout 1.4.3 once released. |
|
@monitoringit -- I made a small mistake here. We have some generic OAuth fixes in 1.4.3 -- but that will NOT be sufficient for the ADFS 4 config. We do have that fix merged into master now... but that would mean you would have to build from source and give it a shot. We are looking at generating nightlies at the moment. I'm curious if you are just downloading bits from our website...building yourself...or ?? |
|
@monitoringit To further clarify: this ADFS feature is now currently in the Chronograf |
|
And note, @CXCV and all: this docs PR will be merged once Chronograf 1.5.0.0 (or the next version) is ready for release, which is currently scheduled for about 2 weeks from now. |
|
Thank you! Can you share ur chronograf adfs configuration ( set of env vars with values)?...i tried with chrono config as shared above in the this thread... |
|
@monitoringit I believe the information you're looking for is available in the content of this PR, which can be found at https://github.com/cxcv/docs.influxdata.com/blob/8d7f5d0ba50d0e85da589e096c9e3698f8989229/content/chronograf/v1.4/administration/managing-security.md#openid-connect-oidc--active-directory-federation-services-ad-fs. Try that and let us know how it goes. Thanks! |
|
Thanks!! Will try it out once 1.5 is released |
|
@monitoringit As @jaredscheib writes, 1.5 will bring OpenID support for AD FS, and this PR includes a example section with all the environment variables. This will be the right thing to do. It is possible (but discouraged) to authenticate against AD FS without OpenID, but you won't have username, email address or groups available then. The trick there is, to set the GENERIC_API_KEY to the only available data: "sub". This results in your username? being some random string, which is intended to be an random identifier, not your username. The env for this not recommended auth is like: The problem here is, that there's no userinfo available. The userinfo is included in an extra "id_token", which requires some extra processing. And that extra processing is exactly what this patch implements. Cheers |
|
This functionality was included in Chronograf 1.4.4 and is currently available. |
|
@monitoringit As per what @sanderson said above, this functionality is now live in Chronograf 1.4.4.x. I'd be interested to hear your experience with it! |
|
Will try it out and share my experience |
related code changes in influxdata/chronograf#2526