aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
steveb8n 2020-04-27T02:25:24.132Z

I’m using Cognito. It was nasty to set up but (as you say) is good to keep everything with one vendor. I eventually set it up using CDK

steveb8n 2020-04-27T02:25:50.132600Z

I plan to move to Keycloak in the future though: better features and docs all around. Can still run that on AWS

Ahmed Hassan 2020-04-27T07:05:00.132700Z

There's library named `keycloak-clojure` to wrap the Keycloak Java Adapter https://github.com/jgrodziski/keycloak-clojure

Ahmed Hassan 2020-04-27T07:10:01.133Z

How much feasible is setting up Keycloak for a single developer? vs using sessions and PostgreSQL tables for user's email/username, roles, hashed password and permissions? Using Buddy and Permissions (https://github.com/tuhlmann/permissions) for this purpose. I'm asking from the perspective of operational cost, complexity, barriers versus benefit.

Ahmed Hassan 2020-04-27T08:36:29.133600Z

@ackerleytng

ackerleytng 2020-04-27T08:42:12.133800Z

I've not used keycloak with clojure before, but i've used it with a python webapp

ackerleytng 2020-04-27T08:42:45.134Z

i liked not having to worry about sessions, and getting to offload a lot of the security stuff to gatekeeper

Ahmed Hassan 2020-04-27T08:44:10.134200Z

How did you setup keycloak? is it feasible to do it on same machine on DO droplet on which app installed (with postgresql for app data)?

ackerleytng 2020-04-27T08:44:21.134400Z

actually the nice part is more gatekeeper than keycloak! not sure if AWS has a similar setup, but the idea behind gatekeeper is that it takes client traffic like a reverse proxy, and only forwards it upstream if it passes validation

ackerleytng 2020-04-27T08:45:05.134600Z

i set it up on another VM

ackerleytng 2020-04-27T08:45:33.134800Z

if you set it up on the same machine, you'll have to deal with routing the client requests between keycloak and your app

ackerleytng 2020-04-27T08:46:11.135100Z

the client will need to be redirected to keycloak, that's the way OAuth works

Ahmed Hassan 2020-04-27T08:48:32.135300Z

so request would go like nginx -> keycloak -> keycloak gatekeeper -> clojure app

ackerleytng 2020-04-27T08:50:24.135500Z

nope, it'll be something like

nginx -> keycloak
  |
  V
gatekeeper -> clojure app

ackerleytng 2020-04-27T08:51:45.135800Z

happen to be working on this recently: https://github.com/ackerleytng/keycloak-quickstarts/tree/latest/app-authz-uma-photoz#scripted-quickstart

ackerleytng 2020-04-27T08:52:09.136Z

this isn't the python app, it's a quickstart that keycloak provided

ackerleytng 2020-04-27T08:52:30.136200Z

i modified it to work in docker and added further instructions to make it a quicker quickstart

ackerleytng 2020-04-27T08:52:56.136400Z

I used caddy to route between keycloak and the java app (this one doesn't use gatekeeper)

ackerleytng 2020-04-27T08:53:14.136600Z

not sure if this is such a good idea for a production service though