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

authorize: support boolean deny results #2338

Merged
merged 3 commits into from
Jul 6, 2021
Merged

Conversation

calebdoxsey
Copy link
Contributor

Summary

PPL rules generally create simple boolean values. For example user: x returns true if the user is x. Historically our policy rego script used an array with [status, reason] for the deny block. This PR updates the policy evaluator so that it supports either. If the deny block returns true it will set [403,""].

Related issues

Fixes https://github.com/pomerium/pomerium-console/issues/1473

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added the bug Something isn't working label Jul 6, 2021
@calebdoxsey calebdoxsey requested a review from a team as a code owner July 6, 2021 18:11
@calebdoxsey calebdoxsey requested a review from wasaga July 6, 2021 18:11
@codeclimate
Copy link

codeclimate bot commented Jul 6, 2021

Code Climate has analyzed commit fb0a8b9 and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link

coveralls commented Jul 6, 2021

Coverage Status

Coverage decreased (-0.08%) to 64.625% when pulling fb0a8b9 on cdoxsey/1473-ppl-deny into 031fa1a on master.

authorize/evaluator/policy_evaluator.go Outdated Show resolved Hide resolved
@calebdoxsey calebdoxsey merged commit 21ffe44 into master Jul 6, 2021
@calebdoxsey calebdoxsey deleted the cdoxsey/1473-ppl-deny branch July 6, 2021 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants