ging / fiware-pep-proxy

Support for proxy functions within OAuth2-based authentication schemas. Also implements PEP functions within an XACML-based access control schema.
https://fiware-pep-proxy.rtfd.io/
MIT License
27 stars 46 forks source link

protect orion #101

Open fernandorr21 opened 4 years ago

fernandorr21 commented 4 years ago

Hello, I am Fernando. I have a stage with keyrock, authzforce and wilma. I want to make the creation of entities safe depending on the values ​​of the attributes of those entities. If for example the email attribute, email = fernando, I want the entity to be created, in case it does not have the value fernando is not created. With Authzforce the attributes of the entities are not captured, with Wilma is it possible to allow this?

jason-fox commented 3 years ago

There is an existing stub to do this called custom_policy ( I have not used this)

config.authorization = {
  enabled: false,
  pdp: 'idm', // idm|authzforce
  azf: {
    protocol: 'http',
    host: 'localhost',
    port: 8080,
    custom_policy: undefined, // use undefined to default policy checks (HTTP verb + path).
  },
};

You'd write the code to create the Authzforce request based on the custom_policy.js.template and need to change custom_policy from undefined to point to the new file.