nebari-dev / nebari-self-registration

Apache License 2.0
0 stars 2 forks source link

Add documentation/configuration option about email verification #15

Open marcelovilla opened 3 months ago

marcelovilla commented 3 months ago

Right now, the README states that:

After you have entered a new password, you will receive a verification email.

However, for a fresh deployment of Nebari with the plugin, that's not the case. I'm assuming there's some kind of external configuration that has to be done (e.g., configuring a SMTP server in Keycloak) before the verification email gets sent.

Besides documenting this, would it make sense to expose it as a configuration option and potentially have the plugin configure the SMTP server automatically given some parameters?

kenafoster commented 3 months ago

Good catch. For a first step, I will update the README so that it says the user will only receive a verification email if the email validation is currently enabled (with a link to the page I'm also working on about enabling outgoing SMTP)

Since email validation and SMTP configuration are core configuration items, I think it would make more sense for it to be configurable in the base Nebari config than through an extension.

viniciusdc commented 3 months ago

This might be related @marcelovilla https://github.com/nebari-dev/nebari-docs/pull/463

Since email validation and SMTP configuration are core configuration items, I think it would make more sense for it to be configurable in the base Nebari config than through an extension.

This is reasonable. We might have already exposed a custom override capability to Keycloak's settings, but that needs better documentation and only affects what Is already present in the values.yaml for the keycloak service itself. If we want something like this to be exposed, we need to think about how to provide those settings to Kubernets Keycloak Stage as this has the power to interact with the realm

viniciusdc commented 3 months ago

Also, a bit out of this discussion scope, but regarding exposing some configuration to the user here, maybe it would be a nice addition to enable styling or provide your own custom email verification/token HTML:

image

kenafoster commented 3 months ago

Did a little digging here - it's possible to develop a custom set of email templates in Freemarker and then mount them in the running keycloak container at /opt/jboss/keycloak/themes/nebari (we already mount other data this way, such as one at /opt/jboss/startup-scripts/nebariadminuser.sh) We could also use the theme.jupyterhub portion of the config file to generate a template set with branding that matches the user's custom JHub theme.