-
Notifications
You must be signed in to change notification settings - Fork 55
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: Initial implementation of Catena-X policies #477
feat: Initial implementation of Catena-X policies #477
Conversation
c146d73
to
e2a5fbf
Compare
Kudos, SonarCloud Quality Gate passed! |
* Converts the value to a string representation. | ||
*/ | ||
@Nullable | ||
private static String convertType(JsonValue value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventually we'll likely want to upstream these utilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thinking we need separate set of Json-Ld utils.
/** | ||
* Returns true if the actual operand value is a string literal case-insensitive equal to the expected value. | ||
*/ | ||
protected boolean validateRightOperand(String expectedValue, Object actualValue, PolicyContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the expected value should be a vararg, because there could be several allowed ones, same as we have for the validateOperator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the expected value should be a vararg, because there could be several allowed ones, same as we have for the
validateOperator
Yeah, that method is going to actually have to be modified when we switch versions from the left to right operand as described here. I'll do that in another PR.
249bd8a
into
eclipse-tractusx:previews/preview_0_1_1_snapshot
* Initial implementation of Catena-X policies * Add header * Fix checkstyle * Fix typo * Fix typo * Add javadoc * Add javadoc * Switch token eval to a policy validator function
* Initial implementation of Catena-X policies * Add header * Fix checkstyle * Fix typo * Fix typo * Add javadoc * Add javadoc * Switch token eval to a policy validator function
* Initial implementation of Catena-X policies * Add header * Fix checkstyle * Fix typo * Fix typo * Add javadoc * Add javadoc * Switch token eval to a policy validator function
* feat: upgrade to 0.1.1-SNAPSHOT, fix resulting compile errors * chore: fix tests (#479) * feat: Initial implementation of Catena-X policies (#477) * Initial implementation of Catena-X policies * Add header * Fix checkstyle * Fix typo * Fix typo * Add javadoc * Add javadoc * Switch token eval to a policy validator function * chore: fix tests (#481) * feat(policy): (#487) * Cleanup namespaces, add extension class, implement summary constraint * Update credential names; add rule bindings * feat(SSI): implements the MIW client with Oauth2 as token provider for using the MIW APIs (#489) * fix: version catalog * feat(ParticipantIdentity): implements the ID extractor (#504) * feat(ParticipantIdentity): implements the ID extractor for the summary credential + E2E test * feat(ParticipantIdentity): more tests and ID extractor exception if identity not extracted * feat(ParticipantIdentity): add audience validation + tests * fix after review * remove short-term cache invalidation --------- Co-authored-by: Enrico Risa <enrico.risa@gmail.com> Co-authored-by: Jim Marino <jim.marino@gmail.com>
WHAT
This PR provides an initial implementation of SSI policies per this specification and the Summary Credential.
FURTHER NOTES
The CX policy module contains functions for working with Json-Ld structures. These functions (
JsonLdTypeFunctions
andJsonLdValueFunctions
) will likely be refactored into a common module and shared with the new SSI-basedIdentityService
in a subsequent PR.Closes #476