m3rl1n

m3rl1n

Phoenix authorisation decision process

Phoenix has always been a difficult system to manage when it comes to manage authorisation. There is a number of different libraries out there to enable such a thing. They are however limited depending on the scope or source of which the authentication data originates.

The idea is to generally store member groups in PostgreSQL and then use the information associated with user structs to perform decisions on what the user can or can not do. It is difficult to find or create the mappings for these ACL’s and also provide user interaction to them.

There is a application called open policy agent. It allows the creation of advanced ACL’s including attribute based authorisation workflows. It uses scripts written in a lightweight language called Rigo to define authorisations. These scripts can be delivered via http which make them easily interoperable.

I think it would be a good tool to use along side phoenix. Through the use of elixir’s pattern matching capabilities with phoenix authorisation can be simplified and also enhanced.

I think a library would be a good thing. That makes the interaction possible. I have not thought to write a library yet as I am not sure how the design would be. Open Policy agent is also not designed for this purpose but it has web compatible api’s. This means we able to integrate it within phoenix and elixir applications.

What do you think of the idea and whether or not it would useful.

Where Next?

Popular in Discussions Top

sergio
There’s a new TIOBE index report that came out that shows Elixir is still not in the top 50 used languages. It also goes on to call Elix...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19760 150
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement