Closed kevintrannz closed 8 years ago
Isn't this a duplicate from #586 and #1661 ? Can you have a look at them?
I just wrote a short bit about this on stackoverflow.com http://stackoverflow.com/a/32062458/1098564 You can take the client secret out altogether but I don't think it buys you anything in security unless you change the jhipster architecture to use a server-side proxy.
@jdubois: Yes. This is duplicate with #586 and #1661 tickets but We hope that this channel will open for community discussion / inputs to fix this issue properly.
No solution found in both tickets:
https://aaronparecki.com/articles/2012/07/29/1/oauth2-simplified
After registering your app, you will receive a client ID and a client secret. The client ID is considered public information, and is used to build login URLs, or included in Javascript source code on a page. The client secret must be kept confidential. If a deployed app cannot keep the secret confidential, such as Javascript or native apps, then the secret is not used.
http://alexbilbie.com/2014/11/oauth-and-javascript
Above is a few of links we could find over the web for references. Hope we have more inputs in this thread. Thank you.
@sdoxsee: Yes, Remove them out in JHipster code would be a quick workaround in this case.
@kevintvh yes it's always open for improvements. I'm clearly not an expert in that field, and I'm not using OAuth2 at the moment.
Thanks @jdubois.
There are a few questions in our JHipster chat (https://gitter.im/jhipster/generator-jhipster) but no one anwser them. Just pick one of questions:
So I would like to create a ticket here for everyone to discuss / fix this issue.
Check src/main/webapp/scripts/components/auth/provider/auth.oauth2.service.js
Does back end check is necessarily? when client_id and client_secret known to the world and anyone can bypass this check.
src/main/java/com/app/config/OAuth2ServerConfiguration.java
Anyone has experience on OAuth2 exposing client secret to the world and why we need to use it as everyone knows the secret against the backend.
Please give us your ideas. Thank you.