Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » ACP (access control policy) fails on second update
ACP (access control policy) fails on second update [message #1784723] Tue, 03 April 2018 08:59
Nguyen Lich is currently offline Nguyen LichFriend
Messages: 1
Registered: April 2018
Junior Member
Hi there,

I have created sample_acp access control policy by using Restlet Client and it was created successfully as following information:
REQUEST:
  Method:
       POST
  Url: 
       http://(OM2M server's IP address):8080/~/in-cse/in-name
  Header: 
       X-M2M-Origin: admin:admin
  Body:
       {
         "m2m:acp": {
           "rn": "sample_acp",
           "pv": {
           "pv": {
             "acr":[
               { "acor": [ "sample"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           },
           "pvs": {
             "acr":[
               { "acor": [ "sample"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           }
         }
       }

RESPONSE: 
       201 created

And then I updated sample_acp for the first time and sample_acp has been updated successfully as following:
REQUEST:
  Method:
        PUT
  Url: 
        http://(OM2M server's IP address):8080/~/in-cse/in-name/sample_acp
  Header: 
        X-M2M-Origin: admin:admin
  Body:
         {
         "m2m:acp": {
           "pv": {
             "acr":[
               { "acor": [ "sample1"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           },
           "pvs": {
             "acr":[
               { "acor": [ "sample1"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           }
         }
       }

RESPONSE: 
       200 OK


When I try to update sample_acp for the second time, following error has occurred:
REQUEST:
  Method:
       PUT
  Url: 
       http://(OM2M server's IP address):8080/~/in-cse/in-name/sample_acp
  Header: 
       X-M2M-Origin: admin:admin
  Body:
       {
         "m2m:acp": {
           "pv": {
             "acr":[
               { "acor": [ "sample2"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           },
           "pvs": {
             "acr":[
               { "acor": [ "sample2"], "acop":63 },
               { "acor": [ "admin:admin"], "acop":63 }
             ]
           }
         }
       }

RESPONSE: 
       403 Forbidden
  Body:
       Unknown or unauthorized originator



How can I successfully update sample_acp for second time?

Best Regards,
Lich Nguyen

[Updated on: Tue, 10 April 2018 06:12]

Report message to a moderator

Previous Topic:Connection between two MN's and one IN
Next Topic:Hybrid addressing of a resource
Goto Forum:
  


Current Time: Sat Oct 12 00:32:01 GMT 2024

Powered by FUDForum. Page generated in 0.04462 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top