ankraft / ACME-oneM2M-CSE

An open source CSE Middleware for Education.
https://acmecse.net/
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Support acor to check from group resource member #114

Closed samuelbles07 closed 1 year ago

samuelbles07 commented 1 year ago

Hi,

As specification that quoted below:

When the originatorID is the resource-ID of a < group > resource which contains < AE > or < remoteCSE > as member, the Hosting CSE of the resource shall check if the originator of the request matches one of the members in the memberIDs attribute of the < group > resource (e.g. by retrieving the < group > resource). If the < group > resource cannot be retrieved or doesn't exist, the request shall be rejected.

Then i see that currently it is not supported. So i create some changes to accommodate it and it works for the purpose. Please see here.

Thanks!

ankraft commented 1 year ago

Hi @samuelbles07,

you are right, this part has yet not been implemented. Great to see this rarely used ACP feature been used in your project! Also thank you very much for providing a solution. I need to think about it for a moment how this can be implemented in a cross-CSE way. The problem is that the method of putting the resource name as a part of the resource-ID is specific to ACME's implementation. Other CSE's might use a different resource-ID format. This is important because the \ resource might be hosted on another CSE. So I guess we need to retrieve the resource first in order to check whether this is a group or not.

ankraft commented 1 year ago

I took your idea and added this to the ACP checks. This also covers now the ACP configurations in he pvs attribute. It is available now in the development version. I hope to make a new release soon.

Thanks for the contributing!