Skip to content
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

NO SUPPORT FOR THE POST OF POLICIES WRITTEN IN WAC #224

Open
DiegoCaro96 opened this issue Apr 26, 2023 · 1 comment
Open

NO SUPPORT FOR THE POST OF POLICIES WRITTEN IN WAC #224

DiegoCaro96 opened this issue Apr 26, 2023 · 1 comment
Assignees

Comments

@DiegoCaro96
Copy link

When I try to make a curl POST, of a policy written in WAC the result is "unprocessable entity".

##########################
I mean when I try to do this:

curl -s -i -X 'POST'
'http: //127.0.0.1:8085/v1/policies/'
-H 'fiware-service: Tenant1'
-H 'fiware-servicepath: /'
-H 'Content-type: text/turtle'
-d '
@base https://tenant1.url/.
@Prefix acl: http://www.w3.org/ns/auth/acl#.
@Prefix foaf: http://xmlns.com/foaf/0.1.
@Prefix tenant1: https://tenant1.url/.

tenant1:policy1 a acl:Authorization ;

acl: accessTo urn:AirQuality:1 ;
acl:accessToClass tenant1:entity ;
acl:agentClass acl:agent:admin;
acl:mode acl:Write.'

########################
the result of anubis is: HTTP/1.1 422 unprocessable Entity

@Cerfoglg
Copy link
Collaborator

@DiegoCaro96 Currently we only support retrieving policies in WAC format, but not creating new ones. It is something we want to support too, but at the moment to create policies it has to be done in the Anubis Policy format as described in the documentation (or see the Swagger API docs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants