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

HTTP API Authorization docs example failing #518

Closed
mikestead opened this issue Dec 8, 2017 · 3 comments
Closed

HTTP API Authorization docs example failing #518

mikestead opened this issue Dec 8, 2017 · 3 comments

Comments

@mikestead
Copy link

mikestead commented Dec 8, 2017

I've run through the following example from the website but can't get point 3 to work.

curl --user alice:password localhost:5000/finance/salary/alice

This fails with

Error: user alice is not authorized to GET url /finance/salary/alice

If I remove the second allow clause from the policy then it works. This seems to indicate we may need an else conditional between the two allows? I'm new to OPA and not had any luck getting such a conditional to work.

Could you confirm this is an issue, or if I'm doing something wrong?

Update

Actually this appears to be a regression(?) When I use the docker image openpolicyagent/opa:0.5.10 the example works but when I use openpolicyagent/opa:0.5.11+ then I get this issue.

@tsandall
Copy link
Member

tsandall commented Dec 8, 2017

I believe this issue is fixed in #512. I'm going to cut the next release (0.5.13) which will resolve that. Sorry for the inconvenience.

@tsandall
Copy link
Member

tsandall commented Dec 9, 2017

Confirmed this was fixed by #512. The fix is contained in release v0.5.13.

@tsandall tsandall closed this as completed Dec 9, 2017
@mikestead
Copy link
Author

@tsandall thanks for the quick fix

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