How to auth in grist-omnibus with custom python script?

(Disclaimer: I am a professional firefighter, not a developer…)

I am self hosting grist-omnibus for my fire brigade local network on a Debian machine.

No problem with hardwired usernames and passwords as in docker -e EMAIL=owner@example.com -e PASSWORD=topsecret ...

I would like to authenticate users by checking their usernames and passwords on our SMTP server (this is the only sort of SSO I have access to…).

So I wrote a very simple Python function using smtplib that can check if the supplied username+password is correct and return the result.

Could you please suggest me a way to hook up the result of that function to Dex in grist-omnibus?

Thank you in advance and happy festivities, if applicable.

PS
Dex could do something like this, see: A connector for SMTP authentication by jeffallen · Pull Request #2601 · dexidp/dex · GitHub
But the developers did not merge the request. And the Go language is beyond my ability…

I did it!

Here is how:

In the meantime I started learning Golang.
I am very proud of myself :wink:

What’s left to do:

  • clean up the mess of my github repos.

Grist is great! Thank you again.

3 Likes