Live data from Hacker News

Show HN: Ory Kratos – Open-source identity server written in Go

github.com

61–67 of 67 posts

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#61
post #56
post #34

Earlier quoted context omitted.

Just to clarify, as not everyone is familiar with service based architecture: When the application server is air-gapped from the identity provider, it is meant that your frontend application will have user information embedded in the requests it makes. For example by setting a JWT in the headers or in a cookie when it's a web application. Even the responsibility of validating that information can be extracted from th…

I know this is the discussion as old as JWTs, but the tradeoff here is how do deauthenticate the user. If you delete/disable the user, or change their role, there's still a stateful JWT out there claiming they have certain grants. You either need to accept a certain TTL on the JWT, or be able to revalidate the JWT on every request with some authoritative service to ensure the grants are good (which sort of invalidate…

That'd depend on the implementation details. Within the Ory ecosystem, you have Kratos (identity management), Hydra (OAuth2 & OIDC server, dealing mostly with token issuance, not so much with identities, which you have to provide externally) and Oathkeeper (API gateway).

For browser use cases, the recommended approach with Kratos is to use cookies (which means that Kratos need to follow the same site rules for the site it's set up for). Since Kratos is separate from the system you're trying to provide authentication for, you need some kind of token issuance, but you can make it as short-lived as you'd like. Within the ecosystem, you'd use Oathkeeper to transparently convert a Kratos cookie to an ID token, but this token can be generated with an arbitrarily short lifespan, and so you can revoke sessions with immediate or almost immediate effect.

Where things get a bit more complicated are if you exchanged that 'local' Kratos token for a different sort of token, like an OAuth2 bearer token (which may give access to external systems). In this case, ending the Kratos session doesn't immediately revoke those other tokens. You need to either accept that tokens might outlive the actual session they originated from (sometimes you might even _want_ this, for instance in an asynchronous service), or else keep track of these other tokens and revoke them individually.

If you're using Hydra for these other tokens, you can either use JWT or 'opaque' tokens. With JWT, you have the issue you mention that the token itself has some state that might become stale, but if you're using 'opaque' tokens, you don't get any claims from the token itself and you're supposed to get these from a separate introspection endpoint. You can make these introspection requests as often as you'd want, like for Kratos cookies above. Hence, if you revoke the session in Hydra (or whichever other OAuth2 server you're using) and you're validating tokens, you can revoke sessions almost immediately, with some overhead that comes with splitting a system into separate ones.

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#62
post #2

One of the co-maintainers here. Ory Kratos has been in development since 2018 and is finally out of beta! If you have any questions about the project, tech, flows, or Ory as a whole I’m here to help :)

Congratulations on Kratos coming out of Beta. We evaluated Ory a few months ago. My understanding: 1. Ory Kratos provides session-based authentication and user management. 2. Ory Hydra is a self-managed server that secures access to your applications and APIs with OAuth 2.0 and OpenID Connect. Basically we want to replace AWS Cognito (which is pretty much abandonware) to secure our API so we needed both applications.…

> 1. Ory Kratos provides session-based authentication and user management. > > 2. Ory Hydra is a self-managed server that secures access to your applications and APIs with OAuth 2.0 and OpenID Connect.

Sounds about right.

> 1. Bugs around traits meant we had issues around password change, password recovery and email change/reverifications for our use-case

Can't comment much on these as I haven't experienced those issues, but I'm curious to hear what the issues were.

> 2. Lack of documentation prevented us making progress on 2FA/WebAuthn

Things have moved on in the last months, and the 2FA/WebAuthn implementation seems more mature and documented.

> 3. Bearer token/Oauth consent flow wasn't available without a lot of work because Kratos and Hydra are not "integrated" [1]. Someone shows how they rolled their own integration [2].

That's right, sadly there's no 'integration' available officially. There've been at least two pull requests (I made one of them) to add Hydra integration to the official demo Kratos UI, which for different reasons weren't merged. I'm not sure I'd say it's so much work (essentially, it's getting the existing Kratos session and translating those into a Hydra session, with a couple of API calls), but it's not something very well documented (or at all) and you're left to figure it out by yourself from the API documentation. I hope that integration between the two is improved, at least with an official demo showcasing the calls needed in order and with the right parameters.

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#63
This is super exciting. But slightly off-topic question: has innovation in identity management plateaued? This is coming from someone who works in a fairly large identity management team. Functionally I can’t figure out what’s the next big thing in our domain. Even passwordless stuff feels like an evolution. Is there any academic work being done in this space?

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#64
I'm passing familiar with this area, but not as familiar as I should be...

How does this compare to something like this - https://github.com/panva/node-oidc-provider

Are they addressing the same need? Is Ory looking to get certified in these area? (Is it already?)

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#65
post #24
post #2

One of the co-maintainers here. Ory Kratos has been in development since 2018 and is finally out of beta! If you have any questions about the project, tech, flows, or Ory as a whole I’m here to help :)

Hey, I've seen the project in the past and it's very interesting, and definitely an improvement over existing alternatives. That said, I have one complaint quite unrelated to tech itself: I think the liberal use of the term "identity" is very inappropriate. Of course "identity" is an extremely hard term to even define , but as far as I can see ory kratos is only assisting with email and phone verification. To talk ab…

I understand what you're saying here. I'm doing some looking-into identity as the concept of a verification that a person is who they say they are, not in the context of authentication but in the "real world". I've learned to read that word "identity" very loosely. As you said - it's very had to define.

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#66
post #62

Earlier quoted context omitted.

Congratulations on Kratos coming out of Beta. We evaluated Ory a few months ago. My understanding: 1. Ory Kratos provides session-based authentication and user management. 2. Ory Hydra is a self-managed server that secures access to your applications and APIs with OAuth 2.0 and OpenID Connect. Basically we want to replace AWS Cognito (which is pretty much abandonware) to secure our API so we needed both applications.…

> 1. Ory Kratos provides session-based authentication and user management. > > 2. Ory Hydra is a self-managed server that secures access to your applications and APIs with OAuth 2.0 and OpenID Connect. Sounds about right. > 1. Bugs around traits meant we had issues around password change, password recovery and email change/reverifications for our use-case Can't comment much on these as I haven't experienced those iss…

We experienced issues with the settings API not updating traits. Will try again now that things have moved on.

Regarding Kratos and Hydra is this[1] your PR?

[1]https://github.com/ory/kratos-selfservice-ui-node/pull/149

Re: Show HN: Ory Kratos – Open-source identity server written in Go

#67
post #24
post #2

One of the co-maintainers here. Ory Kratos has been in development since 2018 and is finally out of beta! If you have any questions about the project, tech, flows, or Ory as a whole I’m here to help :)

Hey, I've seen the project in the past and it's very interesting, and definitely an improvement over existing alternatives. That said, I have one complaint quite unrelated to tech itself: I think the liberal use of the term "identity" is very inappropriate. Of course "identity" is an extremely hard term to even define , but as far as I can see ory kratos is only assisting with email and phone verification. To talk ab…

Hm. I agree with you: Identity is a user account or role. Verification is backing up the assertion of initial registration with phone, email, address, and so on.

Authentication is the verification of identity after registration.

Authorization is the verification of permission for an identity to take an action.

Post reply on HN