Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base64 Encoded SSL Certificates? #71

Open
chrishemmings opened this issue Oct 25, 2022 · 1 comment
Open

Base64 Encoded SSL Certificates? #71

chrishemmings opened this issue Oct 25, 2022 · 1 comment

Comments

@chrishemmings
Copy link

Hey there,

Looking at one of my old implementations of this, I have the following in the my entry point so we can put certs in environment variables. Fancy adding something like this to yours?

if [[ -z "${PGBOUNCER_DATABASE_SSL_CLIENT_CERT}" ]]; then
    echo "► No SSL Client Cert Found"
  else
    echo "${PGBOUNCER_DATABASE_SSL_CLIENT_CERT}" | base64 -d > /tmp/client-cert.pem
    echo "► SSL Client Cert Found.  Writing to /tmp/client-cert.pem"
  fi

  if [[ -z "${PGBOUNCER_DATABASE_SSL_CLIENT_KEY}" ]]; then
    echo "► No SSL Client Key Found"
  else
    echo "${PGBOUNCER_DATABASE_SSL_CLIENT_KEY}" | base64 -d > /tmp/client-key.pem
    echo "► SSL Client Key Found.  Writing to /tmp/client-key.pem"
  fi

  if [[ -z "${PGBOUNCER_DATABASE_SSL_SERVER_CA}" ]]; then
    echo "► No SSL Server CA Found"
  else
    echo "${PGBOUNCER_DATABASE_SSL_SERVER_CA}" | base64 -d > /tmp/server-ca.pem
    echo "► SSL Server CA Found.  Writing to /tmp/server-ca.pem"
  fi

Anyway, I'll leave that with you 👍

@jflambert
Copy link
Collaborator

jflambert commented Oct 11, 2024

Hi @chrishemmings I don't hate this suggestion :)

However help me understand what happens next? Three pem files are written to /tmp and that's it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants