Skip to content

Explore integration of RabbitMQ with Oauth 2.0 auth backend plugin

Notifications You must be signed in to change notification settings

rabbitmq/rabbitmq-oauth2-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e1b9593 · Apr 10, 2025
Feb 20, 2023
Jan 30, 2023
Oct 1, 2024
Apr 10, 2025
Apr 3, 2025
Mar 2, 2022
May 30, 2023
May 3, 2022
Sep 13, 2022
Feb 15, 2024
Oct 21, 2024
Mar 13, 2025
Mar 13, 2025

Repository files navigation

RabbitMQ OAuth2 Tutorial

The instructions on how to configure and test OAuth 2.0 in RabbitMQ have been moved to RabbitMQ documentation. This repository only maintains the configuration files and scripts referenced from the RabbitMQ documentation.

IMPORTANT This branch, main, of this repository is meant for the RabbitMQ docs with the version 4.0 or earlier. For RabbitMQ docs with version Next, check the branch next.

Table of Contents

Layout

For each OAuth provider, there is a subfolder under conf folder, such as keycloak, or entra. If the OAuth provider can be deployed locally via docker, there is also a subfolder under bin folder, such as bin/keycloak, with a deploy script.

RabbitMQ Configuration file

Under each OAuth provider folder, you find either a rabbitmq.conf file for those OAuth providers that can be deployed locally, such as keycloak and uaa. For SaaS OAuth providers like entra, you find instead a rabbitmq.conf.tmpl file that you need to clone as rabbitmq.conf and replace template variables such as {Application(client) ID} with a real value.

RabbitMQ TLS enabled

When the example requires RabbitMQ with TLS enabled, the corresponding conf folder must have a file called requires-tls. When you run make start-rabbitmq, if the key and cert have not been generated yet, the command generates one. For instance, under conf/entra there is a requires-tls file. When you deploy RabbitMQ with MODE=entra, a key-pair is generated under conf/entra/certs. In conf/entra/rabbitmq.conf.tmpl configuration file you can see where the certificates and key are mounted.

Examples

Management UI Access

Using JWT tokens in several protocols to access RabbitMQ

Signing Keys, Scope Aliases, Rich Authorization Requests

Examples for Specific OAuth 2.0 Identity Providers

Commercial-only features