Live data from Hacker News

Keycloak: Open-Source Identity and Access Management

keycloak.org

231–240 of 243 posts

Re: Keycloak: Open-Source Identity and Access Management

#231
post #99

I used Keycloak about 4 or 5 years ago in a former job. It did work very well. Note however, that we did not need to customize anything nor did we have to deal with scaling (in house web-app where it was rare to have more than 100 people using on it at any given day). Right now, I'm looking into https://supertokens.com/ I have not used it in any capacity but it does seem much more approachable -at least to me- and al…

I'm of the project creators. Happy to discuss your specific use case and evaluate different providers.

Some recent feeedback:

"Hi yes, we are testing SuperTokens right now, and we are loving it Thanks for the great tool btw. it is really comfortable to integrate it into the project.

at first we decided to use Keycloak, spent a week to customize it for our needs. It was soooo painful :sweat_smile: then we started looking for alternatives"

"Been using it a bit for a pet project and I am quite impressed of how many integrations and documentation I find on its page. Also, really easy to use!" Just in case you are wondering where I found out about SuperTokens, it was on HackerNews"

Re: Keycloak: Open-Source Identity and Access Management

#232
I'm a fan of KeyCloak and use in prod.

My biggest complaint though, is the storage of configuration in a database. This makes deployment complex, because you can't just deploy code, you must also mutate your database on each deploy (in many cases).

I'm looking into a more modern approach, perhaps disallowing any system admin access (only user admin) and requiring all configurations changes to be applied via code using the API... please provide any recommendations for a better approach!

Re: Keycloak: Open-Source Identity and Access Management

#233

This part of the IAM space (SSO and AuthN) is so crowded with products, both paid and open source. When you look at governance, certification, lifecycle management, approvals, etc. there is almost nothing by comparison. A couple not so great commercial products and very little open source. Hopefully that changes.

> When you look at governance, certification, lifecycle management, approvals, etc What do you mean by these? Are you talking about SOC2/ISO27001 when you say certification? Are you talking about provisioning/deprovisioning users (SCIM, etc) when you say lifecycle management? What do you mean by approvals? Role changes requiring designated approval, or something else?

In a large, highly regulated business, these are all features that are needed in an IAM platform. The specific regulations vary by industry, country, etc.

Onboarding - birthright provisioning of accounts across many systems. Email, directory, etc.

Termination - automatically remove application level access across the business, not just the user's sso access.

Approval - the ability to request access to a system, have it go through a series approvals (which are audited) and then if approved, provision the correct level of access in the end system.

Certification - the ability to do periodic access reviews of users. This is typically run yearly or quarterly and you would be asking the user's manager and possibly the application owner to review their access and decide if it is appropriate. If the choice is made to revoke it the IAM system should go directly to the application and remove their access.

Yes SCIM covers some of this, but it is just a protocol.

Re: Keycloak: Open-Source Identity and Access Management

#234
post #185

This part of the IAM space (SSO and AuthN) is so crowded with products, both paid and open source. When you look at governance, certification, lifecycle management, approvals, etc. there is almost nothing by comparison. A couple not so great commercial products and very little open source. Hopefully that changes.

Agreed, I mean that's why we built our solution completely open source in an open saas model and certified [1] our solution. We even provide our pentest results publicly, after mitigation of course [2]. The value we provide, when you are using our cloud, is the operational peace of mind, global scalability with data residency and access to deep technological knowledge. We wrote some word about that in our blog [3] as…

That is very cool. It looks like you actually have a lot of overlap with an identity orchestration solution, such as Strata.

Re: Keycloak: Open-Source Identity and Access Management

#235

Earlier quoted context omitted.

Yes, I mostly recommend it because it is free and I've used before, plus I've been on several projects where we used Keycloak. For me, Cognito's 50.000 monthly active users is probably all I will ever need, and as you said, its quick to get started. Keycloak is the other way around, you will have to invest beforehand into learning and running it. Also, if you allow self-signup by your users, Email inboxing is a serio…

Thanks for sharing your rationale, makes a ton of sense. Cognito's free tier is great and frankly, takes auth off of many folks' plate. Which is a good thing. I've heard similar things about Azure AD B2C. Strangely, Google has a comparable offering ( https://cloud.google.com/identity-platform ) but I've never talked with anyone using it.

> I've heard similar things about Azure AD B2C

As someone who works with Azure B2C on day to day basis, I wouldn't recommend it to my worst enemy. It's a shitshow. It's impossible to maintain, heavily obfuscated by policies being xml instead of code, with weird naming everywhere. Very, very limited in what it can do and how(try making somewhat of a 'switch' statement). It usually ends up being a Frankenstein of copy-pasted sample policies from their Github that barely work. Debugging is a nightmare, logging to App Insights in production shouldn't be used(it requires 'Development mode') and even if it would, logs it produces are terrible and usually say nothing, with most errors being 'Internal Server Error' and nothing else. UI is also very 90s-like and to fully customize requires a ton of jquery and magic strings hardcoded everywhere. To customize emails in any way you still have to pay for Sendgrid anyway. I genuinely hate the experience.

Re: Keycloak: Open-Source Identity and Access Management

#236
post #174

Earlier quoted context omitted.

There is a document meant for best practices for browser-based apps such as SPA/PWA, which includes use of code flow. https://datatracker.ietf.org/doc/html/draft-ietf-oauth-brows... (disclaimer - co-author) The catch is that since the client web origin and AS web origin are often different sites, the AS has to actually implement CORS on their token endpoint. Some implementations unfortunately (perhaps due to a misund…

