JsonPatch test success#6
JsonPatch test success#6dabloem wants to merge 1 commit intoapache:rmannibucau/json-patch-jwt-payloadfrom
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.
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.
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.
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.
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.
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.
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.
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.