oneM2M Logo transparent 196x130

Standards for M2M and the Internet of Things

Access Control Policy Create

When an access control policy resource is created, a list of one or more allowed request originators must be specified in the acor field and the allowed operations in the acop field.

The value of acop is set to 63 which indicates that the specified originator is granted to conduct CREATE, RETRIEVE, UPDATE, DELETE, DISCOVERY and NOTIFY operations.

The following request can be used to create an access control policy resource MN-CSEAcp hosted on the MN-CSE.

HTTP Request with XML payload
    POST /home_gateway?rcn=0 HTTP/1.1
    Host: mn.provider.com:8080
    X-M2M-Origin: Cgateway_ae
    Content-Type: application/vnd.onem2m-res+xml; ty=1
    X-M2M-RI: mncse-62948
        
    <m2m:acp xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="MN-CSEAcp">
      <pv>
        <acr>
          <acor>Cgateway_ae Clight_ae1 Clight_ae2 /in-cse/Csmartphone_ae</acor>
          <acop>63</acop>
        </acr>
      </pv>
      <pvs>
        <acr>
          <acor>Cgateway_ae</acor>
          <acop>51</acop>
        </acr>
      </pvs>
    </m2m:acp>
HTTP Response
    HTTP/1.1 201 Created
    X-M2M-RSC: 2001
    X-M2M-RI: mncse-62948
    Content-Location: /mn-cse/acp-805496226
HTTP Request with JSON payload
    POST /home_gateway?rcn=0 HTTP/1.1
    Host: mn.provider.com:8080
    X-M2M-Origin: Cgateway_ae
    Content-Type: application/vnd.onem2m-res+json; ty=1
    X-M2M-RI: mncse-62948
        
    { "m2m:acp": {
        "rn": ”MN-CSEAcp”,
          "pv": {
            "acr": {
              "acor": ["Cgateway_ae","Clight_ae1","Clight_ae2","/in-cse/Csmartphone_ae"],
              "acop": "63"
            }
          },
          "pvs": {
            "acr": {
              "acor": ["Cgateway_ae"],
              "acop": "51"
            }
          }
       }
    }
HTTP Response
    HTTP/1.1 201 Created
    X-M2M-RSC: 2001
    X-M2M-RI: mncse-62948
    Content-Location: /mn-cse/acp-805496226

 

Subscribe to oneM2M News Please enter your name and email address, then click on submit.
Alternatively, you can send an email from your preferred email application with a blank subject to
[email protected] with subscribe oneM2M_News in the message body.

Subscribe to oneM2M News

Your Name(*)
Please let us know your name.

Your Email(*)
Please let us know your email address.