-
Notifications
You must be signed in to change notification settings - Fork 542
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
Added JumpCloud support #797
Conversation
AspNet.Security.OAuth.JumpCloud/AspNet.Security.OAuth.JumpCloud.csproj
Outdated
Show resolved
Hide resolved
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.
This looks good so far. Please add tests by following an example of one of the existing providers that has a custom domain, such as Okta.
I'm probably missing something simple but I'm getting the following error when I try to build:
Of course I know it's not found as the package hasn't been published yet, how do I get past this? |
src/AspNet.Security.OAuth.JumpCloud/AspNet.Security.OAuth.JumpCloud.csproj
Outdated
Show resolved
Hide resolved
I have removed the custom authentication as looking through the documentation with JumpCloud there is no mention of it. I have added unit tests, also it looks like the domain is fixed and cannot be changed. |
src/AspNet.Security.OAuth.JumpCloud/AspNet.Security.OAuth.JumpCloud.csproj
Show resolved
Hide resolved
src/AspNet.Security.OAuth.JumpCloud/JumpCloudAuthenticationExtensions.cs
Show resolved
Hide resolved
test/AspNet.Security.OAuth.Providers.Tests/JumpCloud/JumpCloudAuthenticationOptionsTests.cs
Outdated
Show resolved
Hide resolved
src/AspNet.Security.OAuth.JumpCloud/AspNet.Security.OAuth.JumpCloud.csproj
Outdated
Show resolved
Hide resolved
…Cloud.csproj Co-authored-by: Martin Costello <[email protected]>
Before I merge this and prepare a release, can you confirm that you've tested this as working with the real JumpCloud service? |
Yes I have this working, happy to provide a URL privately |
/// <summary> | ||
/// Gets or sets the JumpCloud domain (Org URL) to use for authentication. | ||
/// </summary> | ||
public string? Domain { get; set; } |
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.
Does JumpCloud support configuring your own domain?
- If not, we shouldn't make the domain configurable and remove this property.
- If so, it would likely make sense to use
https://oauth.id.jumpcloud.com/
as the default domain when the user doesn't specify an explicit value.
CallbackPath = JumpCloudAuthenticationDefaults.CallbackPath; | ||
|
||
Scope.Add("openid"); | ||
Scope.Add("profile"); |
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.
In general, we try to limit the default scopes to the absolute required ones. For a standard-compliant OIDC provider, only openid
should be required.
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 just tested and it works fine with only openid
.
@martincostello I guess I'm late to the party, but that would be nice to address my two remarks before shipping a public version of this provider. |
Sorry, I was running the commands whilst also in a meeting so didn't see the notifications until just now. |
We could always unlist 7.0.4 and then do a 7.0.5 that has the changes you want made? |
Is that the secret sauce of being a x10 developer? Doing things in parallel? 🤣
Doesn't seem necessary to me: depending on @AaronSadlerUK's feedback, we'll still be able to give |
It would technically be a breaking change, but it's only been published for ~5 minutes and I think some one would need to be a 100x developer to have already integrated it and be broken by it. |
I can't see anywhere that a custom domain is documented... However, that's not to say the enterprise subscribers can't do it |
I guess it would be more clearly documented if it was possible (and AFAIK, JumpCloud is cloud-only and not offered as an on-premises product, so you can't even self-host it). @martincostello I'm not sure it's worth pushing a new release now. We can integrate these changes in a future version and document them, after all. As you said, folks are unlikely to massively start using this provider anyway 😄 |
Note: JumpCloud fully supports PKCE (for both public and confidential apps) so we'll also want to set |
I'll make these changes now as I've just rebased the new provider into the v8 branch anyway. |
@martincostello would it be possible to PR into the v6 version? The site I plan on using this with uses .NET 6 |
We don't typically backport new providers to older versions because it's additional maintenance for us. |
Ah ok, this site runs on Umbraco 10 (LTS) which uses .NET 6 (LTS) |
Added support for the JumpCloud OIDC application.
https://jumpcloud.com/support/sso-with-oidc