off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
javahippie 2021-03-04T07:52:14.146200Z

So, I was planning to integrate Auth0. Most people talking about Okta Support and Sales are not happy… are there any alternatives left out there you can recommend?

orestis 2021-03-04T09:16:16.146700Z

@javahippie join forces and let's develop something in the community... half joking but if the timelines align it would be nice.

javahippie 2021-03-04T09:27:00.147300Z

For the community, there is always Keycloak 😉

javahippie 2021-03-04T09:27:45.147500Z

I tried setting up several providers with the ring OAuth middleware, and it works fine for most of them. But I need “Log in with Apple”, and OF COURSE they don’t stick to the standards….

orestis 2021-03-04T09:30:15.147700Z

Yeah. Passport.js in Node land is trying to fill this gap, I'm not sure if there's anything like that in JVM or Clojure land.

javahippie 2021-03-04T09:32:31.147900Z

For my application, I patched Ring OAuth to support Apple, too, but maintaining such a library to support several vendors, even those violating standards, sounds like a huge pain

orestis 2021-03-04T09:43:50.148400Z

That's where many hands usually helps. Not that it's a panacea of course.

Timur Latypoff 2021-03-04T09:56:25.150700Z

<rant> Oh the hoops I have to jump through, in order to run a python 2.7 script with all its dependencies on an up-to-date OS. I just want to run a script some other guy wrote three years ago, let me just run it! </rant>

Timur Latypoff 2021-03-05T11:45:00.167500Z

I sudo piped my way into making scripts work more times than I am willing to admit, unfortunately 😞

p-himik 2021-03-05T11:48:01.167700Z

Embrace pyenv, my friend. :) At this point, this tool is a must for Python development.

Timur Latypoff 2021-03-05T11:52:25.167900Z

Yeah, I actually used pipenv successfully a couple of times, but the whole zoo of pyenv/pipenv/virtualenv/venv/pyvenv, along with py2/py3 incompatibility, and compatibility-breaking library version updates, and strange version locking — really confuses me a lot.

Timur Latypoff 2021-03-05T11:53:31.168300Z

It all boils down to "don't touch it if it works" strategy when I am dealing with Python

p-himik 2021-03-05T11:56:02.168500Z

pipenv is a completely different tool though. I'm using it as well in one project, but in retrospective I think I would be better off without it, for various reasons. pyenv is the tool to manage different Python versions at user level. pipenv is one of many tools to manage virtual environments and dependencies for particular projects - there are many alternatives for that.

👍 1
p-himik 2021-03-05T11:57:09.168700Z

> compatibility-breaking library version updates, and strange version locking The whole Python community is largely a mess here, yeah. One of the reasons I now try to avoid dealing with Python at all.

emilaasa 2021-03-05T18:09:06.169500Z

I have given up and now only run python in docker containers.

javahippie 2021-03-04T10:00:49.151Z

So you are thinking about a library containing OAuth endpoints, authentication flows (maybe scopes) for the main social connectors? I’d be tempted… Keycloak is an alternative, but I really don’t want to set up and maintain additional infrastructure for this

orestis 2021-03-04T10:07:30.151200Z

Yeah the infrastructure is what turns me off Keycloak.

orestis 2021-03-04T10:07:58.151400Z

I was thinking this: http://www.passportjs.org but for Ring 🙂

agigao 2021-03-04T10:49:33.151800Z

<wizard> re-write it into Clojure and you’ll run it after 10 years </wizard> 😄

javahippie 2021-03-04T11:09:43.152Z

Looks nice, I agree something like this would be very helpful as a Ring Middleware

Asier 2021-03-04T12:39:41.152200Z

https://github.com/magnetcoop/buddy-auth.jwt-oidc

Asier 2021-03-04T12:40:33.152500Z

We use it with AWS Cognito and Keycloack.

javahippie 2021-03-04T12:45:47.152700Z

For Ring there is also https://github.com/weavejester/ring-oauth2, but none of them bring along specifics for the oidc providers, like passport would do

gklijs 2021-03-04T14:39:30.153600Z

I mentioned password.js to a colleague that has used node more. But he says it's poorly maintained..

javahippie 2021-03-04T14:55:14.153800Z

Yeah, the open issues / open PR don’t look to good, and there was no noteworthy activity for over a year now.

p-himik 2021-03-04T15:34:26.154Z

