Commit Graph

351 Commits

Author SHA1 Message Date
Rin Kuryloski 714f31af1f Use rules_elixir to build the cli without mix
Certain elixir-native deps are still build with mix, but this can be
corrected later

(cherry picked from commit 5debebfaf3)

# Conflicts:
#	deps/rabbit/BUILD.bazel
(cherry picked from commit 7f585d4102)

# Conflicts:
#	deps/rabbitmq_cli/BUILD.bazel
#	deps/rabbitmq_ct_helpers/BUILD.bazel
2024-06-20 11:48:40 +00:00
Michael Klishin 8b26fdc510
(c) year bump 2024-01-01 22:04:04 -05:00
Michael Klishin 7273e29621
Update (c) according to [1]
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:26:04 -05:00
David Ansari a9be086ddc Bump emqtt
to latest master of rabbitmq/emqtt
which corresponds to latest emqx/emqtt master + our RabbitMQ fixes on top
2023-08-16 08:22:19 +00:00
Michael Klishin c81c43de30 Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com
Don't ask why we have to do it. Because reasons!

(cherry picked from commit 55442aa914)
2023-06-20 12:12:19 +00:00
Marcial Rosales 85be083aff Fixes #8547
(cherry picked from commit 77ee572467)
2023-06-14 10:40:16 +00:00
Marcial Rosales f26358c961 Make scopes optional for oauth2 authentication
(cherry picked from commit 84e8d172e6)
2023-05-30 19:53:23 +00:00
Michael Klishin cc41ad4d7d Squash a compiler warning in a test
(cherry picked from commit f5ea10eff8)
2023-05-29 04:09:19 +04:00
Marcial Rosales 7fce52c253 Test scope prefix within scope alias mapping
(cherry picked from commit 1cd84b36ec)
2023-05-16 15:04:24 +00:00
Marcial Rosales 9ea1127aa9 Make parameter optional
(cherry picked from commit ea4074c1df)
2023-05-16 15:04:23 +00:00
Marcial Rosales 0131e9900f Configure Oauth scope prefix
separate from resource_server_id

(cherry picked from commit faffd6fa98)
2023-05-16 15:04:23 +00:00
Rin Kuryloski 2c5d152ce0 Add a workflow to compare the bazel/erlang.mk output
To catch any drift between the builds

(cherry picked from commit eb94a58bc9)
2023-05-15 15:27:03 +00:00
Michal Kuratczyk 86bc953ac2 Switch to an emqtt fork/branch for OTP26
This change should be reverted once emqx/emqtt is OTP26 compatible.
Our fork/branch isn't either at this point, but at least partially
works. Let's use this branch for now to uncover server-side OTP26
incompatibilities (and continue working on OTP26 support for emqtt of
course).

(cherry picked from commit 858ed1bff6)
2023-04-27 13:15:04 +00:00
Rin Kuryloski d1e1084711 Replace globs in bazel with explicit lists of files
As this is preferred in rules_erlang 3.9.14

(cherry picked from commit a944439fba)
2023-04-25 18:03:08 +02:00
Rin Kuryloski b8def2403a Restore the original -include_lib statements from before #6466
since this broke erlang_ls

requires rules_erlang 3.9.13

(cherry picked from commit 854d01d9a5)
2023-04-20 15:37:35 +00:00
Rin Kuryloski 2aaf2176d4 Use gazelle generated bazel files
Bazel build files are now maintained primarily with `bazel run
gazelle`. This will analyze and merge changes into the build files as
necessitated by certain code changes (e.g. the introduction of new
modules).

In some cases there hints to gazelle in the build files, such as `#
gazelle:erlang...` or `# keep` comments. xref checks on plugins that
depend on the cli are a good example.

(cherry picked from commit 8de8f59d47)

# Conflicts:
#	deps/rabbit/BUILD.bazel
2023-04-19 05:34:15 +00:00
Marcial Rosales f8d31cc4b0 Minor code change
(cherry picked from commit de4fa24444)
2023-04-19 02:44:15 +00:00
Marcial Rosales 25bd6692e4 Fix issue #7178
(cherry picked from commit 6227dfd15d)
2023-04-19 02:44:15 +00:00
Rin Kuryloski 7b8beb1c69
Ignore warnings when building plt for rabbitmq_auth_backend_oauth2
The plugin itself still dialyzes cleanly, these warnings just mean
that the limited set of dependencies needed for the plugin are
incomplete with respect to each other (Or at least that is how I'm
intrepreting the results at this time).

(cherry picked from commit 933d6a586c)
2023-04-14 19:04:08 +04:00
Marcial Rosales f121f78d44 Deprecate uaa settings from management plugin
(cherry picked from commit 1c1e4515f7)

# Conflicts:
#	deps/rabbitmq_management/priv/www/js/oidc-oauth/helper.js
#	deps/rabbitmq_management/src/rabbit_mgmt_oauth_bootstrap.erl
#	deps/rabbitmq_management/src/rabbit_mgmt_wm_auth.erl
2023-04-13 11:14:02 +00:00
Marcial Rosales ed92eed510 Fix 2549
Allow list of preferred_username_claims in cuttlefish
config style.
Use new config style on two selenium test suites
Test oauth2 backend's config schema and oauth2 management
config schema

