nextcloud / nextcloud/user_oidc
Access the cloud from roundcube to synch address books
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 181
- Forks
- 60
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 26
Description
Hello,
Our working SSO setup (LemonLdap / Nextcloud / Roundcube ) is using the plugin rcmcarddav (https://github.com/mstilkerich/rcmcarddav) in Roundcube to synchronise the cloud user addressbook within roundcube, using the bearer token.
But this working setup is using the Nextcloud plugin "Nextlcoud Oidc login" (https://github.com/pulsejet/nextcloud-oidc-login).
We decided to use this plugin User_oidc in our Nextcloud setup.
Now with the group management, everything's working well except for one thing, the connection from roundcube to synchronise the user addressbook.
The error I have in Nextcloud log:
No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured
"Code":0,
"Trace":[
{"file":"/var/www/nextcloud-test/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},
{"file":"/var/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},
{"file":"/var/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},
{"file":"/var/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},
{"file":"/var/www/nextcloud-test/apps/dav/lib/Server.php","line":333,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},
{"file":"/var/www/nextcloud-test/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},
{"file":"/var/www/nextcloud-test/remote.php","line":166,"args":["/var/www/nextcloud-test/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","Line":154,"CustomMessage":"--"}}
I was able to debug the content of the request and response objects from the sabre/Dav app:
(request and response vars in 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php)
PROPFIND /remote.php/dav HTTP/1.1
Content-Length: 215
Prefer: return=minimal
Content-Type: application/xml; charset=UTF-8
Depth: 0
User-Agent: GuzzleHttp/6.5.5 curl/7.74.0 PHP/8.0.13
Host: cloud-test.xxxxx.coop
<?xml version="1.0"?>
<DAV:propfind xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
<DAV:prop>
<DAV:current-user-principal/>
</DAV:prop>
</DAV:propfind>
response:
HTTP/1.1 500 Internal Server Error
I went back to some old ticket and found this comment (https://github.com/mstilkerich/rcmcarddav/issues/361#issuecomment-953183587):
Concerning bearer authentication:
the nextcloud-oidc-login app is the only app I am aware of that supports bearer authentication at the DAV backend of nextcloud, so yes, you would have to switch to that app and use OIDC instead of SAML
So I'm wondering if this app is able to auth via DAV or is it indeed not possible?
PS: the app "External user authentication" is active in our cloud.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported request flow at apps/dav/appinfo/v2/remote.php and the authentication trace in 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php. Compare the User_oidc behavior with the bearer-authentication setup described for nextcloud-oidc-login and determine whether DAV authentication is supported; a clear result and reproduction or documentation would define done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100