i was able to run successfully local Eclipse Ditto version using docker container latest version downloaded from https://github.com/eclipse/ditto/tree/master/deployment/docker. Following the tutorial I was training first to create a new policy using the following curl:
curl -X PUT 'http://localhost:8080/api/2/policies/my.test:policy' -u 'ditto:ditto' -H 'Content-Type: application/json' -d '{
"entries": {
"owner": {
"subjects": {
"nginx:ditto": {
"type": "nginx basic auth user"
}
},
"resources": {
"thing:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
},
"policy:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
},
"message:/": {
"grant": [
"READ","WRITE"
],
"revoke": []
}
}
}
}
}'
401 - Authentication is possible but has failed or not yet been provided, the same one I'm getting from the local swagger. Trying to create it on sandbox: https://www.eclipse.org/ditto/http-api-doc.html#/ I'm getting: Undocumented TypeError: NetworkError when attempting to fetch resource.
What I'm missing? i choose the API version 2 and authorize myself as a ditto user to start working. Is there any additional configuration required to start working with the local version? And what I'm doing wrong with the sandbox?