Skip to main content

Certificate

Generating and Accessing LoginRadius Certificate and Key

To establish secure connections, you need to generate a certificate and private key for LoginRadius. You can create these using an online tool or by executing OpenSSL commands. LoginRadius currently supports only the PKCS1 private key format.

Generating a Certificate and Key

Option 1: Using Online Tools

You can generate a certificate and key using an online tool that supports:

  • Key Size: 2048 bits
  • Digest Algorithm: SHA256

For more control over the certificate generation process, use OpenSSL commands as follows:

Step 1: Generate the Private Key

Run the following command to create a private key:

openssl genrsa -out private.key 2048

This command generates a 2048-bit RSA private key and saves it as private.key.

Step 2: Generate the Certificate

Once the private key is created, generate the corresponding certificate:

openssl req -new -x509 -key private.key -out certificate.cert -days 365 -subj "/CN=<loginradius-app-name>.hub.loginradius.com"
  • -new -x509: Creates a self-signed certificate
  • -key private.key: Uses the generated private key
  • -out certificate.cert: Saves the certificate as certificate.cert
  • -days 365: Sets the certificate validity to one year
  • -subj: Specifies the Common Name (CN) for the certificate, replacing <loginradius-app-name> with your actual app name.

Accessing the Generated Certificate and Key

After running the commands, you can locate and view the generated files:

On Linux/Mac

Use the following commands to open and view the contents of the key and certificate:

vi private.key
vi certificate.cert

On Windows

Navigate to the folder where the commands were executed. The files private.key and certificate.cert will be present in that directory. Open them using any text editor such as Notepad++ or VS Code.