You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make "open owncloud in browser" log on automatically #633
PR 2 requires to merge the pull request #42, which adds support for what you are asking via libattica (using OCS specs). This does not require to hand over sessions. On the other hand, opening a browser does.
Client sends request to /ocs/v1.php/cloud/capabilities to check whether the instance supports authentication based on authentication tokens
Client sends a POST request to /ocs/v1.php/auth/nonce to get a new nonce.
Server stores the nonce in the DB and assigns it to the specified user
When clicking on the "open in browser" button the client should either "send the user to the login endpoint e.g. "/auth/nonce?nonce=$nonce&user=$username" OR create a local HTML file that sends this data as POST request to the endpoint (preferred to not leak the username into the log - this is also how e.g. Dropbox implements this)
The server is then verifying the nonce and if the specified token is found the user is logged-in and redirected to the default application (e.g. files)
Acceptance criteria
Client
Nonces SHOULD not be send via GET. POST should be used instead. (e.g. Dropbox does this via a local HTML file, the browser is then sent to file://var/foo/blah.html which is responsible for the POST request to the authentication endpoint)
Nonces SHOULD be stored encrypted in the memory
Nonces MUST NOT be stored unencrypted on the filesystem. It MAY be stored unencrypted for a short term period (e.g. the redirecing HTML file)
Server
Already logged-in users MUST NOT be logged-out if a nonce for another user is sent
Nonces MUST NOT be reusable
Nonces MUST expire after a specific period (e.g. 1 hour)
Requesting a nonce MUST NOT be vulnerable against CSRF
Administrators MUST be able to disable this functionality
Nonce-based authentication MUST work with the planned two-factor authentication capabilities
Multiple nonces for a user MUST be supported.
Users MUST be redirected to the specified default application in config.php OR a two-factor auth application
Invalid nonces or reused nonces MUST be logged
Nonces MUST be generated by a secure RNG
Considerations
While using a cryptographic generated token (e.g. HMAC) might be a solution that would not require requesting a nonce I see the drawback that once an attacker has the secret he is able to request tokens all the time even if you have changed the password. This is not desirable.
Furthermore, reusing the cookie is not an option since we do not want to leak it (e.g. to logs) and this might also be prone to a Session Fixation attack if implemented improperly on the server side. Let's solve this properly together :-)
Needed changes
Server needs to implement an API to request nonces
Server needs to implement an authentication endpoint for nonces
Client needs to implement those APIs
If we can agree on this implementation I'll begin working on the required change in core. Then we can finally make this happen ;-)
@LukasReschke sounds good to me - final question: is this part of core or an isolated app. Building it as an app would already cover the requirement to allow the admin to disable the functionality
Sounds good from my side. Not sure about the 'encrypt nonce in memory' part, because this usually doesn't work as expected, even if you go down to C-level, and because encryption only means that some attacker that has access to the application's memory must look in two places to also find the key, which is not really a challenge. Am I missing anything?
@LukasReschke sooner or later we will need some oauth mechanism as well - would it make sense to bundle the development of both features because both will touch the very core of the our auth mechanisms?
@danimo You're obviously right, this is more or less an obfuscation measure that doesn't work with opensource software. That's how you end after reviewing applications where this is a key requirement. (You know, managers and banksters love snake-oil ;-))
@DeepDiver1975 I agree on the fact that OAuth is something important that we have to tackle for ownCloud 8 and should be in core. To be honest, the whole login system could need a rewrite. This change would be unrelated since this can be implemented without a complete reimplementation. But yeah, let's solve this together to avoid rewriting the nonce-based authentication in the future ;-)
Activity
danimo commentedon May 21, 2013
PR 2 requires to merge the pull request #42, which adds support for what you are asking via libattica (using OCS specs). This does not require to hand over sessions. On the other hand, opening a browser does.
danimo commentedon Nov 26, 2013
This is waiting for owncloud/core#5453.
LukasReschke commentedon Aug 13, 2014
Proposed process
Acceptance criteria
Client
Server
Considerations
While using a cryptographic generated token (e.g. HMAC) might be a solution that would not require requesting a nonce I see the drawback that once an attacker has the secret he is able to request tokens all the time even if you have changed the password. This is not desirable.
Furthermore, reusing the cookie is not an option since we do not want to leak it (e.g. to logs) and this might also be prone to a Session Fixation attack if implemented improperly on the server side. Let's solve this properly together :-)
Needed changes
If we can agree on this implementation I'll begin working on the required change in core. Then we can finally make this happen ;-)
\cc @dragotin @guruz @ogoffart @danimo
LukasReschke commentedon Aug 13, 2014
jochenwezel commentedon Aug 13, 2014
DeepDiver1975 commentedon Aug 13, 2014
@LukasReschke sounds good to me - final question: is this part of core or an isolated app. Building it as an app would already cover the requirement to allow the admin to disable the functionality
LukasReschke commentedon Aug 13, 2014
Implementing this as isolated application would be possible and makes - in my opinion - also sense. We should ship and enable it per default then.
@karlitschek
danimo commentedon Aug 13, 2014
Sounds good from my side. Not sure about the 'encrypt nonce in memory' part, because this usually doesn't work as expected, even if you go down to C-level, and because encryption only means that some attacker that has access to the application's memory must look in two places to also find the key, which is not really a challenge. Am I missing anything?
DeepDiver1975 commentedon Aug 13, 2014
@LukasReschke sooner or later we will need some oauth mechanism as well - would it make sense to bundle the development of both features because both will touch the very core of the our auth mechanisms?
LukasReschke commentedon Aug 13, 2014
@danimo You're obviously right, this is more or less an obfuscation measure that doesn't work with opensource software. That's how you end after reviewing applications where this is a key requirement. (You know, managers and banksters love snake-oil ;-))
@DeepDiver1975 I agree on the fact that OAuth is something important that we have to tackle for ownCloud 8 and should be in core. To be honest, the whole login system could need a rewrite. This change would be unrelated since this can be implemented without a complete reimplementation. But yeah, let's solve this together to avoid rewriting the nonce-based authentication in the future ;-)
LukasReschke commentedon Aug 13, 2014
MTRichards commentedon Aug 13, 2014
I like the feature, it is a parity thing. Definitely nice to have, but does a lot for the end user experience.
karlitschek commentedon Aug 13, 2014
LukasReschke commentedon Aug 13, 2014
Cysioland commentedon Mar 15, 2015
7 remaining items
ogoffart commentedon Jul 4, 2018
@DeepDiver1975 Is there a server issue to track the server part of this?
Edit: I re-opened owncloud/core#5453