Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 11 additions & 10 deletions src/main/java/com/uid2/admin/vertx/service/KeyAclService.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ public void setupRoutes(Router router) {
}
}, Role.PRIVILEGED));

router.post("/api/keys_acl/reset").blockingHandler(auth.handle((ctx) -> {
synchronized (writeLock) {
this.handleKeyAclReset(ctx);
}
}, Role.MAINTAINER));
router.post("/api/keys_acl/update").blockingHandler(auth.handle((ctx) -> {
synchronized (writeLock) {
this.handleKeyAclUpdate(ctx);
}
}, Role.MAINTAINER));
// UID2-2758 Disable setting Key ACLs
// router.post("/api/keys_acl/reset").blockingHandler(auth.handle((ctx) -> {
// synchronized (writeLock) {
// this.handleKeyAclReset(ctx);
// }
// }, Role.MAINTAINER));
// router.post("/api/keys_acl/update").blockingHandler(auth.handle((ctx) -> {
// synchronized (writeLock) {
// this.handleKeyAclUpdate(ctx);
// }
// }, Role.MAINTAINER));
}

private void handleRewriteMetadata(RoutingContext rc) {
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/uid2/admin/vertx/KeyAclServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void listKeyAclsHaveAcls(Vertx vertx, VertxTestContext testContext) {
});
}

/** UID2-2758 Disable setting Key ACLs
@Test
void keyAclResetNoAclToWhitelist(Vertx vertx, VertxTestContext testContext) throws Exception {
fakeAuth(Role.MAINTAINER);
Expand Down Expand Up @@ -477,4 +478,5 @@ void keyAclUpdateRemoveUnlistedSite(Vertx vertx, VertxTestContext testContext) t
testContext.completeNow();
});
}
*/
}
13 changes: 7 additions & 6 deletions webroot/adm/key-acl.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<script src="/js/main.js"></script>
</head>
<body>
<h1>UID2 Admin - Key ACL Management</h1>
<h1><b>Deprecated</b>: UID2 Admin - Key ACL Management</h1>

<h2 style="color: red"><a href="https://atlassian.thetradedesk.com/jira/browse/UID2-2758">UID2-2758</a>: Key ACL entries must no longer be created. Read only by legacy operators now.</h2>

<a href="/">Back</a>

<br>
<br>

<!--
<h3>Inputs</h3>

<label for="siteId">Site Id:</label>
Expand All @@ -24,16 +25,16 @@ <h3>Inputs</h3>
<option value="whitelist">whitelist</option>
<option value="blacklist">blacklist</option>
</select>

-->
<br>
<br>

<h3>Operations</h3>

<ul>
<li class="ro-cki" style="display: none"><a href="#" id="doList">List ACLs</a></li>
<li class="ro-cki" style="display: none"><a href="#" id="doReset">Reset ACL</a></li>
<li class="ro-cki" style="display: none"><a href="#" id="doUpdate">Update ACL</a></li>
<!-- <li class="ro-cki" style="display: none"><a href="#" id="doReset">Reset ACL</a></li>-->
<!-- <li class="ro-cki" style="display: none"><a href="#" id="doUpdate">Update ACL</a></li>-->
</ul>

<br>
Expand Down
8 changes: 5 additions & 3 deletions webroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ <h1>UID2 Admin Site</h1>

<ul>
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/client-key.html">Client Key Management</a></li>
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/key-acl.html">Encryption Key ACL Management</a></li>
<li class="ro-adm" style="display: none"><a href="/adm/keysets.html">Keyset Access Management</a></li>
<li class="ro-sem" style="display: none"><a href="/adm/encryption-key.html">Encryption Key Management</a></li>
<li class="ro-sem" style="display: none"><a href="/adm/salt.html">Salts Management</a></li>
Expand All @@ -42,7 +41,10 @@ <h1>UID2 Admin Site</h1>
<li class="ro-adm" style="display: none"><a href="/adm/search.html">Key and Secret Search</a></li>
<li class="ro-nil" style="display: none">No Admin Permissions</li>
</ul>


<br/>
<h3>Deprecated</h3>
<ul>
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/key-acl.html">Encryption Key ACL Management</a></li>
</ul>
</body>
</html>