-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: restrict login to users matching a certain group #884
Conversation
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
Closing as discussed in #867 (comment). |
I'm quite surprised about this decision: the referenced discussion describes a cumbersome workaround, including creating custom Keycloak flows and carefully adding the Keycloak plugin to multiple locations in these flows. Furthermore, it's an unofficial, single-developer plugin and it limits the solution space to Keycloak. On the other hand, a pull request with a proper solution at PEP (Policy Enforcement Point) exists and gets rejected. Would you please elaborate on this decision? |
We happily welcome open discussion from anyone, not just those already mentioned. We're not saying that this feature isn't useful, but rather that it's better to implement it as a separate app or use LDAP as an alternative. I agree that the Keycloak extension isn't a perfect solution, but what about my point above? What does this PR provide that another app doesn't (user_ldap or otherwise)? This is the first time I'm hearing about PEP as well, so please explain. |
Thank you Edward for keeping an open mind on this. Regarding your point(s): Please take a look at Keycloaks Authorization Service Architecture for Policy Enforcement Point. It means that e.g. Keycloak can define resource access, but the resource server (Nextclouds user_oidc) has to enforce it. |
Let's continue the discussion in #867 (comment) in which I made a response there. |
Reopening as per #867 (comment), will test and merge within the next few days. |
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.
Could you please rebase the branch so that it starts at the tip of the main branch and resolve any conflicts? We'd like to test that it works on the latest version before merging, thank you.
b397b76
to
b3f4372
Compare
I rebased the pull request, unit tests and lints are passing and I did some manual tests in my setup of the feature. |
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.
Looks sane to me. Tested, works fine ✔️
A small improvement could be to check if the leading and trailing slashes are there and add them if not.
The labels/hints in the settings need to be as much descriptive as possible. See inline comments.
@julien-nc the delimiters are now added automatically if the first one is missing. There was one check failing, but it was the same one as on the main branch (Integration tests / php8.1-mysql-stable27) |
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.
Nice! Could you run composer run cs:fix
to make the lint/cs check pass?
I'll merge after that. We can ignore the failing integration tests. They fail because Php 8.3 is installed instead of 8.1 for some reason.
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Co-authored-by: Julien Veyssier <julien-nc@posteo.net> Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
Signed-off-by: Armin Berger <contribute@arminberger.ch>
I still had an old version of the php-cs-fixer. I did now rebase, install the updated dependencies and run @julien-nc is should now pass all tests |
Thanks for merging and your work in general on open source. @julien-nc |
@bergerar Thank you for your patience, your perseverance, your nice words and your contribution! |
Fixes #867