Commit Graph

12 Commits

Author SHA1 Message Date
David Ansari 34a638a229 Optionally return authz refusal reason to client
Trigger a 4.3.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
## What?

If the new config setting `authorization_failure_disclosure`
for an authz backend is set to `true`, (`false` by default), RabbitMQ
will return the reason why access was denied to the client.
For now, only the HTTP auth backend supports this new config setting.

 ## Why?

This helps debugging and troubleshooting directly in the client.
Some users might not have access to the RabbitMQ logs, for other
users it's cumbersome to correlate authz denial in the client with
logs on the broker.

For example, some customers would like to pass the reason why
authorization was denied from their custom HTTP auth backend via
RabbitMQ back to the client.

 ## How?

Authz backends can now return `{false, Reason}` as an alternative to
just `false` if access is denied.

For security reasons, the additional denial reason by the authz backend
will be returned to the client only if the operator opted in by setting
`authorization_failure_disclosure` to `true`.

Note that `authorization_failure_disclosure` applies only to
already authenticated clients when they try to access resources (e.g. vhosts,
exchanges, queues, topics). For security reasons, no detailed denial reason is
returned to the client if **authentication** fails.

Also note that `authorization_failure_disclosure` is set separately per
auth backend instead of being set globally for all auth backends. This
more fine granular configurability helps for use cases where the broker
should reveal the authz denial reason for only a specific auth backend.
2025-10-10 09:07:12 +02:00
Luke Bakken ce86fb989e
Remove all usage of `cacerts` from configuration schemas
As mentioned in discussion #14426, the way that `cacerts` is handled by
cuttlefish schemas simply will not work if set.

If `cacerts` were set to a string value containing one X509 certificate,
it would eventually result in a crash because the `cacerts` ssl option
must be of [this type](https://www.erlang.org/doc/apps/ssl/ssl.html#t:client_option_cert/0):

```
{cacerts, CACerts :: [public_key:der_encoded()] | [public_key:combined_cert()]}
```

Neither of those are strings, of course.

This PR removes all use of `cacerts` in cuttlefish schemas. In addition,
it filters out `cacerts` and `certs_keys` from being JSON-encoded by an
HTTP API call to `/api/overview`. It _is_ technically possible to set
`cacerts` via `advanced.config`, so, if set, it would crash this API
call, as would `certs_keys`.
2025-10-01 08:14:14 -07:00
Michael Klishin 8b90d4a27c Allow for tagged values for a few more rabbitmq.conf settings 2024-08-13 16:27:00 -04:00
Luke Bakken 35f5f813f4 Add server_name_indication/sni and hostname_verfication to cuttlefish schema 2024-05-31 12:34:30 -07:00
Marcial Rosales aa388039ea Add ssl_options to schema 2024-05-31 12:34:30 -07:00
Michael Klishin 471294af67
AuthN/Z backend HTTP: rename two new settings, add tests 2021-06-24 23:26:13 +10:00
SzumiecM bfe648e92d Add configurable timeout to HTTP connections 2021-06-24 02:02:54 -07:00
Michael Klishin 84c7093e88 Add HTTP method field to Cuttlefish schema
Fixes #61.

(cherry picked from commit 38f77443935f4dc873429830bc57489051fa656d)
2017-12-19 18:33:37 +03:00
Daniil Fedotov aa6266d8e5 Shorter prefix for configuration keys 2017-02-09 10:55:10 +00:00
Arnaud Cogoluègnes 72a844dd76 Implement check_topic_access callback
References rabbitmq/rabbitmq-server#505
2016-12-29 08:58:10 +01:00
Michael Klishin ba6238fb3a Use full module name
"http" is too generic.
2016-03-23 11:24:51 +03:00
Daniil Fedotov 4300d1e986 cuttlefish schema 2016-02-19 11:30:13 +00:00