-
Notifications
You must be signed in to change notification settings - Fork 81
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
Enable external auth support and disabling of user/group mgmt #809
Conversation
5eb0cf8
to
04f7b33
Compare
Question, Would it make sense to just have the backend remove these from the list of permissions, instead of adding extra logic? |
Thanks for the feedback! I will take a look to see if this can be updated in the backend. |
04f7b33
to
8b55ee5
Compare
@himdel I made the following update that reduced some of the usage you pointed out: It was necessary to utilize the pattern for the user profile, to manage the human readable permission set, and for cases where permissions can be applied to groups (change_group permission); but you still need to hide adding/removing users from the group detail. |
Makes sense 👍 :) One last thing I'm confused about... |
@himdel Thanks for the above. I set the default to match what was defined in Paths here: https://github.com/ansible/ansible-hub-ui/pull/809/files#diff-ee5c055de3e53b22e883d37e2b0ef701779dfbd11691ca5a6504df271b53e008L29 I'm not sure updating it to Perhaps you have a thought here? |
hm, I see what you mean .. we can't pass the same Sounds like we need to distinguish between external login uris for Though I wonder if we could make it simpler by leaving |
e413d69
to
81fc7c2
Compare
@himdel I like the simplicity of the |
81fc7c2
to
a58b72e
Compare
* Enable development setup for external authentication * Disable user/group management Related to ansible/galaxy_ng#889
8bf6f17
to
748909a
Compare
@chambridge I'm on PTO this week, removing the review request for now, feel free to re-add :) If you do end up going the route of "UI_EXTERNAL_LOGIN_URI can either be an absolute url, or a relative one absolute to UI root", this is currently misconfigured as it's missing the UI_BASE_PATH prefix, at least for standalone. (Unless |
|
@newswangerd based on my responses above I'm not sure what you would like me to update. Feel free to take a look at the responses and give an update; I'll re-request a review. |
Looks like you addressed all my questions. |
@@ -4,6 +4,7 @@ const webpackBase = require('./webpack.base.config'); | |||
const proxyHost = process.env.API_PROXY_HOST || 'localhost'; | |||
const proxyPort = process.env.API_PROXY_PORT || '5001'; | |||
const apiBasePath = process.env.API_BASE_PATH || '/api/automation-hub/'; | |||
const uiExternalLoginURI = process.env.UI_EXTERNAL_LOGIN_URI || '/login'; |
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.
It just occurred to me that this won't work. This data needs to be passed to the UI by the API.
These configurations only affect the UI at build time, not at run time. For this to work, the UI would have to be recompiled for each environment that it's deployed in since the SSO login URL will presumably be different for every deployment.
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 production deployment the value will be the default /login
. The login flow does a window.location.replace()
which will hit the login redirect in the API https://github.com/ansible/galaxy_ng/pull/889/files#diff-f00335e89bdbb1cc98ff1161298369ec25e0fcaf7baccc1cfff44b3e733bef71R54 it doesn't put it under the UI base path. Which should then trigger the SSO login calls.
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.
ah, so the redirrect happens on the api side. That makes sense.
In dev. env. it breaks with Edit: nevermind. Backend and UI not in sync. |
@ZitaNemeckova Do you have some logs or a link? I'm not encountering an error so I'm having trouble reproducing to try and resolve. |
…ansible#809)" This reverts commit 503910e.
@chambridge It was my env. not having UI in sync with backend. Sorry for false alarm. |
Related to ansible/galaxy_ng#889