Commit Graph

36 Commits

Author SHA1 Message Date
Michael Klishin f1595ad781
Revert "Implement LDAP credentials validation via HTTP API" 2025-09-30 13:09:46 -04:00
Luke Bakken 9a4cb9c881
Implement LDAP credentials validation via HTTP API
See discussion #14244

These changes will allow a user to make an HTTP API request to...

```
/api/ldap/validate/simple-bind
```

...with an appropriate JSON body, and the plugin will attempt a
connection to the specified LDAP server using the provided credentials.
This allows validation that a connection can be made to an LDAP server
from a RabbitMQ cluster environment.

* Add code and tests for `eldap:simple_bind` validation.
* Add support for testing TLS connections to OpenLDAP
* Add support for validating TLS related configuration via `/ldap/validate/simple-bind`
* Add support for various TLS options:
 * versions
 * depth
 * multiple CA cert pem data
* Fall back to system certs if neither `cacertfile` nor `cacerts_pem_data` are provided to the `simple-bind` validation.
* Add `ssl_hostname_verification` support.
* Return 422 when auth fails
* Add more informative information when connection fails
* Add more tests with invalid input
* Catch parsing errors
* Tests for edge-cases for password / user_dn
* Add test for use_ssl + use_starttls combo
* Add test for ssl_options.depth validation
* Add validation tests for server_name_indication
2025-09-23 08:50:14 -07:00
Rin Kuryloski eb94a58bc9 Add a workflow to compare the bazel/erlang.mk output
To catch any drift between the builds
2023-05-15 13:54:14 +02:00
Loïc Hoguin dc70cbf281
Update Erlang.mk and switch to new xref code 2022-05-31 13:51:12 +02:00
Philip Kuryloski a63f169fcb Remove duplicate rabbitmq-components.mk and erlang.mk files
Also adjust the references in rabbitmq-components.mk to account for
post monorepo locations
2021-03-22 15:40:19 +01:00
Luke Bakken b843487019 Add warning messages when configuration values do not make sense 2019-10-14 09:58:58 -07:00
Luke Bakken 85dcb36ce6 Add user_bind_pattern
This allows using a different pattern during the "simple bind" phase. If `user_bind_pattern` is defined, it is used, otherwise fall back to `user_dn_pattern`

Related to #98 and #99

(cherry picked from commit 7f32abde3b)
2018-10-31 02:43:38 +03:00
Luke Bakken 1518216c30 Timeouts are in milliseconds 2018-03-14 07:07:35 -07:00
Michael Klishin cd2193a273 Change idle_timeout default to 300 seconds
Closes #81.

[#155865492]
2018-03-12 22:26:49 +03:00
Jean-Sébastien Pédron 37d4790125 Merge branch 'stable' 2017-05-16 18:01:08 +02:00
Jean-Sébastien Pédron 8a20cc579a Makefile: Load the new `rabbitmq-early-plugin.mk` early-stage plugin
See the corresponding commit in rabbitmq-common for an explanation.

[#144697185]
2017-05-16 17:28:55 +02:00
Michael Klishin f20f4c0193 Merge branch 'stable' 2017-05-10 21:54:53 +03:00
William Tan e8a79c06bd Add option to enable anonymous authentication
This will allow the user to enable the anon_auth flag in eldap in order
to be able to do a dn lookup by using anonymous authentication instead
of using a dedicated bind user.
2017-05-10 17:05:01 +00:00
Michael Klishin 627d472cb8 Default LDAP server port should be 389
See https://github.com/rabbitmq/rabbitmq-auth-backend-ldap/issues/63#issuecomment-284680951.

It was changed to 3890 in 2461f04795
by mistake. We don't need to do that since the test suite reconfigures
the plugin to use 3890 anyway.

Fixes #64.
2017-03-10 15:45:33 +03:00
Michael Klishin 27d3ca81a9 Default LDAP server port should be 389
See https://github.com/rabbitmq/rabbitmq-auth-backend-ldap/issues/63#issuecomment-284680951.

It was changed to 3890 in 2461f04795
by mistake. We don't need to do that since the test suite reconfigures
the plugin to use 3890 anyway.

Fixes #64.
2017-03-07 13:53:49 +03:00
Michael Klishin 71643a8aab Merge branch 'master' into rabbitmq-server-505 2017-01-12 12:58:24 +03:00
Arnaud Cogoluègnes ac0a3fb65a Merge branch 'stable' 2017-01-10 11:06:26 +01:00
Arnaud Cogoluègnes fad730f714 Add default value for idle_timeout option
References #7
2017-01-10 11:05:01 +01:00
Arnaud Cogoluègnes aa1bf987c8 Implement check_topic_access callback
References rabbitmq/rabbitmq-server#505
2016-12-29 08:55:58 +01:00
Jean-Sébastien Pédron dde4b0daca Merge branch 'stable' 2016-12-07 15:33:04 +01:00
Jean-Sébastien Pédron 0856702916 Makefile: Add eldap to LOCAL_DEPS
[#130992027]
2016-12-06 15:37:33 +01:00
Jean-Sébastien Pédron 4c50cf1722 Makefile: Forgot PROJECT_MOD in previous commit
[#130992027]
2016-12-06 15:36:06 +01:00
Jean-Sébastien Pédron 636fb21b40 Move from .app.src to Makefile variables
This is the recommended way with Erlang.mk.

By default, the version is inherited from rabbitmq-server-release when
the source archive is created, or computed from git-describe(1) (see
`rabbitmq-components.mk`). One can override the version from the command
line by setting the `PROJECT_VERSION` variable.

[#130992027]
2016-12-06 15:32:08 +01:00
Jean-Sébastien Pédron d77725ee9c Add rabbitmq_ct_client_helpers to TEST_DEPS 2016-11-24 10:06:09 +01:00
Jean-Sébastien Pédron 40f0f233ce Makefile: Explicitely list all DEPS
Sync rabbitmq-components.mk with rabbitmq-common to remove automatic
DEPS handling.

[#130086871]
2016-09-19 13:06:50 +02:00
Jean-Sébastien Pédron eeb232fee0 Makefile: amqp_client is not a runtime DEPS 2016-09-02 12:20:49 +02:00
Jean-Sébastien Pédron f7ea52ec1e Makefile: No need to filter out rabbitmq_test from TEST_DEPS anymore
[#127356157]
2016-09-02 12:17:33 +02:00
kjnilsson 4e6963baf5 setup openldap as part of vagrant provisioning
seed openldap as part of the test run
2016-06-29 10:33:25 +01:00
kjnilsson 2461f04795 move to common test 2016-06-29 10:18:46 +01:00
Jean-Sébastien Pédron ac11dde66f DEPS: Remove rabbit 2015-10-26 18:11:03 +01:00
Jean-Sébastien Pédron 1750635d75 Makefile: `test` is an alias to `tests` 2015-10-26 10:17:06 +01:00
Jean-Sébastien Pédron 8a454c5452 Initial move to erlang.mk 2015-10-19 17:28:08 +02:00
David Wragg ed4638056d Integrate with bug23568 2011-01-20 15:50:43 +00:00
Simon MacMullen 1e1d79fc0a Support a simple LDAP query. We can now control authorisation via LDAP. 2010-11-23 17:12:13 +00:00
Simon MacMullen d302c633b1 The simplest thing that could possibly work. You can authenticate as an LDAP user, but there are plenty of limitations. 2010-11-22 14:15:00 +00:00
Simon MacMullen 7291e2cc25 Initial checkin. Nothing to see here. 2010-11-19 17:22:30 +00:00