All Projects → rabbitmq → Rabbitmq Auth Backend Http

rabbitmq / Rabbitmq Auth Backend Http

Licence: other
HTTP-based authorisation and authentication for RabbitMQ

Projects that are alternatives of or similar to Rabbitmq Auth Backend Http

Awesome Iam
👤 Identity and Access Management Knowledge for Cloud Platforms
Stars: ✭ 186 (-4.12%)
Mutual labels:  authentication, authorization
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (-20.62%)
Mutual labels:  authentication, authorization
Fullstack Apollo React Boilerplate
💥A sophisticated Apollo in React boilerplate project.
Stars: ✭ 136 (-29.9%)
Mutual labels:  authentication, authorization
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (+795.88%)
Mutual labels:  authentication, authorization
Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+980.93%)
Mutual labels:  authentication, authorization
Laravel Auth
A powerful authentication, authorization and verification package built on top of Laravel. It provides developers with Role Based Access Control, Two-Factor Authentication, Social Authentication, and much more, compatible Laravel’s standard API and fully featured out of the box.
Stars: ✭ 128 (-34.02%)
Mutual labels:  authentication, authorization
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (-21.13%)
Mutual labels:  authentication, authorization
Cakephp Tinyauth
CakePHP TinyAuth plugin for an easy and fast user authentication and authorization. Single or multi role. DB or config file based.
Stars: ✭ 114 (-41.24%)
Mutual labels:  authentication, authorization
React Firestore Authentication
🔥Boilerplate Project for Authentication with Firestore in React.
Stars: ✭ 165 (-14.95%)
Mutual labels:  authentication, authorization
Security.identity
.NET DevPack Identity is a set of common implementations to help you implementing Identity, Jwt, claims validation and another facilities
Stars: ✭ 165 (-14.95%)
Mutual labels:  authentication, authorization
Serverless Architectures Aws
The code repository for the Serverless Architectures on AWS book
Stars: ✭ 120 (-38.14%)
Mutual labels:  authentication, authorization
Oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Stars: ✭ 2,323 (+1097.42%)
Mutual labels:  authentication, authorization
Graphql Directive Auth
GraphQL directive for handling auth
Stars: ✭ 120 (-38.14%)
Mutual labels:  authentication, authorization
Registration Login Spring Xml Maven Jsp Mysql
Registration and Login Example with Spring MVC, Spring Security, Spring Data JPA, XML Configuration, Maven, JSP, and MySQL.
Stars: ✭ 134 (-30.93%)
Mutual labels:  authentication, authorization
Xxl Sso
A distributed single-sign-on framework.(分布式单点登录框架XXL-SSO)
Stars: ✭ 1,635 (+742.78%)
Mutual labels:  authentication, authorization
Vuejs2 Authentication Tutorial
Stars: ✭ 144 (-25.77%)
Mutual labels:  authentication, authorization
React Mobx Firebase Authentication
🔥Boilerplate Project for Authentication with Firebase in React and MobX
Stars: ✭ 111 (-42.78%)
Mutual labels:  authentication, authorization
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (-42.27%)
Mutual labels:  authentication, authorization
Spotify Clone Client
A ReactJS clone application of the popular Spotify music streaming service. This application utilizes the Spotify API and the Spotify Web Playback SDK
Stars: ✭ 162 (-16.49%)
Mutual labels:  authentication, authorization
Bottle Cork
Authentication module for the Bottle and Flask web frameworks
Stars: ✭ 174 (-10.31%)
Mutual labels:  authentication, authorization

HTTP-based authorisation and authentication for RabbitMQ

This was migrated to https://github.com/rabbitmq/rabbitmq-server

This repository has been moved to the main unified RabbitMQ "monorepo", including all open issues. You can find the source under /deps/rabbitmq_auth_backend_http. All issues have been transferred.

Overview

This plugin provides the ability for your RabbitMQ server to perform authentication (determining who can log in) and authorisation (determining what permissions they have) by making requests to an HTTP server.

This plugin can put a significant amount of load on its backing service. We recommend using it together with rabbitmq_auth_backend_cache with a reasonable caching interval (e.g. 1-3 minutes).

Project Maturity

As of 3.7.0, this plugin is distributed with RabbitMQ.

RabbitMQ Version Requirements

As of 3.7.0, this plugin is distributed with RabbitMQ.

As with all authentication plugins, this one requires RabbitMQ server 2.3.1 or later.

Using with RabbitMQ 3.6.x

