-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jans-cedarling): Policy Store: Parse Schema and Policies (#9575)
* feat(jans-cedarling): add PolicyStore and field schema. Also added decoding from json. Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * test(jans-cedarling): add unit tests to check `parse_cedar_schema` (deserialize cedar schema from json) Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * docs(jans-cedarling): add docs for PolicyStore Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * feat(jans-cedarling): add loading policy store based on config Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * feat(jans-cedarling): add loading policy store to Cedarling Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): rename LogType to LogTypeConfig Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): fix `log_init` example after updating config Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): add allow(dead_code) on schema Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): add copyright notice Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * docs(jans-cedarling): add README to init module Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * docs(jans-cedarling): add README to authz module Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): update message in ErrorLoadPolicyStore::MoreThanOnePolicy Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): add comments to Cedarling::new Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): remove unnecessary code Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * docs(jans-cedarling): in README removed `Cedarling bindings` section Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): move position of PolicyStoreMap to be first Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> * chore(jans-cedarling): refactor, move errors messages to the enum Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> --------- Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com> Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
- Loading branch information
Showing
21 changed files
with
435 additions
and
39 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
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,6 @@ | ||
# Auth Engine | ||
|
||
Part of Cedarling that main purpose is: | ||
|
||
- evaluate if authorization is granted for *user* | ||
- evaluate if authorization is granted for *client* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Init engine | ||
|
||
Init engine is responsible for reading and loading entities on start of the application, like: | ||
|
||
- read boostrap properties | ||
- load Cedar Policies | ||
- get keys for JWT validation |
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,86 @@ | ||
/* | ||
* This software is available under the Apache-2.0 license. | ||
* See https://www.apache.org/licenses/LICENSE-2.0.txt for full text. | ||
* | ||
* Copyright (c) 2024, Gluu, Inc. | ||
*/ | ||
|
||
use base64::prelude::*; | ||
|
||
#[derive(Debug, thiserror::Error)] | ||
pub enum ParceCedarSchemaErrMsg { | ||
#[error("unable to decode cedar policy schema base64")] | ||
BASE64, | ||
#[error("unable to decode cedar policy schema json")] | ||
JSON, | ||
} | ||
|
||
/// A custom deserializer for Cedar's Schema. | ||
// | ||
// is used to deserialize field `schema` in `PolicyStore` | ||
pub(crate) fn parse_cedar_schema<'de, D>(deserializer: D) -> Result<cedar_policy::Schema, D::Error> | ||
where | ||
D: serde::Deserializer<'de>, | ||
{ | ||
let source = <String as serde::Deserialize>::deserialize(deserializer)?; | ||
let decoded: Vec<u8> = BASE64_STANDARD.decode(source.as_str()).map_err(|err| { | ||
serde::de::Error::custom(format!("{}: {}", ParceCedarSchemaErrMsg::BASE64, err,)) | ||
})?; | ||
|
||
let schema = cedar_policy::Schema::from_json_file(decoded.as_slice()).map_err(|err| { | ||
serde::de::Error::custom(format!("{}: {}", ParceCedarSchemaErrMsg::JSON, err)) | ||
})?; | ||
|
||
Ok(schema) | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
use crate::models::policy_store::PolicyStoreMap; | ||
|
||
#[test] | ||
fn test_read_ok() { | ||
static POLICY_STORE_RAW: &str = include_str!("test_files/policy-store_ok.json"); | ||
|
||
let policy_result = serde_json::from_str::<PolicyStoreMap>(POLICY_STORE_RAW); | ||
assert!(policy_result.is_ok()); | ||
} | ||
|
||
#[test] | ||
fn test_read_base64_error() { | ||
static POLICY_STORE_RAW: &str = | ||
include_str!("test_files/policy-store_schema_err_base64.json"); | ||
|
||
let policy_result = serde_json::from_str::<PolicyStoreMap>(POLICY_STORE_RAW); | ||
assert!(policy_result | ||
.unwrap_err() | ||
.to_string() | ||
.contains(&ParceCedarSchemaErrMsg::BASE64.to_string())); | ||
} | ||
|
||
#[test] | ||
fn test_read_json_error() { | ||
static POLICY_STORE_RAW: &str = | ||
include_str!("test_files/policy-store_schema_err_json.json"); | ||
|
||
let policy_result = serde_json::from_str::<PolicyStoreMap>(POLICY_STORE_RAW); | ||
assert!(policy_result | ||
.unwrap_err() | ||
.to_string() | ||
.contains(&ParceCedarSchemaErrMsg::JSON.to_string())); | ||
} | ||
|
||
#[test] | ||
fn test_read_cedar_error() { | ||
static POLICY_STORE_RAW: &str = | ||
include_str!("test_files/policy-store_schema_err_cedar_mistake.json"); | ||
|
||
let policy_result = serde_json::from_str::<PolicyStoreMap>(POLICY_STORE_RAW); | ||
// in this scenario error message looks like: | ||
// `unable to decode cedar policy schema json: failed to resolve type: User_TypeNotExist", line: 35, column: 1` | ||
let err_msg = policy_result.unwrap_err().to_string(); | ||
assert!(err_msg.contains(&ParceCedarSchemaErrMsg::JSON.to_string())); | ||
assert!(err_msg.contains("failed to resolve type")); | ||
} | ||
} |
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,11 +1,14 @@ | ||
/* | ||
* This software is available under the Apache-2.0 license. | ||
* This software is available under the Apache-2.0 license. | ||
* See https://www.apache.org/licenses/LICENSE-2.0.txt for full text. | ||
* | ||
* Copyright (c) 2024, Gluu, Inc. | ||
* Copyright (c) 2024, Gluu, Inc. | ||
*/ | ||
//! # Init Engine | ||
//! Part of Cedarling that main purpose is: | ||
//! - read boostrap properties | ||
//! - load Cedar Policies | ||
//! - get keys for JWT validation | ||
pub(crate) mod cedar_schema; | ||
pub(crate) mod policy_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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* This software is available under the Apache-2.0 license. | ||
* See https://www.apache.org/licenses/LICENSE-2.0.txt for full text. | ||
* | ||
* Copyright (c) 2024, Gluu, Inc. | ||
*/ | ||
|
||
use crate::models::policy_store::{PolicyStore, PolicyStoreMap}; | ||
use crate::models::policy_store_config::{PolicyStoreConfig, PolicyStoreSource}; | ||
|
||
/// Error cases for loading policy | ||
#[derive(Debug, thiserror::Error)] | ||
pub enum ErrorLoadPolicyStore { | ||
#[error("{0}")] | ||
JsonParce(#[from] serde_json::Error), | ||
#[error("store policy is empty")] | ||
PolicyEmpty, | ||
#[error("the `store_key` is not specified and the count on policies more than 1")] | ||
MoreThanOnePolicy, | ||
#[error("could not found policy by id: {0}")] | ||
FindPolicy(String), | ||
} | ||
|
||
/// Load policy store based on config | ||
// | ||
// Unit tests will be added when will be implemented other types of sources | ||
pub(crate) fn load_policy_store( | ||
config: PolicyStoreConfig, | ||
) -> Result<PolicyStore, ErrorLoadPolicyStore> { | ||
let mut policy_store_map: PolicyStoreMap = match config.source { | ||
PolicyStoreSource::Json(json_raw) => serde_json::from_str(json_raw.as_str())?, | ||
}; | ||
|
||
let policy: PolicyStore = match (config.store_id, policy_store_map.policy_stores.len()) { | ||
(Some(store_id), _) => policy_store_map | ||
.policy_stores | ||
.remove(store_id.as_str()) | ||
.ok_or(ErrorLoadPolicyStore::FindPolicy(store_id))?, | ||
(None, 0) => { | ||
return Err(ErrorLoadPolicyStore::PolicyEmpty); | ||
}, | ||
(None, 1) => { | ||
// getting first element and we know it is save to use unwrap here, | ||
// because we know that there is only one element in the map | ||
policy_store_map | ||
.policy_stores | ||
.into_values() | ||
.into_iter() | ||
.next() | ||
.unwrap() | ||
}, | ||
(None, 2..) => { | ||
return Err(ErrorLoadPolicyStore::MoreThanOnePolicy); | ||
}, | ||
}; | ||
|
||
Ok(policy) | ||
} |
35 changes: 35 additions & 0 deletions
35
jans-cedarling/cedarling/src/init/test_files/policy-store_ok.json
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,35 @@ | ||
{ | ||
"8b805e22fdd39f3dd33a13d9fb446d8e6314153ca997": { | ||
"name": "gluustore", | ||
"description": "gluu", | ||
"policies": { | ||
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": { | ||
"description": "admin access", | ||
"creation_date": "2024-09-20T17:22:39.996050", | ||
"policy_content": "QGlkKCJhZG1pbiBhY2Nlc3MiKQpwZXJtaXQKKAogcHJpbmNpcGFsID09IEphbnM6OlJvbGU6OiJBZG1pbiIsCiBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IkNvbXBhcmUiLEphbnM6OkFjdGlvbjo6IkV4ZWN1dGUiXSwKIHJlc291cmNlID09IEphbnM6OkFwcGxpY2F0aW9uOjoiQWRtaW4iCikKd2hlbgp7CiBKYW5zOjpBY2Nlc3NfdG9rZW46OiJhYmMiLnNjb3BlPT0iYWJjIiAmJiBKYW5zOjppZF90b2tlbjo6ImlkeHh4Ii5hbXI9PSJpZHh4eCIgIAp9Ow==" | ||
}, | ||
"b6313811924c9e67f898257cbf017674e08203779ae9": { | ||
"description": "manager access", | ||
"creation_date": "2024-09-20T18:11:26.442574", | ||
"policy_content": "QGlkKCJtYW5hZ2VyIGFjY2VzcyIpCnBlcm1pdAooCiBwcmluY2lwYWwsCiBhY3Rpb24sCiByZXNvdXJjZQopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5zY29wZT09Inh4eCIgfHwgSmFuczo6aWRfdG9rZW46OiJpZHh4eCIuYW1yPT0iaWR4eHgiICYmIGNvbnRleHQubmV0d29yay5pc0luUmFuZ2UoaXAoIjIyMi4yMjIuMjIyLjAvMjQiKSkgIAp9Ow==" | ||
}, | ||
"f2b38413cad977ab21616bd4a63c233548491cf25b72": { | ||
"description": "manager access", | ||
"creation_date": "2024-09-20T18:11:37.774401", | ||
"policy_content": "QGlkKCJtYW5hZ2VyIGFjY2VzcyIpCnBlcm1pdAooCiBwcmluY2lwYWwsCiBhY3Rpb24sCiByZXNvdXJjZQopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5zY29wZT09Inh4eCIgfHwgSmFuczo6aWRfdG9rZW46OiJpZHh4eCIuYW1yPT0iaWR4eHgiICYmIGNvbnRleHQubmV0d29yay5pc0luUmFuZ2UoaXAoIjIyMi4yMjIuMjIyLjAvMjQiKSkgIAp9Ow==" | ||
}, | ||
"fa6a3f46ab5f741e806deff0f81d0f848af37604500f": { | ||
"description": "without condition", | ||
"creation_date": "2024-09-22T18:18:35.801566", | ||
"policy_content": "QGlkKCJ3aXRob3V0IGNvbmRpdGlvbiIpCnBlcm1pdAooCiBwcmluY2lwYWwgPT0gSmFuczo6Um9sZTo6IkFkbWluIiwKIGFjdGlvbiwKIHJlc291cmNlCikKOw==" | ||
}, | ||
"96deb02f8ce44c46d497d44dbfec80b3b6a64fe22994": { | ||
"description": "forbid", | ||
"creation_date": "2024-09-23T14:51:21.480763", | ||
"policy_content": "QGlkKCJmb3JiaWQiKQpmb3JiaWQKKAogcHJpbmNpcGFsIGluIEphbnM6OlJvbGU6OiJBZG1pbiIsCiBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IlNlYXJjaCIsSmFuczo6QWN0aW9uOjoiVGFnIl0sCiByZXNvdXJjZSBpbiBKYW5zOjpBcHBsaWNhdGlvbjo6IkFkbWluUG9ydGFsIgopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5leHA+MTIzICYmIEphbnM6OkFjY2Vzc190b2tlbjo6ImFhYSIuZXhwPDMyMSB8fCBKYW5zOjpBY2Nlc3NfdG9rZW46OiJhYWEiLmlhdD49MTExICAKfTs=" | ||
} | ||
}, | ||
"identity_source": {}, | ||
"schema": "eyJKYW5zIjp7ImNvbW1vblR5cGVzIjp7IlVybCI6eyJ0eXBlIjoiUmVjb3JkIiwiYXR0cmlidXRlcyI6eyJob3N0Ijp7InR5cGUiOiJTdHJpbmcifSwicGF0aCI6eyJ0eXBl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XBwbGljYXRpb24iXSwicHJpbmNpcGFsVHlwZXMiOlsiVXNlciIsIlJvbGUiXSwiY29udGV4dCI6eyJ0eXBlIjoiQ29udGV4dCJ9fX19fX0=" | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
jans-cedarling/cedarling/src/init/test_files/policy-store_schema_err_base64.json
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,35 @@ | ||
{ | ||
"8b805e22fdd39f3dd33a13d9fb446d8e6314153ca997": { | ||
"name": "gluustore", | ||
"description": "gluu", | ||
"policies": { | ||
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": { | ||
"description": "admin access", | ||
"creation_date": "2024-09-20T17:22:39.996050", | ||
"policy_content": "QGlkKCJhZG1pbiBhY2Nlc3MiKQpwZXJtaXQKKAogcHJpbmNpcGFsID09IEphbnM6OlJvbGU6OiJBZG1pbiIsCiBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IkNvbXBhcmUiLEphbnM6OkFjdGlvbjo6IkV4ZWN1dGUiXSwKIHJlc291cmNlID09IEphbnM6OkFwcGxpY2F0aW9uOjoiQWRtaW4iCikKd2hlbgp7CiBKYW5zOjpBY2Nlc3NfdG9rZW46OiJhYmMiLnNjb3BlPT0iYWJjIiAmJiBKYW5zOjppZF90b2tlbjo6ImlkeHh4Ii5hbXI9PSJpZHh4eCIgIAp9Ow==" | ||
}, | ||
"b6313811924c9e67f898257cbf017674e08203779ae9": { | ||
"description": "manager access", | ||
"creation_date": "2024-09-20T18:11:26.442574", | ||
"policy_content": "QGlkKCJtYW5hZ2VyIGFjY2VzcyIpCnBlcm1pdAooCiBwcmluY2lwYWwsCiBhY3Rpb24sCiByZXNvdXJjZQopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5zY29wZT09Inh4eCIgfHwgSmFuczo6aWRfdG9rZW46OiJpZHh4eCIuYW1yPT0iaWR4eHgiICYmIGNvbnRleHQubmV0d29yay5pc0luUmFuZ2UoaXAoIjIyMi4yMjIuMjIyLjAvMjQiKSkgIAp9Ow==" | ||
}, | ||
"f2b38413cad977ab21616bd4a63c233548491cf25b72": { | ||
"description": "manager access", | ||
"creation_date": "2024-09-20T18:11:37.774401", | ||
"policy_content": "QGlkKCJtYW5hZ2VyIGFjY2VzcyIpCnBlcm1pdAooCiBwcmluY2lwYWwsCiBhY3Rpb24sCiByZXNvdXJjZQopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5zY29wZT09Inh4eCIgfHwgSmFuczo6aWRfdG9rZW46OiJpZHh4eCIuYW1yPT0iaWR4eHgiICYmIGNvbnRleHQubmV0d29yay5pc0luUmFuZ2UoaXAoIjIyMi4yMjIuMjIyLjAvMjQiKSkgIAp9Ow==" | ||
}, | ||
"fa6a3f46ab5f741e806deff0f81d0f848af37604500f": { | ||
"description": "without condition", | ||
"creation_date": "2024-09-22T18:18:35.801566", | ||
"policy_content": "QGlkKCJ3aXRob3V0IGNvbmRpdGlvbiIpCnBlcm1pdAooCiBwcmluY2lwYWwgPT0gSmFuczo6Um9sZTo6IkFkbWluIiwKIGFjdGlvbiwKIHJlc291cmNlCikKOw==" | ||
}, | ||
"96deb02f8ce44c46d497d44dbfec80b3b6a64fe22994": { | ||
"description": "forbid", | ||
"creation_date": "2024-09-23T14:51:21.480763", | ||
"policy_content": "QGlkKCJmb3JiaWQiKQpmb3JiaWQKKAogcHJpbmNpcGFsIGluIEphbnM6OlJvbGU6OiJBZG1pbiIsCiBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IlNlYXJjaCIsSmFuczo6QWN0aW9uOjoiVGFnIl0sCiByZXNvdXJjZSBpbiBKYW5zOjpBcHBsaWNhdGlvbjo6IkFkbWluUG9ydGFsIgopCndoZW4KewogSmFuczo6QWNjZXNzX3Rva2VuOjoieHh4Ii5leHA+MTIzICYmIEphbnM6OkFjY2Vzc190b2tlbjo6ImFhYSIuZXhwPDMyMSB8fCBKYW5zOjpBY2Nlc3NfdG9rZW46OiJhYWEiLmlhdD49MTExICAKfTs=" | ||
} | ||
}, | ||
"identity_source": {}, | ||
"schema": "ewogICJKYW...gfQp9" | ||
} | ||
} |
Oops, something went wrong.