feat(jans-cedarling): Update Tests, Examples, and Benchmarks After Core Changes#13464
feat(jans-cedarling): Update Tests, Examples, and Benchmarks After Core Changes#13464haileyesus2433 wants to merge 14 commits intojans-cedarling-13381from
Conversation
…figurations - Deleted several obsolete test files including `authorize_resource_entity.rs`, `cases_authorize_different_principals.rs`, `cases_authorize_namespace_jans2.rs`, `cases_authorize_without_check_jwt.rs`, and `schema_type_mapping.rs` to clean up the test suite. - Updated `authorize_multi_issuer.rs` to remove unnecessary parameters in callback functions. - Adjusted `mod.rs` to reflect the removal of deleted test modules, enhancing clarity and maintainability of the test structure. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
…recated fields - Updated `authz_authorize_benchmark.rs` to utilize `RequestUnsigned` and renamed the benchmark function for clarity. - Simplified `prepare_cedarling` function by removing unused parameters and deprecated fields in `AuthorizationConfig`. - Adjusted `authz_authorize_multi_issuer_benchmark.rs` and `context_data_store_benchmark.rs` to remove unnecessary fields related to user and workload principals. - Cleaned up `startup_benchmark.rs` by eliminating deprecated fields from `BootstrapConfig` and `EntityBuilderConfig`. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
…e deprecated files - Updated `authorize_unsigned.rs`, `bulk_authorization_benchmark.rs`, `lock_integration.rs`, `log_init.rs`, and `profiling.rs` to utilize default settings for `AuthorizationConfig` and `EntityBuilderConfig`, removing unnecessary fields. - Deleted obsolete files `authorize_with_jwt_validation.rs` and `authorize_without_jwt_validation.rs` to clean up the examples directory. - Adjusted imports and function calls to reflect the removal of deprecated fields, enhancing code clarity and maintainability. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
- Eliminated the `built_entities` method from the `AuthorizeEntitiesData` implementation, streamlining the authorization logic. - Removed associated documentation comments to enhance code clarity and maintainability. - Adjusted imports to reflect the removal of the unused method. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
… streamline imports - Deleted obsolete files related to role and token entity building, including `build_role_entity.rs` and `build_token_entities.rs`, to clean up the entity builder module. - Refactored imports in `build_multi_issuer_entity.rs` and `build_principal_entity.rs` to remove unused dependencies and enhance code clarity. - Removed legacy user and workload entity building logic from `build_principal_entity.rs`, aligning with the current authorization paths. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
- Removed unused fields and methods from the `JwtService` and `Token` structures, including `signed_authz_available` and `jwt_sig_validation_required`. - Streamlined the `validate_tokens` method by eliminating unnecessary logic and comments, focusing on single token validation. - Updated imports to reflect the removal of deprecated items, enhancing code clarity and maintainability. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 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)
📝 Coding Plan
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 Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
✅ 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. |
…ration files and examples - Eliminated `CEDARLING_USER_AUTHZ`, `CEDARLING_WORKLOAD_AUTHZ`, and `CEDARLING_ID_TOKEN_TRUST_MODE` from various configuration files including JSON and YAML examples. - Streamlined the `bootstrap_props` and `docker-compose-env` configurations to enhance clarity and maintainability. - Updated test configurations to reflect the removal of deprecated fields, ensuring consistency across the codebase. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
| id_token: &str, | ||
| userinfo_token: &str, | ||
| ) { | ||
| async fn call_authorize_unsigned(cedarling: &Cedarling) { |
There was a problem hiding this comment.
It would be great to have 2 files for profiling. For the unsigned, you already made. Can you make authorize_multi_issuer profiling?
|
@coderabbitai can you verify if changes in jans-cedarling/flask-sidecar/main/base/cedarling/cedarling.py are valid? |
|
@SafinWasi, can you take a look and verify if changes in jans-cedarling/flask-sidecar/main/base/cedarling/cedarling.py are OK? |
oh ok i forgot about those thanks, its a huge refactor and need help in spotting things i missed thanks |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainLet me gather the file contents and diff to verify the changes. 🏁 Script executed: Length of output: 8159 Now let me check the Python bindings 🏁 Script executed: Length of output: 123334
✅ API Usage — All Valid
|
…urations - Deleted multiple deprecated policy store files including `agama-store_2.yaml`, `policy-store_entity_mapping.yaml`, and others to clean up the test suite. - Updated `bootstrap_props.json` and `bootstrap_props.yaml` to reference the new policy store file `policy-store_ok.yaml`. - Removed unused files related to local JWKS and policy store locks, enhancing clarity and maintainability of the test configurations. Signed-off-by: haileyesus2433 <haileyesusbe@gmail.com>
resolved in f677cb5 |
Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
…arling-13441 Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
Signed-off-by: Oleh Bozhok <6554798+olehbozhok@users.noreply.github.com>
|
@haileyesus2433 I removed some outdated fields from the code and merged the last changes from main. Testing code still has some problems, pls analyze them and fix if needed. |
Prepare
Description
Target issue
closes #13441
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.