public void register(SecretSource source) {
    SecretSource oldSource = sourcesMap.put(source.getURIScheme(), source);
    if (oldSource != null) {
      throw new RuntimeException("Two sources for same scheme: " + source.getURIScheme() +  " [" +
          source.getClass().getName() + " and " + oldSource.getClass().getName() + "]");
    }
  }
Class provides a way to load passwords using a URI. The secret sources are discovered using java service loader.
The
ql/src/java/org/apache/hadoop/hive/ql/secrets/URISecretSource.java