Skip to content

Commit

Permalink
Cover the case with empty scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
lgiommi committed Oct 27, 2023
1 parent 280dbf6 commit 3f5754b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,13 @@ public boolean doDeploy(DeploymentMessage deploymentMessage) {
scopes = String.join(" ", wellKnownResponse.getScopesSupported());
}

if (scopes.isEmpty()){
String errorMessage = "Zero scopes allowed provided are not sufficient to create a client";
LOG.error(errorMessage);
iamService.deleteAllClients(restTemplate, resources);
throw new IamServiceException(errorMessage);
}

// Create an IAM client
try {
LOG.info("Creating client with the identity provider {}", issuerNode);
Expand Down

0 comments on commit 3f5754b

Please sign in to comment.