{"info":{"_postman_id":"59ce8a5e-c01f-4d7b-964e-64dd67f2fce5","name":"FIWARE Administrating XACML","description":"<html><head></head><body><p><a href=\"https://www.fiware.org/developers/catalogue/\"><img src=\"https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/security.svg\" alt=\"FIWARE Security\"></a></p>\n<p>This tutorial introduces the administration of level 3 advanced authorization rules into <strong>Keyrock</strong>. The simple verb-resource based permissions are amended to use XACML and new XACML permissions added to the existing roles. The updated ruleset is automatically uploaded to <strong>Authzforce</strong> PDP, so that policy execution points such as the <strong>PEP proxy</strong> are able to apply the latest ruleset.</p>\n<p>The tutorial demonstrates examples of interactions using the <strong>Keyrock</strong> GUI, as\nwell <a href=\"https://ec.haxx.se/\">cUrl</a> commands used to access the REST\nAPIs of <strong>Keyrock</strong>  and <strong>Authzforce</strong> </p>\n<p>The <code>docker-compose</code> files for this tutorial can be found on GitHub: </p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/icon/GitHub-Mark-32px.png\" alt=\"GitHub\"> <a href=\"https://github.com/Fiware/tutorials.Administrating-XACML\">FIWARE 406: Administrating XACML</a></p>\n<h1 id=\"administrating-xacml-rules\">Administrating XACML Rules</h1>\n<blockquote>\n<p><strong>12.3 Central Terminal Area</strong></p>\n<ul>\n<li>Red or Yellow Zone<ul>\n<li>No private vehicle shall stop, wait, or park in the red or yellow zone.</li>\n</ul>\n</li>\n<li>White Zone<ul>\n<li>No vehicle shall stop, wait, or park in the white zone unless actively\nengaged in the immediate loading or unloading of passengers\nand/or baggage.</li>\n</ul>\n</li>\n</ul>\n<p>— Los Angeles International Airport Rules and Regulations, Section 12 - Landside Motor Vehicle Operations</p>\n</blockquote>\n<p>Business rules change over time, and it is necessary to be able to amend access controls accordingly. The <a href=\"https://github.com/Fiware/tutorials.XACML-Access-Rules\">previous tutorial</a> included a static XACML <code>&lt;PolicySet&gt;</code> loaded into <strong>Authzforce</strong>. This component offers advanced authorization (level 3) access control where every policy decision is calculated on the fly and new rules can be applied under new circumstances.\nThe details of the <a href=\"https://authzforce-ce-fiware.readthedocs.io/\">Authzforce</a> Policy Decision Point (PDP) were discussed in the <a href=\"https://github.com/Fiware/tutorials.XACML-Access-Rules\">previous tutorial</a>, suffice to say, the <strong>Authzforce</strong> PDP interprets rules according to the\n<a href=\"https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml\">XACML standard</a> and offers a means to adjudicate on any access request provided that sufficient information can be supplied.</p>\n<p>For full flexibility, it must be possible to load, update and activate a new access control XACML <code>&lt;PolicySet&gt;</code> whenever necessary. In order to do, this <strong>Authzforce</strong> offers a simple REST Policy Adminstration Point (PAP), an alternative role-based PAP is available within <strong>Keyrock</strong></p>\n<h2 id=\"what-is-xacml\">What is XACML</h2>\n<p>eXtensible Access Control Markup Language (XACML) is a vendor neutral\ndeclarative access control policy language. It was created to promote common\naccess control terminology and interoperability. The architectural naming\nconventions for elements such as Policy Execution Point (PEP) and Policy\nDecision Point (PDP) come from the XACML specifications.</p>\n<p>XACML policies are split into a hierarchy of three levels - <code>&lt;PolicySet&gt;</code>,\n<code>&lt;Policy&gt;</code> and <code>&lt;Rule&gt;</code>, the <code>&lt;PolicySet&gt;</code> is a collection of <code>&lt;Policy&gt;</code>\nelements each of which contain one or more <code>&lt;Rule&gt;</code> elements.</p>\n<p>Each <code>&lt;Rule&gt;</code> within a <code>&lt;Policy&gt;</code> is evaluated as to whether it should grant\naccess to a resource - the overall <code>&lt;Policy&gt;</code> result is defined by the overall\nresult of all <code>&lt;Rule&gt;</code> elements processed in turn. Separate <code>&lt;Policy&gt;</code> results\nare then evaluated against each other using combining alogorthms define which\n<code>&lt;Policy&gt;</code> wins in case of conflict.</p>\n<p>Further information can be found within the <a href=\"https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml\">XACML standard</a></p>\n<h2 id=\"pap---policy-administration-point\">PAP - Policy Administration Point</h2>\n<p>For the first half of the tutorial, a simple two rule <code>&lt;PolicySet&gt;</code> will be administered using the <strong>Authzforce</strong> PAP. Thereafter the <strong>Keyrock</strong> GUI will be used to administer XACML rules within the existing tutorial application  on an individual XACML <code>&lt;Rule&gt;</code> level. The policy decision request code within the <strong>PEP-Proxy</strong> may also need to be customized to enable the enforcement of complex XACML rules.</p>\n<h3 id=\"authzforce-pap\">Authzforce PAP</h3>\n<p>Within the <strong>Authzforce</strong> PAP all CRUD actions occur on the <code>&lt;PolicySet&gt;</code> level. It is therefore necessary to create a complete, valid XACML file before uploading it to the service. There is no GUI available to ensure the validity of the  <code>&lt;PolicySet&gt;</code> prior to uploading the XACML.</p>\n<h3 id=\"keyrock-pap\">Keyrock PAP</h3>\n<p><strong>Keyrock</strong> can create a valid XACML file based on available roles and permissions and pass this to <strong>Authzforce</strong>. Indeed <strong>Keyrock</strong> already does this whenever it combines with <strong>Authzforce</strong> as all its own basic authorization (level 2) permissions must be translated into advanced authorization (level 3) permissions before they can be adjudicated by <strong>Authzforce</strong>.</p>\n<p>Within <strong>Keyrock</strong>, each role corresponds to an XACML <code>&lt;Policy&gt;</code>, each permission within that role corresponds to an XACML <code>&lt;Rule&gt;</code>. There is a GUI available for uploading and amending the XACML for each <code>&lt;Rule&gt;</code> and all CRUD actions occur on the <code>&lt;Rule&gt;</code> level.</p>\n<p>Provided care is taken when creating <code>&lt;Rule&gt;</code> you can use <strong>Keyrock</strong> to simplify the administration of XACML and create a valid <code>&lt;PolicySet&gt;</code> for <strong>Authzforce</strong>.</p>\n<h2 id=\"pep---policy-execution-point\">PEP - Policy Execution Point</h2>\n<p>When using advanced authorization (level 3),  a policy execution point sends the an authorization request to he relevant domain endpoint within <strong>Authzforce</strong>,\nproviding all of the information necessary for <strong>Authzforce</strong> to provide a\njudgement. Details of the interaction can be found in the <a href=\"https://github.com/Fiware/tutorials.XACML-Access-Rules\">previous tutorial</a>.</p>\n<p>The full code to supply each request to <strong>Authzforce</strong> can be found within the\ntutorials'\n<a href=\"https://github.com/Fiware/tutorials.Step-by-Step/blob/master/context-provider/lib/azf.js\">Git Repository</a></p>\n<p>Obviously the definition of <em>\"all of the information necessary\"</em> may change\nover time, applications must therefore be flexible enough to be able to modify the requests sent to ensure that sufficient information is passed.</p>\n<h1 id=\"prerequisites\">Prerequisites</h1>\n<h2 id=\"docker\">Docker</h2>\n<p>To keep things simple all components will be run using\n<a href=\"https://www.docker.com\">Docker</a>. <strong>Docker</strong> is a container technology which\nallows to different components isolated into their respective environments.</p>\n<ul>\n<li>To install Docker on Windows follow the instructions\n<a href=\"https://docs.docker.com/docker-for-windows/\">here</a></li>\n<li>To install Docker on Mac follow the instructions\n<a href=\"https://docs.docker.com/docker-for-mac/\">here</a></li>\n<li>To install Docker on Linux follow the instructions\n<a href=\"https://docs.docker.com/install/\">here</a></li>\n</ul>\n<p><strong>Docker Compose</strong> is a tool for defining and running multi-container Docker\napplications. A\n<a href=\"https://raw.githubusercontent.com/Fiware/tutorials.Identity-Management/master/docker-compose.yml\">YAML file</a>\nis used configure the required services for the application. This means all\ncontainer services can be brought up in a single command. Docker Compose is\ninstalled by default as part of Docker for Windows and Docker for Mac, however\nLinux users will need to follow the instructions found\n<a href=\"https://docs.docker.com/compose/install/\">here</a></p>\n<h2 id=\"cygwin\">Cygwin</h2>\n<p>We will start up our services using a simple bash script. Windows users should\ndownload <a href=\"http://www.cygwin.com/\">cygwin</a> to provide a command-line\nfunctionality similar to a Linux distribution on Windows.</p>\n<h1 id=\"architecture\">Architecture</h1>\n<p>This application adds OAuth2-driven security into the existing Stock Management\nand Sensors-based application created in\n<a href=\"https://github.com/Fiware/tutorials.IoT-Agent/\">previous tutorials</a> by using\nthe data created in the first\n<a href=\"https://github.com/Fiware/tutorials.Identity-Management/\">security tutorial</a>\nand reading it programmatically. It will make use of three FIWARE components -\nthe <a href=\"https://fiware-orion.readthedocs.io/en/latest/\">Orion Context Broker</a>,the\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/\">IoT Agent for UltraLight 2.0</a>\nand integrates the use of the\n<a href=\"https://fiware-idm.readthedocs.io/en/latest/\">Keyrock</a> Generic enabler. Usage\nof the Orion Context Broker is sufficient for an application to qualify as\n<em>“Powered by FIWARE”</em>.</p>\n<p>Both the Orion Context Broker and the IoT Agent rely on open source\n<a href=\"https://www.mongodb.com/\">MongoDB</a> technology to keep persistence of the\ninformation they hold. We will also be using the dummy IoT devices created in\nthe <a href=\"https://github.com/Fiware/tutorials.IoT-Sensors/\">previous tutorial</a>.\n<strong>Keyrock</strong> uses its own <a href=\"https://www.mysql.com/\">MySQL</a> database.</p>\n<p>Therefore the overall architecture will consist of the following elements:</p>\n<ul>\n<li><p>The FIWARE\n<a href=\"https://fiware-orion.readthedocs.io/en/latest/\">Orion Context Broker</a> which\nwill receive requests using\n<a href=\"https://fiware.github.io/specifications/OpenAPI/ngsiv2\">NGSI</a></p>\n</li>\n<li><p>The FIWARE\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/\">IoT Agent for UltraLight 2.0</a>\nwhich will receive southbound requests using\n<a href=\"https://fiware.github.io/specifications/OpenAPI/ngsiv2\">NGSI</a> and convert\nthem to\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual\">UltraLight 2.0</a>\ncommands for the devices</p>\n</li>\n<li><p>FIWARE <a href=\"https://fiware-idm.readthedocs.io/en/latest/\">Keyrock</a> offer a\ncomplement Identity Management System including:</p>\n<ul>\n<li>An OAuth2 authentication system for Applications and Users</li>\n<li>A site graphical frontend for Identity Management Administration</li>\n<li>An equivalent REST API for Identity Management via HTTP requests</li>\n</ul>\n</li>\n<li><p>FIWARE <a href=\"https://fiware-pep-proxy.rtfd.io/\">Authzforce</a> is a XACML Server providing an interpretive Policy Decision Point (PDP)\naccess to the <strong>Orion</strong> and/or <strong>IoT Agent</strong> microservices</p>\n</li>\n<li><p>FIWARE <a href=\"https://fiware-pep-proxy.rtfd.io/\">Wilma</a> is a PEP Proxy securing\naccess to the <strong>Orion</strong> microservices, it requests authorisation decisions from <strong>Authzforce</strong></p>\n</li>\n<li><p>The underlying <a href=\"https://www.mongodb.com/\">MongoDB</a> database :</p>\n<ul>\n<li>Used by the <strong>Orion Context Broker</strong> to hold context data information\nsuch as data entities, subscriptions and registrations</li>\n<li>Used by the <strong>IoT Agent</strong> to hold device information such as device URLs\nand Keys</li>\n</ul>\n</li>\n<li><p>A <a href=\"https://www.mysql.com/\">MySQL</a> database :</p>\n<ul>\n<li>Used to persist user identities, applications, roles and permissions</li>\n</ul>\n</li>\n<li><p>The <strong>Stock Management Frontend</strong> does the following:</p>\n<ul>\n<li>Displays store information</li>\n<li>Shows which products can be bought at each store</li>\n<li>Allows users to \"buy\" products and reduce the stock count.</li>\n<li>Allows authorized users into restricted areas, it requests authoriation decisions from <strong>Authzforce</strong></li>\n</ul>\n</li>\n<li><p>A webserver acting as set of\n<a href=\"https://github.com/Fiware/tutorials.IoT-Sensors\">dummy IoT devices</a> using\nthe\n<a href=\"https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual\">UltraLight 2.0</a>\nprotocol running over HTTP - access to certain resources is restricted.</p>\n</li>\n</ul>\n<p>Since all interactions between the elements are initiated by HTTP requests, the\nentities can be containerized and run from exposed ports.</p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/img/architecture.png\" alt=\"\"></p>\n<p>The all container configuration values described in the YAML file\nhave been described in previous tutorials</p>\n<h1 id=\"start-up\">Start Up</h1>\n<p>To start the installation, do the following:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">git clone git@github.com:Fiware/tutorials.Administrating-XACML.git\ncd tutorials.Administrating-XACML\n\n./services create\n</code></pre>\n<blockquote>\n<p><strong>Note</strong> The initial creation of Docker images can take up to three minutes</p>\n</blockquote>\n<p>Thereafter, all services can be initialized from the command-line by running the\n<a href=\"https://github.com/Fiware/tutorials.Administrating-XACML/blob/master/services\">services</a>\nBash script provided within the repository:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-console\">./services start\n</code></pre>\n<blockquote>\n<p><strong>Note:</strong> If you want to clean up and start over again\nyou can do so with the following command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>./services stop\n</code></pre></blockquote>\n<h3 id=\"dramatis-personae\">Dramatis Personae</h3>\n<p>The following people at <code>test.com</code> legitimately have accounts within the\nApplication</p>\n<ul>\n<li>Alice, she will be the Administrator of the <strong>Keyrock</strong> Application</li>\n<li>Bob, the Regional Manager of the supermarket chain - he has several store\nmanagers under him:<ul>\n<li>Manager1</li>\n<li>Manager2</li>\n</ul>\n</li>\n<li>Charlie, the Head of Security of the supermarket chain - he has several\nstore detectives under him:<ul>\n<li>Detective1</li>\n<li>Detective2</li>\n</ul>\n</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>eMail</th>\n<th>Password</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>alice</td>\n<td><a href=\"mailto:alice-the-admin@test.com\">alice-the-admin@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>bob</td>\n<td><a href=\"mailto:bob-the-manager@test.com\">bob-the-manager@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>charlie</td>\n<td><a href=\"mailto:charlie-security@test.com\">charlie-security@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>manager1</td>\n<td><a href=\"mailto:manager1@test.com\">manager1@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>manager2</td>\n<td><a href=\"mailto:manager2@test.com\">manager2@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>detective1</td>\n<td><a href=\"mailto:detective1@test.com\">detective1@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>detective2</td>\n<td><a href=\"mailto:detective2@test.com\">detective2@test.com</a></td>\n<td><code>test</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>The following people at <code>example.com</code> have signed up for accounts, but have no\nreason to be granted access</p>\n<ul>\n<li>Eve - Eve the Eavesdropper</li>\n<li>Mallory - Mallory the malicious attacker</li>\n<li>Rob - Rob the Robber</li>\n</ul>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>eMail</th>\n<th>Password</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>eve</td>\n<td><a href=\"mailto:eve@example.com\">eve@example.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>mallory</td>\n<td><a href=\"mailto:mallory@example.com\">mallory@example.com</a></td>\n<td><code>test</code></td>\n</tr>\n<tr>\n<td>rob</td>\n<td><a href=\"mailto:rob@example.com\">rob@example.com</a></td>\n<td><code>test</code></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"xacml-administration\">XACML Administration</h1>\n<p>To apply an access control policy, it is necessary to be able to do the following:</p>\n<p>a) Create a consistent <code>&lt;PolicySet&gt;</code>\nb) Supply a Policy Execution Point (PEP) which provides necessary data</p>\n<p>As will be seen, <strong>Keyrock</strong> is able help with the first point, and custom code within the <strong>PEP Proxy</strong> can help with the second. <strong>Authzforce</strong> itself does not offer a UI, and is not concerned with generation and management of XACML policies - it assumes that each <code>&lt;PolicySet&gt;</code> it receives has already been generated by another component.</p>\n<p>Full-blown XACML editors are available, but the limited editor within <strong>Keyrock</strong> is usually sufficient for most access control scenarios.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Administrating XACML Rules","slug":"administrating-xacml-rules"},{"content":"Prerequisites","slug":"prerequisites"},{"content":"Architecture","slug":"architecture"},{"content":"Start Up","slug":"start-up"},{"content":"XACML Administration","slug":"xacml-administration"}],"owner":"513743","collectionId":"59ce8a5e-c01f-4d7b-964e-64dd67f2fce5","publishedId":"RznCrzo9","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF7059"},"publishDate":"2020-01-02T11:02:36.000Z"},"item":[{"name":"Authzforce PAP - Adminstrating XACML Policies","item":[{"name":"Creating a new Domain","id":"e8403c53-8bc0-4c10-83f1-e66b55aeabcf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml","type":"text"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<domainProperties xmlns=\"http://authzforce.github.io/rest-api-model/xmlns/authz/5\" externalId=\"airplane\"/>"},"url":"http://localhost:8080/authzforce-ce/domains","description":"<p>To create a new domain in <strong>Authzforce</strong>, make a POST request to the\n<code>/authzforce-ce/domains</code> endpoint including a unique <code>external-id</code> within\nthe <code>&lt;domainProperties&gt;</code> element</p>\n<p>The response includes a <code>href</code> in the <code>&lt;n2:link&gt;</code> element  which holds the\n<code>domain-id</code> used internally within <strong>Authzforce</strong>.</p>\n<p>An empty <code>PolicySet</code> will be created for the new domain. By default all\naccess will be permitted.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"e8403c53-8bc0-4c10-83f1-e66b55aeabcf"},{"name":"Creating an initial PolicySet","id":"ec3d042c-f8bb-45a2-8f27-d8deee57a657","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/xml"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<PolicySet xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicySetId=\"f8194af5-8a07-486a-9581-c1f05d05483c\" Version=\"9\" PolicyCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit\">\n   <Description>Policy Set for Airplane!</Description>\n   <Target />\n   <Policy PolicyId=\"airplane\" Version=\"1.0\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit\">\n      <Description>Vehicle Roles from the Male announcer in the movie Airplane!</Description>\n      <Target>\n         <AnyOf>\n            <AllOf>\n               <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                  <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">airplane!</AttributeValue>\n                  <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n               </Match>\n            </AllOf>\n         </AnyOf>\n      </Target>\n      <Rule RuleId=\"white-zone\" Effect=\"Permit\">\n         <Description>The white zone is for immediate loading and unloading of passengers only</Description>\n         <Target>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">white</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">loading</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n         </Target>\n         \n         \n         \n          <Condition>\n\n\n             <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:not\">\n                                 <Apply FunctionId=\"urn:oasis:names:tc:xacml:2.0:function:time-in-range\">\n                                    <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\">\n                                       <AttributeDesignator AttributeId=\"urn:oasis:names:tc:xacml:1.0:environment:current-time\" DataType=\"http://www.w3.org/2001/XMLSchema#time\" Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\" MustBePresent=\"false\"></AttributeDesignator>\n                                    </Apply>\n                                    <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\">\n                                       <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:time-bag\">\n                                          <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#time\">00:00:00-08:00</AttributeValue>\n                                       </Apply>\n                                    </Apply>\n                                    <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\">\n                                       <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:time-bag\">\n                                          <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#time\">18:00:00-23:59</AttributeValue>\n                                       </Apply>\n                                    </Apply>\n                                 </Apply>\n                              </Apply>\n                              \n                              \n               <!--Apply FunctionId=\"urn:oasis:names:tc:xacml:3.0:function:any-of\">\n                  <Function FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\" />\n                  <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">managers-role-0000-0000-000000000000</AttributeValue>\n                  <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" AttributeId=\"urn:oasis:names:tc:xacml:2.0:subject:role\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"false\" />\n               </Apply-->\n         </Condition>\n         \n         \n         \n         \n         \n      </Rule>\n     \n   </Policy>\n</PolicySet>\n"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pap/policies","description":"<p>To create a <code>PolicySet</code> for a given domain information in <strong>Authzforce</strong>, make a\nPOST request to the\n<code>/authzforce-ce/domains/gQqnLOnIEeiBFQJCrBIBDA/pap/policies</code> endpoint including the full set\nof XACML rules to upload.</p>\n<p>For this initial Policy, the following rules will be enforced</p>\n<ul>\n<li>The <strong>white</strong> zone is for immediate loading and unloading of passengers only</li>\n<li>There is no stopping in the <strong>red</strong> zone</li>\n</ul>\n<p>The response contains the internal id of the policy held within <strong>Authzforce</strong> and \nversion information about the <code>PolicySet</code> versions available.\nThe rules of the new <code>PolicySet</code> will not be applied until the <code>PolicySet</code> is activated.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pap","policies"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"ec3d042c-f8bb-45a2-8f27-d8deee57a657"},{"name":"Activate the initial PolicySet","id":"baeae972-1e96-43ab-b281-24c0c4dd93c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","type":"text","value":"application/xml"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><pdpPropertiesUpdate xmlns=\"http://authzforce.github.io/rest-api-model/xmlns/authz/5\"><rootPolicyRefExpression>f8194af5-8a07-486a-9581-c1f05d05483c</rootPolicyRefExpression></pdpPropertiesUpdate>"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pap/pdp.properties","description":"<p>To activate a <code>PolicySet</code>, make a PUT request to the\n<code>/authzforce-ce/domains/{domain-id}/pap/pdp.properties</code> endpoint including the <code>policy-id</code>\nto update within the <code>&lt;rootPolicyRefExpresion&gt;</code> attribute</p>\n<p>The response returns information about the <code>PolicySet</code> applied.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pap","pdp.properties"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"baeae972-1e96-43ab-b281-24c0c4dd93c6"},{"name":"Updating a Policy Set","id":"d5ebad20-03df-42b7-b710-f6af3158d9af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/xml"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<PolicySet xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" PolicySetId=\"f8194af5-8a07-486a-9581-c1f05d05483c\" Version=\"2\" PolicyCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit\">\n   <Description>Policy Set for Airplane!</Description>\n   <Target />\n   <Policy PolicyId=\"airplane\" Version=\"1.0\" RuleCombiningAlgId=\"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit\">\n      <Description>Vehicle Roles from the Female announcer in the movie Airplane!</Description>\n      <Target>\n         <AnyOf>\n            <AllOf>\n               <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                  <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">airplane!</AttributeValue>\n                  <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n               </Match>\n            </AllOf>\n         </AnyOf>\n      </Target>\n      <Rule RuleId=\"red-zone\" Effect=\"Permit\">\n         <Description>The red zone is for immediate loading and unloading of passengers only</Description>\n         <Target>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">red</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">loading</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n         </Target>\n      </Rule>\n      <Rule RuleId=\"white-zone\" Effect=\"Deny\">\n         <Description>There is no stopping in the white zone</Description>\n         <Target>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">white</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\" AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n            <AnyOf>\n               <AllOf>\n                  <Match MatchId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\">\n                     <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">stopping</AttributeValue>\n                     <AttributeDesignator Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\" AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\" />\n                  </Match>\n               </AllOf>\n            </AnyOf>\n         </Target>\n      </Rule>\n   </Policy>\n</PolicySet>\n"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pap/policies","description":"<p>To update a <code>PolicySet</code> for a given domain information in <strong>Authzforce</strong>, make a\nPOST request to the\n<code>/authzforce-ce/domains/gQqnLOnIEeiBFQJCrBIBDA/pap/policies</code> endpoint including the full set\nof XACML rules to upload. Note that the <code>Version</code> must be unique.</p>\n<p>For the updated Policy, the previous rules will be reversed</p>\n<ul>\n<li>The <strong>red</strong> zone is for immediate loading and unloading of passengers only</li>\n<li>There is no stopping in the <strong>white</strong> zone</li>\n</ul>\n<p>The response contains version information about the <code>PolicySet</code> versions available.\nThe rules of the new <code>PolicySet</code> will not be applied until the <code>PolicySet</code> is activated.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pap","policies"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"d5ebad20-03df-42b7-b710-f6af3158d9af"},{"name":"Activating an updated PolicySet","id":"4b513619-f725-450b-b1a2-0af84ed896a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","type":"text","value":"application/xml"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><pdpPropertiesUpdate xmlns=\"http://authzforce.github.io/rest-api-model/xmlns/authz/5\"><rootPolicyRefExpression>f8194af5-8a07-486a-9581-c1f05d05483c</rootPolicyRefExpression></pdpPropertiesUpdate>"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pap/pdp.properties","description":"<p>To update an active a <code>PolicySet</code>, make another PUT request to the\n<code>/authzforce-ce/domains/{domain-id}/pap/pdp.properties</code> endpoint including the <code>policy-id</code>\nto update within the <code>&lt;rootPolicyRefExpresion&gt;</code> attribute. The ruleset will be updated to\napply the latest uploaded version.</p>\n<p>The response returns information about the <code>PolicySet</code> applied.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pap","pdp.properties"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b513619-f725-450b-b1a2-0af84ed896a4"}],"id":"b82596e9-3482-4b53-8e2a-ec6ee866f036","description":"<p><strong>Authzforce</strong> can act as a Policy Administration Point (PAP), this means that PolicySets can be created and amended using API calls directly to <strong>Authzforce</strong></p>\n<p>However there is no GUI for creating or amending a <code>&lt;PolicySet&gt;</code>, and no generation tool. All CRUD actions occur on the <code>&lt;PolicySet&gt;</code> level.</p>\n","event":[{"listen":"prerequest","script":{"id":"6bba1d42-8a2c-4d85-b103-5792ce90530f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"64d519de-39c8-47bb-8e9e-00b2e3aff3ce","type":"text/javascript","exec":[""]}}],"_postman_id":"b82596e9-3482-4b53-8e2a-ec6ee866f036"},{"name":"Authzforce PDP - Requesting Policy Decisions","item":[{"name":"White Zone Permissions","id":"00c9cc52-1aea-49af-a71c-e3d69eded343","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml","type":"text"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Request xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" CombinedDecision=\"false\" ReturnPolicyIdList=\"false\">\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\">\n      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">airplane!</AttributeValue>\n      </Attribute>\n      <Attribute AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">white</AttributeValue>\n      </Attribute>\n   </Attributes>\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\">\n      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">loading</AttributeValue>\n      </Attribute>\n   </Attributes>\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\" />\n</Request>"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pdp","description":"<p>To request a decision from Authzforce, make a POST request to the\n<code>domains/{domain-id}/pdp</code> endpoint. In this case the user has the\nis requesting access to <code>loading</code> in the <code>white</code> zone.</p>\n<p>The response for the request includes a <code>&lt;Decision&gt;</code> element to <code>Permit</code> or <code>Deny</code> access to the resource.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pdp"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"00c9cc52-1aea-49af-a71c-e3d69eded343"},{"name":"Red Zone Permissions","id":"71c28403-9a92-4c01-8a7c-c45cc52635a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml","type":"text"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Request xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" CombinedDecision=\"false\" ReturnPolicyIdList=\"false\">\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\">\n      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">airplane!</AttributeValue>\n      </Attribute>\n      <Attribute AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">red</AttributeValue>\n      </Attribute>\n   </Attributes>\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\">\n      <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" IncludeInResult=\"false\">\n         <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">loading</AttributeValue>\n      </Attribute>\n   </Attributes>\n   <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\" />\n</Request>"},"url":"http://localhost:8080/authzforce-ce/domains/czGVrRJvEemHrAJCrBIBDA/pdp","description":"<p>To request a decision from Authzforce, make a POST request to the\n<code>domains/{domain-id}/pdp</code> endpoint. In this case the user has the\nis requesting access to <code>loading</code> in the <code>red</code> zone.</p>\n<p>The response for the request includes a <code>&lt;Decision&gt;</code> element to <code>Permit</code> or <code>Deny</code> access to the resource.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","czGVrRJvEemHrAJCrBIBDA","pdp"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"71c28403-9a92-4c01-8a7c-c45cc52635a7"}],"id":"6adb3d08-e662-47ec-aa8f-675e03329bd3","description":"<p>At several points within this tutorial, a Policy Decision can be requested using <strong>Authzforce</strong>.</p>\n<p>The simple <code>&lt;PolicySet&gt;</code> used consists of two rules:</p>\n<ul>\n<li>The <strong>red</strong> zone is for immediate loading and unloading of passengers only</li>\n<li>There is no stopping in the <strong>white</strong> zone</li>\n</ul>\n<p>The updated policy switches the zones used. </p>\n<p>To request a decision from Authzforce, a structured request containing all\nrelevant information must be sent to the <code>domains/{domain-id}/pdp</code> endpoint. In\nthis case, the Body of the request must include sufficient information so that\nthe access request can be adjudicated.</p>\n","event":[{"listen":"prerequest","script":{"id":"7b40d496-0a0f-424d-a300-d7a4c7946cf7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"121f1a38-45b2-4245-9fdc-97dfd34c1f5b","type":"text/javascript","exec":[""]}}],"_postman_id":"6adb3d08-e662-47ec-aa8f-675e03329bd3"},{"name":"Keyrock PAP - Administrating XACML Permissions","item":[{"name":"Create token with Password","id":"5b101f39-bd57-480b-bfdc-f49168d43661","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"alice-the-admin@test.com\",\n  \"password\": \"test\"\n}"},"url":"http://localhost:3005/v1/auth/tokens","description":"<p>Enter a username and password to enter the application. The default super-user has the values <code>alice-the-admin@test.com</code> and <code>test</code>.</p>\n<p>The response header returns an <code>X-Subject-token</code> which identifies who has logged on the application.\nThis token is required in all subsequent requests to gain access</p>\n","urlObject":{"protocol":"http","path":["v1","auth","tokens"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"5b101f39-bd57-480b-bfdc-f49168d43661"},{"name":"Read a Verb-Resource Permission","id":"192f4c06-9914-483d-887e-f50057bc3ab7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3005/v1/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/entrance-open-0000-0000-000000000000","description":"<p>The <code>/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/{permission-id}}</code> endpoint will return the permission\nlisted under that id. The <code>X-Auth-token</code> must be supplied in the headers.</p>\n<p>The response returns the details of the requested permission, for a verb-resource permission, the <code>xml</code> element is <code>null</code>. This permission indicates that a user is permittted to make a POST request\nto the <code>/door/unlock</code> endpoint to unlock the main entrance.</p>\n","urlObject":{"protocol":"http","path":["v1","applications","tutorial-dckr-site-0000-xpresswebapp","permissions","entrance-open-0000-0000-000000000000"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"192f4c06-9914-483d-887e-f50057bc3ab7"},{"name":"Read an XACML Rule Permission","id":"65ecb210-b27f-44a9-afba-4d09ce08c536","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3005/v1/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/alrmbell-ring-24hr-xaml-000000000000","description":"<p>The <code>/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/{permission-id}}</code> endpoint will return the permission\nlisted under that id. The <code>X-Auth-token</code> must be supplied in the headers.</p>\n<p>The response returns the details of the requested permission, for a XACML Rule permission, the <code>xml</code> element holds the details of the associated XACML <code>&lt;Rule&gt;</code>\nthe <code>action</code> and <code>resource</code> fields are  <code>null</code>.</p>\n","urlObject":{"protocol":"http","path":["v1","applications","tutorial-dckr-site-0000-xpresswebapp","permissions","alrmbell-ring-24hr-xaml-000000000000"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"65ecb210-b27f-44a9-afba-4d09ce08c536"},{"name":"Update an XACML Permission","id":"fe09b929-10d0-48c9-b337-4b3b51aa6fd1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}],"body":{"mode":"raw","raw":"{\n\t\"permission\": {\n        \"action\": \"\",\n        \"resource\": \"\",\n        \"xml\": \"<Rule RuleId=\\\"alrmbell-ring-only-000000000000\\\" Effect=\\\"Permit\\\">\\n<Description>Allow Full Access to Charlie the Security Manager</Description>\\n<Target>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">/bell/ring</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\\\" AttributeId=\\\"urn:thales:xacml:2.0:resource:sub-resource-id\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">POST</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\\\" AttributeId=\\\"urn:oasis:names:tc:xacml:1.0:action:action-id\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">charlie</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\\\" AttributeId=\\\"urn:oasis:names:tc:xacml:1.0:subject:subject-id\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n</Target>\\n</Rule>\\n<Rule RuleId=\\\"alrmbell-ring-24hr-hours-000000000000\\\" Effect=\\\"Permit\\\">\\n<Description>Ring Alarm Bell (Outside Core Hours)</Description>\\n<Target>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">/bell/ring</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\\\" AttributeId=\\\"urn:thales:xacml:2.0:resource:sub-resource-id\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">POST</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\\\" AttributeId=\\\"urn:oasis:names:tc:xacml:1.0:action:action-id\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n<AnyOf>\\n<AllOf>\\n<Match MatchId=\\\"urn:oasis:names:tc:xacml:1.0:function:string-equal\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\">security-role-0000-0000-000000000000</AttributeValue>\\n<AttributeDesignator Category=\\\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\\\" AttributeId=\\\"urn:oasis:names:tc:xacml:2.0:subject:role\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#string\\\" MustBePresent=\\\"true\\\" />\\n</Match>\\n</AllOf>\\n</AnyOf>\\n</Target>\\n<Condition>\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:not\\\">\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:2.0:function:time-in-range\\\">\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\\\">\\n<AttributeDesignator AttributeId=\\\"urn:oasis:names:tc:xacml:1.0:environment:current-time\\\" DataType=\\\"http://www.w3.org/2001/XMLSchema#time\\\" Category=\\\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\\\" MustBePresent=\\\"false\\\"></AttributeDesignator>\\n</Apply>\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\\\">\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:time-bag\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#time\\\">08:00:00</AttributeValue>\\n</Apply>\\n</Apply>\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:time-one-and-only\\\">\\n<Apply FunctionId=\\\"urn:oasis:names:tc:xacml:1.0:function:time-bag\\\">\\n<AttributeValue DataType=\\\"http://www.w3.org/2001/XMLSchema#time\\\">17:00:00</AttributeValue>\\n</Apply>\\n</Apply>\\n</Apply>\\n</Apply>\\n</Condition>\\n</Rule>\"\n\t}\n}"},"url":"http://localhost:3005/v1/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/alrmbell-ring-24hr-xaml-000000000000","description":"<p>This is most easily be done in the GUI by pasting the rule into the appropriate\ntext box, however it can also be done programmatically.</p>\n<p>To log-in to the <strong>Keyrock</strong> GUI, enter the username and password on the log-in\npage <code>http://localhost:3005/</code></p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/img/login.png\" alt /></p>\n<p>Navigate to correct application, and click on the manage roles tab</p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/img/manage-roles.png\" alt /></p>\n<p>Select a permission to edit</p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/img/edit-permission.png\" alt /></p>\n<p>The HTTP Verb and Resource rule needs to be left blank, but the applicable XACML\n<code>&lt;Rule&gt;</code> elements need to be pasted within the <strong>Advanced XACML Rule</strong> textbox\nas shown:</p>\n<p><img src=\"https://fiware.github.io/tutorials.Administrating-XACML/img/permission.png\" alt /></p>\n<p>To amend the XACML rules governing a permission, make a PATCH request to the  <code>/applications/tutorial-dckr-site-0000-xpresswebapp/permissions/{permission-id}}</code> endpoint. The body of the request must include three attributes - <code>action</code> and <code>resource</code> must both be set to <code>\"\"</code> and the <code>xml</code> attribute should hold the XACML text.</p>\n<p>The response shows the details of the attributes which have been updated.</p>\n","urlObject":{"protocol":"http","path":["v1","applications","tutorial-dckr-site-0000-xpresswebapp","permissions","alrmbell-ring-24hr-xaml-000000000000"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"fe09b929-10d0-48c9-b337-4b3b51aa6fd1"},{"name":"Delete Role-Permission Association","id":"80590be3-d424-42bf-9e2b-a005276889dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3005/v1/applications/tutorial-dckr-site-0000-xpresswebapp/roles/security-role-0000-0000-000000000000/permissions/alrmbell-ring-24hr-xaml-000000000000","urlObject":{"protocol":"http","path":["v1","applications","tutorial-dckr-site-0000-xpresswebapp","roles","security-role-0000-0000-000000000000","permissions","alrmbell-ring-24hr-xaml-000000000000"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"80590be3-d424-42bf-9e2b-a005276889dd"},{"name":"Create a Role-Permission Association","id":"ab410247-3e1e-4856-b6fb-5ad0eb6052ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3005/v1/applications/tutorial-dckr-site-0000-xpresswebapp/roles/security-role-0000-0000-000000000000/permissions/alrmbell-ring-24hr-xaml-000000000000","urlObject":{"protocol":"http","path":["v1","applications","tutorial-dckr-site-0000-xpresswebapp","roles","security-role-0000-0000-000000000000","permissions","alrmbell-ring-24hr-xaml-000000000000"],"host":["localhost:3005"],"query":[],"variable":[]}},"response":[],"_postman_id":"ab410247-3e1e-4856-b6fb-5ad0eb6052ae"}],"id":"389c01fb-4d10-4ccd-8f42-601a1190cb2b","description":"<p><strong>Keyrock</strong> offers a role based access control identity management system. Typically every permission is only accessible to  users within a given role. We have already seen how Verb-Resource rules can be <a href=\"https://github.com/Fiware/tutorials.Roles-Permissions/\">set-up</a> and <a href=\"https://github.com/Fiware/tutorials.Securing-Access/\">enforced</a> using the basic authorization (level 2) access control mechanism found within Keyrock, the data for defining an advanced permission can also be administed using the <strong>Keyrock</strong> GUI or via <strong>Keyrock</strong> REST API requests.</p>\n<p><strong>Keyrock</strong> permissions work on individual XACML <code>&lt;Rule&gt;</code> elements rather than a complete <code>&lt;PolicySet&gt;</code>. The <code>&lt;PolicySet&gt;</code> is generated by combining all the roles and permissions.</p>\n<h3 id=\"predefined-roles-and-permissions\">Predefined Roles and Permissions</h3>\n<p>In a similar manner to the previous tutorial, two roles have been created, one\nfor store detectives and another for management users. A series of permissions have been set up for the supermarket application, the following XACML rules are applied:</p>\n<h4 id=\"security-staff\">Security Staff</h4>\n<ul>\n<li>Can unlock the door at any time</li>\n<li>Can ring the alarm bell before 9 a.m. or after 5 p.m.</li>\n<li>Can access the <strong>context broker</strong> data at any time</li>\n</ul>\n<h4 id=\"mangement\">Mangement</h4>\n<ul>\n<li>Have access to the price change area</li>\n<li>Have access to the stock count area</li>\n<li>Can ring the alarm bell between 9 a.m. and 5 p.m.</li>\n<li>Can access the <strong>context broker</strong> data from 9 a.m. to 5 p.m.</li>\n</ul>\n<p>As you can see some of the new rules now have a time element to them and are no longer simple Verb-Resource rules.</p>\n<p>For most of the\nrules, the Policy Execution Point (i.e. the request to <strong>Authzforce</strong> and analysis of the result)  is found within the tutorial <a href=\"https://github.com/Fiware/tutorials.Step-by-Step/blob/master/context-provider/lib/azf.js\">code</a> -</p>\n<p>The <strong>context broker</strong> data for the <strong>Store</strong> and <strong>IoT Devices</strong> is held in is secured behind the <strong>PEP Proxy</strong>. This means that only security staff are able to access the system outside of core hours.</p>\n<blockquote>\n<p><strong>Note</strong> within the <strong>Keyrock</strong>, only four resources have been secured using advanced authorization rules (level 3)</p>\n<ul>\n<li>sending the ring bell command</li>\n<li>access to the price-change area</li>\n<li>access to the order-stock area</li>\n<li>PEP Proxy access to the <strong>context broker</strong></li>\n</ul>\n<p>For contrast, one resource has been left as a simple VERB Resource permission (level 2)</p>\n<ul>\n<li>sending the unlock door command</li>\n</ul>\n</blockquote>\n","event":[{"listen":"prerequest","script":{"id":"7b40d496-0a0f-424d-a300-d7a4c7946cf7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"121f1a38-45b2-4245-9fdc-97dfd34c1f5b","type":"text/javascript","exec":[""]}}],"_postman_id":"389c01fb-4d10-4ccd-8f42-601a1190cb2b"},{"name":"Authzforce PDP - Requesting Policy Decisions","item":[{"name":"Deny Access to a Resource","id":"b65eab2e-43b7-4a6c-b7a0-c4f154ef82d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml","type":"text"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Request xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" CombinedDecision=\"false\" ReturnPolicyIdList=\"false\">\n  <Attributes Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:2.0:subject:role\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">security-role-0000-0000-000000000000</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">tutorial-dckr-site-0000-xpresswebapp</AttributeValue>\n     </Attribute>\n     <Attribute AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/bell/ring</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">POST</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\" />\n</Request>"},"url":"http://localhost:8080/authzforce-ce/domains/gQqnLOnIEeiBFQJCrBIBDA/pdp","description":"<p>To request a decision from Authzforce, make a POST request to the\n<code>domains/{domain-id}/pdp</code> endpoint. In this case the user has the\nis requesting access to <code>POST</code> to the <code>/ring/bell</code> endpoint.</p>\n<p>The response for the request includes a <code>&lt;Decision&gt;</code> element to <code>Permit</code> or <code>Deny</code> access to the resource.</p>\n<p>If the time on the server is between 9 a.m. and 5 p.m. the access request will be denied.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","gQqnLOnIEeiBFQJCrBIBDA","pdp"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"b65eab2e-43b7-4a6c-b7a0-c4f154ef82d1"},{"name":"Permit Access to a Resource","id":"41f54fda-41f9-43ea-93bd-308961465cea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/xml","type":"text"}],"body":{"mode":"raw","raw":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Request xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" CombinedDecision=\"false\" ReturnPolicyIdList=\"false\">\n  <Attributes Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:subject:subject-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">charlie</AttributeValue>\n     </Attribute>\n     <Attribute AttributeId=\"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">charlie-security@test.com</AttributeValue>\n     </Attribute>\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:2.0:subject:role\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">security-role-0000-0000-000000000000</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:resource\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:resource:resource-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">tutorial-dckr-site-0000-xpresswebapp</AttributeValue>\n     </Attribute>\n     <Attribute AttributeId=\"urn:thales:xacml:2.0:resource:sub-resource-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">/bell/ring</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:action\">\n     <Attribute AttributeId=\"urn:oasis:names:tc:xacml:1.0:action:action-id\" IncludeInResult=\"false\">\n        <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">POST</AttributeValue>\n     </Attribute>\n  </Attributes>\n  <Attributes Category=\"urn:oasis:names:tc:xacml:3.0:attribute-category:environment\" />\n</Request>"},"url":"http://localhost:8080/authzforce-ce/domains/gQqnLOnIEeiBFQJCrBIBDA/pdp","description":"<p>Additional Fields can be added to the policy decision request to improve the likelyhood of a <code>Permit</code> response.</p>\n<p>In the example below, the <code>emailaddress</code> and <code>subject:subject-id</code> have been added to the body of the request\nwithin the <code>subject-category:access-subject</code> category.</p>\n<p>With the new rule in place, the user <code>charlie</code> will be able to access the <code>/bell/ring</code> endpoint at all times of day.</p>\n","urlObject":{"protocol":"http","path":["authzforce-ce","domains","gQqnLOnIEeiBFQJCrBIBDA","pdp"],"host":["localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"41f54fda-41f9-43ea-93bd-308961465cea"}],"id":"696a9eb8-634e-4b13-936e-c16b7c861b67","description":"<p>To request a decision from Authzforce, a structured request containing all\nrelevant information must be sent to the <code>domains/{domain-id}/pdp</code> endpoint. In\nthis case, the Body of the request includes information such as the roles that\nthe User has, the application id that is being requested\n(<code>tutorial-dckr-site-0000-xpresswebapp</code>) and the HTTP verb and resource that are\nbeing requested ( a GET request on the <code>/app/price-change</code> URL). Obviously the\ninformation passed in the Body can be expanded as the rules become more complex.</p>\n","event":[{"listen":"prerequest","script":{"id":"7b40d496-0a0f-424d-a300-d7a4c7946cf7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"121f1a38-45b2-4245-9fdc-97dfd34c1f5b","type":"text/javascript","exec":[""]}}],"_postman_id":"696a9eb8-634e-4b13-936e-c16b7c861b67"},{"name":"Tutorial PEP - Extending Advanced Authorization","item":[],"id":"1403a2a1-0e81-4882-8b38-ee7380899b4c","description":"<p>The new policy for Charlie the security manager needs additional information to\nbe passed to <strong>Authzforce</strong></p>\n<h3 id=\"extending-advanced-authorization---sample-code\">Extending Advanced Authorization - Sample Code</h3>\n<p>Programmatically, any Policy Execution Point consists of two parts, an OAuth\nrequest to Keyrock retrieves information about the user (such as the assigned\nroles) as well as the policy domain to be queried.</p>\n<p>A second request is sent to the relevant domain endpoint within Authzforce,\nproviding all of the information necessary for Authzforce to provide a\njudgement. Authzforce responds with a <strong>permit</strong> or <strong>deny</strong> response, and the\ndecision whether to continue can be made thereafter.</p>\n<p>The <code>user.username</code> and <code>user.email</code> have been added to the list of fields\nto be sent to <strong>Authzforce</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">function authorizeAdvancedXACML(req, res, next, resource = req.url) {\n    const keyrockUserUrl =\n        \"http://keyrock/user?access_token=\" +\n        req.session.access_token +\n        \"&amp;app_id=\" +\n        clientId +\n        \"&amp;authzforce=true\";\n\n    return oa\n        .get(keyrockUserUrl)\n        .then(response =&gt; {\n            const user = JSON.parse(response);\n            return azf.policyDomainRequest(\n                user.app_azf_domain,\n                user.roles,\n                user.username,\n                user.email,\n                resource,\n                req.method\n            );\n        })\n        .then(authzforceResponse =&gt; {\n            res.locals.authorized = authzforceResponse === \"Permit\";\n            return next();\n        })\n        .catch(error =&gt; {\n            debug(error);\n            res.locals.authorized = false;\n            return next();\n        });\n}\n</code></pre>\n<p>The full code to supply each request to Authzforce can be found within the\ntutorials'\n<a href=\"https://github.com/Fiware/tutorials.Step-by-Step/blob/master/context-provider/lib/azf.js\">Git Repository</a> -\nthe supplied information has been expanded to include the <code>username</code> and <code>email</code> within the generated XACML request</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const xml2js = require(\"xml2js\");\nconst request = require(\"request\");\n\nfunction policyDomainRequest(domain, roles, resource, action, username, email ) {\n    let body =\n        '&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\\n' +\n        '&lt;Request xmlns=\"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17\" CombinedDecision=\"false\" ReturnPolicyIdList=\"false\"&gt;\\n';\n    // Code to create the XML body for the request is omitted\n    body = body + \"&lt;/Request&gt;\";\n\n    const options = {\n        method: \"POST\",\n        url: \"http://authzforceUrl/authzforce-ce/domains/\" + domain + \"/pdp\",\n        headers: { \"Content-Type\": \"application/xml\" },\n        body\n    };\n\n    return new Promise((resolve, reject) =&gt; {\n        request(options, function(error, response, body) {\n            let decision;\n            xml2js.parseString(\n                body,\n                { tagNameProcessors: [xml2js.processors.stripPrefix] },\n                function(err, jsonRes) {\n                    // The decision is found within the /Response/Result[0]/Decision[0] XPath\n                    decision = jsonRes.Response.Result[0].Decision[0];\n                }\n            );\n            decision = String(decision);\n            return error ? reject(error) : resolve(decision);\n        });\n    });\n}\n</code></pre>\n<h2 id=\"extending-advanced-authorization---running-the-example\">Extending Advanced Authorization - Running the Example</h2>\n<p>After successfully update the <strong>Authzforce</strong> <code>&lt;PolicySet&gt;</code> to include a special rule for Charlie, his rights will differ from other users in the security role</p>\n<h4 id=\"detective-1\">Detective 1</h4>\n<p>Detective1 works for Charlie and has the <strong>security</strong> role</p>\n<ul>\n<li>From <code>http://localhost:3000</code>, log in as <code>detective1@test.com</code> with the\npassword <code>test</code></li>\n</ul>\n<h5 id=\"level-3-advanced-authorization-access\">Level 3: Advanced Authorization Access</h5>\n<ul>\n<li>Click on the restricted access links at <code>http://localhost:3000</code> - access is\n<strong>denied</strong> - This is a management only permission</li>\n<li>Open the Device Monitor on <code>http://localhost:3000/device/monitor</code><ul>\n<li>Unlock a door - access is <strong>permitted</strong> - This is a security only\npermission</li>\n<li>Ring a bell - access is <strong>denied</strong> - This is not permitted to security\nusers between 9 a.m. and 5 p.m.</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"charlie-the-security-manager\">Charlie the Security Manager</h4>\n<p>Charlie has the <strong>security</strong> role</p>\n<ul>\n<li>From <code>http://localhost:3000</code>, log in as <code>charlie-security@test.com</code> with the\npassword <code>test</code></li>\n</ul>\n<h5 id=\"level-3-advanced-authorization-access-1\">Level 3: Advanced Authorization Access</h5>\n<ul>\n<li>Click on the restricted access links at <code>http://localhost:3000</code> - access is\n<strong>denied</strong> - This is a management only permission</li>\n<li>Open the Device Monitor on <code>http://localhost:3000/device/monitor</code><ul>\n<li>Unlock a door - access is <strong>permitted</strong> - This is a security only\npermission</li>\n<li>Ring a bell - access is <strong>permitted</strong> - This is an exception which is only permitted to the user called <code>charlie</code></li>\n</ul>\n</li>\n</ul>\n","_postman_id":"1403a2a1-0e81-4882-8b38-ee7380899b4c"}],"event":[{"listen":"prerequest","script":{"id":"bf821021-7bc2-471e-9ab7-a55ecb9e663f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1269e342-1093-4844-83cb-f8fed192c512","type":"text/javascript","exec":[""]}}],"variable":[{"key":"authzforce","value":"localhost:8080"},{"key":"keyrock","value":"localhost:3005"},{"key":"domain-id","value":"gQqnLOnIEeiBFQJCrBIBDA"},{"key":"policy-id","value":"f8194af5-8a07-486a-9581-c1f05d05483c"},{"key":"app-id","value":"tutorial-dckr-site-0000-xpresswebapp"},{"key":"new-domain-id","value":"czGVrRJvEemHrAJCrBIBDA"},{"key":"X-Auth-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},{"key":"X-Subject-token","value":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},{"key":"role-id","value":"security-role-0000-0000-000000000000"}]}