janhoy commented on a change in pull request #139:
URL: https://github.com/apache/solr/pull/139#discussion_r646401624
##########
File path:
solr/core/src/test/org/apache/solr/security/JWTAuthPluginIntegrationTest.java
##########
@@ -127,13 +135,40 @@ public void tearDown() throws Exception {
super.tearDown();
}
- @Test(expected = IOException.class)
- public void infoRequestWithoutToken() throws Exception {
- get(baseUrl + "/admin/info/system", null);
+ @Test
+ public void extractCertificateFromPem() throws IOException {
Review comment:
I added two tests to JWTAuthPluginTest, verifying that init() fails. No
need for integration test of all these?
If you load a `security.json` to ZK with bogous `trustedCertsFile` or
`trustedCerts`, the JWT plugin will throw and exception and auth will not be
enabled. Here are log messages you can expect to see prior to exception:
> Reading trustedCerts from file {}
or
> Reading trustedCerts PEM from configuration string
In the exception stacktrace itself you'll see either
> Wrong type of certificates. Must be DER or PEM format
or
> Failed loading certificate(s) from input stream
--
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]