GUACAMOLE-641: Allow token mapping file to not exist.

Some tokens may be standardized or specific to the implementation, and
may not need to be defined in YAML.
This commit is contained in:
Michael Jumper
2022-01-21 15:23:41 -08:00
parent 8bedbe746c
commit d0043e34dd

View File

@@ -25,6 +25,7 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.google.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.GuacamoleServerException;
@@ -91,6 +92,8 @@ public abstract class VaultConfigurationService {
// Get configuration file from GUACAMOLE_HOME
File confFile = new File(environment.getGuacamoleHome(), tokenMappingFilename);
if (!confFile.exists())
return Collections.emptyMap();
// Deserialize token mapping from YAML
try {