Thank you Simon for your profound response.
Have a nice day 😄.
Adam.
Hello,
Thank you very much for your response. So it is more likely as I have thought.
Nevertheless, I believe I have stumbled on different part of creating an ACL configuration in that case.
I am having an issue when trying to configure an ACL for some object instances.
Lets say I have created an object as a bootstrapserver with following configuration:
Server type Object:
"instanceId": 0,
"shortServerId": 1,
(path of this object is /1/0 ?)
To create an ACL configuration for that object I need specify a configuration for it.
objectId: {here will come one of the lwm2m type, in this case: 1}
objectInstanceId: 0
accessControlOwner: 1
alcs: {shortServerId for which I will want to provide an access control, accessRight:
in long}
According to the picture on page 71 in the documentation that suppose to be sufficient. There is also a big possibility I misunderstood the picture.
Currently, when I am using leshan demo client I get no error. However, when i see in bootstrap server logs I can see following information:
The LWM2M BOOTSTRAP OPERATION has finished with failure: session=BootstrapResultPort.BootstrapSessionData(endpoint=uin1, sessionStartTime=1633947473182), operation=BootstrapResultPort.BootstrapOperationData(command=WRITE, path=/2/0), errorMessage=The LWM2M
operation response has failed., responseErrorCode=404
part of the response from the Leshan client is:
2021-10-11 12:30:30,316 DEBUG Security - Write on Security resource /0/0/0
2021-10-11 12:30:30,316 DEBUG Security - Write on Security resource /0/0/1
2021-10-11 12:30:30,316 DEBUG Security - Write on Security resource /0/0/2
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/3
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/4
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/5
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/7
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/8
2021-10-11 12:30:30,317 DEBUG Security - Write on Security resource /0/0/10
2021-10-11 12:30:30,323 DEBUG Server - Write on Server resource /1/0/0
2021-10-11 12:30:30,323 DEBUG Server - Write on Server resource /1/0/1
2021-10-11 12:30:30,323 DEBUG Server - Write on Server resource /1/0/2
2021-10-11 12:30:30,324 DEBUG Server - Write on Server resource /1/0/3
2021-10-11 12:30:30,324 DEBUG Server - Write on Server resource /1/0/6
2021-10-11 12:30:30,324 DEBUG Server - Write on Server resource /1/0/7
Is there some other prerequisite for this configuration? I have tried get this information from leshan acl tests. Unfortunately, this did not help too much with that 404.
Is adding objectInstanceId from ACL configuration a problem anyhow?
I am trying various combinations to match it. But I am feeling Somehow I cannot connect ACL configuration with predefined configuration.
I hope I have explained it sufficient enough
Adam.
-----Original Message-----
Subject: [EXTERNAL] Re: [leshan-dev] Leshan AclConfig
Date: Fri, 08 Oct 2021 18:43:56 +0200
[EXTERNAL EMAIL]
Hi,
To configure R and C the long expected will be the long where the binary notation value is 10001.
So in java you can write it like :
- 17l
- Long.valueOf(17)
- Long.valueOf(0b10001)
Hope this helps.
(Hope this works too because I didn't play so much with ACL until now)
Maybe a better API will be need for AclConfig. I should maybe create an issue about this.
Simon
Le 08/10/2021 à 10:56, Kaczmarek, Adam via leshan-dev a écrit :
Hello,
I have got question regarding the ACL config object. From the documentation (page 109) we can read:
"The bit order is specified as below. 1st LSB: R(Read, Observe, Write-Attributes) 2nd LSB: W(Write) 3rd LSB: E(Execute) 4th LSB: D(Delete) 5th LSB: C(Create) Other bits are reserved for future use."
So what exactly does leshan expect from me to send him? Is it something like for:
Value=ToBeSend
R=1
W=10
E=100
D=1000
C=10000
and then appropriately if user configure for an instance R and C for whatever server then long which is expected in org.eclipse.leshan.server.bootstrap.BootstrapConfig.AclConfig; in the acls property will be 10001?
Is this a correct understanding?
I have found thread which could possess information about this. However, it has not been responded to.
https://www.eclipse.org/lists/leshan-dev/msg00485.html
I am looking forward to hearing from you.
Adam.
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/leshan-dev