carlosgrell
Canary vs Bodyguard, thoughts and suggestions
Recently I’ve been wondering which of these two libraries would be the most recommended for resource authorisation, regardless of the app purpose (but maybe taking into account different app sizes and structures).
I would very much like to know your thoughts about these two libraries, and what are the reasons one should choose one of them over another:
- Bodyguard: GitHub - schrockwell/bodyguard: Simple authorization conventions for Phoenix apps · GitHub - 265 stars, 18 forks, 10 contributors
- canary: GitHub - cpjk/canary: 🐣 Elixir authorization and resource-loading library for Plug applications. · GitHub - 373 stars, 45 forks, 12 contributors
At a first glance (not having used any), the best thought I can have is: the first one (Bodyguard) seems a little less invasive, simpler and easier to test, but also harder to find rules and maintain, and the latter (canary) makes authorisation more centralised (thus making its rules easier for modification and maintenance).
Thanks in advance.
Most Liked
tielur
We’ve been using GitHub - boydm/policy_wonk: Elixir authorization and resource loading in Plug form for Phoenix · GitHub and it works pretty well. I haven’t checked out bodyguard though.
OvermindDL1
I just use my own built on my permissions_ex matcher library combined with bog-standard phoenix tokens.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