(cherry picked from commit efb1b5bd10)
2023-02-28 16:19:58 +00:00
David Ansari 1c4f30742e Bump emqx/emqtt to 1.8.2
(cherry picked from commit bf2a97a20a)
2023-02-21 18:52:18 +01:00
Michael Klishin 2dfa762bbb
Merge pull request #7177 from rabbitmq/oauth-mqtt-test
Add OAuth 2.0 MQTT system test
2023-02-06 23:18:17 -05:00
brunomedeirosdedalus bf2b11d7ba
Fixing the rabbitmq_auth_backend_oauth2 schema
Fixing reference to the old key 'additional_rabbitmq_scopes'. Removing redundant mapping
2023-02-04 11:41:26 +01:00
David Ansari 2d0826c335 Add OAuth 2.0 MQTT system test
Add a test that rabbitmq_auth_backend_oauth2 works with MQTT.

See https://github.com/rabbitmq/rabbitmq-oauth2-tutorial#mqtt-protocol
2023-02-03 14:08:51 +00:00
Marcial Rosales 9339ad1114 Comment why we are propagating authz_backends
when opening an internal amqp connection
2023-01-31 11:45:59 +01:00
Marcial Rosales 51e27f8a3f Fix issue #6909
Use the outcome from first authentication
stored in the #user.authz_backends to authenticate
subsequent attempts which occur when a session is
opened.
In particular, during the first authentication attempt
which occurs during the sasl handshake, the amqp 1.0
plugins reads and validates JWT token present in the
password field.
When a new AMQP 1.0 session is opened, the plugin creates
an internal AMQP connection which triggers a second/nth
authentication. For this second/nth authentication, the
plugin propagates as Authentication Credentials the outcome
from the first authentication which is stored in the
`#user.authz_backends`.
The Oauth2 backend first attempts to authenticate using
the password credentials else it uses the credential with the
key `rabbit_auth_backend_oauth2` which has a function which
returns the decoded token
2023-01-31 11:45:59 +01:00
Rin Kuryloski b84e746ee9 Rework plt/dialyze for rabbitmqctl and plugins that depend on it
This allows us to stop ignorning undefined callback warnings

When mix compiles rabbitmqctl, it produces a 'consolidated' directory
alongside the 'ebin' dir. Some of the modules in consolidated are
intended to be used instead of those provided by elixir. We now handle
the conflicts properly in the bazel build.
2023-01-19 17:29:23 +01:00
Alexey Lebedeff 8164df8bb2 Fix all dialyzer warnings in auth backends 2023-01-19 16:01:30 +01:00
Rin Kuryloski 5ef8923462 Avoid the need to pass package name to rabbitmq_integration_suite 2023-01-18 15:25:27 +01:00
Rin Kuryloski a317b30807 Use improved assert_suites2 macro from rules_erlang 3.9.0 2023-01-18 15:07:06 +01:00
Marcial Rosales 9fca4a7446
Improve coverage 2023-01-03 07:09:02 -05:00
Marcial Rosales 9354397cbf
Support Idp initiated logon in mgt ui with Oauth
Configure preferred username from a token
Make client_secret optional
2023-01-03 07:09:00 -05:00
Michael Klishin 0a8dd19434
Cosmetics
(cherry picked from commit 042725d8364bac3fed40df4dcdb534728dd56576)
2023-01-02 07:15:58 -05:00
Michael Klishin ec4f1dba7d
(c) year bump: 2022 => 2023 2023-01-01 23:17:36 -05:00
Simon Unge 09d84e6bd5 See #4842. Obfuscate impl value 2022-11-09 15:14:51 -08:00
Luke Bakken 7fe159edef
Yolo-replace format strings
Replaces `~s` and `~p` with their unicode-friendly counterparts.

```
git ls-files *.erl | xargs sed -i.ORIG -e s/~s>/~ts/g -e s/~p>/~tp/g
```
2022-10-10 10:32:03 +04:00
Michael Klishin a9b72877f5 Bump deps: michaelklishin/erlang-jose and Thoas 2022-08-29 15:28:37 +04:00
Michael Klishin b14eee13b5 OAuth 2: rename a function 2022-08-23 14:30:03 +04:00
Michael Klishin 21e98f8b13 OAuth 2: unit_SUITE naming and wording 2022-08-23 13:20:01 +04:00
Michael Klishin 877f03082a
OAuth 2: use a separate system suite group for RAR 2022-08-23 12:59:59 +04:00
Marcial Rosales d321a30198
README edits
Make it clear that the first sample location grants
access to any queue and/or exchange on the selected
vhost and cluster
2022-08-22 16:16:16 +04:00
Michael Klishin 5629a7ccbb
OAuth 2 README: add a missing link 2022-08-22 16:16:16 +04:00
Michael Klishin 4134bbacfc
OAuth 2: edits per discussion with @marcialrosales 2022-08-22 16:16:16 +04:00
Michael Klishin 3a09139635
OAuth 2: more RAR doc edits 2022-08-22 16:16:15 +04:00
Michael Klishin 207162d535
OAuth 2: one more RAR doc edit 2022-08-22 16:16:15 +04:00
Michael Klishin 083abe52b7
OAuth 2 Cuttlefish schema: cosmetics 2022-08-22 16:16:15 +04:00
Michael Klishin 382c7f092b
OAuth 2: README edits 2022-08-22 16:16:15 +04:00
Michael Klishin 32242a5c7a
OAuth 2: README edits 2022-08-22 16:16:15 +04:00
Michael Klishin efc2878bdb
README edits 2022-08-22 16:16:15 +04:00