containers icon indicating copy to clipboard operation
containers copied to clipboard

[bitnami/openldap] Certificate modification is not detected automatically.

Open FabienZa opened this issue 4 years ago • 5 comments

Name and Version

bitnami/openldap:2.6

What steps will reproduce the bug?

Environment :

Ubuntu Server 22.04

Config :

docker-compose.yml

services:
  openldap:
    image: bitnami/openldap:2.6
    env_file: openldap.env
    ports:
      - 636:1636
    volumes:
      - ./data:/bitnami/openldap
      - ./certs:/opt/bitnami/openldap/certs
      - ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
    restart: always

In container /opt/bitnami/openldap/certs

/opt/bitnami/openldap/certs$ ls
cert.pem  isrg-root-x1-cross-signed.pem  key.pem 

What is the expected behavior?

The openldap container should automatically detect and use the newly generated certificate?

What do you see instead?

Certificate modification is not detected automatically.

So when the certificate is expired and the new certificate was not detected we have the errors :

ldap-openldap-1  | 636787d1.378875fd 0x7f2d13fff700 TLS: can't accept: error:14094415:SSL routines:ssl3_read_bytes:sslv3 alert certificate expired.
ldap-openldap-1  | 636787d1.378accd5 0x7f2d13fff700 conn=446084 fd=14 closed (TLS negotiation failure)

We need to restart container to use the new certificate.

Additional information

Error :

Certificate modification is not detected automatically.

Our certificate expires every 3 months. It is automatically renewed before it expires. Unfortunately, the container openldap does not detect its renewal and continues to use the old certificate. When it expires we can no longer use openldap. For the new certificate to take effect, we must restart the container.

Is this a bug or is this the normal behavior of the container? If this is the normal behavior, how to make openldap detect the certificate change without having to restart the container ?

Thank you for your help.

FabienZa avatar Nov 07 '22 10:11 FabienZa

Hi,

Is this something that openldap itself supports? The detection and auto-restart when there is a change in the certificate?

javsalgar avatar Nov 09 '22 16:11 javsalgar

Apparently, openldap don't need to restart to use the new certificate. So I think it is specific to the bitnami container ?

FabienZa avatar Nov 14 '22 16:11 FabienZa

Could you share the documentation stating that OpenLDAP needs to restarts? Maybe it is an option for the daemon? Or, do you have an example non-bitnami solution where it works without restarts?

javsalgar avatar Nov 15 '22 08:11 javsalgar

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Dec 01 '22 01:12 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Dec 07 '22 01:12 github-actions[bot]