Skip to content

Commit

Permalink
feat(jans-cedarling): "cedar_version": "v2.4.7" to "v4.0.0"
Browse files Browse the repository at this point in the history
Signed-off-by: John Anderson <[email protected]>
  • Loading branch information
djellemah committed Nov 7, 2024
1 parent 737cd8a commit fb81db6
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/cedarling/cedarling-policy-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The `policies` field describes the Cedar policies that will be used in Cedarling
```json
"policies": {
"unique_policy_id": {
"cedar_version" : "v2.4.7",
"cedar_version" : "v4.0.0",
"name": "Policy for Unique Id",
"description": "simple policy example",
"creation_date": "2024-09-20T17:22:39.996050",
Expand Down Expand Up @@ -207,7 +207,7 @@ Here is a non-normative example of a `cedarling_store.json` file:

```json
{
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal workload",
Expand Down
6 changes: 3 additions & 3 deletions jans-cedarling/cedarling/src/common/policy_store/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn test_policy_store_deserialization_success() {

// represents the `policy_store.json`
let policy_store_json = json!({
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example",
Expand Down Expand Up @@ -74,7 +74,7 @@ fn test_base64_decoding_error_in_policy_store() {

// represents the `policy_store.json`
let policy_store_json = json!({
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example",
Expand Down Expand Up @@ -123,7 +123,7 @@ fn test_policy_parsing_error_in_policy_store() {

// represents the `policy_store.json`
let policy_store_json = json!({
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example",
Expand Down
4 changes: 2 additions & 2 deletions jans-cedarling/cedarling/src/tests/agama_policy_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ fn load_agama_policy_store_json() {
"fbcd361d3243f4808d5e6f89ca81eaf4ca03900b407e": {
"policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"description": "simple policy example for principal workload",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6Oldvcmtsb2FkLAogICAgYWN0aW9uIGluIFtKYW5zOjpBY3Rpb246OiJVcGRhdGUiXSwKICAgIHJlc291cmNlIGlzIEphbnM6Oklzc3VlCil3aGVuewogICAgcHJpbmNpcGFsLm9yZ19pZCA9PSByZXNvdXJjZS5vcmdfaWQKfTs="
},
"444da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"description": "simple policy example for principal user",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6OlVzZXIsCiAgICBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IlVwZGF0ZSJdLAogICAgcmVzb3VyY2UgaXMgSmFuczo6SXNzdWUKKXdoZW57CiAgICBwcmluY2lwYWwuY291bnRyeSA9PSByZXNvdXJjZS5jb3VudHJ5Cn07"
Expand Down
2 changes: 1 addition & 1 deletion jans-cedarling/test_files/policy-store_blobby.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal workload",
Expand Down
2 changes: 1 addition & 1 deletion jans-cedarling/test_files/policy-store_ok_2.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cedar_version: v4.0.0
policy_stores:
a1bf93115de86de760ee0bea1d529b521489e5a11747:
cedar_version: v2.4.7
cedar_version: v4.0.0
policies:
1:
description: simple policy example for principal workload, permit when workload org_id same with resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cedar_version": "v4.0.0",
"policy_stores": {
"23641abe5787e6276852e4c0d37c881e6814e4ecf2e8ffebff3c88a9d9bf1975": {
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "admin access",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cedar_version: v4.0.0
policy_stores:
ba1f39115ed86ed760ee0bea1d529b52189e5a117474:
cedar_version: v2.4.7
cedar_version: v4.0.0
name: PolicyStoreOk
description: Syntax error in policy
cedar_policies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cedar_version": "v4.0.0",
"policy_stores": {
"050bc9c1b1c08eb4b95b1da310c5d17a69be17f7a13c206d868853232edb57bb": {
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "admin access",
Expand Down
2 changes: 1 addition & 1 deletion jans-cedarling/test_files/policy-store_schema_err.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cedar_version: v2.4.7
cedar_version: v4.0.0
policy_stores:
e8c39ee71792766d3b9b12846f0479419051bb5fafff:
policies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cedar_version": "v4.0.0",
"policy_stores": {
"8ec39ee717927663bd9b18246f0479491051bb5af15a": {
"cedar_version": "v2.4.7",
"cedar_version": "v4.0.0",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "admin access",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cedar_version: v4.0.0
policy_stores:
a1bf93115de86de760ee0bea1d529b521489e5a11747:
cedar_version: v2.4.7
cedar_version: v4.0.0
policies:
840da5d85403f35ea76519ed1a18a33989f855bf1cf8:
description: admin access
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
cedar_version: v2.4.7
cedar_version: v4.0.0
cedar_policies:
840da5d85403f35ea76519ed1a18a33989f855bf1cf8:
description: simple policy example
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
cedar_version: v2.4.7
cedar_version: v4.0.0
cedar_policies:
840da5d85403f35ea76519ed1a18a33989f855bf1cf8:
description: simple policy example
Expand Down

0 comments on commit fb81db6

Please sign in to comment.