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

feat(jans-cedarling): Policy Store: Parse Schema and Policies #9575

Merged
merged 18 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
97ea92a
feat(jans-cedarling): add PolicyStore and field schema. Also added de…
olehbozhok Sep 23, 2024
7dac32a
test(jans-cedarling): add unit tests to check `parse_cedar_schema` (d…
olehbozhok Sep 23, 2024
e01bc54
docs(jans-cedarling): add docs for PolicyStore
olehbozhok Sep 23, 2024
928b2bd
feat(jans-cedarling): add loading policy store based on config
olehbozhok Sep 23, 2024
bd0df57
feat(jans-cedarling): add loading policy store to Cedarling
olehbozhok Sep 23, 2024
3449b60
chore(jans-cedarling): rename LogType to LogTypeConfig
olehbozhok Sep 23, 2024
821cc2e
chore(jans-cedarling): fix `log_init` example after updating config
olehbozhok Sep 23, 2024
5cd1c79
chore(jans-cedarling): add allow(dead_code) on schema
olehbozhok Sep 23, 2024
d29218e
chore(jans-cedarling): add copyright notice
olehbozhok Sep 23, 2024
6b4ed70
docs(jans-cedarling): add README to init module
olehbozhok Sep 23, 2024
a1163bd
docs(jans-cedarling): add README to authz module
olehbozhok Sep 23, 2024
8d8cf8b
chore(jans-cedarling): update message in ErrorLoadPolicyStore::MoreTh…
olehbozhok Sep 23, 2024
bf89da3
chore(jans-cedarling): add comments to Cedarling::new
olehbozhok Sep 23, 2024
b6dacac
chore(jans-cedarling): remove unnecessary code
olehbozhok Sep 23, 2024
8cd92b3
docs(jans-cedarling): in README removed `Cedarling bindings` section
olehbozhok Sep 24, 2024
e724090
chore(jans-cedarling): move position of PolicyStoreMap to be first
olehbozhok Sep 24, 2024
cf20191
chore(jans-cedarling): refactor, move errors messages to the enum
olehbozhok Sep 24, 2024
df19054
Merge branch 'main' into jans-cedaling-issue-9568
moabu Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(jans-cedarling): add docs for PolicyStore
Signed-off-by: Oleh Bohzok <olehbozhok@gmail.com>
  • Loading branch information
olehbozhok committed Sep 23, 2024
commit e01bc545e5ca2e262dfd799e7f2994552647a51a
3 changes: 2 additions & 1 deletion jans-cedarling/cedarling/src/models/policy_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ use std::collections::HashMap;

use crate::init::cedar_schema::parse_cedar_schema;

/// PolicyStore contains all the data the Cedarling needs to verify JWT tokens and evaluate policies
#[derive(Debug, serde::Deserialize)]
pub struct PolicyStore {
#[serde(deserialize_with = "parse_cedar_schema")]
pub schema: cedar_policy::Schema,
}

/// PolicyStoreSet it is a store for `PolicyStore` accessible by key.
#[derive(Debug, serde::Deserialize)]

pub(crate) struct PolicyStoreSet {
#[serde(flatten)]
pub policy_stores: HashMap<String, PolicyStore>,
Expand Down