Skip to content

Commit 8dfbac6

Browse files
committed
Drop client_id/client_secret pattern validation on /reset endpoint
1 parent 2929a99 commit 8dfbac6

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
6060
- Enhanced catalog federation with SigV4 authentication support, additional authentication types for credential vending, and location-based access restrictions to block credential vending for remote tables outside allowed location lists.
6161
- Added `topologySpreadConstraints` support in Helm chart.
6262
- Added support for including principal name in subscoped credentials. `INCLUDE_PRINCIPAL_NAME_IN_SUBSCOPED_CREDENTIAL` (default: false) can be used to toggle this feature. If enabled, cached credentials issued to one principal will no longer be available for others.
63+
- Relaxed `client_id`, `client_secret` regex/pattern validation on reset endpoint call
6364

6465
### Changes
6566

runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisServiceImpl.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,6 @@ public Response createCatalog(
136136
return Response.status(Response.Status.CREATED).entity(newCatalog).build();
137137
}
138138

139-
private void validateClientId(String clientId) {
140-
if (!clientId.matches("^[0-9a-f]{16}$")) {
141-
throw new IllegalArgumentException("Invalid clientId format");
142-
}
143-
}
144-
145-
private void validateClientSecret(String clientSecret) {
146-
if (!clientSecret.matches("^[0-9a-f]{32}$")) {
147-
throw new IllegalArgumentException("Invalid clientSecret format");
148-
}
149-
}
150-
151139
private void validateStorageConfig(StorageConfigInfo storageConfigInfo) {
152140
List<String> allowedStorageTypes =
153141
realmConfig.getConfig(FeatureConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES);
@@ -304,12 +292,6 @@ public Response resetCredentials(
304292
? resetPrincipalRequest
305293
: new ResetPrincipalRequest(null, null);
306294

307-
if (safeResetPrincipalRequest.getClientId() != null) {
308-
validateClientId(safeResetPrincipalRequest.getClientId());
309-
}
310-
if (safeResetPrincipalRequest.getClientSecret() != null) {
311-
validateClientSecret(safeResetPrincipalRequest.getClientSecret());
312-
}
313295
return Response.ok(adminService.resetCredentials(principalName, safeResetPrincipalRequest))
314296
.build();
315297
}

0 commit comments

Comments
 (0)