Fork me on GitHub
#off-topic
<
2022-07-14
>
Marius07:07:16

I’m writing a new SaaS payroll platform, providing access to a web frontend but also a paid API. What is your recommendation regarding Identity and Access Management? I’ve been looking at Keycloak, which seems to be a common choice, but there are also new players like https://ory.sh , which are appealing due to their lightweight approach, but unfortunately without Java/Clojure support. I’d appreciate any feedback and opinions!

javahippie07:07:58

Do you want to run your own, or is a Cloud provider also an option?

javahippie07:07:02

The new Keycloak is running on Quarkus instead of Wildfly, and therefore more lightweight. We evaluated using it, but we were concerned about properly securing the user data on our server and opted for Auth0 instead

☝️ 1
lispyclouds07:07:56

Adding onto Auth0, its seemingly steep price pays off over the longer run in my experience.

Tuomas-Matti Soikkeli07:07:57

Try to avoid running your own at all costs! In the long run the costs for maintaining it will be greater than just paying for a service.

Tuomas-Matti Soikkeli08:07:34

Look into AWS cognito if you are off-put by auth0 pricing but be prepared to spend some time on it.

slipset08:07:02

There is #web-security in where you could hit a better audience for your question. Also, I'd recommend the episodes with @U07QKGF9P on the Clojurescript podcast, there is something on identity management there, and I do remember him recommending AWS Cognito.

👍 2
slipset08:07:00

FWIW we're currently running “our own” identity management, using various Clojure libs like friend. What we've found is that as a first step we want to create a very clear boundary in our code between what's generic IM and what's our provisioning logic, since the first could be replaced by keycloak/cognito, whereas the second can not.

Asier09:07:16

We use either AWS Cognito or Keycloack depending on several factors: Cloud vs On-premises, custom UI, etc.

Marius09:07:44

@U0N9SJHCH I was hoping to be able to run my own to keep the cost low. As a database I’d use managed Postgresql, assuming user data is properly secured there 😉

Marius09:07:38

Actually now looking at the Auth0 pricing it does not seem so steep at all, I guess I’ll check out the free plan with 7k MAU, that should be good for now 🙂

javahippie09:07:39

We use it and still have not payed a single Dollar to them, yet 😄 If you need advice integrating your backend or a Clojure SPA with it, feel free to reach out, there is not a lot of info out there

Marius09:07:22

Cool, thank you very much!

javahippie09:07:14

Also: The DB for Keycloak is no security concern to me, I am more afraid of people accessing the data through the Software Layer. The maintenance can become quite expensive here, if there is a critical vulnerability concerned. And if there is no solution, yet, to work around the vulnerability, you’d have to switch your app off entirely, and that’s expensive 😉

lispyclouds09:07:46

My perspective more from the infra side with Keycloak is that its quite the headache when doing an upgrade/maintenance, specially the many many emails of planned schedules and upgrades at weird time of nights 😕 Auth0 is like a lifesaver. literally.

slipset10:07:51

Also note that as a SaaS provider you'll run into all kinds of weird and wonderful OIDC/OAuth impls with different quirks and settings needed to make them work.

Marius11:07:18

…which I hope Auth0 has all sorted out 🙂

slipset11:07:34

Last time I looked at Auth0 it let you pass arbitrary js code into a text area to deal with these situations. Not my kind of fun :)

jeremie08:07:51

A little bit late to the party, my experience of running authn/authz with Keycloak is quite good for the moment : • Running Keyckoak on Kubernetes + postgres in a cloud provider is easy. The upgrade sometimes needs downtime but few minutes and for major release. The deployment model can fit one Keycloak for all the non-prod environments with realm as the isolation mechanism. • The provisioning can be the real culprit, but I wrote https://github.com/jgrodziski/keycloak-clojure especially to solve that problem. With it you can declare your conf and users and a reconciliation process can be triggered to reliably synchronize the Keycloak instance (with retry with exponential backoff, etc.). Of course the first thing for good evolvability is to never conflate a User (keycloak’s concept of an identity) with an Account (all other things related to that identity), that’s two different bounded context if I adopt the DDD’s vocabulary. • For the security side it’s difficult to trust 100% a provider but Keycloak being widely iused and open, the vulnerabilities are quickly discovered and solved. The Financial Grade API reassure me about the security level (and Keycloak is commonly used within Bank).

