Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Required for fluree/http-api-gateway#38
This PR enables the use of policy opts via http-api.
The only required change here was 56e770d.
I also added a change to how we deal with errors when compiling policies (f394d78). Prior to this change, if there was an error in that codepath, we would fail to enforce any policy at all, silently failing open to root access.
We should do something smarter with those errors (they are still not surfaced correctly, so I have left the
TODO
s intact), but this was a minimal change that ensures that we at least fail closed when policy compilation fails.I encountered this earlier in this work, where due to some bugs I was getting errors during the policy compilation process. Since those got fixed I'm no longer getting those errors, and I couldn't readily think of a way to set up a test for this that would demonstrate this. So, we can take it or leave it, since it's untested.