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

Deprecate custom JWT and Oauth2 #10421

Closed
VinodAnandan opened this issue Sep 15, 2019 · 8 comments
Closed

Deprecate custom JWT and Oauth2 #10421

VinodAnandan opened this issue Sep 15, 2019 · 8 comments

Comments

@VinodAnandan
Copy link
Contributor

VinodAnandan commented Sep 15, 2019

Hi,

I am bringing this old discussion (#9120) back as it's relevant to the recent security issues (#10401) with Jhipster. The user Identity, Authentication, and Authorization are very security-sensitive functionalities and we should give priority to security.

OpenID Connect securely uses both Oauth2 and JWT to implement secure Identity and Access Management. The OIDC has already covered multiple countermeasures to prevent attack patterns. We shouldn't reinvent insecure IAM with custom JWT and Oauth2 implementation. We should learn from Facebook. Facebook had multiple bug bounty with custom Oauth2, even though they have improved eventually they got hacked because of it. https://nat.sakimura.org/2018/10/09/facebook-hack-and-oauth-user-authentication-2-min-oauth/

So please consider using OpenID Connect instead of custom JWT and Oauth2. OpenID Connect is a pre-vetted way to utilize secure federated IAM which includes Oauth2 and JWT. Open Banking depends on FAPI (extended version of OIDC) (  https://openid.net/2018/07/12/the-uk-open-banking-implementation-entity-adopts-the-openid-foundation-financial-grade-api-fapi-specification-certification-program/ ).

Even for the OpenID Connect integration, we have to be very careful as an insecure integration can also result in security issues. We have to use the OpenID foundation certified integrations wherever possible. If it's not available, we need to confirm the compliance with the standard by utilizing the test automation suite from the OpenID foundation.

https://openid.net/certification/
https://openid.net/certification/instructions/

If you need more information, please let me know.

@yelhouti , @mraible , @deepu105 , @avdev4j , @jdubois , @pascalgrimaud , @jhipster/developers
 
Thanks and Regards,

Vinod

@mraible
Copy link
Contributor

mraible commented Sep 15, 2019 via email

@PierreBesson
Copy link
Contributor

PierreBesson commented Sep 16, 2019

Hello everyone, remember that JHipster is a hobby community project of volunteers. We are not making money ! We don't employ anyone.
We never promised any security guarantees to our users or any guarantee of any kind. It is explicitly stated in the Apache 2 license that "this software is provided AS IS".

So I'm totally against removing the jwt option which is our most popular option. This would harm the project as it is more complex and require an external server setup (keycloak, okta,uaa). However I'm not against having a write up on our website to explain that oauth2 is the more secure option.

[Edit] sorry for accidentally closing this issue.

@pascalgrimaud
Copy link
Member

pascalgrimaud commented Sep 16, 2019

I don't understand well this ticket. I think @VinodAnandan talks about our current implementation of OAuth2/OIDC, not about the JWT authentication.

Even for the OpenID Connect integration, we have to be very careful as an insecure integration can also result in security issues

Better than words, can you have a look at our code in generator-jhipster or here https://github.com/jhipster/jhipster-sample-app-oauth2
Then, can you point us the code your consider as unsecured, so we can discuss ?

@vishal423
Copy link
Contributor

I am also not in favor of removing other authentication options. They are useful in different contexts. However, I feel that we can have OIDC authentication as default.

@mraible
Copy link
Contributor

mraible commented Sep 16, 2019 via email

@VinodAnandan
Copy link
Contributor Author

VinodAnandan commented Sep 17, 2019 via email

@pascalgrimaud
Copy link
Member

We can't choose the options for our end-users. They are responsible for their choice and the code once if it's in production. The result would be the same if they coded it. So I think we'll stay with JWT by default.

Anyway, I don't understand what you mean here:

My suggestion is to discourage custom JWT, Oauth2, and OIDC

Then, I don't have answer for my question:

Better than words, can you have a look at our code in generator-jhipster or here https://github.com/jhipster/jhipster-sample-app-oauth2
Then, can you point us the code your consider as unsecured, so we can discuss ?

@pascalgrimaud
Copy link
Member

I think it can be closed.
Feel free to add new comment to discuss if needed

@pascalgrimaud pascalgrimaud added this to the 6.4.0 milestone Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants