Skip to content

Commit

Permalink
GUACAMOLE-2030: Fix KSM static token mapping for per-user config.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugen-keeper committed Feb 17, 2025
1 parent c276c49 commit 260ee80
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@ public Future<String> getSecret(

// Unfortunately, the notation parser within the Keeper SDK throws
// plain Errors for retrieval failures ...
catch (Error e) {
logger.warn("Record \"{}\" does not exist.", notation);
catch (Error | Exception e) {
logger.warn("Keeper notation \"{}\" could not be resolved "
+ "to a record: {}", notation, e.getMessage());
logger.debug("Retrieval of record by Keeper notation failed.", e);

// If the secret is not found, invoke the fallback function
Expand All @@ -663,15 +664,6 @@ public Future<String> getSecret(

return CompletableFuture.completedFuture(null);
}

// ... and plain Exceptions for parse failures (no subclasses)
catch (Exception e) {
logger.warn("\"{}\" is not valid Keeper notation. Please check "
+ "the documentation at {} for valid formatting.",
notation, KEEPER_NOTATION_DOC_URL);
logger.debug("Provided Keeper notation could not be parsed.", e);
return CompletableFuture.completedFuture(null);
}
finally {
cacheLock.readLock().unlock();
}
Expand Down

0 comments on commit 260ee80

Please sign in to comment.