Skip to content

Commit

Permalink
refactor(jans-cedarling): implement rename for logging info fields
Browse files Browse the repository at this point in the history
- rename UserAuthorizeInfo.principal to user_principal
- rename UserAuthorizeInfo.diagnostics to user_diagnostics
- rename UserAuthorizeInfo.decision to user_decision
- rename WorkloadAuthorizeInfo.principal to workload_principal
- rename WorkloadAuthorizeInfo.diagnostics to workload_diagnostics
- rename WorkloadAuthorizeInfo.decision to workload_decision

Signed-off-by: rmarinn <[email protected]>
  • Loading branch information
rmarinn committed Dec 21, 2024
1 parent 17fd13e commit ac7f80c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jans-cedarling/cedarling/src/log/log_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,13 @@ pub struct AuthorizationLogInfo {
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct UserAuthorizeInfo {
/// cedar-policy user/person principal
#[serde(rename = "person_principal")]
#[serde(rename = "user_principal")]
pub principal: String,
/// cedar-policy user/person diagnostics information
#[serde(rename = "user_diagnostics")]
pub diagnostics: Diagnostics,
/// cedar-policy user/person decision
#[serde(rename = "user_decision")]
pub decision: Decision,
}

Expand All @@ -163,9 +165,11 @@ pub struct WorkloadAuthorizeInfo {
/// cedar-policy workload principal
#[serde(rename = "workload_principal")]
pub principal: String,
#[serde(rename = "workload_diagnostics")]
/// cedar-policy workload diagnostics information
pub diagnostics: Diagnostics,
/// cedar-policy workload decision
#[serde(rename = "workload_decision")]
pub decision: Decision,
}

Expand Down

0 comments on commit ac7f80c

Please sign in to comment.