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

This website uses cookies

Cookies consist of small text files. They contain data that is stored on your device. To enable us to place certain types of cookies we need to obtain your consent. At PrimeKey Solutions AB, corp. ID no. 556628-3064, we use the following kinds of cookies. To read more about which cookies we use and storage times, click here to access our cookies policy.

Manage your cookie-settings

Necessary cookies

Check to consent to the use of Necessary cookies
Necessary cookies are cookies that must be placed for basic functions to work on the website. Basic functions are, for example, cookies which are needed so that you can use menus on the website and navigate on the site.

Functional cookies

Check to consent to the use of Functional cookies
Functional cookies need to be placed on the website in order for it to perform as you would expect. For example, so that it recognizes which language you prefer, whether or not you are logged in, to keep the website secure, remember login details or to be able to sort products on the website according to your preferences.

Cookies for statistics

Check to consent to the use of Cookies for statistics
For us to measure your interactions with the website, we place cookies in order to keep statistics. These cookies anonymize personal data.

Cookies for ad-tracking

Check to consent to the use of Cookies for ad-tracking
To enable us to offer better service and experience, we place cookies so that we can provide relevant advertising. Another aim of this processing is to enable us to promote products or services, provide customized offers or provide recommendations based on what you have purchased in the past.

Ad measurement user cookies

Check to consent to the use of Ad measurement user cookies
In order to show relevant ads we place cookies to tailor ads for you

Personalized ads cookies

Check to consent to the use of Personalized ads cookies
To show relevant and personal ads we place cookies to provide unique offers that are tailored to your user data