-
Notifications
You must be signed in to change notification settings - Fork 9
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
JsonPatch test success #6
base: rmannibucau/json-patch-jwt-payload
Are you sure you want to change the base?
JsonPatch test success #6
Conversation
public class JsonPatchTest extends Arquillian { | ||
@Deployment(testable = false) | ||
public static Archive<?> war() { | ||
System.setProperty("geronimo.jwt-auth.jwt.payload.patch.default", "[ { \"op\": \"copy\", \"from\":\"/resource_access/service-C/groups\", \"path\": \"/groups\" } ]"); |
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.
Can you use microprofile properties as a webapp asset instead? Goal is to have each test able to run in the same suite. TCK have a bug about it but we shouldnt prevent ourself to do it IMHO.
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.
sure, I try.
btw, you agree, that the defaultPatch is always used when no mapping is found (regardless off default kid 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.
If kid is not in the mapping yes.
That said wonder if we shoulf support "none" value in the mapping to ease skipping that.
Wdyt?
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 don't see any real benefit in a 'none' value currently.
btw, I couldn't manage to get microprofile-config.properties to work. Either the tck tests fail or the projects tests fail when I add/remove a mp-config impl.
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.
If we dont support none then we only use default if kid is not set, not in all other cases to respect mapping config.
Not configured in mapping means "none" in this case.
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.
currently, the patch.mapping has higher priority then patch.default. So, if no patch.mapping is found then always apply the default jsonpatch if defined (regardless of geronimo.jwt-auth.jwt.header.kid.default is set, or not). This seems fine by me.
What is your use case, to be sure I understand you correctly.
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.
This one ;).
Point is that if you want default to be used if there is no mapping there is the need of a "noop" mapping (skipping an empty jsonpatch array for perf) so i proposed none.
No description provided.