Project

General

Profile

Actions

Task #3479

closed

Task #3257: Create a letsencrypt callback for each service that will serve letsencrypt certificates

Letsencrypt hook script for openldap

Added by Andrea Dell'Amico about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
_InfraScience Systems Engineer
Category:
System Application
Target version:
Start date:
Apr 15, 2016
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Development, Pre-Production, Production

Description

A script that copies the certificates in a different place with the correct permissions.

Actions #1

Updated by Andrea Dell'Amico about 9 years ago

The hook script:

#!/bin/bash

. /etc/default/letsencrypt

mkdir -p /etc/pki/openldap
chown openldap:openldap /etc/pki/openldap
chmod 500 /etc/pki/openldap
cp $LE_CERTS_DIR/cert /etc/pki/openldap/cert.pem
cp $LE_CERTS_DIR/chain /etc/pki/openldap/chain.pem
cp $LE_CERTS_DIR/privkey /etc/pki/openldap/privkey.pem
chown openldap /etc/pki/openldap/privkey.pem
chmod 400 /etc/pki/openldap/privkey.pem

service slapd restart >/dev/null 2>&1

exit 0
Actions #2

Updated by Andrea Dell'Amico about 9 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

And the ldif that add the certificates to the openldap configuration:

dn: cn=config
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/pki/openldap/chain.pem
-
add: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/pki/openldap/privkey.pem
-
add: olcTLSCertificateFile
olcTLSCertificateFile: /etc/pki/openldap/cert.pem
-
add: olcTLSCACertificatePath
olcTLSCACertificatePath: /etc/ssl/certs
Actions #3

Updated by Andrea Dell'Amico about 9 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

The openldap playbook has been updated.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)