buda-base / bdrc-auth-lib

Bdrc authorization library based on auth0
Apache License 2.0
0 stars 0 forks source link

add way to give special rights to some IP address ranges #10

Open eroux opened 5 years ago

eroux commented 5 years ago

One of the main missing pieces in the library is the ability to give special rights to some IP address ranges. For instance we want to have in the model something along the lines of:

- rightsForInstitution
   - institutionID bdr:C123 (imagining we have corporation entities for universities, we currently don't but that's another story)
  - additionalRights bdr:CopyrightAccess
  - ipv4AddressRange "1.2.3.0/24" , "1.2.4.5"

(to be modeled correctly in RDF). Then when analyzing the model, the lib would create a trie (using this code which looks good) allowing to match an ip address to a rightsForInstitution and thus additional rights. This means changing a bit the initialization code when creating the user profile but it shouldn't be too difficult... Not an emergency but to be considered...