feat(jans-cedarling): updating policies from URL by ttl#14174
feat(jans-cedarling): updating policies from URL by ttl#14174haileyesus2433 wants to merge 6 commits into
Conversation
… validation - Added a new `policy_store_refresh` module to handle background refresh of remote policy stores. - Introduced `CacheValidators` to parse and manage HTTP cache headers for conditional GET requests. - Updated `MetricsCollector` to track policy store refresh attempts and outcomes. - Updated `PolicyStoreConfig` to include a refresh interval setting for URL-based sources. - Implemented logic to handle `304 Not Modified` responses efficiently, ensuring the system remains responsive to policy updates. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
- Introduced a new `policy_store_refresh` module to manage background refresh of remote policy stores. - Updated `Cedarling` struct to utilize `ArcSwap` for atomic updates of the `Authz` instance. - Added support for a configurable refresh interval for policy stores in `BootstrapConfig`. - Implemented logic to spawn a refresh worker based on the configured refresh interval. - Enhanced deserialization for policy store refresh interval to ensure proper clamping of values. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
- Updated multiple benchmark files to include default values for `policy_store_config` in `BootstrapConfig`. - Ensured consistency across `authz_authorize_multi_issuer_benchmark.rs`, `authz_authorize_unsigned_benchmark.rs`, `context_data_store_benchmark.rs`, and `startup_benchmark.rs`. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
…ons in examples - Added default values for `policy_store_config` in multiple example files including `authorize_unsigned.rs`, `bulk_authorization_benchmark.rs`, `lock_integration.rs`, `log_init.rs`, `profiling_multi_issuer.rs`, and `profiling_unsigned.rs`. - Ensured consistency across examples to streamline configuration setup. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
…ons in test files - Updated `policy_store_config` in `policy_store_loader.rs`, `ssa_validation_integration.rs`, and `cedarling_util.rs` to include default values. - Ensured consistency across test files to streamline configuration setup. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
- Updated authorization methods in `blocking.rs` to utilize the `load()` method for improved instance management. - Refactored the refresh worker spawning logic in `lib.rs` into a new `maybe_spawn_refresh_worker` function for better clarity and maintainability. - Improved cache header handling in `cache_headers.rs` by simplifying the `from_headers` method and ensuring proper handling of cache control directives. - Enhanced `RefreshState` struct in `policy_store_refresh.rs` to streamline initialization and improve clarity in managing refresh states. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Error: Hi @haileyesus2433, You did not reference an open issue in your PR. I attempted to create an issue for you. |
Prepare
Description
Target issue
closes #issue-number-here
Implementation Details
Test and Document the changes
Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with
docs:to indicate documentation changes or if the below checklist is not selected.Closes #14127,