Skip to content

Commit

Permalink
Don't prefix KEK names with the context in the ContextFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Feb 5, 2024
1 parent 309ab0b commit 28d8663
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ ContextAndPath modifyUriPath(String path) {

boolean isRootConfigOrMode = isRootConfigOrMode(isFirst, uriPathStr);
if (uriPathStr.equals("subjects")
|| uriPathStr.equals("keks")
|| uriPathStr.equals("deks")
|| isRootConfigOrMode) {
subjectPathFound = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ public void testModeUriWithoutSubjectDefaultContext() {
public void testKekPartOfUri() {
String path = "/contexts/.test-ctx/dek-registry/v1/keks/test-kek";
Assert.assertEquals(
"Dek must be prefixed",
"/dek-registry/v1/keks/:.test-ctx:test-kek/",
"Kek must not be prefixed",
"/dek-registry/v1/keks/test-kek/",
contextFilter.modifyUri(UriBuilder.fromPath(path), path, new MultivaluedHashMap<>()).getPath()
);
}
Expand All @@ -197,7 +197,7 @@ public void testDekPartOfUri() {
String path = "/contexts/.test-ctx/dek-registry/v1/keks/test-kek/deks/test-subject";
Assert.assertEquals(
"Dek must be prefixed",
"/dek-registry/v1/keks/:.test-ctx:test-kek/deks/:.test-ctx:test-subject/",
"/dek-registry/v1/keks/test-kek/deks/:.test-ctx:test-subject/",
contextFilter.modifyUri(UriBuilder.fromPath(path), path, new MultivaluedHashMap<>()).getPath()
);
}
Expand Down

0 comments on commit 28d8663

Please sign in to comment.