-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Only produce outputs for activated rules (#1631)
* fix: Only produce outputs for activated rules Rule output expressions should only be evaluated and appended to the API response if the rule is activated during the processing of the request. Fixes #1630 Signed-off-by: Charith Ellawala <charith@cerbos.dev> * Move once to correct place Signed-off-by: Charith Ellawala <charith@cerbos.dev> * Remove sync.Once and update tests Signed-off-by: Charith Ellawala <charith@cerbos.dev> --------- Signed-off-by: Charith Ellawala <charith@cerbos.dev>
- Loading branch information
Showing
10 changed files
with
67 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# created: 2023-06-08T09:55:24+01:00 | ||
# public key: age1rlszmt4d7lu6wjkj00qdepya8anq8zcujyw8dqskcd3spjg2cs2sgerh0q | ||
AGE-SECRET-KEY-14SPXE0NZUG25FE5RW5PD7FKGPKP5CZAG53TR6HHAAN7NPMYP0YES4RQFVS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
{ | ||
"apiVersion": "api.cerbos.cloud/v1", | ||
"policyIndex": { | ||
"cerbos.principal.daisy_duck.vdefault": "policies/1E0CD2615BE3760B", | ||
"cerbos.principal.donald_duck.v20210210": "policies/1CC91E277263674D", | ||
"cerbos.principal.donald_duck.vdefault": "policies/2F26F3660A97BECD", | ||
"cerbos.principal.donald_duck.vdefault/acme": "policies/4C6062CFBE8627DB", | ||
"cerbos.principal.donald_duck.vdefault/acme.hr": "policies/60C13DA6FD1DF10C", | ||
"cerbos.principal.terry_tibbs.vdefault": "policies/BCD8E5E5F425900C", | ||
"cerbos.resource.account.vdefault": "policies/EE58DE7B0F7DA6B9", | ||
"cerbos.resource.album_object.vdefault": "policies/684ED25FF04663F2", | ||
"cerbos.resource.equipment_request.vdefault": "policies/51F53279EC2F9999", | ||
"cerbos.resource.equipment_request.vdefault/acme": "policies/4E007D10C67C7E53", | ||
"cerbos.resource.leave_request.v20210210": "policies/EAE733C912F22DA", | ||
"cerbos.resource.leave_request.vdefault": "policies/EF8C9BEB57967AA0", | ||
"cerbos.resource.leave_request.vdefault/acme": "policies/827F815FFA0C2AC5", | ||
"cerbos.resource.leave_request.vdefault/acme.hr": "policies/FBAEBB70E5F8BBE6", | ||
"cerbos.resource.leave_request.vdefault/acme.hr.uk": "policies/BC5AE9FB81ACF7B2", | ||
"cerbos.resource.leave_request.vstaging": "policies/AD56144EE420A347", | ||
"cerbos.resource.purchase_order.vdefault": "policies/B55EE74E34DF4F2B" | ||
"apiVersion": "api.cerbos.cloud/v1", | ||
"policyIndex": { | ||
"cerbos.principal.daisy_duck.vdefault": "policies/1E0CD2615BE3760B", | ||
"cerbos.principal.donald_duck.v20210210": "policies/1CC91E277263674D", | ||
"cerbos.principal.donald_duck.vdefault": "policies/2F26F3660A97BECD", | ||
"cerbos.principal.donald_duck.vdefault/acme": "policies/4C6062CFBE8627DB", | ||
"cerbos.principal.donald_duck.vdefault/acme.hr": "policies/60C13DA6FD1DF10C", | ||
"cerbos.principal.terry_tibbs.vdefault": "policies/BCD8E5E5F425900C", | ||
"cerbos.resource.account.vdefault": "policies/EE58DE7B0F7DA6B9", | ||
"cerbos.resource.album_object.vdefault": "policies/684ED25FF04663F2", | ||
"cerbos.resource.equipment_request.vdefault": "policies/51F53279EC2F9999", | ||
"cerbos.resource.equipment_request.vdefault/acme": "policies/4E007D10C67C7E53", | ||
"cerbos.resource.leave_request.v20210210": "policies/EAE733C912F22DA", | ||
"cerbos.resource.leave_request.vdefault": "policies/EF8C9BEB57967AA0", | ||
"cerbos.resource.leave_request.vdefault/acme": "policies/827F815FFA0C2AC5", | ||
"cerbos.resource.leave_request.vdefault/acme.hr": "policies/FBAEBB70E5F8BBE6", | ||
"cerbos.resource.leave_request.vdefault/acme.hr.uk": "policies/BC5AE9FB81ACF7B2", | ||
"cerbos.resource.leave_request.vstaging": "policies/AD56144EE420A347", | ||
"cerbos.resource.purchase_order.vdefault": "policies/B55EE74E34DF4F2B" | ||
}, | ||
"schemas": [ | ||
"schemas": [ | ||
"principal.json", | ||
"resources/leave_request.json", | ||
"resources/purchase_order.json", | ||
"resources/salary_record.json" | ||
], | ||
"meta": { | ||
"identifier": "h1:EVPzJ8jAvo0+qEaXJPe8roBCAdfGAdowddMAPMkxZY8=", | ||
"source": "/Users/samuellock/cerbos/cerbos/internal/test/testdata/store" | ||
"meta": { | ||
"identifier": "h1:441rLQQdIotHlkzP1SOoFBQHdLA4VNfxAgr8zWv7ip4=", | ||
"source": "/home/cell/work/cerbos/internal/test/testdata/store" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
CERBOS-1SomeFakeWorkspaceIDSamlMadeUpSoItCouldBeCutOut-PVCDJFES5KDVJPL2Y8U6NEW7W6NHL5Z8HG7KSUGJRTCWSN4RJW4Q8HVPZE | ||
CERBOS-1HDHY70IHFLXD-4SPXE0NZUG25FE5RW5PD7FKGPKP5CZAG53TR6HHAAN7NPMYP0YES4RQFVS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters