JanssenProject / jans

An open source enterprise digital identity platform for CIAM or workforce... Janssen is a distribution of standards-based, developer friendly, components that are engineered to work together in any cloud. #OAuth #OpenID #FIDO
https://docs.jans.io
Apache License 2.0
479 stars 75 forks source link

feat(jans-cedarling): cedarling logging design, retrieval, and shipping #10228

Open djellemah opened 1 week ago

djellemah commented 1 week ago

Description

Ensure that latest requirements are captured, and rust design will meet those requirements.

log schema

document full log schema at https://github.com/JanssenProject/jans/wiki/Cedarling-Nativity-Plan#log-schema

cedar::PartialResponse for errors

Should this be used to provide more information on requests that were not authorized?

pop_logs design

Say a binding calls pop_logs. The binding implementation in Rust calls that on the Cedarling instance. Logs are removed from the Cedarling instance, by the pop_logs implementation.

The log entries are then converted by the binding code to some other representation. But something goes wrong, and the conversion code throws an error. The logs are now lost. This would not be acceptable.

description field in reason - yes

1) The reason field is currently the policy_id only. Is it worthwhile to have a description field alongside the reason field?

2) What would it take to add the description field? policy_id comes from a cedar::Policy instance, but description is only in cedarling::common::policy_store::PolicyStore.


Prepare


Identified code changes


Test cases and code coverage


Document the changes