@Override
    protected void addTokens(ConnectionGroup connectionGroup,
            Map<String, String> tokens) throws GuacamoleException {

        String name = connectionGroup.getName();
        String identifier = connectionGroup.getIdentifier();
        logger.debug("Injecting tokens from vault for connection group "
                + "\"{}\" (\"{}\").", identifier, name);

        // Add general and connection-group-specific tokens
        TokenFilter filter = createFilter();
        filter.setToken(CONNECTION_GROUP_NAME_TOKEN, name);
        filter.setToken(CONNECTION_GROUP_IDENTIFIER_TOKEN, identifier);

        // Substitute tokens producing secret names, retrieving and storing
        // those secrets as parameter tokens
        tokens.putAll(resolve(getTokens(
                connectionGroup, confService.getTokenMapping(), filter,
                null, new TokenFilter(tokens))));

    }
Waits for all pending secret retrieval operations to complete,
transforming each Future within the given Map into its contained String
value.

@param pendingTokens
    A Map of token name to Future, where each Future represents the
    pending retrieval operation which will ultimately be completed with
    the value of all secrets mapped to that token.

@return
    A Map of token name to the corresponding String value retrieved for
    that token from the vault.

@throws GuacamoleException
    If the value for any applicable secret cannot be retrieved from the
    vault due to an error.
extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/user/VaultUserContext.java