{"id":28898843,"url":"https://github.com/pauldeng/rabbitmq_auth_backend_fastify","last_synced_at":"2026-05-08T10:35:29.496Z","repository":{"id":298650322,"uuid":"995895723","full_name":"pauldeng/rabbitmq_auth_backend_fastify","owner":"pauldeng","description":"A missing Node.js example of RabbitMQ HTTP Authn/Authz Backend","archived":false,"fork":false,"pushed_at":"2025-06-12T05:56:36.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T06:46:22.809Z","etag":null,"topics":["fastify","nodejs","rabbitmq","rabbitmq-http-auth-backend"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pauldeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T06:56:57.000Z","updated_at":"2025-06-12T05:56:39.000Z","dependencies_parsed_at":"2025-06-12T06:46:26.692Z","dependency_job_id":"264462a7-0d53-472a-b958-66f0968e9771","html_url":"https://github.com/pauldeng/rabbitmq_auth_backend_fastify","commit_stats":null,"previous_names":["pauldeng/rabbitmq_auth_backend_fastify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pauldeng/rabbitmq_auth_backend_fastify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldeng%2Frabbitmq_auth_backend_fastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldeng%2Frabbitmq_auth_backend_fastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldeng%2Frabbitmq_auth_backend_fastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldeng%2Frabbitmq_auth_backend_fastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauldeng","download_url":"https://codeload.github.com/pauldeng/rabbitmq_auth_backend_fastify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldeng%2Frabbitmq_auth_backend_fastify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261088330,"owners_count":23107676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastify","nodejs","rabbitmq","rabbitmq-http-auth-backend"],"created_at":"2025-06-21T08:00:30.017Z","updated_at":"2026-05-08T10:35:29.488Z","avatar_url":"https://github.com/pauldeng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ HTTP Authn/Authz Backend Examples\n\n## Overview\n\n* Node.js and Fastify\n\n## Node.js Example\n\n`rabbitmq_auth_backend_fastify` is a very minimalistic [Fastify](https://fastify.dev/) application that rabbitmq-auth-backend-http can authenticate against. It's really not designed to be anything other than an example.\n\n### Running the Example\n\n1. Configure RabbitMQ `/etc/rabbitmq/rabbitmq.conf`\n\n```text\n...\n\n## External Authentication Provider\n\n### Enable cache in production\n#auth_backends.1 = cache\n#auth_cache.cached_backend = http\n#auth_cache.cache_ttl = 86400000 # Expire in milliseconds\n\n### Invoke auth provider everytime\nauth_backends.1 = http\nauth_http.http_method = post\nauth_http.user_path = http://localhost:8080/auth/user\nauth_http.vhost_path = http://localhost:8080/auth/vhost\nauth_http.resource_path = http://localhost:8080/auth/resource\nauth_http.topic_path    = http://localhost:8080/auth/topic\n\n```\n\n2. Enable RabbitMQ Plugins\n\n```shell\nsudo rabbitmqctl enable_feature_flag all\n\nsudo rabbitmq-plugins enable rabbitmq_auth_backend_http\n\n# Enable cache in production\nsudo rabbitmq-plugins enable rabbitmq_auth_backend_cache\n\n# Restart RabbitMQ service\nsudo systemctl restart rabbitmq-server.service\n\n```\n\n3. Run this Fastify\n\n```shell\n# Clone this repo\n\n# Install dependency\nnpm i\n\n# Run this app\nnode fastify-auth-provider\n\n# Use pm2 to manage it as a service\npm2 start fastify-auth-provider\n```\n\n4. Verify\n\nOpen RabbitMQ Management page at `http://localhost:15672/`.\nYou should be able to login by typing any username and password\n\n### Improvements\n\n* Support YAML configuration\n* Read credentials from a file\n* Read credentials from Redis\n* Read credentials from DB\n\n## References\n\n* [rabbitmq_auth_backend_http](https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_auth_backend_http)\n\n* [rabbitmq_auth_backend_http examples](https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_auth_backend_http/examples)\n\n* [RabbitMQ Management Plugin Permissions](https://www.rabbitmq.com/docs/management#permissions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldeng%2Frabbitmq_auth_backend_fastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauldeng%2Frabbitmq_auth_backend_fastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldeng%2Frabbitmq_auth_backend_fastify/lists"}