1. Home
  2. /
  3. Automated certificate issuing via EJBCA REST

Automated certificate issuing via EJBCA REST

If you want to automate your certificate issuance, you can use the EJBCA REST API. With these examples, we will show you how to use EJBCA REST API CLI with Phyhton and EJBCA REST API with Postman.

hero-sub-2
python-logo-master-v3-TM-flattened
Postman-logo-orange-2021_1155x

EJBCA REST + Python and Postman

Python is ideal for scripting, automation, data manipulation, analysis, and web development with custom logic and broader application requirements. On the other hand, Postman is primarily focused on API testing and exploration. Both are covered in the examples below.

How to get started: EJBCA REST API CLI

In this tutorial, we will: 

  • Generate a private key, CSR using OpenSSL, and get it signed using EJBCA REST API
  • Use Python or shell to script to submit the CSR to EJBCA REST API
  • Check the contents of the certificate using OpenSSL

We will use a Linux server with OpenSSL, a credential from EJBCA that has permission to enroll for a certificate and use the Rest API to submit CSRs and receive a certificate from EJBCA. Two examples are covered using Python and shell.

Prerequisites

Before you get started you need: 

  • EJBCA configured with a certificate profile, end entity profile, CA, role, etc to issue certificates
  • P12 file that is permitted in an EJBCA role to issue an End Entity
  • Linux host to run the Python or shell script
  • Python, Python Request, curl, jq, installed on the Linux host

How to get started: EJBCA REST API Postman

In this tutorial, we will: 

  • Generate a private key, CSR using OpenSSL, and get it signed using EJBCA REST API
  • Use Postman to submit the CSR to EJBCA REST API
  • Check the contents of the certificate using OpenSSL

Use Postman a graphical user interface tool to submit CSR’s to EJBCA to request a certificate. Use OpenSSL to generate a private key, CSR, and parse the certificate returned from EJBCA

Prerequisites

Before you get started you need: 

  • EJBCA configured with a certificate profile, end entity profile, CA, role, etc to issue certificates
  • P12 file that is permitted in an EJBCA role to issue an End Entity 
  • OpenSSL to generate private key, CSR, and inspect the certificate
    Postman installed

Tutorials/documentation

GitHub

The accompanying documentation of the tutorial videos is here.

Docker Hub

Get your hands on the EJBCA Docker container by downloading it now.

YouTube

Take a peek at the EJBCA REST CLI video on YouTube, and browse through some of our other tutorial videos as well.

YouTube

Take a peek at the EJBCA REST Postman video on YouTube, and browse through some of our other tutorial videos as well.

Discuss

You can ask your questions and learn from PKI specialists in the EJBCA forum on GitHub Discussions.

Related open-source projects