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