private KsmClient getClient(@Nonnull String ksmConfig)
            throws GuacamoleException {

        // If a client already exists for the provided config, use it
        KsmClient ksmClient = ksmClientMap.get(ksmConfig);
        if (ksmClient != null)
            return ksmClient;

        // Create and store a new KSM client instance for the provided KSM config blob
        SecretsManagerOptions options = confService.getSecretsManagerOptions(ksmConfig);
        ksmClient = ksmClientFactory.create(options, confService.getKsmApiInterval());
        KsmClient prevClient = ksmClientMap.putIfAbsent(ksmConfig, ksmClient);

        // If the client was already set before this thread got there, use the existing one
        return prevClient != null ? prevClient : ksmClient;
    }
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