-
Notifications
You must be signed in to change notification settings - Fork 113
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
Normalize domains in mentix provider authorizer driver #3121
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@mirekys This PR is to solve #3113 right? That issue was created because invites could not be accepted because the providers could not be authorized. Please take note of the following: When the user idp of the sender of the forward invite is a domein rather than a url (eg. reva/internal/http/services/ocmd/invites.go Lines 241 to 248 in 5eb6e70
ProviderInfo.Domain will be an empty string. This will make authorization fail as we found out in the tests.Previously the recipientProvider parameter was actually normalized but this has been removed (#2751). See also #2288.So I guess this recipientProvider needs to be normalized once more. And solve #2288 in the process.
|
@redblom You're right, it also needs normalization, thanks for pointing that out. If I understood the situation correctly, there is yet no exact specification on how the provider domains should look, and Reva should accept both the bare domain name & full URL, while the full URL is the preferable variant in the future? I'll update the PR accordingly |
I just simply removed the code and pass the provider as is, as it should be a responsibility of IsProviderAllowed endpoint to normalize value before checking |
Makes sense. |
Yeah I like that ! (there's obviously some personal preference from me here but I like this better ;) |
@mirekys @labkode in the |
I would vote for handling it in a single place (user manager), rather than doing it in all places idp is being used, but not sure whether it won't break something somewhere |
|
I realized, and tested, that this is not needed after all. So simply removing as you've already done in Next however the |
@antoonp
that can have 3 possible values:
I start thinking it would be cleaner to determine the required formats on each property, I think But I see a |
Merge cs3org#3121 into my debug branch
Oops, I used the GitHub online merge tool to merge this branch into my debug branch, and apparently it somehow allowed me to add commits to https://github.com/mirekys/reva/commits/fix-3113 - that's scary! |
78b8ad1
to
fdced33
Compare
Force push to someone else's GitHub account is also scary but looks like it did put the branch back in its correct state :/ |
@michielbdejong The Ci has changed on the master branch. You need to rebase this PR. |
While testing this code, I think there is one more change missing: I think the "service host" is already a FQDN, and parsing it in this way changes it to |
@labkode I think we should merge this PR asap |
Fixes #3113