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

extend U2F #248

Closed
cornelinux opened this issue Oct 28, 2015 · 11 comments
Closed

extend U2F #248

cornelinux opened this issue Oct 28, 2015 · 11 comments
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.
Milestone

Comments

@cornelinux
Copy link
Member

We need to add a mechanism to let other applications / web sites authenticate against privacyidea. We should avoid, that each website needs to register the U2F key.

Redirect to privacyIDEA for authentication?

@cornelinux cornelinux added the Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature. label Oct 28, 2015
@cornelinux cornelinux added this to the 2.8 U2F ready milestone Oct 28, 2015
@vDorst
Copy link
Contributor

vDorst commented Nov 5, 2015

So basicly we want to be a SAML identity provider (IdP)?

@cornelinux
Copy link
Member Author

Yes and No.
Might be great if privacyIDEA was an IdP.

Here are some thoughts:

simple API

An application could implement U2F on its own. So why should it use privacyIDEA. My main point would be - because it is simpler than implementing U2F.
I.e. it must be easier for an application to connect to privacyIDEA than to implement U2F.
And I think SAML on the SP side is also not that easy.

simple Code

privacyIDEA already provides a plugin for simpleSAMLphp. So basically I want to avoid reinventing the wheel. And implementing and maintaining a SAML IdP seems quite a task.
At the moment the privacyIDEA server has 13.000 lines of code. (The system from which privacyIDEA was forked has 30.000 slocs). 13.000 is not that much and I am happy and proud, that it is not much but nevertheless provides a great functionality.
Looking at https://github.com/rohe/pysaml2 or https://github.com/rohe/pyoidc which might give a starting point for either SAML or OpenID Connect you see that it is quite some code. The issue #252 also emerged from a necessity to login via SAML. I would have preferred to have a SAML SP functionality to login to the privacyIDEA WebUI. (hm, I should nevertheless create a ticket for SAML ;-)
But at this stage I wanted to avoid pulling a requirement like pysaml2 so I went with REMOTE_USER. Which also provides other possible means to login.

Any thoughts and input welcome!

@vDorst
Copy link
Contributor

vDorst commented Nov 6, 2015

I was thinking which only works in a browser.
can you do a u2f auth with an iframe or overlay? so that the u2f origin is pi server.
if that is possible.
an app like sinplesaml or owncloud can do a simple username and otp pin password with the default theme.
when u2f is required it shows an iframe or overlay to handle u2f stuff.

@cornelinux
Copy link
Member Author

How would you return the successful authentication back to the application?

@vDorst
Copy link
Contributor

vDorst commented Nov 7, 2015

i have no idea. javascripting?
redirect is probably better.
Does privacyidea support redirection at the moment?

@cornelinux
Copy link
Member Author

We add the U2F functionality to the privacyIDEA simpleSAMLphp plugin. We can use an adapted login UI, which also needs to support Challenge Response. The SAML IdP needs to run on the same machine like the privacyIDEA Server.

Take a look at https://github.com/simplesamlphp/simplesamlphp/blob/master/modules/authYubiKey/templates/yubikeylogin.php for an example of an adapted Login UI.

@cornelinux
Copy link
Member Author

In addition we can try to add javascript in the templates.
See discopower/templates/disco-tpl.php.

Using the javascript we could create a challenge response on the one page.

@vDorst
Copy link
Contributor

vDorst commented Nov 17, 2015

What I am looking for is a SSO solution not only for the web but also internal.
I think Kerberos can be a good solution for internal use. But not directly for websites. Because with standard mod_auth_kerb you can't logout unless you close the browser.
WebAuth seems a good bridge for that. Can handle SSO and also kerberos/GSSAPI tickets.

WebAuth https://web.stanford.edu/services/webauth/ is a Apache Auth module
WebKDC is service to handle login and logout. Which I think can be done by privacyIdea. So that we can use U2F devices.
Kerberos is able to handle OTP via FreeRadius server.

@cornelinux
Copy link
Member Author

You are welcome to file a feature request for a plugin for webauth.
But I am not sure if it is a descending branch.
The latest release/news is one year old.
They mentioned cosign, which has its last entry 2012.
Just file the issue and we will see.

@cornelinux
Copy link
Member Author

We start by enabling Challenge Response against privacyIDEA in the default simpleSAMLphp login page.

cornelinux added a commit to privacyidea/simplesamlphp-module-privacyidea that referenced this issue Nov 19, 2015
The plugins own logic supports the basic use of callenge response.
This is the basic support for
privacyidea/privacyidea#248
cornelinux added a commit that referenced this issue Nov 19, 2015
cornelinux added a commit to privacyidea/simplesamlphp-module-privacyidea that referenced this issue Nov 19, 2015
In cases like the U2F token there is no RequestInput to enter
the OTP value, but only the message is displayed.

Working on privacyidea/privacyidea#248
@cornelinux
Copy link
Member Author

Now we have to do the u2fSignResponse javascript stuff...

cornelinux added a commit to privacyidea/simplesamlphp-module-privacyidea that referenced this issue Nov 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants