Skip to content

Conversation

@lukebakken
Copy link
Collaborator

There's an edge case in LDAP SSL configuration. If you set...

auth_ldap.use_ssl = true

...but nothing else, you'll eventually hit this error:

{error, {options, incompatible,
    [{verify, verify_peer}, {cacerts, undefined}]}}

This is due to the fact that without any SSL options, the rabbit_ssl_options:fix_client/1 function won't be hit, and thus system certs won't be added via public_key:cacerts_get/0 and cacerts option.

This PR adds verify, verify_peer as the default SSL option and ensures that rabbit_ssl_options:fix_client/1 is always called. Since verify_peer is the default since OTP 26, we can just add it here.

There's an edge case in LDAP SSL configuration. If you set...

```
auth_ldap.use_ssl = true
```

...but nothing else, you'll eventually hit this error:

```
{error, {options, incompatible,
    [{verify, verify_peer}, {cacerts, undefined}]}}
```

This is due to the fact that without any SSL options, the
`rabbit_ssl_options:fix_client/1` function won't be hit, and thus system
certs won't be added via `public_key:cacerts_get/0` and `cacerts`
option.

This PR adds `verify, verify_peer` as the default SSL option and ensures
that `rabbit_ssl_options:fix_client/1` is always called. Since
`verify_peer` is the default since OTP 26, we can just add it here.
@lukebakken lukebakken self-assigned this Nov 11, 2025
@lukebakken lukebakken marked this pull request as ready for review November 11, 2025 18:39
@michaelklishin michaelklishin changed the title Always set and fix up SSL options in LDAP plugin Always set and fix up TLS options in LDAP plugin Nov 11, 2025
@michaelklishin michaelklishin merged commit d6bad82 into rabbitmq:main Nov 11, 2025
574 of 575 checks passed
michaelklishin added a commit that referenced this pull request Nov 12, 2025
Always set and fix up TLS options in LDAP plugin (backport #14937)
@lukebakken lukebakken deleted the lukebakken/ssl-defaults branch November 12, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants