Skip to content

feat(jans-cedarling): updating policies from URL by ttl#14174

Draft
haileyesus2433 wants to merge 6 commits into
mainfrom
jans-cedarling-14127
Draft

feat(jans-cedarling): updating policies from URL by ttl#14174
haileyesus2433 wants to merge 6 commits into
mainfrom
jans-cedarling-14127

Conversation

@haileyesus2433
Copy link
Copy Markdown
Contributor

@haileyesus2433 haileyesus2433 commented May 29, 2026

Prepare


Description

Target issue

closes #issue-number-here

Implementation Details


Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

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.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

Closes #14127,

… 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>
@haileyesus2433 haileyesus2433 added this to the 2.2.0 milestone May 29, 2026
@haileyesus2433 haileyesus2433 self-assigned this May 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 550e7182-393e-4dd9-97c1-9b71f55c0b42

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jans-cedarling-14127

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mo-auto
Copy link
Copy Markdown
Member

mo-auto commented May 29, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mo-auto mo-auto added comp-jans-cedarling Touching folder /jans-cedarling kind-feature Issue or PR is a new feature request labels May 29, 2026
@mo-auto
Copy link
Copy Markdown
Member

mo-auto commented May 29, 2026

Error: Hi @haileyesus2433, You did not reference an open issue in your PR. I attempted to create an issue for you.
Please update that issues' title and body and make sure I correctly referenced it in the above PRs body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-jans-cedarling Touching folder /jans-cedarling kind-feature Issue or PR is a new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(jans-cedarling): updating policies from URL by ttl

2 participants