2021-05-21 18:02:50 +08:00
|
|
|
load("@bazel-erlang//:xref.bzl", "xref")
|
2021-06-01 16:19:10 +08:00
|
|
|
load("@bazel-erlang//:dialyze.bzl", "dialyze", "plt")
|
2021-05-11 16:44:28 +08:00
|
|
|
load(
|
|
|
|
"//:rabbitmq.bzl",
|
2021-06-01 16:19:10 +08:00
|
|
|
"RABBITMQ_DIALYZER_OPTS",
|
2021-07-12 23:54:55 +08:00
|
|
|
"assert_suites",
|
2021-05-11 16:44:28 +08:00
|
|
|
"broker_for_integration_suites",
|
|
|
|
"rabbitmq_integration_suite",
|
|
|
|
"rabbitmq_lib",
|
|
|
|
"rabbitmq_suite",
|
|
|
|
)
|
2021-03-29 17:01:43 +08:00
|
|
|
|
|
|
|
APP_ENV = """[
|
|
|
|
{servers, undefined},
|
|
|
|
{user_bind_pattern, none},
|
|
|
|
{user_dn_pattern, "$${username}"},
|
|
|
|
{dn_lookup_attribute, none},
|
|
|
|
{dn_lookup_base, none},
|
|
|
|
{group_lookup_base, none},
|
|
|
|
{dn_lookup_bind, as_user},
|
|
|
|
{other_bind, as_user},
|
|
|
|
{anon_auth, false},
|
|
|
|
{vhost_access_query, {constant, true}},
|
|
|
|
{resource_access_query, {constant, true}},
|
|
|
|
{topic_access_query, {constant, true}},
|
|
|
|
{tag_queries, [{administrator, {constant, false}}]},
|
|
|
|
{use_ssl, false},
|
|
|
|
{use_starttls, false},
|
|
|
|
{ssl_options, []},
|
|
|
|
{port, 389},
|
|
|
|
{timeout, infinity},
|
|
|
|
{log, false},
|
|
|
|
{pool_size, 64},
|
|
|
|
{idle_timeout, 300000}
|
|
|
|
]"""
|
|
|
|
|
|
|
|
APP_NAME = "rabbitmq_auth_backend_ldap"
|
|
|
|
|
|
|
|
APP_DESCRIPTION = "RabbitMQ LDAP Authentication Backend"
|
|
|
|
|
|
|
|
APP_MODULE = "rabbit_auth_backend_ldap_app"
|
|
|
|
|
|
|
|
EXTRA_APPS = [
|
|
|
|
"eldap",
|
|
|
|
]
|
|
|
|
|
|
|
|
DEPS = [
|
|
|
|
"//deps/rabbit_common:bazel_erlang_lib",
|
|
|
|
]
|
|
|
|
|
|
|
|
RUNTIME_DEPS = [
|
|
|
|
"//deps/rabbit:bazel_erlang_lib",
|
|
|
|
]
|
|
|
|
|
2021-04-16 16:22:44 +08:00
|
|
|
rabbitmq_lib(
|
2021-03-29 17:01:43 +08:00
|
|
|
app_description = APP_DESCRIPTION,
|
|
|
|
app_env = APP_ENV,
|
|
|
|
app_module = APP_MODULE,
|
|
|
|
app_name = APP_NAME,
|
|
|
|
extra_apps = EXTRA_APPS,
|
|
|
|
runtime_deps = RUNTIME_DEPS,
|
|
|
|
deps = DEPS,
|
|
|
|
)
|
|
|
|
|
2021-05-21 18:02:50 +08:00
|
|
|
xref(tags = ["xref"])
|
|
|
|
|
2021-06-01 16:19:10 +08:00
|
|
|
plt(
|
|
|
|
name = "base_plt",
|
|
|
|
apps = EXTRA_APPS,
|
|
|
|
plt = "//:base_plt",
|
|
|
|
)
|
|
|
|
|
|
|
|
dialyze(
|
|
|
|
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
|
|
|
|
plt = ":base_plt",
|
|
|
|
tags = ["dialyze"],
|
|
|
|
)
|
|
|
|
|
2021-05-11 16:44:28 +08:00
|
|
|
broker_for_integration_suites()
|
2021-03-29 17:01:43 +08:00
|
|
|
|
2021-05-11 16:44:28 +08:00
|
|
|
PACKAGE = "deps/rabbitmq_auth_backend_ldap"
|
2021-03-29 17:01:43 +08:00
|
|
|
|
2021-07-12 23:54:55 +08:00
|
|
|
suites = [
|
|
|
|
rabbitmq_integration_suite(
|
|
|
|
PACKAGE,
|
|
|
|
name = "config_schema_SUITE",
|
|
|
|
),
|
|
|
|
rabbitmq_integration_suite(
|
|
|
|
PACKAGE,
|
|
|
|
name = "system_SUITE",
|
2021-07-23 19:36:09 +08:00
|
|
|
size = "medium",
|
2021-07-12 23:54:55 +08:00
|
|
|
additional_srcs = [
|
|
|
|
"test/rabbit_ldap_seed.erl",
|
|
|
|
],
|
|
|
|
data = [
|
|
|
|
"example/global.ldif",
|
|
|
|
"example/memberof_init.ldif",
|
|
|
|
"example/refint_1.ldif",
|
|
|
|
"example/refint_2.ldif",
|
|
|
|
],
|
|
|
|
tags = [
|
|
|
|
"ldap",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
rabbitmq_suite(
|
|
|
|
name = "unit_SUITE",
|
|
|
|
size = "small",
|
|
|
|
),
|
|
|
|
]
|
2021-03-29 17:01:43 +08:00
|
|
|
|
2021-07-12 23:54:55 +08:00
|
|
|
assert_suites(
|
|
|
|
suites,
|
|
|
|
glob(["test/**/*_SUITE.erl"]),
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|