You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently all Lokole clients are configured to send their API requests to mailserver.lokole.ca (see install.py).
We should change this such that each client sends its API requests to a separate endpoint, e.g. {client_name}.lokole.ca. This provides us a number of benefits such as being able to block a misbehaving client at the DNS level and enabling different clients to be served by different server stacks which is useful for scaling, experimentation, etc.
There are several steps required to implement this change:
Modify cert-manager (see cluster-issuer.yaml) to issue wildcard certificates. This will enable us to request a TLS certificate which is valid for all of our dynamically created hostnames in the format of *.lokole.ca.
In the client registration code (see actions.py), create a new DNS A record in Cloudflare for the client, such as {client_name}.lokole.ca and return this value in the registration response. The code required for this will be very similar to what we're already doing to create the client-specific MX record (see dns.py), but instead of creating a MX record for {client_name}.lokole.ca we'll create an A record that maps {client_name}.lokole.ca to the server's IP address.
To make the server aware of its IP address, we'll need to store the ingress IP available at the end of the server setup (see setup.sh) in a kubernetes secret and inject this to the server as an environment variable.
The Lokole webapp code already looks up the hostname of the API server it should connect to via an environment variable (see config.py). We'll need to modify the Lokole client setup script (which sets the server endpoint environment variable) from its current static value (see install.py) to a dynamic value. We can achieve this by modifying the Lokole client setup script where we call the client registration endpoint to store the new API endpoint URL returned by the server (see install.py).
The text was updated successfully, but these errors were encountered:
Currently all Lokole clients are configured to send their API requests to
mailserver.lokole.ca
(see install.py).We should change this such that each client sends its API requests to a separate endpoint, e.g.
{client_name}.lokole.ca
. This provides us a number of benefits such as being able to block a misbehaving client at the DNS level and enabling different clients to be served by different server stacks which is useful for scaling, experimentation, etc.There are several steps required to implement this change:
*.lokole.ca
.{client_name}.lokole.ca
and return this value in the registration response. The code required for this will be very similar to what we're already doing to create the client-specific MX record (see dns.py), but instead of creating a MX record for{client_name}.lokole.ca
we'll create an A record that maps{client_name}.lokole.ca
to the server's IP address.The text was updated successfully, but these errors were encountered: