138 lines
2.6 KiB
Python
138 lines
2.6 KiB
Python
load("@rules_erlang//:xref2.bzl", "xref")
|
|
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt")
|
|
load(
|
|
"//:rabbitmq.bzl",
|
|
"RABBITMQ_DIALYZER_OPTS",
|
|
"assert_suites",
|
|
"broker_for_integration_suites",
|
|
"rabbitmq_app",
|
|
"rabbitmq_integration_suite",
|
|
"rabbitmq_suite",
|
|
"rabbitmq_test_helper",
|
|
"without",
|
|
)
|
|
|
|
APP_NAME = "rabbitmq_auth_backend_oauth2"
|
|
|
|
APP_DESCRIPTION = "OAuth 2 and JWT-based AuthN and AuthZ backend"
|
|
|
|
BUILD_DEPS = [
|
|
"//deps/rabbit_common:erlang_app",
|
|
"//deps/rabbitmq_cli:rabbitmqctl",
|
|
]
|
|
|
|
DEPS = [
|
|
"@jose//:erlang_app",
|
|
]
|
|
|
|
RUNTIME_DEPS = [
|
|
"//deps/rabbit:erlang_app",
|
|
"@base64url//:erlang_app",
|
|
"@cowlib//:erlang_app",
|
|
]
|
|
|
|
rabbitmq_app(
|
|
app_description = APP_DESCRIPTION,
|
|
app_name = APP_NAME,
|
|
build_deps = BUILD_DEPS,
|
|
runtime_deps = RUNTIME_DEPS,
|
|
deps = DEPS,
|
|
)
|
|
|
|
xref(
|
|
additional_libs = [
|
|
"//deps/rabbitmq_cli:rabbitmqctl",
|
|
],
|
|
)
|
|
|
|
plt(
|
|
name = "base_plt",
|
|
deps = without(
|
|
"//deps/rabbitmq_cli:rabbitmqctl",
|
|
BUILD_DEPS + DEPS,
|
|
),
|
|
)
|
|
|
|
dialyze(
|
|
dialyzer_opts = RABBITMQ_DIALYZER_OPTS + ["-Wno_undefined_callbacks"],
|
|
plt = ":base_plt",
|
|
warnings_as_errors = False,
|
|
)
|
|
|
|
broker_for_integration_suites()
|
|
|
|
rabbitmq_test_helper(
|
|
name = "rabbit_auth_backend_oauth2_test_util",
|
|
srcs = [
|
|
"test/rabbit_auth_backend_oauth2_test_util.erl",
|
|
],
|
|
)
|
|
|
|
PACKAGE = "deps/rabbitmq_auth_backend_oauth2"
|
|
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "add_uaa_key_command_SUITE",
|
|
size = "small",
|
|
)
|
|
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "config_schema_SUITE",
|
|
)
|
|
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "jwks_SUITE",
|
|
additional_beam = [
|
|
":rabbit_auth_backend_oauth2_test_util",
|
|
],
|
|
additional_srcs = [
|
|
"test/jwks_http_app.erl",
|
|
"test/jwks_http_handler.erl",
|
|
"test/jwks_http_sup.erl",
|
|
],
|
|
runtime_deps = [
|
|
"@cowboy//:erlang_app",
|
|
],
|
|
)
|
|
|
|
rabbitmq_suite(
|
|
name = "scope_SUITE",
|
|
size = "medium",
|
|
deps = [
|
|
"//deps/rabbit_common:erlang_app",
|
|
],
|
|
)
|
|
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "system_SUITE",
|
|
size = "medium",
|
|
additional_beam = [
|
|
":rabbit_auth_backend_oauth2_test_util",
|
|
],
|
|
)
|
|
|
|
rabbitmq_integration_suite(
|
|
PACKAGE,
|
|
name = "unit_SUITE",
|
|
size = "medium",
|
|
additional_beam = [
|
|
":rabbit_auth_backend_oauth2_test_util",
|
|
],
|
|
)
|
|
|
|
rabbitmq_suite(
|
|
name = "wildcard_match_SUITE",
|
|
size = "small",
|
|
)
|
|
|
|
assert_suites()
|
|
|
|
alias(
|
|
name = "rabbitmq_auth_backend_oauth2",
|
|
actual = ":erlang_app",
|
|
visibility = ["//visibility:public"],
|
|
)
|