public String getPasswordFromUri(URI uri) throws IOException, HiveException {
    SecretSource source = sourcesMap.get(uri.getScheme());
    if (source == null) {
      throw new HiveException("Cannot fine secret source for scheme: " + uri.getScheme());
    }
    return source.getSecret(uri);
  }
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