A proper way nowadays would be to use pyenv (preferably, with an addition of a virtual environment on top). With it, it's a breeze.

p-himik 2021-03-04T15:35:08.154200Z

And just in case - never, ever, ever, run sudo pip. You will be in for some baaad time later on, guaranteed.

p-himik 2021-03-04T15:35:33.154400Z

(assuming you're on *nix)

gklijs 2021-03-04T16:41:01.154600Z

Seems it should still be Keycloak for us, luckily another team is managing that. (We are about to start with a new team)

2021-03-04T18:06:21.158800Z

Anyone have formats they particularly like for storing application configuration? These are parameter values for knobs we provide in the application, but which the users can set their own values for (and in some cases, can define their own “keys” as well). We’re quickly outgrowing the “big ball of JSON” and starting to consider alternatives to move to. The schemas will be fairly rapidly evolving, so easy versioning/migration is a must. I just saw something about DFDL, which looks interesting. Of course, since the backend is in Clojure, EDN has to be considered. Or something like Thrift perhaps. For purposes of adoption/expediency, it should ideally be something that can be serialized to a column in a relation DB fairly easily (ex: a BLOB/CLOB), or possibly stored in a set of normalized tables instead (is that a thing?). Anyway, all suggestions are welcome.

emilaasa 2021-03-05T18:11:51.169700Z

I try to stick to simple environment variables for simple things (db urls, user, pass etc) that change between deployments, and chuck the rest in a database. If the configuration is supposed to be done in a file then a nice file format and a good example can be useful.

2021-03-05T18:48:59.169900Z

yeah that’s what I would prefer to do, too. unfortunately, in this case there is dynamic state being updated by users (administrative functions in the UI)

2021-03-04T20:05:17.159800Z

I wouldn't choose YAML myself but it's clearly popular out there

2021-03-04T20:52:43.160Z

sigh… yes it is. personally, I don’t find it much nicer than JSON

2021-03-04T20:53:10.160200Z

and I presume any kind of versioning or schema would have to be bolted on

2021-03-04T20:54:07.160400Z

if you want versioning and schema's xml is an option

2021-03-04T20:54:28.160600Z

its not the most ergonomic option

2021-03-04T20:54:47.160800Z

yes, excellent point. somehow had forgotten about XML

2021-03-04T20:54:53.161Z

but some editors have good support for schemas

2021-03-04T20:55:11.161200Z

or perhaps just blocked it out of my memory

2021-03-04T20:55:14.161400Z

offering autocomplete and validation in the editor

2021-03-04T20:55:56.161600Z

how big is you're application config that you are running into problems?

2021-03-04T20:56:32.161800Z

well, we might have a notion of a “DB connection”, which has username and password keys to start. not too bad (ignoring, for a second, the problem of storing passwords in plaintext)

2021-03-04T20:57:01.162Z

but then various other things can enter into the picture. like if using an SSH tunnel/bastion server to connect, the address and details of that server

2021-03-04T20:57:12.162200Z

and possibly SSH key blobs (which can be large binary objects)

2021-03-04T20:57:24.162400Z

and Java keystore file contents (also large binary objects)

2021-03-04T20:57:45.162600Z

so, maybe “application configuration” isn’t really the right way to describe this after all

2021-03-04T20:57:59.162800Z

“metadata managed by the application on behalf of the users”

2021-03-04T21:03:13.163100Z

ok so more like application state, i'd just store this in a database

2021-03-04T21:03:27.163300Z

yeah, that’s what we’re already doing

2021-03-04T21:04:18.163500Z

not normalized, though, in the form of JSON blob in a TEXT column

2021-03-04T21:04:25.163700Z

which is what I’m thinking about moving away from

2021-03-04T21:10:23.163900Z

if the format is somewhat stable i'd just create some tables for this

2021-03-04T21:10:58.164100Z

if it changes all the time maybe something like avro helps

2021-03-04T21:11:24.164300Z

avro has a good backward compatibility story for versioning

2021-03-04T21:11:34.164500Z

yep, that is true

2021-03-04T21:11:48.164900Z

I’m more used to thinking about Avro as being a data format, like in the Hadoop world

2021-03-04T21:11:57.165100Z

but it doesn’t necessarily have to be

2021-03-04T21:12:10.165300Z

given our deployment model though, the bytes would still have to be stored in the DB, which is kind of gnarly

2021-03-04T21:15:26.165700Z

yeah deployment always makes things complicated