We started to implement the security part of OneM2M and we set about implementing Access Control Policy(ACP) first. While we are investigating the oneM2M example of the Access Control Policy, we see that the privileges (PV) and self privileges (PVS) can be any originator which can be any Application Entity (AE) or Common Service Entity(CSE).
In a privilege, each access control rule defines which AE/CSE is allowed for which operation. So for sets of access control rules an operation is permitted if it is permitted by one or more access control rules in the set.
TS-0001 v3.12.0 | Ln 3432-3433
After that, we also looked at the Eclipse version of the OneM2M implementation and run the application for each CSEs (IN-CSE & MN-CSE). A web interface welcomes you with a login screen and waits for a username and password. Then the weird part comes up. After we did a successful login, the entered username & password seems to be used as originator for the resources that we want to access. In addition to this, also a test user has been also added to the default ACP.
The example ACP is taken from a eclipse forum's thread.
<m2m:acp xmlns:m2m="http://www.onem2m.org/xml/protocols">
<pv>
<acr>
<acor>admin:admin</acor>
<acop>63</acop>
</acr>
<acr>
<acor>test</acor>
<acop>34</acop>
</acr>
</pv>
<pvs>
<acr>
<acor>admin:admin</acor>
<acop>63</acop>
</acr>
</pvs>
</m2m:acp>
The question is, is it suitable to put some kind of username & password logic to the ACP itself ? Whatever it is, I understand the necessity of that kind of usage. But I am not sure it is the right way to do that in OneM2M.
Assume that we have an AE that has a web interface and used by many users. So each user has different privileges for accessing the other resources in OneM2M, but the access control policies only have originators that can be any AE/CSE and not users. How to implement this kind of scenario ?
Related question is from the OneM2M website
The Cgateway_ae (It seems to be the MN-AE) sends an ACP create request to the MN-CSE. But where the permission comes from for the MN-AE to create a ACP to the MN-CSE. Somehow it should be created before it wants to create another ACP ?
Who has the responsibility to create that ACP ? How that responsible party will know the related AE-ID/CSE-ID even before it is created.
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>
------------------ EDITED ---------------------------
This is a really good document.
http://www.onem2m.org/tr-0038/procedures/authorization/configuration-of-accesscontrolpolicy