active-directory - RabbitMQ in_group 过滤器在 Active Directory 中出现错误
问题描述
我无法让 RabbitMQ in_group 过滤器与 Active Directory 一起使用。它试图替换我的用户名,但我的 in_group 模式中没有 ${username} 变量:'CN="rabbitmq-${vhost}-users",OU=Groups,DC=example,DC=com'。我可以登录,但是当我尝试添加新队列时,出现以下错误。在 tag_queries = true 中设置“管理员”可以访问所有 vHost。我将其设置为 false,现在我正在尝试通过使用 Active Directory 的 vhost_access_query 来限制 vHost 的用户管理员访问。
CRASH REPORT Process <0.495.0> with 1 neighbours exited with reason:
bad argument in call to re:replace('CN="rabbitmq-${vhost}-users",OU=Groups,DC=example,DC=com',
["\\${username}"], ["smitchell"], [global]) line 398
以下是 rabbitmq.conf 中的设置。
auth_ldap.servers.1 = ad.example.com
auth_ldap.port = 389
auth_ldap.use_ssl = false
auth_backends.1 = rabbit_auth_backend_internal
auth_backends.2 = rabbit_auth_backend_ldap
auth_ldap.dn_lookup_attribute = sAMAccountName
auth_ldap.dn_lookup_base = DC=example,DC=com
auth_ldap.user_dn_pattern = ${username}@example.com
# auth_ldap.user_bind_pattern = ${username}@example.com <-- Same error with this
user_dn_pattern 作为 ${username}@example.com 或 $example$(username} 工作,与从 Apache Directory Studio 登录相同。
这是高级配置。
[
{rabbitmq_auth_backend_ldap, [
{group_lookup_base, "OU=Groups,DC=example,DC=com"},
{vhost_access_query, {in_group, 'CN="rabbitmq-${vhost}-users",OU=Groups,DC=example,DC=com', "member"}},
{tag_queries, [
{administrator, {constant, false}},
{management, {constant, true}}
]}
]}
].
解决方案
推荐阅读
- r - RcppArmadillo gamma distribution differs between platforms with same seed
- mysql - 插入带有键值列的mysql表
- spring - 为什么 H2 数据库在 Springboot 应用中使用 Hibernate Core
- javascript - 如何在 Javascript 中获取 Asp.Net GridView 控件 ID
- c# - System.InvalidOperationException 实例失败
- c# - dotnet 4.0 和 registerprovider
- http - 如何在 Flutter GET Api 请求中添加多个标头
- ruby-on-rails - 如何获取上一年启用但当年未启用的数据
- python - 如何在python3每5分钟重新启动一次我的代码
- arrays - 在脚本中访问数组中的元素