@Override
    public Future<String> getValue(UserContext userContext, Connectable connectable,
            String name) throws GuacamoleException {

        // Attempt to find a KSM config for this connection or group
        String ksmConfig = getConnectionGroupKsmConfig(userContext, connectable);

        return getClient(ksmConfig).getSecret(name, new GuacamoleExceptionSupplier<Future<String>>() {

            @Override
            public Future<String> get() throws GuacamoleException {

                // Get the user-supplied KSM config, if allowed by config and
                // set by the user
                String userKsmConfig = getUserKSMConfig(userContext, connectable);

                // If the user config happens to be the same as admin-defined one,
                // don't bother trying again
                if (userKsmConfig != null && !Objects.equal(userKsmConfig, ksmConfig))
                    return getClient(userKsmConfig).getSecret(name);

                return CompletableFuture.completedFuture(null);
            }

        });
    }
Create and return a KSM client for the provided KSM config if not already
present in the client map, otherwise return the existing client entry.

@param ksmConfig
    The base-64 encoded JSON KSM config blob associated with the client entry.
    If an associated entry does not already exist, it will be created using
    this configuration.

@return
    A KSM client for the provided KSM config if not already present in the
    client map, otherwise the existing client entry.

@throws GuacamoleException
    If an error occurs while creating the KSM client.
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java