Skip to content

Commit ee38ba7

Browse files
committed
Document some fields to use for pgAdmin LDAP and Kerberos
The CRD reference links to pgAdmin's overall configuration, but nothing specific about LDAP or Kerberos, which are now supported. Issue: [sc-13978]
1 parent aea4ffb commit ee38ba7

File tree

1 file changed

+55
-21
lines changed

1 file changed

+55
-21
lines changed

docs/content/architecture/pgadmin4.md

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,40 +87,74 @@ field. For example, set `SHOW_GRAVATAR_IMAGE` to `False` to disable automatic pr
8787
SHOW_GRAVATAR_IMAGE: False
8888
```
8989

90-
You can also add a Secret containing the pgAdmin `LDAP_BIND_PASSWORD` through the
91-
[`userInterface.pgAdmin.config.ldapBindPassword`]
92-
({{< relref "/references/crd#postgresclusterspecuserinterfacepgadminconfigldapbindpassword" >}})
93-
field. This is one of the configuration settings needed to enable LDAP authentication
94-
for pgAdmin and is handled separately from the other pgAdmin settings to allow for
95-
proper storage of the sensitive value in a Secret rather than a ConfigMap.
90+
You can also mount files to `/etc/pgadmin/conf.d` inside the pgAdmin container using
91+
[projected volumes](https://kubernetes.io/docs/concepts/storage/projected-volumes/).
92+
The following mounts `useful.txt` of Secret `mysecret` to `/etc/pgadmin/conf.d/useful.txt`:
9693

9794
```yaml
9895
userInterface:
9996
pgAdmin:
10097
config:
101-
ldapBindPassword:
102-
name: ldappass
103-
key: mypw
98+
files:
99+
- secret:
100+
name: mysecret
101+
items:
102+
- key: useful.txt
103+
- configMap:
104+
name: myconfigmap
105+
optional: false
104106
```
105107
106-
Lastly, you can also use Secrets and ConfigMaps to mount required files to your
107-
pgAdmin container through the
108-
[`userInterface.pgAdmin.config.files`]
109-
({{< relref "/references/crd#postgresclusterspecuserinterfacepgadminconfigfilesindex" >}})
110-
field. The contents of the Secrets and ConfigMaps defined here are mounted at
111-
`/etc/pgadmin/conf.d` and can be referenced from various pgAdmin configuration
112-
settings as needed.
108+
### Kerberos Configuration
109+
110+
You can configure pgAdmin to [authenticate its users using Kerberos](https://www.pgadmin.org/docs/pgadmin4/latest/kerberos.html)
111+
SPNEGO. In addition to setting `AUTHENTICATION_SOURCES` and `KRB_APP_HOST_NAME`, you need to
112+
enable `KERBEROS_AUTO_CREATE_USER` and mount a `krb5.conf` and a keytab file:
113113

114114
```yaml
115115
userInterface:
116116
pgAdmin:
117117
config:
118+
settings:
119+
AUTHENTICATION_SOURCES: ['kerberos']
120+
KERBEROS_AUTO_CREATE_USER: True
121+
KRB_APP_HOST_NAME: my.service.principal.name.local # without HTTP class
122+
KRB_KTNAME: /etc/pgadmin/conf.d/krb5.keytab
118123
files:
119-
- secret:
120-
name: mysecret
121-
- configMap:
122-
name: myconfigmap
123-
optional: false
124+
- secret:
125+
name: mysecret
126+
items:
127+
- key: krb5.conf
128+
- key: krb5.keytab
129+
```
130+
131+
### LDAP Configuration
132+
133+
You can configure pgAdmin to [authenticate its users using LDAP](https://www.pgadmin.org/docs/pgadmin4/latest/ldap.html)
134+
passwords. In addition to setting `AUTHENTICATION_SOURCES` and `LDAP_SERVER_URI`, you need to
135+
enable `LDAP_AUTO_CREATE_USER`:
136+
137+
```yaml
138+
userInterface:
139+
pgAdmin:
140+
config:
141+
settings:
142+
AUTHENTICATION_SOURCES: ['ldap']
143+
LDAP_AUTO_CREATE_USER: True
144+
LDAP_SERVER_URI: ldaps://my.ds.example.com
145+
```
146+
147+
When using a dedicated user to bind, you can store the `LDAP_BIND_PASSWORD` setting in a Secret and
148+
reference it through the [`ldapBindPassword`]({{< relref "/references/crd#postgresclusterspecuserinterfacepgadminconfigldapbindpassword" >}})
149+
field:
150+
151+
```yaml
152+
userInterface:
153+
pgAdmin:
154+
config:
155+
ldapBindPassword:
156+
name: ldappass
157+
key: mypw
124158
```
125159

126160
## Deleting pgAdmin 4

0 commit comments

Comments
 (0)