-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jans-cedarling): implement new bootstrap configs for JWT validat…
…ion (#10306) * feat(jans-cedarling): implement NewJwtConfig - implement the NewJwtConfig which contains the updated bootstrap properties and some helper methods for initialization. Signed-off-by: rmarinn <[email protected]> * refactor(jans-cedarling): move HttpClient and it's tests closer to root Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): implement loading JWKS for NewJwtService Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): remove failing example docstring from private module Removed example docstring in a private module due to test failures. The examples could not import the necessary structs because they are private, causing `cargo test` to fail. Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): update a docstring in NewJwtConfig Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): remove unused structs - remove AccessTokenValidationConfig - remove UserinfoTokenValidationConfig - remove IdTokenValidationConfig Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): enhance JwkStore to support loading from JwkSet and TrustedIssuer - Added `new_from_jwkset` method to initialize `JwkStore` from a JWK set. - Added `new_from_trusted_issuer` method to initialize `JwkStore` using a TrustedIssuer. - Implemented `get` method to easily fetch keys by Key ID. - Added support for storing and handling keys without Key IDs. Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): implement a new KeyService Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): start new implementation for token Validator Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): simplify JwtValidatorConfig Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): implement new check_missing_claims function Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): gracefully handle JWKS with unsupported algs Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): optimize JwtValidator initialization for reusable validators - refactor the JwtValidator startup process to support reusing existing validators, reducing redundant initialization and improving performance. Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): implement init and process for NewJwtService - implement new_from_config for NewJwtService - implement process_tokens for NewJwtService Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): return TrustedIssuer info with jwt validation result - Implement returning TrustedIssuer information with the JWT validation result to be able to find the mappings used for Cedar easily. Signed-off-by: rmarinn <[email protected]> * refactor(jans-cedarling): remove local jwks and issuers from NewJwtConfig - remove local jwks and trusted issuers from NewJwtConfig. - local jwks and trusted issuers should be passed separately via the new_with_local_jwks or new_with_trusted_issuers functions. Signed-off-by: rmarinn <[email protected]> * refactor(jans-cedarling): add back local jwks into NewJwtConfig Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): add NewJwtService to ServiceFactory Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): enhance JwtValidator initialization - allow initialization of JwtValidator even if there's no JWKS or trusted issuer provided as long as signature validator is turned off. Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): add NewJwtService to AuthzConfig Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): change process_tokens's result - Change process_token's result to be DecodeTokensResult so it would be compatible with the existing calls. Signed-off-by: rmarinn <[email protected]> * feat(jans-cedarling): enchance JwtValidator implementation - implement returning a reference to the TrustedIssuer when decoding without signature validation - implement checking if the scheme of the token's `iss` is `https` Signed-off-by: rmarinn <[email protected]> * refactor(jans-cedarling): replace old JwtService implementation with new Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): rename JwtServiceError to JwtProcessingError Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): rename DecodeTokensResult to ProcessTokensResult Signed-off-by: rmarinn <[email protected]> * docs(jans-cedarling): update jwt/README.md Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): remove unnecessary println! calls Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): delete unused files Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): add copyright information on top of files Signed-off-by: rmarinn <[email protected]> * docs(jans-cedarling): update cedarling-properties.md Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): resolve clippy issue with elided lifetime Signed-off-by: rmarinn <[email protected]> * chore(jans-cedarling): minor spelling corrections Signed-off-by: John Anderson <[email protected]> --------- Signed-off-by: rmarinn <[email protected]> Signed-off-by: John Anderson <[email protected]> Co-authored-by: John Anderson <[email protected]>
- Loading branch information
Showing
49 changed files
with
2,641 additions
and
3,324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
jans-cedarling/bindings/cedarling_python/src/config/jwt_config.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.