percona / percona/percona-postgresql-operator

ldap auth not working via ldaps in verison 2.6.0

Open
#1,162 0 comments 0 reactions 1 assignee View on GitHub

@valmiranogueira is already working on this.

Since Sep 26, 2025.

bug
Dominant language
Go
Stars
385
Forks
83
Avg merge
2d 5h
Merged PRs (30d)
39

Description

Report

Ldaps authentication not working in the version 2.6.0 because the postgresql cannot connect to the ldap server.

More about the problem

When user want to sign in to the database, the postgresql cannot connect to ldap server because tls negotiation failed even when the ldap certificate is trusted by openssl s_client in the conatiner. In the new version the LDAPTLS_CACERT environment variable points to the /etc/postgres/ldap/ca.crt file in the statefulset. This file doesn't exists and you can't create with initContainer, secret or configMap, cannot mount a PVC, etc...

Steps to reproduce
  1. Install the postgresql-operator in a namespace
  2. Apply PerconaPGCluster kubernetes object:
apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: percona-nke-psql-17
spec:
  crVersion: 2.6.0
...
  instances:
  - name: instance1
    replicas: 1
...
  patroni:
    syncPeriodSeconds: 10 # default: 10
    leaderLeaseDurationSeconds: 30 # default: 30
    port: 8008
    dynamicConfiguration:
      postgresql:
        pg_hba:
        - host all postgres 10.0.0.0/8 md5
        - host all all 172.16.0.0/12 ldap ldapurl="ldaps://ldap.example.com:636/DC=intra,DC=example,DC=com?sAMAccountName?sub" ldapbinddn="CN=ldap_percona_svc,OU=LDAP_users,DC=intra,DC=example,DC=com" ldapbindpasswd="sompassword"
...
  1. Try to login with ldap user
Versions
  1. Kubernetes: rke2 (rancher managed cluster), 1.31.7
  2. Operator: 2.6.0
  3. Database: 17.4
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.