News for hackers. Stuff that matters.
Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Wednesday May 04, 2022 @07:28AM (#31259034)
My company used Keycloak for a long time (I'm not there any more) and I agree with everyone here, it works great, but it's hard to understand unless you already know oauth/oidc, and it is a huge binary.

While Keycloak is a great out-of-the-box solution, my #1 complaint at the time was how heavyweight it was, which was a burden for development, followed closely by its packaging as a J2EE app and bundling with Wildfly (at the time).

This meant we needed to know not only about Keycloak itself, but also about Wildfly's special quirks, the clustering system (Infinispan??), Java and Docker.

Now it's packaged with Quarkus, which is another dependency to learn about, and to be honest despite the quality of the finished product, all those dependencies have become pretty off-putting.

So while I can recommend Keycloak's functionality, if you're not already deploying Java apps as part of your job, I suspect it will present a pretty serious administrative burden to deploy into serious production.

Re:Keycloak: Open-Source Identity and Access Management by maxbaines on Wednesday May 04, 2022 @07:39AM (#31259121)
For me this is all kind of opaque, apart from a theme put into a folder and some Environment Variables set i don't touch anything in Keycloak, first had no requirement to consider it and second very likely would be doing something maybe not best practice i.e oidc, oauth based.

Its the only java app we run in stack, but doesn't matter to me in Docker and within Windows we run a portable java from a subfolder of keycloak so not System wide in Path

Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @07:46AM (#31259187)
You might want to have a look on zitadel [1]

If you are intrigued into the differences, you can read some of them here [2]

Oh and judging from your username: it could be interesting to you... because we use eventsourcing and cqrs ;-)

Disclaimer: I am one of the authors

1. https://github.com/zitadel/zitadel/

2. https://zitadel.ch/blog/zitadel-vs-keycloak

Re:Keycloak: Open-Source Identity and Access Management by jordemort on Wednesday May 04, 2022 @09:13AM (#31259911)
I was interested in Zitadel, but because it requires Kubernetes, it can't replace Keycloak in my docker-compose managed homelab setup. If you could just run it as a standalone container, I'd give it a shot.
Re:Keycloak: Open-Source Identity and Access Management by stebenz on Wednesday May 04, 2022 @09:36AM (#31260168)
Sounds like you would be interested in v2 (https://zitadel.ch/v2) as in it will be provided as single binary, which you should be able to use in our homelab setup.

There are a lot of other improvements, but if that's the only dealbreaker, v2 should take care of it.

Re:Keycloak: Open-Source Identity and Access Management by js4ever on Wednesday May 04, 2022 @04:20PM (#31265333)
Wow I was not expecting that! Usually offering only a Kubernetes version is the new way to force small users to the SaaS version.
Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @04:55PM (#31265750)
True, we think that for most setups and early explorations K8s is too much of a beast. TBH we are in the process of switching our cloud from K8s to Cloud Run which is kind of close to Knative but without the ops hustle ;-)
Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Wednesday May 04, 2022 @04:45PM (#31265630)
Apache 2.0 and golang. Thank you! That’s exactly what I was looking for. I’ll check out v2 asap.
Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @04:53PM (#31265732)
Thank you, v2 will be ready in the next 2-4 weeks. We are already running it internally ;-)
Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Wednesday May 04, 2022 @07:05PM (#31267020)
Oh yeah I came here to ask "when". 2-4 weeks is brilliant. Hopefully this is my IAM strategy sorted and I can worry about some other stuff instead :)

I'm really impressed with your strategy and v2 looks like a really great upgrade.

Re:Keycloak: Open-Source Identity and Access Management by ffo on Thursday May 05, 2022 @02:20AM (#31270177)
Thank you ;-) we will keep you posted.
Re:Keycloak: Open-Source Identity and Access Management by jordemort on Wednesday May 04, 2022 @09:41AM (#31260244)
Yep, that's the only dealbreaker for me - I'll keep an eye out for v2!
Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @04:56PM (#31265761)
Love it, we will definitely create a post here in the next 2-4 weeks.
Re:Keycloak: Open-Source Identity and Access Management by getcrunk on Wednesday May 04, 2022 @05:40PM (#31266201)
Your v2 pricing model is lame. I was literally pulling out my credit card when I saw the original pricing.
Re:Keycloak: Open-Source Identity and Access Management by ffo on Thursday May 05, 2022 @02:18AM (#31270170)
Thanks for the feedback.

What do you not like of the new pricing? The pay-as-you-go approach?

The background to this is, that we got many customers asking for features on the lower tiers and that many of them wanted to have a more linear scaling in their business cases. On the other hand we wanted to make sure, that even from the start you get all security features without paywalling them.

The 25K request roughly translate to 10K user per Month and you will be able to get that without a credit card :-)

Re:Keycloak: Open-Source Identity and Access Management by sebmellen on Wednesday May 04, 2022 @08:44AM (#31259645)
What is your opinion on ORY, specifically ORY Kratos? We have been building on Kratos for some time now and find that it is not super well documented, but it is still a very pleasant experience and their ORY Cloud project is backed by support from their team.

How does Zitadel differ/compare? Do you have similar goals as an organization?

Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @08:58AM (#31259763)
Well to keep it brief, we see it the following way. Use:

- ZITADEL: If you want turnkey solution built for the cloud with a great support for B2B, a strong audit trail and self-hosting, but also the option for SaaS - Ory: If you want flexibility to customize all the stuff but are aware that it is not as turnkey as ZITADEL and Keycloak - Keycloak: If you want turnkey with a high maturity and a lot of features but some lack in regard to B2B, cloud native and support

This more or less reflects my opinion about Ory. I like the way they built their suite because its totally flexible. But it dislike the fact that it does not feel like a turnkey solution and needs some more work than plugin in a OIDC client.

So what we think and aim for is that ZITADEL combines the best of Auth0 and Keycloak [1] while bringing some unique features to the table. For example an unlimited audit trail (built with event sourcing), great self-service capabilities for B2B and B2C cases (customers can manage their own org, user, federation, access) and the possibility to soon run "serverless" (well at least as serverless container). With our cloud service we also allow customer soon to move their data around (see data location [2]). And all of this while being totally open source.

1. Funny image for this https://twitter.com/ffo_sesp/status/1519655412752162818?s=20...

2. https://zitadel.ch/pricing/v2

Re:Keycloak: Open-Source Identity and Access Management by collegeburner on Wednesday May 04, 2022 @06:04PM (#31266460)
Looks nice, but the CockroachDB dependency is kinda a pain for people not already using that. Any plans for alternative db support, like Maria or Postgres?
Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Wednesday May 04, 2022 @08:03PM (#31267571)
If CockroachDB supports the PG wire protocol and appears to be a functional subset of PG then in theory we might be able to just point it at a PG database and it might work :)

I too would prefer to use PG than Cockroach, if only because I have ops experience with PG. But Cockroach is certainly intriguing.

Re:Keycloak: Open-Source Identity and Access Management by ffo on Thursday May 05, 2022 @02:25AM (#31270203)
Thank, we hear you! Currently we are discussing two things for this subject.

1) We think providing an embedded DB of some kind for easy to use cases with ZITADEL might be favourable to some of you (think Sqlite or an embedded CockroachDB ) 2) To allow plain Postgresql besides CockroachDB should be an easy thing to do since we already make use of PG wire protocol. We plan to address this in a 2.X release

What do you think of this? Or what DB would on your Wishlist?

Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Thursday May 05, 2022 @02:56AM (#31270410)
Thanks for taking the time to answer everyone's questions, and for asking me this one.

My own personal preference would be if you could please support PG, because in that case I could be confident of going into production with what I configure, even if it's less scaleable than CockroachDB. I'd really prefer to be learning about how Zitadel works, rather than learning CDB or trying to remember sqlite cli commands.

I'm happy to give CDB a spin once Zitadel 2.0 comes out, but it will add to the burden of onboarding it into my stack, and I'd think that's something you'd like to avoid going forward :)

Re:Keycloak: Open-Source Identity and Access Management by ffo on Thursday May 05, 2022 @03:28AM (#31270587)
Well thank you for your time. Let me check with the team. I am certain we can release 2.X with a Postgresql support ;-)

I created an issue for further tracking https://github.com/zitadel/zitadel/issues/3598

Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Thursday May 05, 2022 @04:03AM (#31270789)
That rocks. Thank you. I’ve been hanging out for a more lightweight IAM/IDP solution, quite literally for years. I really hope yours is it.
Re:Keycloak: Open-Source Identity and Access Management by ffo on Thursday May 05, 2022 @04:39AM (#31271010)
We too ;-)
Re:Keycloak: Open-Source Identity and Access Management by evrflx on Thursday May 05, 2022 @06:03AM (#31271473)
I would love to have the embedded db option as well. Reason: for demos on conferences but more importantly in a training/workshop or Tutorial scenario it should be easy to get it running and let students replicate the setup. I assume that this can be a nice multiplier and is underrated by many „modern“ projects. (Elastic apm 8.x: I am looking at you)
Re:Keycloak: Open-Source Identity and Access Management by sebmellen on Wednesday May 04, 2022 @09:40AM (#31260226)
Make sense, thank you for the answer! I do think the turnkey solution middleground is badly needed and I'm excited to see where ZITADEL goes. We've already committed heavily to Ory on this project, but maybe on the next one we'll be able to explore ZITADEL!
Re:Keycloak: Open-Source Identity and Access Management by ffo on Wednesday May 04, 2022 @09:48AM (#31260348)
Thank you too. Feel free to join our chat and ask questions any time https://zitadel.ch/chat (discord)
Re:Keycloak: Open-Source Identity and Access Management by joekrill on Wednesday May 04, 2022 @10:24AM (#31260882)
That's really surprising to me. I've been building some things with Ory Kratos myself and I find the documentation pretty good. There's definitely room for improvement but I'm typically able to find what I need pretty easily. I certainly find it much more usable than the Keycloak docs.
Re:Keycloak: Open-Source Identity and Access Management by littlecranky67 on Wednesday May 04, 2022 @07:41AM (#31259133)
Was working at a Java shop once which used Keycloak as a central IAM solution. As an FE Dev, I was tasked to customize/style the login-page provided by Keycloak, and quickly faced what you described: Pretty heavily Java-based, even to edit HTML templates I had to recompile using a full blown Java/JVM stack.

As an FE dev without Java background, this became pretty difficult. But once we finished that with the help of some of the BE Java devs, it ran (and still runs) quite stable and also the KeycloakJS adapter I integrated was alright without much surprises.

Re:Keycloak: Open-Source Identity and Access Management by oauea on Wednesday May 04, 2022 @08:44AM (#31259644)
> even to edit HTML templates I had to recompile using a full blown Java/JVM stack

Next time check the docs and turn off the theme cache: https://www.keycloak.org/docs/latest/server_development/#cre...

> While creating a theme it’s a good idea to disable caching as this makes it possible to edit theme resources directly from the themes directory without restarting Keycloak.

Re:Keycloak: Open-Source Identity and Access Management by spacemanmatt on Wednesday May 04, 2022 @08:29AM (#31259516)
Java backend/React frontend dev here.

I customized Keycloak 10 login page a while back, and it did not require anything but markup. My Keycloak 18 instance runs the same customization now, unchanged.

Re:Keycloak: Open-Source Identity and Access Management by psnehanshu on Wednesday May 04, 2022 @09:34AM (#31260134)
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

Re:Keycloak: Open-Source Identity and Access Management by littlecranky67 on Wednesday May 04, 2022 @10:08AM (#31260634)
Because that is not how you customize the login/signup page that lives inside Keycloak (and its Docker image, if you use docker).
Re:Keycloak: Open-Source Identity and Access Management by psnehanshu on Friday May 06, 2022 @08:16AM (#31284250)
Sorry, my misunderstanding.
Re:Keycloak: Open-Source Identity and Access Management by jbaczuk on Wednesday May 04, 2022 @11:14AM (#31261644)
I knew I could smell Java when I went to their website...
Re:Keycloak: Open-Source Identity and Access Management by marcosdumay on Wednesday May 04, 2022 @02:17PM (#31263977)
Languages (actually, ecosystems) do have specific smells. You can perceive them on every artifact. It's an interesting observation.
Re:Keycloak: Open-Source Identity and Access Management by advaitruia on Wednesday May 04, 2022 @09:35AM (#31260156)
> my #1 complaint at the time was how heavyweight it was, which was a burden for development What do you mean by "heavyweight"?

I ask because Java in other large open source projects (Elastic Search, Cassandra, Android) and it really depends on how its being used (by Keycloak as well)

I've also come across GraalVM which can significantly reduce Java memory consumption (if that is something you are referring to)

Re:Keycloak: Open-Source Identity and Access Management by doctor_eval on Wednesday May 04, 2022 @07:19PM (#31267141)
Well just bear in mind that this was about 4 years ago (we were fairly early adopters apparently), and I understand that my comments here are probably no longer fair, and probably don't apply to KC at it is today.

But since you asked, basically Keycloak was by far the single largest component of our stack, which didn't sit well with me because by any measure, our application was far more complex than Keycloak.

At the time we were transitioning away from JEE to JSE microservices, and Keycloak was a full-blown JEE application with all the heaviness that we were successfully leaving behind; it took over a minute to start, while our other Java services would launch in less than a second. Of course this didn't impact production at all - but most engineering time is spent in development and testing, where this was a real problem, especially if we were experimenting with and learning about new features.

All of this contributed to my perception of heaviness.

Re:Keycloak: Open-Source Identity and Access Management by advaitruia on Tuesday May 17, 2022 @10:38AM (#31411346)
Fair enough, thank you for the explanation!

Seems like your other Java services were not an issue though?

Re:Keycloak: Open-Source Identity and Access Management by voidcommonstock on Wednesday May 04, 2022 @11:08AM (#31261560)
Another OAuth2 server, that's well on the other side of the heavyweight spectrum vs. keycloak:

https://github.com/curveball/a12n-server

Re:Keycloak: Open-Source Identity and Access Management by mooreds on Wednesday May 04, 2022 @08:07AM (#31259344)
We hear comments like this a lot. Keycloak has a lot of functionality but also a lot of quirks. We have a product, FusionAuth, that folks often consider at the same time.

Similarities between our products:

* Overall base feature set (OAuth, OIDC, SAML, user management, authentication, RBAC) is similar.

* Both written in Java.

* Both use container technology to hide Java from you :)

* Both offer commercial support (Redhat SSO is the commercial offering for Keycloak, FusionAuth has paid editions with support). FusionAuth is much less expensive (compare https://marketplace.redhat.com/en-us/products/red-hat-single... with https://fusionauth.io/pricing .)

* Both offer the ability to self-host.

* Both develop in the open (we use GitHub issues, they use a mailing list).

Differences:

* They're OSS, we are free as in beer.

* I haven't found a compelling hosting solution for Keycloak, most folks self host. FusionAuth offers a hosted product if you'd like.

* Keycloak has more niche features (CAS SSO support) and a bigger community.

* FusionAuth has better, more straightforward docs.

* FusionAuth user UI customization is easier.

* FusionAuth supports a number of languages with client libraries for easier config management. I only saw a python client library for Keycloak.

* FusionAuth supports unlimited tenants, limited only by your server's resources. We have folks running thousands of tenants. Last time I looked Keycloak had issues around 400 realms (their term for tenants): https://keycloak.discourse.group/t/maximum-limit-of-realms/8...

Disclosure: I work for FusionAuth.

Re:Keycloak: Open-Source Identity and Access Management by oauea on Wednesday May 04, 2022 @08:42AM (#31259628)
> Disclosure: I work for FusionAuth.

Don't worry, that was obvious.

Re:Keycloak: Open-Source Identity and Access Management by mooreds on Wednesday May 04, 2022 @08:48AM (#31259689)
Ha ha, fair enough. I've found it better to err on the side of transparency.
Re:Keycloak: Open-Source Identity and Access Management by freedomben on Wednesday May 04, 2022 @12:30PM (#31262703)
I would offer two suggestions that might improve reception:

1. Put that disclaimer at the top

2. Shrink it to no more than a couple sentences and link to a blog post or something for the detailed comparison. It looks pre-canned and kind of spammy the way it is now

Re:Keycloak: Open-Source Identity and Access Management by mooreds on Wednesday May 04, 2022 @01:27PM (#31263395)
Thanks, I appreciate that feedback. I agree that I was over enthusiastic. Unfortunately I can't edit the post now, but will do better next time.
Re:Keycloak: Open-Source Identity and Access Management by abraae on Wednesday May 04, 2022 @06:19PM (#31266603)
Realms are not necessarily equivalent to tenants in Keycloak.

You can run many tenants inside a single realm (we do). They can all log in to their account using Google, LI, etc., as well as email/password.

It's only if your tenant requires SSO, e.g. to their corporate idp, that their own realm is required.

Of course you may choose architecturally to put every tenant in their own realm but that is overkill IMO.

Re:Keycloak: Open-Source Identity and Access Management by mooreds on Wednesday May 04, 2022 @08:09PM (#31267624)
Ah, thanks. It probably depends on what you mean by tenant; there's no real accepted definition. By tenant, I mean a separate user space, and I think that is analogous to Keycloak realms. (So [email protected] in tenant 1 has no connection at all with [email protected] in tenant 2; separate passwords, different profile data, etc.)

But it sure looks like you can have multiple tenants (in your SaaS application) all against one realm in Keycloak if you don't want that level of separation. In fact, here's an article from 2020 discussing that exact architecture: https://medium.com/swlh/using-keycloak-for-multi-tenancy-wit...

Re:Keycloak: Open-Source Identity and Access Management by abraae on Wednesday May 04, 2022 @08:20PM (#31267722)
Separate user spaces are achievable within a single realm. In our case, we do it using an account chooser within our application code. After logging in, you select the account you want to work within.

I think of realms as part of a trust model. No realm can safely "trust" another realm's user identities. For example, if I own my own realm, I can set up my own bogus idp and pretend to be the user [email protected], even though I don't own that email or have any access to it.

In our case, the exception is the central realm, where all customers who don't need SSO live. In SaaS, this is usually most customers (> 90% for us). Only larger and more security-minded orgs will want their own SSO and hence their own realm. In the central realm, anyone can authenticate through a set of "trusted" idps (Facebook, Google etc.) as well as good old email and password. This does make the central realm vulnerable to compromise of e.g. Facebook.