in emr-user-role-mapper-application/src/main/java/com/amazon/aws/emr/ApplicationConfiguration.java [31:49]
public void init() {
try (final InputStream stream =
this.getClass().getResourceAsStream(PROPS_FILE)) {
properties.load(stream);
if (!isValidConfig()) {
throw new RuntimeException("Invalid configuration!");
}
log.info("Loaded " + properties.toString());
if (properties.containsKey(Constants.IMPERSONATION_ALLOWED_USERS)) {
IMPERSONATION_ALLOWED_USERS = ImmutableSet
.copyOf(properties.getProperty(Constants.IMPERSONATION_ALLOWED_USERS).split(","))
.stream().map(String::trim).collect(ImmutableSet.toImmutableSet());
log.info("Loaded allowed users for impersonation: {}", IMPERSONATION_ALLOWED_USERS);
}
} catch (Exception e) {
throw new RuntimeException("Could not load properties file", e);
}
}