Skip to content

Commit

Permalink
401 -> 500 smallrye/smallrye-jwt#373 in MultipleConfiguredPublicKeysS…
Browse files Browse the repository at this point in the history
…electionTest
  • Loading branch information
tommaso-borgato authored and marekkopecky committed Sep 19, 2022
1 parent e0a423a commit 2e54718
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 53 deletions.
37 changes: 0 additions & 37 deletions .run/MultipleConfiguredPublicKeysSelectionLocationPropTest.run.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void testJwtSignedByBlueKeyJsonPk(@ArquillianResource URL url) {
* @tpTestDetails A JWT signed by a "pink" private key is send to the server which has configured public key to be a
* JSON Web Key set in JSON. There are multiple keys in this set and there is no "pink" public key among
* them.
* @tpPassCrit JWt is rejected and user receives 401/forbidden because there is no matching configured public key on
* @tpPassCrit JWt is rejected and user receives "501/internal server error" because there is no matching configured public key on
* the server.
* @tpSince EAP 7.4.0.CD19
*/
Expand Down Expand Up @@ -176,7 +176,7 @@ public void testJwtSignedByBlueKeyBase64(@ArquillianResource URL url) {
* @tpTestDetails A JWT signed by a "pink" private key is send to the server which has configured public key to be a
* JSON Web Key set Base64 encoded. There are multiple keys in this set and there is no "pink" public
* key among them.
* @tpPassCrit JWt is rejected and user receives 401/forbidden because there is no matching configured public key on
* @tpPassCrit JWt is rejected and user receives "501/internal server error" because there is no matching configured public key on
* the server.
* @tpSince EAP 7.4.0.CD19
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void testJwtSignedByBlueKeyJsonPk(@ArquillianResource URL url) {
* @tpTestDetails A JWT signed by a "pink" private key is send to the server which has configured public key to be a
* JSON Web Key set in JSON. There are multiple keys in this set and there is no "pink" public key among
* them.
* @tpPassCrit JWt is rejected and user receives 401/forbidden because there is no matching configured public key on
* @tpPassCrit JWt is rejected and user receives "501/internal server error" because there is no matching configured public key on
* the server.
* @tpSince EAP 7.4.0.CD19
*/
Expand All @@ -152,7 +152,7 @@ public void testJwtSignedByPinkKeyJsonPk(@ArquillianResource URL url) {
given().header("Authorization", "Bearer " + token.getRawValue())
.when().get(url.toExternalForm() + Endpoints.SECURED_ENDPOINT)
.then()
.statusCode(401);
.statusCode(500); // 401 -> 500 https://github.com/smallrye/smallrye-jwt/pull/373
}

/**
Expand Down Expand Up @@ -198,7 +198,7 @@ public void testJwtSignedByBlueKeyBase64(@ArquillianResource URL url) {
* @tpTestDetails A JWT signed by a "pink" private key is send to the server which has configured public key to be a
* JSON Web Key set Base64 encoded. There are multiple keys in this set and there is no "pink" public
* key among them.
* @tpPassCrit JWt is rejected and user receives 401/forbidden because there is no matching configured public key on
* @tpPassCrit JWt is rejected and user receives "501/internal server error" because there is no matching configured public key on
* the server.
* @tpSince EAP 7.4.0.CD19
*/
Expand All @@ -210,7 +210,7 @@ public void testJwtSignedByPinkKeyBase64Pk(@ArquillianResource URL url) {
given().header("Authorization", "Bearer " + token.getRawValue())
.when().get(url.toExternalForm() + Endpoints.SECURED_ENDPOINT)
.then()
.statusCode(401);
.statusCode(500); // 401 -> 500 https://github.com/smallrye/smallrye-jwt/pull/373
}

private static URL getFileFromResources(final String filePath) {
Expand Down

This file was deleted.

10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@
<version.org.jboss.wildfly.dist>27.0.0.Alpha4</version.org.jboss.wildfly.dist>
<version.org.wildfly.arquillian>5.0.0.Alpha5</version.org.wildfly.arquillian>
<version.org.fusesource.jansi>1.18</version.org.fusesource.jansi>
<version.io.undertow.undertow-core>2.3.0.Alpha2</version.io.undertow.undertow-core>
<version.org.jboss.threads.jboss-threads>2.4.0.Final</version.org.jboss.threads.jboss-threads>
<version.org.eclipse.microprofile.jwt.microprofile-jwt-auth-api>2.0</version.org.eclipse.microprofile.jwt.microprofile-jwt-auth-api>
<!-- wildfly-core update needed to have the launcher version with BootableJarCommandBuilder used to start
the server up -->
<version.org.wildfly.core>19.0.0.Beta15</version.org.wildfly.core>
<version.org.wildfly.extras.creaper>1.6.1</version.org.wildfly.extras.creaper>
<version.org.yaml.snakeyaml>1.26</version.org.yaml.snakeyaml>
<version.com.google.code.gson>2.8.6</version.com.google.code.gson>
<version.com.fasterxml.jackson.core.jackson-databind>2.9.9.1</version.com.fasterxml.jackson.core.jackson-databind>
<version.org.glassfish.javax.json>1.1.4</version.org.glassfish.javax.json>
<version.org.glassfish.jakarta.json>2.0.1</version.org.glassfish.jakarta.json>
<version.org.awaitility>3.1.6</version.org.awaitility>
<version.org.jboss.shrinkwrap.resolver>3.1.4</version.org.jboss.shrinkwrap.resolver>
Expand Down Expand Up @@ -260,19 +262,19 @@
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<version>2.3.0.Alpha2</version>
<version>${version.io.undertow.undertow-core}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.threads</groupId>
<artifactId>jboss-threads</artifactId>
<version>2.4.0.Final</version>
<version>${version.org.jboss.threads.jboss-threads}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile.jwt</groupId>
<artifactId>microprofile-jwt-auth-api</artifactId>
<version>2.0</version>
<version>${version.org.eclipse.microprofile.jwt.microprofile-jwt-auth-api}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down

0 comments on commit 2e54718

Please sign in to comment.