Add keycloak authentication
Together with my colleague @GiorgioBart we have extended the authentication method to https://github.com/keycloak
We have defined some environment variables:
- KEYCLOAK_ENABLE
- KEYCLOAK_URL
- KEYCLOAK_REALM
- KEYCLOAK_CLIENTID
- KEYCLOAK_USERINFO_ATTRIBUTE
This sounds useful! A few notes:
- keycloak implements open authentication standards. I don't think there is a reason to make wbo dependant on keycloak instead of being generic and working with any openid connect provider.
- If I'm not mistaken, the most important part is missing: the server side token verification logic.
Amy further improvements @mspasiano? I'm really looking forward to it ;-)
We shouldn't have to take more than an optional oidc discovery url. Keycloak implements the standard oidc protocol; I don't think this should be keycloak-specific, mention a realm, or need a "userinfo" configuration.
We shouldn't have to take more than an optional oidc discovery url. Keycloak implements the standard oidc protocol; I don't think this should be keycloak-specific, mention a realm, or need a "userinfo" configuration.
You could use this https://www.npmjs.com/package/openid-client what do you think? If you think it's appropriate I can take care of it, I did the same thing for PeerTube https://www.npmjs.com/package/peertube-plugin-oidc-cnr
Yes, we can use an external lib. But we should keep compatibility with the existing jwt authentication mechanism described in https://github.com/lovasoa/whitebophir#authentication