Allow pure token based auth on DAV
Currently we're using a Sabre plugin for HTTP basic auth, which checks the Authorization: basic xxxx header. With basic auth it's possible to authenticate either with user + login password or user + token. The latter is an interim solution to not break existing/legacy clients.
With pure token based auth, the client sends a HTTP header Authorization: token xxxx.
Steps to reproduce
- Generate device token
- Make DAV request using the
Authorization: token xxxformat
Expected behaviour
The client should authenticate successfully.
Actual behaviour
Auth exception is thrown as no HTTP basic header is found
ownCloud version: (see ownCloud admin page) 9.1.0.2
@LukasReschke @PVince81 @rullzer @owncloud/desktop-developers
sabre dav provides the abstract bearer auth backend for this use case https://github.com/fruux/sabre-dav/blob/master/lib/DAV/Auth/Backend/AbstractBearer.php
Great stuff, yes.
We still need to have a fallback in case we're connecting to older ownCloud versions that don't support token based auth.
Why "bug" ? This is mostly an enhancement. @ChristophWurst
I doubt there's enough time for 9.1 before the freeze for this to be covered properly. But would be a nice addition, yes.
CC @cmonteroluque
Okay, now I realize that I have mixed up "server support" and "client support".
So first we need:
- make ownCloud DAV's endpoints support token auth
- make ownCloud's DAV client (fed shares, etc) use token auth when connecting to other ownClouds
I guess this ticket is mostly about 1) which is important for clients to be able to use token auth. In that case it might still be feasible for 9.1. @ChristophWurst can you confirm ?
Exactly, it's about the server support. If there is enough time I'd like to implement this for 9.1.
No more time for 9.1, moving to 9.2.
@cmonteroluque FYI, note that this was not in any plan and is just nice to have
I would like @MTRichards just to make sure it can wait
concur! thanks for asking.
FYI, in Qt it might not be so easy to use token in the challenge/response HTTP:
https://code.woboq.org/qt5/qtbase/src/network/kernel/qauthenticator.cpp.html#_ZN21QAuthenticatorPrivate17parseHttpResponseERK5QListI5QPairI10QByteArrayS2_EEb
We could still just hack it like we did before and just send our own Authorization header in the request.
FYI @ogoffart @danimo
@ChristophWurst it seems that final implementation looks like

User associated to token is shown, but IMHO it´s not needed. :confused:
User associated to token is shown, but IMHO it´s not needed.
What user?
@ChristophWurst

That info related to Username is also shown as user connected at right top corner
it is needed as you have to use the very same login name for tokens that you use for logging into the browser.
@PhilippSchaffrath this could be obsoleted or changed with oauth2
not sure if still relevant with oauth2, moving to backlog for now
@DeepDiver1975
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.
I'll let @DeepDiver1975 evaluate whether this is still relevant in the future, considering that we have oauth2 now and some slightly different plans
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
Likely already implemented with oauth token