You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to use XACML request template to generate the actual XACML request to PDP at runtime. For each access request, the variables used in the template (e.g. user ID, user roles, action ID, resource ID) are resolved at runtime in the context of the request.
For this, you can use one of many Python template engines listed here for instance: https://wiki.python.org/moin/Templating
For example, if you want the SDK to send XACML/JSON requests, using Jinja template engine, the app developer/admin would provide a XACML request template file looking like this:
When using the SDK API, the developer just needs to call a method template.render( [variables] ), the input variables being in a dict, e.g. {"user_id" = "bob", "method_name" = "read", ...}.
The idea is to use XACML request template to generate the actual XACML request to PDP at runtime. For each access request, the variables used in the template (e.g. user ID, user roles, action ID, resource ID) are resolved at runtime in the context of the request.
For this, you can use one of many Python template engines listed here for instance:
https://wiki.python.org/moin/Templating
For example, if you want the SDK to send XACML/JSON requests, using Jinja template engine, the app developer/admin would provide a XACML request template file looking like this:
When using the SDK API, the developer just needs to call a method
template.render( [variables] )
, the input variables being in a dict, e.g.{"user_id" = "bob", "method_name" = "read", ...}
.You may find valid XACML/JSON Request samples in xacml-json-model project.
More examples of JSON templating with Python's Jinja:
http://sasheldon.com/blog/2013/12/14/simplifying-json-response-mocks-with-jinja/
The text was updated successfully, but these errors were encountered: