@@ -87,40 +87,74 @@ field. For example, set `SHOW_GRAVATAR_IMAGE` to `False` to disable automatic pr
87
87
SHOW_GRAVATAR_IMAGE: False
88
88
```
89
89
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 ` :
96
93
97
94
``` yaml
98
95
userInterface :
99
96
pgAdmin :
100
97
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
104
106
` ` `
105
107
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 :
113
113
114
114
` ` ` yaml
115
115
userInterface:
116
116
pgAdmin:
117
117
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
118
123
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
124
158
` ` `
125
159
126
160
# # Deleting pgAdmin 4
0 commit comments