Skip to content
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

Two-Factor Auth - Implementation details #12102

Closed
5 tasks
LukasReschke opened this issue Nov 11, 2014 · 18 comments · Fixed by #24559
Closed
5 tasks

Two-Factor Auth - Implementation details #12102

LukasReschke opened this issue Nov 11, 2014 · 18 comments · Fixed by #24559

Comments

@LukasReschke
Copy link
Member

LukasReschke commented Nov 11, 2014

For ownCloud 8 we are aiming to implement Two-Factor authentication, the following requirements are given:

  • Additions to core should be as minimal as possible. If possible parts should be implemented within an ownCloud application.
  • Not to be implemented as \OC_User_Backend, this approach has been tried in the past but is a major hack
  • Two-Factor Auth has to be compatible with all existing user backends without modifying them.
  • Support application specific passwords (with Application we mean external application like mobile or web apps) - implementation should be generic to be able to reuse them for OAuth tokens (OAuth 2.0 support for ownCloud [$5] #10400). Application specific passwords will be valid for the whole ownCloud instance while OAuth tokens can be limited in the future then for specific scopes.
  • The system should be pluggable to allow further authentication backends, per default it will support TOTP (Time-Based One-Time Password Algorithm) which is widely used.
  • A personal console exists which:
    • Allows to register new token devices
    • Shows recently used token devices
    • Allows to revoke recently used token devices
  • An administrative console exists which:
    • Allows admins to enforce enrollment for users
    • Allows admins to view enrollment status
    • Allows admins to view devices and revoke them
  • If a revoked token is supplied the server will send back a statuscode which indicates that the token has been revoked

This issue is here to track the changes required for the change and also the required features. Any suggestions are welcome.


Todo:

  • Refactor authentication from base.php into own classes (… in progress …)
  • Add new authentication state ("2FA")
  • Add code for 2FA app
  • Add adapters for 2FA app
  • Take pride and celebrate
@LukasReschke
Copy link
Member Author

@MTRichards @karlitschek FYI

@PVince81
Copy link
Contributor

So this means external apps do not need to send the user's password any more ? 😄

@LukasReschke
Copy link
Member Author

So this means external apps do not need to send the user's password any more ?

Yes. - And if we implement this properly (aka: "plug OAuth above it") we can even limit the access scope of external applications 🎉

@karlitschek
Copy link
Contributor

@LukasReschke Sounds good in general. I suggest to discuss this in a call the next few days.

@LukasReschke
Copy link
Member Author

Sounds good in general. I suggest to discuss this in a call the next few days.

Sure. Feel free to make an invite.

@filippouni
Copy link

my two cents:
https://fidoalliance.org/specifications

@karlitschek
Copy link
Contributor

Cool. Let´s implement this! 👍

@MTRichards
Copy link
Contributor

Good stuff!

How do we handle this form of 2 factor for mobile and desktop? Do we need to consider adding an additional pin/something for the user to take advantage of 2 factor on the client too?

@LukasReschke
Copy link
Member Author

How do we handle this form of 2 factor for mobile and desktop? Do we need to consider adding an additional pin/something for the user to take advantage of 2 factor on the client too?

Application-specific passwords, just like everybody else does it too. That should be sufficient for the first step. I'll ensure to return a proper status code to the client in case two-factor auth is needed so we can show a little popup like "Please generate a token at demo.owncloud.org".

Once everything is done we can think about implementing an OAuth like login approach for mobile devices. But I think we should get the basic right first :-)

I really don't want to throw too many different things together into this. - Would that work?

@MTRichards
Copy link
Contributor

Out of the box, that would work.

Second step is, of course, to integrate with existing enterprise 2-factor systems for auth, such as RSA tokens or something like that. We should just make sure we have proper architecture to offload the 2 factor to an external system as well (or integrate with it), whichever makes more sense.

@LukasReschke
Copy link
Member Author

Second step is, of course, to integrate with existing enterprise 2-factor systems for auth, such as RSA tokens or something like that. We should just make sure we have proper architecture to offload the 2 factor to an external system as well (or integrate with it), whichever makes more sense.

Sure. That is the goal, the whole system is meant to be pluggable. Throwing in your own self-made connector (SMS / Authy / SmartCard / whatever) should not be a problem with the architecture that I think of.

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.1-next, ownCloud 8 Jan 8, 2015
@leonardomarino
Copy link

Duo Security? They have libraries for php, see https://www.duosecurity.com/docs/duoweb

@LukasReschke LukasReschke modified the milestones: 8.2-next, 8.1-current Mar 2, 2015
@Cysioland
Copy link

👍

@kriede
Copy link

kriede commented Mar 23, 2015

Would love to see this!

@owncloud owncloud locked and limited conversation to collaborators Mar 23, 2015
@ghost
Copy link

ghost commented Sep 10, 2015

@MTRichards I need a call regarding priority here

@MTRichards
Copy link
Contributor

@LukasReschke this is related to what you discussed in Berlin, right? How does that relate to this? @karlitschek did you ever have the deeper conversation about how this impacts LDAP / AD?

@cmonteroluque unless I missed something, this is not ready for 8.2 certainly, and not required for 8.2.

@ghost ghost modified the milestones: 9.0-next, 8.2-current Sep 21, 2015
@ghost
Copy link

ghost commented Sep 21, 2015

@MTRichards ok, moved to 9.0

@PVince81
Copy link
Contributor

Any progress here ?

Since we're past feature freeze, would move this to 9.1.

@ghost ghost modified the milestones: 9.1-next, 9.0-current Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants