dexidp / dex

OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
https://dexidp.io
Apache License 2.0
9.53k stars 1.71k forks source link

Generic database connector #1831

Open al45tair opened 4 years ago

al45tair commented 4 years ago

Many of us have an existing database containing users (and groups) and would like to be able to plug Dex into it. There should be a connector that allows for this, perhaps allowing for customisable SQL queries (rather like the way the LDAP connector allows for custom LDAP queries).

sagikazarmark commented 4 years ago

Rewriting the SQL layer is high on our priority list. We are looking at https://github.com/facebook/ent

I'm not sure how generic we can be. Supporting customizable queries is certainly a deep rabbit hole that we don't necessarily want to go down into. Supporting more storage drivers is an option, but adds an extra maintenance burden.

Postgres, Mysql, sqlite, etcd are probably generic enough, so we will stick to those for now.

al45tair commented 4 years ago

I've actually got a PR I'm working on for this.