Enabling Password Reset Feature
Overview
The password reset feature allows user to request a password reset email (they simply need to open a browser to the C3 server and click on the “Forgot your password?” link).
The Password Reset Feature is required in order to allow users to reset their passwords, or to utilize the shepctl commands for bulk user account creation.
There are two supported methods:
1. SendGrid
2. SMTP Server
The simplest of the two is using SendGrid. For using SMTP, you’ll at least need to know your smtp server’s hostname/ip address.
We will use a k8s patch file to set the needed settings. You’ll need to make sure you can access kubectl either directly or append the following commands with microk8s if you haven’t made any adjustments to how you access the kubectl tool while using microk8s.
SendGrid
For SendGrid we will only need one piece of information before we start, this is your SendGrid API Key. Edit the sendgrid-patch.yaml file, and change the test your_sendgrid_api_key to your actual SendGrid API Key.
Now apply the change:
kubectl -n sshepherd patch statefulset python-flask --patch "$(sendgrid-patch.yaml)"
SMTP Server
For SMTP Server, you’ll need to know the hostname/ip address for your smtp server, the port that the smtp server is listening on, whether or not it requires TLS, and the username/password combination for the email address you want the emails to come from. Once you have all of that, you’ll need to go into mail-server-patch.yaml and adjust those settings to match what you need.
Now apply the change:
kubectl -n sshepherd patch statefulset python-flask --patch "$(mail-server-patch.yaml)"