Chapter 2. Authentication

2.1. Using SSL Authentication

Red Hat Satellite uses HTTPS [1] over SSL, which provides a degree of encryption and identity verification when communicating with a Red Hat Satellite host.
Each Red Hat Satellite host uses a self-signed certificate. This certificate acts as both the server certificate to verify the encryption key and the certificate authority (CA) to trust the identity of the Red Hat Satellite server.

Procedure 2.1. Obtaining a Certificate

This method uses SSH to copy the server's self-signed certificate.
  1. Use ssh to connect to your Satellite server as the root user:
    # ssh root@satellite.example.com
  2. Search your server's configuration directory for the certificate location:
    # grep -r "SSLCertificateFile" /etc/httpd/conf.d
    

    Note

    The default location of self-signed certificates is usually /var/www/html/pub/katello-server-ca.crt.
  3. Copy this certificate to your client.
    # scp /path/to/ca-cert-file username@client:~/
    
Use this certificate on your client as a certificate authority (CA) to verify the identity of the host server.
You can use the --cacert option with the curl command as follows:
# curl -X GET -u admin:changeme -H "Accept:application/json" --cacert /path/to/ca-cert-file https://satellite.example.com/katello/api/organizations
Use the following command to permanently include the certificate in the curl CA store:
# certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "Red Hat Satellite" -i /path/to/ca-cert-file
This imports the certificate into the Network Security Services (NSS) database, which means you can omit the --cacert option for each request.


[1] HTTPS is described in RFC 2818 HTTP Over TLS.