Live data from Hacker News

Show HN: Run your own OAuth2/OpenID Connect provider

github.com

31–40 of 52 posts

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#31
post #23
post #8

How do you integrate this with your existing API? Do you need to proxy requests through Hydra or do you just need to read and trust Hydra-signed tokens on every request? Is there any overlap with https://getkong.org/ ?

You have to query token validation endpoint to have your reference token validated. That's how oauth2 works. With OpenId connect you get JWT which can be validated without a call to the identity provider.

One thing I've not quite got my head around with JWT is not authenticating tokens with the server on each request - am I really just meant to assume a token is trusted until it's expiry time? What if a user signs out all their sessions in the meantime, or an employee is fired and needs access revoking? As far as I can tell I do just have to use short-lived tokens and renew them frequently but that comes with its own set of problems when doing JavaScript based applications and implicit auth.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#32
post #23

Earlier quoted context omitted.

You have to query token validation endpoint to have your reference token validated. That's how oauth2 works. With OpenId connect you get JWT which can be validated without a call to the identity provider.

One thing I've not quite got my head around with JWT is not authenticating tokens with the server on each request - am I really just meant to assume a token is trusted until it's expiry time? What if a user signs out all their sessions in the meantime, or an employee is fired and needs access revoking? As far as I can tell I do just have to use short-lived tokens and renew them frequently but that comes with its own…

That's the trade off. Either you have "real-time" data but need a database roundtrip or you save latency but must accept the downside. However, you can use short token times to mitigate that, something like 10 minutes for example.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#33
post #23

Earlier quoted context omitted.

You have to query token validation endpoint to have your reference token validated. That's how oauth2 works. With OpenId connect you get JWT which can be validated without a call to the identity provider.

One thing I've not quite got my head around with JWT is not authenticating tokens with the server on each request - am I really just meant to assume a token is trusted until it's expiry time? What if a user signs out all their sessions in the meantime, or an employee is fired and needs access revoking? As far as I can tell I do just have to use short-lived tokens and renew them frequently but that comes with its own…

That's the trade off. Either you have "real-time" data but need a database roundtrip or you save latency but must accept the downside. However, you can use short token times to mitigate that, something like 10 minutes for example.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#34
post #4

Nice! Lowering barriers to the use of technologies like these is important. Would anyone else be interested in hosting Mozilla Persona? https://developer.mozilla.org/en-US/Persona

Check out Let's Auth: https://github.com/letsauth/letsauth.github.io It's a successor to Mozilla Persona in development. Details in the readme and on freenode #letsauth (mirrored to gitter.im/letsauth/letsauth).

why is it written in python? why not something that compiles and runs well on all platforms?

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#35
post #34

Earlier quoted context omitted.

Check out Let's Auth: https://github.com/letsauth/letsauth.github.io It's a successor to Mozilla Persona in development. Details in the readme and on freenode #letsauth (mirrored to gitter.im/letsauth/letsauth).

why is it written in python? why not something that compiles and runs well on all platforms?

From the readme:

> Let's Auth 1.0 will ship as a single, statically compiled binary. Pre-1.0, we will use a variety of dynamic languages for prototyping.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#36
post #34

Earlier quoted context omitted.

why is it written in python? why not something that compiles and runs well on all platforms?

From the readme: > Let's Auth 1.0 will ship as a single, statically compiled binary. Pre-1.0, we will use a variety of dynamic languages for prototyping.

nice :)

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#37
post #22

I know it's in the title but I don't see any OpenID capabilities here. Looks like Oauth2 spec implementation. Am i missing something?

It implements OpenID Connect, which basically an opinionated OAuth2 implementation, and a different thing to OpenID.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#38
post #24

Would this or coreos/dex replace something like Auth0?

Auth0's big feature that isn't provided by open source platforms at the moment is being able to request an OAuth token for third party services the user has authenticated with, so for example you can trade in an auth token that was issued when you logged in the user for a Facebook token.

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#39
OAuth is super simple, you only need two endpoints for an OAuth provider. It only took a few hours to write the WakaTime OAuth provider implementation[1]. No offense and serious question: why would you need a library for this? Isn't it more trouble to integrate an external OAuth provider with an existing api than to just write two api endpoints yourself?

[1] https://wakatime.com/api

Re: Show HN: Run your own OAuth2/OpenID Connect provider

#40
post #22

I know it's in the title but I don't see any OpenID capabilities here. Looks like Oauth2 spec implementation. Am i missing something?

OpenID has been deprecated in favor of OpenID Connect:

* http://openid.net/specs/openid-connect-core-1_0.html * http://openid.net/connect/faq/

Post reply on HN