-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove (additional) CSRF check from public endpoints if a Bearer authentication header is present (OAuth 2) #5694
Comments
I'm not really a fan of adding new endpoints, especially such as implementing parts of yet another specification which in the end will lead to other people demanding other parts of the specification as well. Would the <?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>200</statuscode>
<message>OK</message>
</meta>
<data>
<enabled>true</enabled>
<id>lukas</id>
<quota>
<free>3909530726400</free>
<used>6657835832</used>
<total>3916188562232</total>
<relative>0.17</relative>
<quota>-3</quota>
</quota>
<email>lukas@nextcloud.com</email>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups>
<element>Engineering</element>
<element>General</element>
</groups>
<display-name>Lukas Reschke</display-name>
</data>
</ocs> |
This would be great, thanks! |
"It depends". Our OCS API automatically supports converting the responses to JSON by appending Would it be possible to add nested support for this into Moodle? I could then take a look at the CSRF check. {
"ocs":{
"meta":{
"status":"ok",
"statuscode":200,
"message":"OK"
},
"data":{
"enabled":"true",
"id":"lukas",
"quota":{
"free":3909529214976,
"used":6657835832,
"total":3916187050808,
"relative":0.17,
"quota":-3
},
"email":"lukas@nextcloud.com",
"phone":"",
"address":"",
"website":"",
"twitter":"",
"groups":[
"Engineering",
"General"
],
"display-name":"Lukas Reschke"
}
}
} |
For reference, where is the response for
I'll have a look into that and will report back. Thanks! :) |
Route registered at
server/apps/provisioning_api/lib/Controller/UsersController.php Lines 219 to 241 in 3511114
|
@LukasReschke Could you please tell me how to modify codes in Nextcloud 12 to solve this problem (for integrating with Moodle) ? I can't wait for the release of 13 :-) |
@LukasReschke I was investigating Nextcloud as oauth2 provider, and I came to the same conclusion. Do you know if it'll still be planned for the Nextcloud 13? Thanks! |
Would we need some kind of equivalent logic: |
@rullzer: Why have you removed this issue from the milestone list for the nextcloud 13 release? Michael |
I removed it from 14. We first moved it to 13. So far nothing has happened in this direction and as far as I know nobody is actively working (or plans to work on this) for 14. We can always add it to the milestone again when somebody works on it. |
Fixes #5694 I tested on my server, and worked like a charm :) I think in term of security it is fine to open this route. What do you think?
Just created a PR that works. I'm just not sure about the security implication. #7798 |
Hello, thanks for your answer. Ok, if you are in feature freeze of the Nextcloud 13 release, please could you aply a patch for this issue - even if you think it is not so relevant - in the next following release, maybe in 13.0.1? I think for users, which uses both Moodle and Nextcloud, it would be relevant enough to fix this issue. Thanks a lot & Greetings, |
Fixes #5694 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Fixes #5694 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Fixes #5694 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Fixes #5694 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Fixes #5694 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
OCS APIs cannot be used in a straightforward way if OAuth-authenticated clients perform requests, due to CSRF checks. If a Bearer authentication header is present, it should be sufficient to assume that no CSRF attack takes place. As discussed below in this thread, it would be great if additional CSRF checks were disabled if requests are authenticated by a bearer token.
(Edited on 2017-08-07, 2:53 pm) -- Original Text:
The text was updated successfully, but these errors were encountered: