Skip to content

#15192 by @lukebakken with a CI fix#15193

Merged
michaelklishin merged 3 commits intomainfrom
rabbitmq-server-15192
Dec 31, 2025
Merged

#15192 by @lukebakken with a CI fix#15193
michaelklishin merged 3 commits intomainfrom
rabbitmq-server-15192

Conversation

@michaelklishin
Copy link
Copy Markdown
Collaborator

This is #15192 by @lukebakken with a CI-related test suite change from me.

lukebakken and others added 3 commits December 30, 2025 08:07
The etcd peer discovery plugin crashes during startup when username and
password authentication is configured. The crash occurs with a
`function_clause` error in `rabbit_data_coercion:to_list/1` when it
receives a double-wrapped encrypted password structure like `{encrypted,
{plaintext, Binary}}`.

This change adds authentication to the etcd test suite to reproduce the
bug. The test suite now starts etcd with authentication enabled, creates
a `rabbitmq` user with password `s3kR37`, and passes these credentials
to the etcd client. The test also ensures the `credentials_obfuscation`
application starts before the etcd client to properly encrypt passwords.

The bug occurs in `deobfuscate/1` which wraps an already-encrypted
password with another `{encrypted, ...}` tuple, creating the
double-wrapped structure that causes `to_list/1` to fail.

Fixes #15191
The `deobfuscate/1` function wraps an already-encrypted password with
another `{encrypted, ...}` tuple, creating a double-wrapped structure
like `{encrypted, {encrypted, Binary}}`. This causes
`rabbit_data_coercion:to_list/1` to fail with a `function_clause` error
because it has no clause matching the double-wrapped structure.

This change removes the extra wrapping in `deobfuscate/1`. The password
parameter is already in the correct format `{encrypted, Binary}` or
`{plaintext, Binary}` from the `obfuscate/1` call, so it passes directly
to `credentials_obfuscation:decrypt/1` without modification.

This matches the pattern used in other modules like
`rabbit_federation_util` and `amqp_direct_connection` which call
`credentials_obfuscation:decrypt/1` directly on encrypted values.

Fixes #15191
@michaelklishin michaelklishin added this to the 4.3.0 milestone Dec 31, 2025
@michaelklishin michaelklishin changed the title Rabbitmq server 15192 #15192 by @lukebakken with a CI fix Dec 31, 2025
@michaelklishin michaelklishin merged commit 8c2ea58 into main Dec 31, 2025
289 checks passed
@michaelklishin michaelklishin deleted the rabbitmq-server-15192 branch December 31, 2025 07:08
michaelklishin added a commit that referenced this pull request Dec 31, 2025
@lukebakken
Copy link
Copy Markdown
Collaborator

Thanks!

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.

2 participants