A private key is a secret cryptographic key used with a public key in asymmetric encryption. In HTTPS, the web server keeps it secret and uses it to decrypt data protected with the public key. section 16.4.1
When securing an Airflow API server, treat the private key as follows:
- Store it in a path available to Airflow, separately from the certificate that can be shared. section 16.4.2
- Configure it with AIRFLOW__API__SSL_KEY=/path/to/privatekey.pem and configure the certificate with AIRFLOW__API__SSL_CERT. section 16.4.2
- Never share it or leave it exposed: only the private key can decrypt data encrypted with the corresponding public key. section 16.4.1 section 16.4.2
Creating a local HTTPS key
Generate a self-signed key and certificate with OpenSSL, writing the private key to privatekey.pem and the certificate to certificate.pem. Configure both files for Airflow, then access the API server at https://localhost:8080. Because a self-signed certificate is untrusted by default, the browser may warn until it is added to trusted certificates.