Install the corresponding .ez files from our Community Plugins page. Note that different releases of this plugin support different versions of RabbitMQ.

Enabling the Plugin

First enable the plugin using rabbitmq-plugins:

rabbitmq-plugins enable rabbitmq_auth_backend_http

Configuring the Plugin

To use this backend exclusively, use the following snippet in rabbitmq.conf (currently in master)

auth_backends.1 = http

Or, in the classic config format (rabbitmq.config, prior to 3.7.0) or advanced.config:

[{rabbit, [{auth_backends, [rabbit_auth_backend_http]}]}].

See RabbitMQ Configuration guide and Access Control guide for more information.

You need to configure the plugin to know which URIs to point at and which HTTP method to use.

Below is a minimal configuration file example.

In rabbitmq.conf:

auth_backends.1 = http
auth_http.http_method   = post
auth_http.user_path     = http://some-server/auth/user
auth_http.vhost_path    = http://some-server/auth/vhost
auth_http.resource_path = http://some-server/auth/resource
auth_http.topic_path    = http://some-server/auth/topic

In the classic config format (rabbitmq.config prior to 3.7.0 or advanced.config):

[
  {rabbit, [{auth_backends, [rabbit_auth_backend_http]}]},
  {rabbitmq_auth_backend_http,
   [{http_method,   post},
    {user_path,     "http(s)://some-server/auth/user"},
    {vhost_path,    "http(s)://some-server/auth/vhost"},
    {resource_path, "http(s)://some-server/auth/resource"},
    {topic_path,    "http(s)://some-server/auth/topic"}]}
].

By default http_method configuration is GET for backwards compatibility. It's recommended to use POST requests to avoid credentials logging.

What Must My Web Server Do?

This plugin requires that your web server respond to requests in a certain predefined format. It will make GET (by default) or POST requests against the URIs listed in the configuration file. It will add query string (for GET requests) or a URL-encoded request body (for POST requests) parameters as follows:

user_path

  • username - the name of the user
  • password - the password provided (may be missing if e.g. rabbitmq-auth-mechanism-ssl is used)

vhost_path

  • username - the name of the user
  • vhost - the name of the virtual host being accessed
  • ip - the client ip address

Note that you cannot create arbitrary virtual hosts using this plugin; you can only determine whether your users can see / access the ones that exist.

resource_path

  • username - the name of the user
  • vhost - the name of the virtual host containing the resource
  • resource - the type of resource (exchange, queue, topic)
  • name - the name of the resource
  • permission - the access level to the resource (configure, write, read) - see the Access Control guide for their meaning

topic_path

  • username - the name of the user
  • vhost - the name of the virtual host containing the resource
  • resource - the type of resource (topic in this case)
  • name - the name of the exchange
  • permission - the access level to the resource (write or read)
  • routing_key - the routing key of a published message (when the permission is write) or routing key of the queue binding (when the permission is read)

See topic authorisation for more information about topic authorisation.

Your web server should always return HTTP 200 OK, with a body containing:

  • deny - deny access to the user / vhost / resource
  • allow - allow access to the user / vhost / resource
  • allow [list of tags] - (for user_path only) - allow access, and mark the user as an having the tags listed

Using TLS/HTTPS

If your Web server uses HTTPS and certificate verification, you need to configure the plugin to use a CA and client certificate/key pair using the rabbitmq_auth_backend_http.ssl_options config variable:

[
  {rabbit, [{auth_backends, [rabbit_auth_backend_http]}]},
  {rabbitmq_auth_backend_http,
   [{http_method,   post},
    {user_path,     "https://some-server/auth/user"},
    {vhost_path,    "https://some-server/auth/vhost"},
    {resource_path, "https://some-server/auth/resource"},
    {topic_path,    "https://some-server/auth/topic"},
    {ssl_options,
     [{cacertfile, "/path/to/cacert.pem"},
      {certfile,   "/path/to/client/cert.pem"},
      {keyfile,    "/path/to/client/key.pem"},
      {verify,     verify_peer},
      {fail_if_no_peer_cert, true}]}]}
].

It is recommended to use TLS for authentication and enable peer verification.

Debugging

Check the RabbitMQ logs if things don't seem to be working properly. Look for log messages containing "rabbit_auth_backend_http failed".

Example Apps

There are example backend services available in Python, PHP, Spring Boot, ASP.NET Web API.

See examples README for more information.

Building from Source

You can build and install it like any other plugin (see the plugin development guide).

This plugin depends on the Erlang client (just to grab a URI parser).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].