Skip to content

Commit

Permalink
fix policy and query path
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Renatus <[email protected]>
  • Loading branch information
srenatus committed Jan 15, 2024
1 parent 098fcf1 commit 283017a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ services:
- --server
- --addr=:8181
- users:/data/data.json
- /data/policy.rego
- /policies/rules/rules.rego
volumes:
- ./opa/:/data
- ./policies/prod/:/policies
environment: *styra-env
profiles:
- ci
Expand Down
32 changes: 0 additions & 32 deletions opa/policy.rego

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class OpaClient {
private final RestTemplate restTemplate = new RestTemplate();

public boolean allow(String action, Map<String, Object> resourceAttributes) {
String URI = HOST + "/v1/data/authz/allow";
String URI = HOST + "/v1/data/rules/allow";
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null || !authentication.isAuthenticated() || action == null || resourceAttributes == null || resourceAttributes.isEmpty()) {
return false;
Expand Down

0 comments on commit 283017a

Please sign in to comment.