Skip to content

Commit 2bfd5d4

Browse files
authored
Disable writing Key ACLs (#274)
* disable setting Key ACL and mark Key ACL overall deprecated and separate away from normal admin functionalities
1 parent b23c4c0 commit 2bfd5d4

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

src/main/java/com/uid2/admin/vertx/service/KeyAclService.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,17 @@ public void setupRoutes(Router router) {
5656
}
5757
}, Role.PRIVILEGED));
5858

59-
router.post("/api/keys_acl/reset").blockingHandler(auth.handle((ctx) -> {
60-
synchronized (writeLock) {
61-
this.handleKeyAclReset(ctx);
62-
}
63-
}, Role.MAINTAINER));
64-
router.post("/api/keys_acl/update").blockingHandler(auth.handle((ctx) -> {
65-
synchronized (writeLock) {
66-
this.handleKeyAclUpdate(ctx);
67-
}
68-
}, Role.MAINTAINER));
59+
// UID2-2758 Disable setting Key ACLs
60+
// router.post("/api/keys_acl/reset").blockingHandler(auth.handle((ctx) -> {
61+
// synchronized (writeLock) {
62+
// this.handleKeyAclReset(ctx);
63+
// }
64+
// }, Role.MAINTAINER));
65+
// router.post("/api/keys_acl/update").blockingHandler(auth.handle((ctx) -> {
66+
// synchronized (writeLock) {
67+
// this.handleKeyAclUpdate(ctx);
68+
// }
69+
// }, Role.MAINTAINER));
6970
}
7071

7172
private void handleRewriteMetadata(RoutingContext rc) {

src/test/java/com/uid2/admin/vertx/KeyAclServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void listKeyAclsHaveAcls(Vertx vertx, VertxTestContext testContext) {
6969
});
7070
}
7171

72+
/** UID2-2758 Disable setting Key ACLs
7273
@Test
7374
void keyAclResetNoAclToWhitelist(Vertx vertx, VertxTestContext testContext) throws Exception {
7475
fakeAuth(Role.MAINTAINER);
@@ -477,4 +478,5 @@ void keyAclUpdateRemoveUnlistedSite(Vertx vertx, VertxTestContext testContext) t
477478
testContext.completeNow();
478479
});
479480
}
481+
*/
480482
}

webroot/adm/key-acl.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
<script src="/js/main.js"></script>
55
</head>
66
<body>
7-
<h1>UID2 Admin - Key ACL Management</h1>
7+
<h1><b>Deprecated</b>: UID2 Admin - Key ACL Management</h1>
8+
9+
<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>
810

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

11-
<br>
12-
<br>
1313

14+
<!--
1415
<h3>Inputs</h3>
1516
1617
<label for="siteId">Site Id:</label>
@@ -24,16 +25,16 @@ <h3>Inputs</h3>
2425
<option value="whitelist">whitelist</option>
2526
<option value="blacklist">blacklist</option>
2627
</select>
27-
28+
-->
2829
<br>
2930
<br>
3031

3132
<h3>Operations</h3>
3233

3334
<ul>
3435
<li class="ro-cki" style="display: none"><a href="#" id="doList">List ACLs</a></li>
35-
<li class="ro-cki" style="display: none"><a href="#" id="doReset">Reset ACL</a></li>
36-
<li class="ro-cki" style="display: none"><a href="#" id="doUpdate">Update ACL</a></li>
36+
<!-- <li class="ro-cki" style="display: none"><a href="#" id="doReset">Reset ACL</a></li>-->
37+
<!-- <li class="ro-cki" style="display: none"><a href="#" id="doUpdate">Update ACL</a></li>-->
3738
</ul>
3839

3940
<br>

webroot/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ <h1>UID2 Admin Site</h1>
3030

3131
<ul>
3232
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/client-key.html">Client Key Management</a></li>
33-
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/key-acl.html">Encryption Key ACL Management</a></li>
3433
<li class="ro-adm" style="display: none"><a href="/adm/keysets.html">Keyset Access Management</a></li>
3534
<li class="ro-sem" style="display: none"><a href="/adm/encryption-key.html">Encryption Key Management</a></li>
3635
<li class="ro-sem" style="display: none"><a href="/adm/salt.html">Salts Management</a></li>
@@ -42,7 +41,10 @@ <h1>UID2 Admin Site</h1>
4241
<li class="ro-adm" style="display: none"><a href="/adm/search.html">Key and Secret Search</a></li>
4342
<li class="ro-nil" style="display: none">No Admin Permissions</li>
4443
</ul>
45-
46-
44+
<br/>
45+
<h3>Deprecated</h3>
46+
<ul>
47+
<li class="ro-cki ro-adm" style="display: none"><a href="/adm/key-acl.html">Encryption Key ACL Management</a></li>
48+
</ul>
4749
</body>
4850
</html>

0 commit comments

Comments
 (0)