Hi. I’m trying to get OOD working with DEX for ldap integration against freeipa.
When I browse to my login node’s IP, I get an “internal server error”, with DEX (running on that login node) showing:
Dec 07 10:29:54 login-0.noetchosts.invalid ondemand-dex[93160]: 2022/12/07 10:29:54 http: TLS handshake error from 10.60.102.67:33420: local error: tls: bad record MAC
Note 10.60.102.67
is the login node’s address, i.e. this is dex trying to contact dex?
Both OOD and dex are running on the cluster’s login node and freeipa is running on the cluster’s control node. Nothing has floating IPs or “real” domain names, so I’m using ssh ProxyJump to browse to the login node’s private IP. Note without dex and freeipa, just using PAM, this all works fine (i.e. I can reach OOD from the browser and auth etc etc.). All nodes are RockyLinux8.6.
OOD is using the default self-signed cert at /etc/pki/tls/certs/localhost.crt
which is generated on install of the ood-apache
package, and I’m using the OOD DEX defaults so DEX is using that cert too.
Someone suggested the problem might be because the cert’s SAN doesn’t include the IP address which DEX is using. This seemed plausible as it doesn’t:
[root@login-0 rocky]# openssl x509 -noout -text -in /etc/ood/dex/localhost.crt | grep -A1 "Subject Alternative Name"
X509v3 Subject Alternative Name:
DNS:login-0.noetchosts.invalid
However I’ve tried two things to fix that, and both still give the same error:
-
Changing the dex config to point to the hostname, i.e. modifying
/etc/ood/dex/config.yaml
to have#issuer: https://10.60.102.67:5554 issuer: https://login-0.noetchosts.invalid:5554
(commented-out line is original, OOD-generated version) then running
systemctl restart ondemand-dex
. I can see the new issuer insystemctl status ondemand-dex
but I get the same error. (I know that if I restart apache, that rewrites dex’s config, so I didn’t do that) -
Creating a new cert with both IP and DNS in the SANs:
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout oodv2.key -out oodv2.crt -subj '/CN=login-0.noetchosts.invalid' -addext 'subjectAltName=DNS:login-0.noetchosts.invalid,IP:10.60.102.67'
then modified the dex config to point to that, and do
systemctl restart ondemand-dex
. Again, I get the same error.
Any more suggestions would be very much appreciated!