I appreciate you work on clarifying the situation. But my statement still stands, and you seem to back it up in your draft: > The JavaScript application is then responsible for storing the access token (and optional refresh token) as securely as possible using appropriate browser APIs. As of the date of this publication there is no browser API that allows to store tokens in a completely secure way. So with OAuth 2.0…

Storing access tokens in Javascript and storing them in a native application have about equal protections - but by far most Javascript apps are left far more susceptible to third party code execution.

The answer is typically to make such credentials incapable of being exfiltrated by adding proof-of-possession, such as the use of MTLS or of the upcoming DPoP mechanism.

Note that preventing exfiltration doesn't prevent a third party from injecting logic to remote-drive use of those tokens and their access sans exfiltration.

While access tokens can be requested with specifically limited scopes of access, a backend server could potentially further control the level of access a front-end has. The problem is that the backend and frontend are typically defined in terms of business requirements. As such, there hasn't been a clear opportunity for standardizing such approaches.

When using a backend, my advice is to be sure you don't just have your API take a session cookie in lieu of an access token. API are typically not constructed with protections from XSRF and the like (or rather, an access token header serves as an XSRF protection while just a session cookie will not).

> Also, if I'm not mistaken, PKCE extension is optional in OAuth 2.0

Correct - although it is strongly recommended by best current practices, including recommending deployments limit/block access to clients which do not use PKCE.

> …and without it you cannot securely use the code flow (as you would have to expose the client secret).

PKCE has nothing to do with client secrets or client authentication. It provides additional strong correlation between the initial front-end request with the following code exchange request.

It was written to support native apps, as many such apps used the system browser for the authorization step and then redirected back into a custom URL scheme. Since custom URL scheme registrations are not regulated, malicious apps could attempt to catch these redirects. PKCE provides a verification that the same client software created both the redirect to the authorization endpoint and the request to the token endpoint. Even if a malicious piece of software got the code, they wouldn't have a way to exchange it for an access token.

Some of the original OAuth security requirements for clients have been found to be poorly implemented, but that PKCE provides equivalent protections against these particular issues. Unlike client-only implementation logic, PKCE support is something that an AS can audit. Hence it being likely that PKCE will be a requirement in future versions of OAuth.

Re: Keycloak: Open-Source Identity and Access Management

#237
post #236

Earlier quoted context omitted.

I appreciate you work on clarifying the situation. But my statement still stands, and you seem to back it up in your draft: > The JavaScript application is then responsible for storing the access token (and optional refresh token) as securely as possible using appropriate browser APIs. As of the date of this publication there is no browser API that allows to store tokens in a completely secure way. So with OAuth 2.0…

Storing access tokens in Javascript and storing them in a native application have about equal protections - but by far most Javascript apps are left far more susceptible to third party code execution. The answer is typically to make such credentials incapable of being exfiltrated by adding proof-of-possession, such as the use of MTLS or of the upcoming DPoP mechanism. Note that preventing exfiltration doesn't prevent…

I really appreciate your effort, but somehow you just produce a lot of text without arguing against my point: OAuth 2.0 in a FE SPA is just broken, or "difficult" at best.

Re: Keycloak: Open-Source Identity and Access Management

#238

Earlier quoted context omitted.

Why customize the FE when you can use the keycloak-js[1] NPM library to integrate with any JS framework? [1] https://www.npmjs.com/package/keycloak-js

Because that is not how you customize the login/signup page that lives inside Keycloak (and its Docker image, if you use docker).

Sorry, my misunderstanding.

Re: Keycloak: Open-Source Identity and Access Management

#239
post #49

Earlier quoted context omitted.

Maybe https://github.com/zitadel/zitadel could be an alternative to you. Its written in Go, can be self-hosted or used from a cloud service. It will also soon (end of May) provide SAML 2.0 support besides the current OpenID Connect and OAuth support. Disclaimer: I am one of the authors ;-)

Does it/will it support Forward Auth style usage for plugging in with reverse proxies? Asking as a Caddy maintainer, I'm working on this right now and we've been working with Authelia to test it out, would be cool to get it working with another Go auth server! See https://github.com/caddyserver/caddy/pull/4739

Hi there

First and most importantly, thank you for maintaining such a cool project with caddy! I use it all the time as nginx alternative (even though of being an nginx fan in the past).

We do not directly support "forward auth" concepts. But what you could do is to use OpenID Connect to Authenticate the user prior of allowing traffic to flow to upstream services. That's more or less what the oauth2-proxy does as well.

The reason why we are not so fond of "forward auth" is that in many setups authentication needs to scale beyond on ingress and in that case it makes more sense to create a centralised session for a user with an identity system.

If you are intrigued to discuss this subject I would encourage you to join our discord https://zitadel.ch/chat

Re: Keycloak: Open-Source Identity and Access Management

#240
post #185

Earlier quoted context omitted.

Agreed, I mean that's why we built our solution completely open source in an open saas model and certified [1] our solution. We even provide our pentest results publicly, after mitigation of course [2]. The value we provide, when you are using our cloud, is the operational peace of mind, global scalability with data residency and access to deep technological knowledge. We wrote some word about that in our blog [3] as…

That is very cool. It looks like you actually have a lot of overlap with an identity orchestration solution, such as Strata.

Hm, interesting it need to check that ;-)
Post reply on HN