Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jans-cedarling): implement validation for userinfo_token JWT #9939

Merged
merged 84 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
860ba3b
feat(jans-cedarling): implement KeyService for JwtService
rmarinn Oct 17, 2024
e47e657
feat(jans-cedarling): implement GetKey for KeyService
rmarinn Oct 18, 2024
e40c80b
feat(jans-cedarling): integrate jwt::KeyService with jwt::DecodingStr…
rmarinn Oct 18, 2024
e639073
feat(jans-cedarling): replace custom mockhttp with mockito and refact…
rmarinn Oct 19, 2024
7ec377c
refactor(jans-cedarling): restructure folder layout, improve document…
rmarinn Oct 20, 2024
2257511
chore(jans-cedarling): move mockito from dependencies to dev-dependen…
rmarinn Oct 20, 2024
5e14b5e
merge: branch 'main' into jans-cedarling-9814
rmarinn Oct 20, 2024
4e2d45d
feat(jans-cedarling): add trusted_issuers field to the PolicyStore
rmarinn Oct 23, 2024
7976b58
feat(jans-cedarling): reuse HTTP client and switch to eprintln for er…
rmarinn Oct 23, 2024
460bc0b
feat(jans-cedarling): implement custom error handling for lock acquis…
rmarinn Oct 23, 2024
366050c
feat(jans-cedarling): implement validation for `userinfo_token`
rmarinn Oct 23, 2024
87d4f68
feat(jans-cedarling): update token examples in `/examples` directory
rmarinn Oct 23, 2024
01dd8b5
chore(jans-cedarling): remove unused fields from tokens in `jwt::token`
rmarinn Oct 23, 2024
e60a4f2
feat(jans-cedarling): implement specific error messages for invalid t…
rmarinn Oct 23, 2024
b5e00a1
docs: changes in policy store docs
duttarnab Oct 23, 2024
0b2128f
feat(jans-cedarling): implement Deserialize for TokenKind
rmarinn Oct 23, 2024
b600fdb
refactor(jans-cedarling): move test mod from init/test.rs into init/p…
rmarinn Oct 23, 2024
53b4f70
test(jans-cedarling): remove redundant assert in errors_on_multiple_m…
rmarinn Oct 23, 2024
98c50fb
feat(jans-cedarling): implement Copy trait for TokenKind enum
rmarinn Oct 23, 2024
24b2088
refactor(jans-cedarling): remove unnecessary .clone() calls on TokenKind
rmarinn Oct 23, 2024
782bcee
refactor(jans-cedarling): change MultipleRoleMappings error to use Ve…
rmarinn Oct 24, 2024
7bf7adf
refactor(jans-cedarling): rename fields in PolicyStore to be more des…
rmarinn Oct 24, 2024
2709358
refactor(jans-cedarling): improve naming and deserialization for Poli…
rmarinn Oct 24, 2024
55dfa50
feat(jans-cedarling): introduce cedar_version field in policy_store.json
rmarinn Oct 24, 2024
90c7bdc
merge: branch 'jans-cedarling-9892' into jans-cedarling-9905
rmarinn Oct 24, 2024
bcb0e43
refactor(jans-cedarling): move deserialization logic for multiple rol…
rmarinn Oct 24, 2024
5f1c19b
refactor(jans-cedarling): rename parse_policy to parse_single_policy
rmarinn Oct 24, 2024
1bf5bf7
docs: fixing review comments
duttarnab Oct 24, 2024
2f831ca
docs(jans-cedarling): add missing docstrings in common/policy_store.rs
rmarinn Oct 24, 2024
fde6270
docs(jans-cedarling): update docs/cedarling/cedarling-policy-store.md
rmarinn Oct 24, 2024
6c70fa5
docs(jans-cedarling): update docs/dedarling/cedarling-jwt.md
rmarinn Oct 24, 2024
0221382
docs: fixing review comments
duttarnab Oct 24, 2024
37ea3fd
fix(jans-cedarling): uncomment previously commented functions
rmarinn Oct 24, 2024
3178f68
docs: correct policy store format
duttarnab Oct 24, 2024
9692d6c
docs: correct policy store format
duttarnab Oct 24, 2024
7a4db0a
docs: correct policy store format
duttarnab Oct 24, 2024
3b7dae6
fix(jans-cedarling): remove unused commented code
rmarinn Oct 25, 2024
208596a
docs(jans-cedarling): fix docstrings in PolicyStore
rmarinn Oct 25, 2024
df336b1
chore(jans-cedarling): renamed `check_token_metadata` to `parse_and_c…
rmarinn Oct 25, 2024
f07fcc2
refactor(jans-cedarling): replace custom version parsing with the sem…
rmarinn Oct 25, 2024
a5abfd9
refactor(jans-cedarling): simplify TokenKind parsing
rmarinn Oct 25, 2024
e36f963
chore(jans-cedarling): simplify policy parsing by removing unnecessar…
rmarinn Oct 25, 2024
f9f67d4
test(jans-cedarling): add unit test for handling invalid token type
rmarinn Oct 25, 2024
33315bc
chore(jans-cedarling): replace string with JSON macro for invalid tok…
rmarinn Oct 25, 2024
cc062d2
feat(jans-cedarling): enhance policy deserialization error handling
rmarinn Oct 25, 2024
c500ca0
merge: branch 'main' into jans-cedarling-9905
rmarinn Oct 25, 2024
fd635ea
fix(jans-cedarling): resolve merge conflicts between jans-cedarling-i…
rmarinn Oct 25, 2024
1c5f33f
test(jans-cedarling): move tests to a separate file and enhance input…
rmarinn Oct 25, 2024
a1360cb
chore(jans-cedarling): resolve Clippy warnings
rmarinn Oct 25, 2024
7a3ac9a
merge: branch 'jans-cedarling-9905' into jans-cedarling-9814
rmarinn Oct 25, 2024
26b8cb4
test(jans-cedarling): add specific error assertion in unit tests
rmarinn Oct 25, 2024
bb83394
merge: branch 'main' into jans-cedarling-9905
rmarinn Oct 26, 2024
acf70f2
merge: branch 'jans-cedarling-9814' into jans-cedarling-9832
rmarinn Oct 26, 2024
d5632af
chore(jans-cedarling): add comments to the tokens in the examples
rmarinn Oct 26, 2024
9b39d16
fix(jans-cedarling): fix broken example with jwt validation
rmarinn Oct 26, 2024
435a418
chore(jans-cedarling): update incorrect docstrings
rmarinn Oct 26, 2024
885b844
merge: branch 'main' into jans-cedarling-9832
rmarinn Oct 26, 2024
77823a6
chore(jans-cedarling): resolve clippy warnings
rmarinn Oct 26, 2024
b1a5d10
refactor(jwt): convert extract_claims to an associated function
rmarinn Oct 26, 2024
c8c8945
refactor(jans-cedarling): revert to custom Error for unsupported algo…
rmarinn Oct 26, 2024
ae9a250
merge: branch 'main' into jans-cedarling-9814
rmarinn Oct 27, 2024
1128c8d
chore(jans-cedarling): fix clippy warnings
rmarinn Oct 27, 2024
0407e39
docs(jans-cedarling): fix wrong example in the docs
rmarinn Oct 27, 2024
67c233c
merge: branch 'jans-cedarling-9905' into jans-cedarling-9814
rmarinn Oct 27, 2024
a626c7c
merge: branch 'jans-cedarling-9814' into jans-cedarling-9832
rmarinn Oct 27, 2024
6f7bba6
merge: branch 'main' into jans-cedarling-9905
rmarinn Oct 27, 2024
635fd96
merge: branch 'jans-cedarling-9905' into jans-cedarling-9814
rmarinn Oct 27, 2024
aa0ca33
merge: branch 'jans-cedarling-9814' into jans-cedarling-9832
rmarinn Oct 27, 2024
d50c9d9
chore(jans-cedarling): replace `person_id` with `user_id`
rmarinn Oct 28, 2024
263f279
Merge branch 'jans-cedarling-9905' into jans-cedarling-9814
rmarinn Oct 28, 2024
4e3f0c8
merge: branch 'jans-cedarling-9814' into jans-cedarling-9832
rmarinn Oct 28, 2024
b974f5b
merge: branch 'main' into jans-cedarling-9814
rmarinn Oct 28, 2024
ed081a1
merge: branch 'jans-cedarling-9814' into jans-cedarling-9832
rmarinn Oct 28, 2024
faa4f90
merge: branch 'main' into jans-cedarling-9832
rmarinn Oct 28, 2024
6d5a976
chore(jans-cedarling): remove unused traits file
rmarinn Oct 29, 2024
f0fec48
fix(jans-cedarling): update examples to align with schema changes
rmarinn Oct 29, 2024
aa1e863
docs(jans-cedarling): update README.md
rmarinn Oct 29, 2024
fb93439
feat(jans-cedarling): improve error handling
rmarinn Oct 29, 2024
f90b486
merge: branch 'main' into jans-cedarling-9832
rmarinn Oct 29, 2024
58febd3
fix(jans-cedarling): revert unintended change to the docs by a merge
rmarinn Oct 29, 2024
334f5a9
test(jans-cedarling): fix python unit tests
olehbozhok Oct 29, 2024
8860caf
chore(jans-cedarling): fix misspelled test function name
rmarinn Oct 30, 2024
01bc63b
test(jans-cedarling): improve test assertion and specificity
rmarinn Oct 30, 2024
18ea57d
Merge branch 'main' into jans-cedarling-9832
olehbozhok Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cedarling/cedarling-policy-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The `cedar_policies` field outlines the Cedar policies that will be used in Ceda

```json
"cedar_policies": {
"a_unique_policy_id": {
"unique_policy_id": {
"description": "simple policy example",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgc..."
Expand Down
17 changes: 13 additions & 4 deletions jans-cedarling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,22 @@ But actually the example execute very fast, so we no need to wait.
cargo run -p cedarling --example log_init -- lock
```

### Example of authorize evaluation
### Authorization Evaluation Examples

File with example is `authorize.rs`.
To run example you need execute next command:
#### Running Without JWT validation

To evaluate authorization without validating JWT tokens, use the following command:

```bash
cargo run -p cedarling --example authorize_without_jwt_validation
```

#### Running with JWT validation

To include JWT validation in the authorization evaluation, use this command:

```bash
cargo run -p cedarling --example authorize
cargo run -p cedarling --example authorize_with_jwt_validation
```

## Unit tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"8b805e22fdd39f3dd33a13d9fb446d8e6314153ca997": {
"name": "gluustore",
"description": "gluu",
"policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal workload",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6Oldvcmtsb2FkLAogICAgYWN0aW9uIGluIFtKYW5zOjpBY3Rpb246OiJVcGRhdGUiXSwKICAgIHJlc291cmNlIGlzIEphbnM6Oklzc3VlCil3aGVuewogICAgcHJpbmNpcGFsLm9yZ19pZCA9PSByZXNvdXJjZS5vcmdfaWQKfTs="
},
"444da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal user",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6OlVzZXIsCiAgICBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IlVwZGF0ZSJdLAogICAgcmVzb3VyY2UgaXMgSmFuczo6SXNzdWUKKXdoZW57CiAgICBwcmluY2lwYWwuY291bnRyeSA9PSByZXNvdXJjZS5jb3VudHJ5Cn07"
}
"cedar_version": "v2.4.7",
"cedar_policies": {
"840da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal workload",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6Oldvcmtsb2FkLAogICAgYWN0aW9uIGluIFtKYW5zOjpBY3Rpb246OiJVcGRhdGUiXSwKICAgIHJlc291cmNlIGlzIEphbnM6Oklzc3VlCil3aGVuewogICAgcHJpbmNpcGFsLm9yZ19pZCA9PSByZXNvdXJjZS5vcmdfaWQKfTs="
},
"identity_source": {},
"schema": "eyJKYW5zIjp7ImNvbW1vblR5cGVzIjp7IlVybCI6eyJ0eXBlIjoiUmVjb3JkIiwiYXR0cmlidXRlcyI6eyJob3N0Ijp7InR5cGUiOiJFbnRpdHlPckNvbW1vbiIsIm5hbWUiOiJTdHJpbmcifSwicGF0aCI6eyJ0eXBlIjoiRW50aXR5T3JDb21tb24iLCJuYW1lIjoiU3RyaW5nIn0sInByb3RvY29sIjp7InR5cGUiOiJFbnRpdHlPckNvbW1vbiIsIm5hbWUiOiJTdHJpbmcifX19fSwiZW50aXR5VHlwZXMiOnsiV29ya2xvYWQiOnsic2hhcGUiOnsidHlwZSI6IlJlY29yZCIsImF0dHJpYnV0ZXMiOnsiY2xpZW50X2lkIjp7InR5cGUiOiJFbnRpdHlPckNvbW1vbiIsIm5hbWUiOiJTdHJpbmcifSwiaXNzIjp7InR5cGUiOiJFbnRpdHlPckNvbW1vbiIsIm5hbWUiOiJUcnVzdGVkSXNzdWVyIn0sIm5hbWUiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJ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R0cmlidXRlcyI6eyJhY3IiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJhbXIiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJhdWQiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJleHAiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IkxvbmcifSwiaWF0Ijp7InR5cGUiOiJFbnRpdHlPckNvbW1vbiIsIm5hbWUiOiJMb25nIn0sImlzcyI6eyJ0eXBlIjoiRW50aXR5T3JDb21tb24iLCJuYW1lIjoiVHJ1c3RlZElzc3VlciJ9LCJqdGkiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJzdWIiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9fX19LCJUcnVzdGVkSXNzdWVyIjp7InNoYXBlIjp7InR5cGUiOiJSZWNvcmQiLCJhdHRyaWJ1dGVzIjp7Imlzc3Vlcl9lbnRpdHlfaWQiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlVybCJ9fX19fSwiYWN0aW9ucyI6eyJVcGRhdGUiOnsiYXBwbGllc1RvIjp7InJlc291cmNlVHlwZXMiOlsiSXNzdWUiXSwicHJpbmNpcGFsVHlwZXMiOlsiV29ya2xvYWQiLCJVc2VyIl19fX19fQo="
}
"444da5d85403f35ea76519ed1a18a33989f855bf1cf8": {
"description": "simple policy example for principal user",
"creation_date": "2024-09-20T17:22:39.996050",
"policy_content": "cGVybWl0KAogICAgcHJpbmNpcGFsIGlzIEphbnM6OlVzZXIsCiAgICBhY3Rpb24gaW4gW0phbnM6OkFjdGlvbjo6IlVwZGF0ZSJdLAogICAgcmVzb3VyY2UgaXMgSmFuczo6SXNzdWUKKXdoZW57CiAgICBwcmluY2l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U9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9LCJzdWIiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlN0cmluZyJ9fX19LCJUcnVzdGVkSXNzdWVyIjp7InNoYXBlIjp7InR5cGUiOiJSZWNvcmQiLCJhdHRyaWJ1dGVzIjp7Imlzc3Vlcl9lbnRpdHlfaWQiOnsidHlwZSI6IkVudGl0eU9yQ29tbW9uIiwibmFtZSI6IlVybCJ9fX19fSwiYWN0aW9ucyI6eyJVcGRhdGUiOnsiYXBwbGllc1RvIjp7InJlc291cmNlVHlwZXMiOlsiSXNzdWUiXSwicHJpbmNpcGFsVHlwZXMiOlsiV29ya2xvYWQiLCJVc2VyIl19fX19fQo="
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct Request {
pub access_token: String,
/// Id token raw value
pub id_token: String,
// User info token raw value
/// Userinfo token raw value
pub userinfo_token: String,
/// cedar_policy action
pub action: String,
Expand Down
2 changes: 1 addition & 1 deletion jans-cedarling/bindings/cedarling_python/tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def sample_bootstrap_config():
policy_source = PolicyStoreSource(json=policy_raw_json)

policy_store_config = PolicyStoreConfig(
source=policy_source, store_id=None)
source=policy_source)

jwt_config = JwtConfig(enabled=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
("policy-store_policy_err_broken_utf8.json",
"unable to decode policy_content to utf8 string"),
("policy-store_policy_err_broken_policy.json",
'unable to decode policy with id: 840da5d85403f35ea76519ed1a18a33989f855bf1cf8, error: unable to decode policy_content from human readable format: unexpected token `)` at line 15 column 1'),
"unable to decode policy with id: 840da5d85403f35ea76519ed1a18a33989f855bf1cf8, error: unable to decode policy_content from human readable format: unexpected token `)`"),
# cases with schema errors
("policy-store_schema_err_base64.json",
"unable to decode cedar policy schema base64"),
("policy-store_schema_err_json.json",
"unable to unmarshal cedar policy schema json to the structure"),
("policy-store_schema_err_cedar_mistake.json",
"Could not load policy: unable to parse cedar policy schema json: failed to resolve type: User_TypeNotExist at line 35 column 1"),
"Could not load policy: failed to parse the policy store from `policy_store.json`: unable to parse cedar policy schema json: failed to resolve type: User_TypeNotExist at line 32 column 1"),
]


Expand Down
138 changes: 0 additions & 138 deletions jans-cedarling/cedarling/examples/authorize.rs

This file was deleted.

Loading