Special characters in passwords breaks Prisma migrations

If using a password that contains special characters it might break Primsa migrations and cause the web pods to fail. This can be resolved with special formatting and SQL.

For every non alpha-numeric character we replaced it with the value outlined in: https://stackoverflow.com/questions/63684133/prisma-cant-connect-to-postgresql

  1. Change the password in your database, and secret if used in your deployment.

    1. Select a new password to use.

    2. Exec into db container, log into psql as postgres

      1. kubectl exec -n <NAMESPACE> -it <DATABASE-POD-NAME> -- bash

      2. psql -u postgres

      3. ALTER USER postgres WITH PASSWORD 'newpassword';

    3. Exit the Postgres container and pod

  2. If a kubernetes secret is being used you must edit the secret to reflect the password changed in the steps above:

    1. Change the databaseSuperuserPassword in the immuta-secrets kubernetes Secret to reflect the new password

      1. Postgres passwords must be base64 encrpyted prior to saving or altering outside of SQL:

        1. echo "newpassword" | base64

      2. Save the secret

Last updated