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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
- Added `hierarchical` flag to `AzureStorageConfigInfo` to allow more precise SAS token down-scoping in ADLS when
the [hierarchical namespace](https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-namespace)
feature is enabled in Azure.
- Relaxed `client_id`, `client_secret` regex/pattern validation on reset endpoint call

### Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,6 @@ public Response createCatalog(
return Response.status(Response.Status.CREATED).entity(newCatalog).build();
}

private void validateClientId(String clientId) {
if (!clientId.matches("^[0-9a-f]{16}$")) {
throw new IllegalArgumentException("Invalid clientId format");
}
}

private void validateClientSecret(String clientSecret) {
if (!clientSecret.matches("^[0-9a-f]{32}$")) {
throw new IllegalArgumentException("Invalid clientSecret format");
}
}

private void validateStorageConfig(StorageConfigInfo storageConfigInfo) {
List<String> allowedStorageTypes =
realmConfig.getConfig(FeatureConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES);
Expand Down Expand Up @@ -304,12 +292,6 @@ public Response resetCredentials(
? resetPrincipalRequest
: new ResetPrincipalRequest(null, null);

if (safeResetPrincipalRequest.getClientId() != null) {
validateClientId(safeResetPrincipalRequest.getClientId());
}
if (safeResetPrincipalRequest.getClientSecret() != null) {
validateClientSecret(safeResetPrincipalRequest.getClientSecret());
}
return Response.ok(adminService.resetCredentials(principalName, safeResetPrincipalRequest))
.build();
}
Expand Down