-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACL support #404
Labels
bsserver
Impact LWM2M bootstrap server
client
Impact LWM2M client
new feature
New feature from LWM2M specification
Comments
sbernard31
added
bsserver
Impact LWM2M bootstrap server
client
Impact LWM2M client
new feature
New feature from LWM2M specification
labels
Oct 17, 2017
implemented by #666. We didn't add any UI to set acl config in import requests
import json
BASE_URL = "https://leshan.eclipse.org/bs/" # the URL of the server.
url = BASE_URL + "api/bootstrap/clientendpoint" # the client endpoint here !
data = {"servers": {"0": {"shortId": 123,
"lifetime": 20,
"defaultMinPeriod": 1,
"defaultMaxPeriod": None,
"disableTimeout": None,
"notifIfDisabled": True,
"binding": "U"}},
"security": {"0":{"uri": "coaps://leshan.eclipse.org:5784",
"bootstrapServer": True,
"securityMode": "PSK",
"publicKeyOrId": [98,111,111,116,115,116,114,97,112,95,99,108,105,101,110,116,95,105,100,101,110,116,105,116,121], #binary represenation of "bootstrap_client_identity"
"serverPublicKey" : [],
"secretKey": [115,101,99,114,101,116,95,107,101,121], #binary representation of "private_key", the hexa value is 7365637265745f6b6579
"smsSecurityMode": "NO_SEC",
"smsBindingKeyParam" : [],
"smsBindingKeySecret" : [],
"serverSmsNumber" : "+3343577911",
"serverId" : 0,
"clientOldOffTime" : 20},
"1":{"uri": "coaps://leshan.eclipse.org:5684",
"bootstrapServer": False,
"securityMode": "PSK",
"publicKeyOrId": [115,101,99,117,114,101,95,99,108,105,101,110,116,95,105,100],#represenation of "secure_client_id"
"serverPublicKey" : [],
"secretKey": [112,114,105,118,97,116,101,95,107,101,121], #binary representation of "private_key", the hexa value is 707269766174655f6b6579
"smsSecurityMode": "NO_SEC",
"smsBindingKeyParam" : [],
"smsBindingKeySecret" : [],
"serverSmsNumber" : "+3343577464",
"serverId" : 123,
"clientOldOffTime" : 1}},
"acls": {"0":{
"objectId": 3,
"objectInstanceId": 0,
"acls": {3333: 1},
"AccessControlOwner":123
}}};
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
r = requests.post(url, data=json.dumps(data), headers=headers)
print r.status_code
print r.content For the better/flexible approach #437, this will probably not available in 1.0.0 maybe for 2.0.0. |
sbernard31
added a commit
that referenced
this issue
Mar 15, 2019
Adding a custom |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bsserver
Impact LWM2M bootstrap server
client
Impact LWM2M client
new feature
New feature from LWM2M specification
Add support for ACL at Boostrap side (I think we should go for a better generic way : be able to send any write request).
Add support for ACL at client side.
The text was updated successfully, but these errors were encountered: