private String getUserKSMConfig(
            UserContext userContext, Connectable connectable) throws GuacamoleException {

        // If user KSM configs are enabled globally, and for the given connectable,
        // return the user-specific KSM config, if one exists
        if (confService.getAllowUserConfig() && isKsmUserConfigEnabled(connectable)) {

            // Get the underlying user, to avoid the KSM config sanitization
            User self = (
                    ((KsmDirectory<User>) userContext.getUserDirectory())
                    .getUnderlyingDirectory().get(userContext.self().getIdentifier()));

            return self.getAttributes().get(
                    KsmAttributeService.KSM_CONFIGURATION_ATTRIBUTE);
        }


        // If user-specific KSM config is disabled globally or for the given
        // connectable, return null to indicate that no user config exists
        return null;
    }
Return the KSM config blob for the current user IFF user KSM configs
are enabled globally, and are enabled for the given connectable. If no
KSM config exists for the given user or KSM configs are not enabled,
null will be returned.

@param userContext
   The user context from which the current user should be fetched.

@param connectable
   The connectable to which the connection is being established. This
   is the conneciton which will be checked to see if user KSM configs
   are enabled.

@return
   The base64 encoded KSM config blob for the current user if one
   exists, and if user KSM configs are enabled globally and for the
   provided connectable.

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