The code which extracts the different policy parameters from an NGSI request should be splitted into separate functions and added to a separate utility module.
Policy parameters are:
entity type
entity IDs
attributes
An additional function should also evaluate the operation type (GET, POST, PATCH, DELETE + the different batch type operations)
The code which extracts the different policy parameters from an NGSI request should be splitted into separate functions and added to a separate utility module.
Policy parameters are:
Current implementation can be found here: https://github.com/FIWARE/api-umbrella/blob/master/src/api-umbrella/proxy/middleware/policy_validator_cb_ishare_auto.lua#L29
Utility module could be stored under src/api-umbrella/utils similar to idp.lua.