janhoy commented on a change in pull request #139:
URL: https://github.com/apache/solr/pull/139#discussion_r636899014
##########
File path: solr/core/src/java/org/apache/solr/security/JWTAuthPlugin.java
##########
@@ -155,8 +168,33 @@ public void init(Map<String, Object> pluginConfig) {
requiredScopes = Arrays.asList(requiredScopesStr.split("\\s+"));
}
+ // Parse custom IDP SSL Cert from either path or string
+ InputStream trustedCertsStream = null;
+ String trustedCertsFile = (String)
pluginConfig.get(PARAM_TRUSTED_CERTS_FILE);
+ String trustedCerts = (String) pluginConfig.get(PARAM_TRUSTED_CERTS);
+ if (trustedCertsFile != null && trustedCerts != null) {
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Found
both " + PARAM_TRUSTED_CERTS_FILE + " and " + PARAM_TRUSTED_CERTS + ", please
use only one");
+ }
+ if (trustedCertsFile != null) {
+ try {
+ trustedCertsStream =
Files.newInputStream(Paths.get(trustedCertsFile));
Review comment:
Hmm, I tried using `CoreContainer.assertPathAllowed()` but unfortunately
AuthPlugins do not have access to coreContainer, so I cannot get access to it.
An Auth plugin is at the container level, not the core level, so what is the
equivalent of `SolrCoreAware` for such plugins? I.e. that it would get a
reference to `CoreContainer`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]