madrob commented on a change in pull request #139:
URL: https://github.com/apache/solr/pull/139#discussion_r636967838
##########
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:
CoreContainer:517 attempts to create an authentication plugin using a
constructor with the CoreContainer as a parameter first, then falls back to a
zero-arg constructor. I think you can just add this constructor and hold a
reference to the container.
--
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]