Benjamin08:07:35

I am currently not grokking why there is IReduce and IReduceInit . irrc one of them only exists for backwards compatibility or something?

p-himik08:07:16

Sometimes dreams do come true. :)

Ben Sless11:07:05

Need some help with java midi, I decided to take clojure-sound for a spin but I have a java issue where the midi playback just stops after the first note. My google-fu couldn't beat this problem Ubuntu 22, tested on jvm 15 and 17

Ben Sless11:07:38

This example just freezes

import javax.sound.midi.*;
import java.io.File;

public class Player {
    public static void main(String[] args) {
        Player p = new Player();
        p.play();
    }
    public void play() {
        try {
            Sequencer player = MidiSystem.getSequencer();
            player.open();
            Sequence s = MidiSystem.getSequence(new File("./maple.mid"));
            player.setSequence(s);
            player.start();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Martynas Maciulevičius12:07:20

I have no idea what it is but what happens when you try to play a random file instead of mid? Maybe it doesn't crash as well? What about a nonexistent file?

javahippie12:07:37

If you can share the file here, I’d be happy to try and reproduce the issue

Ben Sless12:07:29

ah, sure, sorry

javahippie13:07:21

Works for me on Mac M1 with 17.0.1-tem

javahippie13:07:13

What does player.getDeviceInfo() output for you?

Ben Sless13:07:23

Yeah I guess the problem is with ubuntu or popos

1
Ben Sless13:07:46

Looks the same

javahippie13:07:16

Am afraid so, MIDI can be fickle, especially on Linux

quoll12:07:38

Twitter being down isn't something I’ve seen for a while!

quoll12:07:59

Did Elon do something to them?

😂 1
Hermann12:07:11

Maybe dug off their water supply (probably German context needed)

👍 1
adi12:07:18

Tinfoil hat time... Maybe it is those bots...

Ben Sless12:07:15

Thousands report an immediate improvement in their mood

😂 2
Martynas Maciulevičius12:07:07

Imagine getting a better life because of some stupid hacker hacking twitter...

Martynas Maciulevičius13:07:05

It's back. Better life is cancelled again!

Lennart Buit19:07:04

Did they pull themselves off the internet like Facebook this a while ago

uriel-caiado18:07:50

So, about Google's Guava library, anyone knows if it performs better than Java's standard libraries?

Martynas Maciulevičius18:07:02

I didn't use it too much but from what I understand it's a wrapper on top of Java's standard library. And if they create data structures then you should look at the particular data structure and not the whole. So for me it seems that the most performance can be gained in writing the code (compared to writing Java) and not running it (i.e. it's a syntax sugar library). But you already use Clojure so you probably don't need Guava. Also I think that languages like Kotlin somewhat deprecate Guava as you can have better defaults. IMO Guava is a "better defaults" library. But being "better" is a subjective thing.

🙂 1
uriel-caiado18:07:36

Thanks for the comprehensive answer. The reason why I asked that is because I wondered if Guava is for Java what Closure Library is for JavaScript. After reading your reply, I guess they have different scopes.

zerjens20:07:58

I like to think of Guava being to Java what Boost is to C++, not a perfect analogy but considering Boost offers more-sane alternatives to std

zerjens20:07:44

I’ve used Guava’s graph library from Clojure in the past too, doing some compare and contrast with Loom. Like most Google built libraries doesn’t do a lot of reflection magic like Spring so it’s more amenable to interop with other JVM languages

ghadi18:07:45

it's pretty large library. are you using a particular feature?

uriel-caiado18:07:31

none at all, started wondering if it'd be for Java what Closure Library is for JavaScript. I think, now, that they have different scopes.