Compare commits

...
94 Commits
Author SHA1 Message Date
keycloak-bot d3e66fbbf5 Set version to 2.2.0.Test1 2016-08-26 07:27:09 +00:00
Marek Posolda d138b19adb Merge pull request #3142 from vmuzikar/KEYCLOAK-3429
KEYCLOAK-3429 Fix behaviour of redirect_uri parameter with query components
2016-08-24 09:53:29 +02:00
Marek Posolda 3be47dee37 Merge pull request #3162 from mposolda/master
KEYCLOAK-3460 Support for ClientUpdatedEvent
2016-08-23 16:35:14 +02:00
mposolda 494d9973a6 KEYCLOAK-3460 Support for ClientUpdatedEvent 2016-08-23 14:57:31 +02:00
Stian Thorgersen e28a3750cd Merge pull request #3149 from vmuzikar/KEYCLOAK-3437
KEYCLOAK-3437 Add User Federation Console UI test
2016-08-23 12:57:02 +02:00
Stian Thorgersen 014c8e068f Merge pull request #3156 from vmuzikar/KEYCLOAK-3448
KEYCLOAK-3448 Stabilize Internationalization UI Test
2016-08-23 12:55:53 +02:00
Stian Thorgersen 3890867383 Merge pull request #3133 from fkiss/master-email-ibmjdk
KEYCLOAK-3351 TrustStoreEmailTest fix for ibmjdk
2016-08-23 12:54:12 +02:00
Stian Thorgersen d499b8a489 Merge pull request #3159 from stianst/master
KEYCLOAK-3447 Manual upgrade of database schema
2016-08-23 12:38:28 +02:00
Stian Thorgersen c522a20ab9 KEYCLOAK-3447 Manual upgrade of database schema 2016-08-22 10:22:08 +02:00
Vaclav Muzikar 365a1b66c8 KEYCLOAK-3448 Stabilize Internationalization UI Test 2016-08-19 11:40:01 +02:00
Pedro Igor fa1fb3a3a9 Merge pull request #3152 from pedroigor/KEYCLOAK-3377
[KEYCLOAK-3377] - Add pagination to authorization UI
2016-08-18 19:43:34 -03:00
Bill Burke 6592014707 Update users.js 2016-08-18 13:13:08 -04:00
Pedro Igor 4cd0a8e894 [KEYCLOAK-3377] - Add pagination to authorization UI 2016-08-18 13:29:54 -03:00
Stian Thorgersen 7d444c8b13 Merge pull request #3147 from stianst/master
Tweak Travis
2016-08-17 08:08:13 +02:00
Vaclav Muzikar be83e2fb6b KEYCLOAK-3437 Add User Federation Console UI test 2016-08-16 15:47:02 +02:00
Stian Thorgersen ab2368be34 Tweak Travis 2016-08-16 07:49:17 +02:00
Pedro Igor ba076ad159 Merge pull request #3144 from pedroigor/KEYCLOAK-3144
[KEYCLOAK-3144] - Add authorization settings when exporting/importing a realm
2016-08-15 11:49:49 -03:00
Pedro Igor a8d2b810cf [KEYCLOAK-3144] - Add authorization settings when exporting/importing a realm. 2016-08-15 10:35:28 -03:00
Pedro Igor fd983690e2 Merge pull request #3140 from pedroigor/KEYCLOAK-3390
[KEYCLOAK-3390] - Updating authorization objects doesn't invalidate cache in cluster
2016-08-12 12:45:20 -03:00
Marek Posolda 006a0f856e Merge pull request #3143 from mposolda/oidc-dynamic2
KEYCLOAK-3424 Support for save JWKS in OIDC ClientRegistration endpoint
2016-08-12 17:33:07 +02:00
Pedro Igor bfe10e34e7 [KEYCLOAK-3390] - Updating authorization objects doesn't invalidate cache in cluster 2016-08-12 11:15:13 -03:00
mposolda 2cba13db9c KEYCLOAK-3424 Possibility to import JWK key through admin console 2016-08-12 15:51:14 +02:00
mposolda 3eb9134e02 KEYCLOAK-3424 Support for save JWKS in OIDC ClientRegistration endpoint 2016-08-12 15:51:14 +02:00
Vaclav Muzikar b7f2e0b5ff KEYCLOAK-3429 Fix behaviour of redirect_uri parameter with query components 2016-08-12 14:02:17 +02:00
Pedro Igor 27187c11f1 Merge pull request #3138 from pedroigor/KEYCLOAK-3428
[KEYCLOAK-3428] - Removing scope policies in case the resource does not match
2016-08-11 14:59:20 -03:00
Pedro Igor 0030df060b [KEYCLOAK-3428] - Removing scope policies in case the resource does not match 2016-08-11 14:58:14 -03:00
Marek Posolda f6f587e472 Merge pull request #3137 from thomasdarimont/issue/KEYCLOAK-3412-remove-unused-adminEventBuilder-error-method
KEYCLOAK-3412 - Remove erroneous AdminEventBuilder.error method
2016-08-11 17:41:04 +02:00
Marek Posolda 841c6b619a Merge pull request #3136 from mposolda/oidc-dynamic2
OIDC dynamic client registrations from conformance testsuite
2016-08-11 17:16:11 +02:00
Thomas Darimont e0d70a35d6 KEYCLOAK-3412 - Remove erroneous AdminEventBuilder.error method
Wasn't used within the Keycloak codebase and wouldn't have worked either
since the OperationType lookup would always fail since there are no
"_ERROR" operation types.

Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
2016-08-11 16:10:49 +02:00
mposolda 0520d465c1 KEYCLOAK-3414 Support for client registration from trusted hosts 2016-08-11 15:55:32 +02:00
mposolda a8fb988e31 KEYCLOAK-3406 OIDC dynamic client registrations specs fixes 2016-08-11 15:54:51 +02:00
Marek Posolda c34d175572 Merge pull request #3135 from mposolda/master
Fix ExportImportTest
2016-08-11 15:53:16 +02:00
mposolda 9c7442c75b Fix ExportImportTest 2016-08-11 15:51:56 +02:00
fkiss de888fc8a1 KEYCLOAK-3351 TrustStoreEmailTest fix for ibmjdk 2016-08-11 10:52:29 +02:00
Marek Posolda 2df7d6252e Merge pull request #3128 from mposolda/master
Set version to 2.2.0-SNAPSHOT
2016-08-10 09:02:13 +02:00
mposolda d52e043322 Set version to 2.2.0-SNAPSHOT 2016-08-10 08:57:18 +02:00
Marek Posolda 6c8d55d534 Merge pull request #3125 from thomasdarimont/issue/KEYCLOAK-3391-hide-service-account-roles-if-service-accounts-disabled
KEYCLOAK-3391 Better control over service account roles tab visibility
2016-08-10 08:16:27 +02:00
Marek Posolda 26bc07b2c4 Merge pull request #3126 from pedroigor/KEYCLOAK-3398
[KEYCLOAK-3398] - Review input fields on AuthZ UI to fetch data on demand
2016-08-10 06:50:51 +02:00
Bill Burke 7f6fc170dc Merge pull request #3119 from fkiss/master-exportimport
KEYCLOAK-3211 - ExportImportTest fix for Wildfly
2016-08-09 20:59:04 -04:00
Bill Burke 741bbf471f Merge pull request #3123 from patriot1burke/master
components import/export
2016-08-09 20:58:20 -04:00
Pedro Igor 70eb27ec83 [KEYCLOAK-3398] - Review input fields on AuthZ UI to fetch data on demand 2016-08-09 21:56:29 -03:00
Thomas Darimont 96b729886f KEYCLOAK-3391 Better control of service account roles tab visibility
Previously the service account roles remain visible when changing
the client type from confidential to public or bearer only.

We now only show the service account roles tab iif:
- service accounts are enabled
- client access type is set to confidential
2016-08-10 00:44:14 +02:00
Bill Burke 530870f05e realm components import/export 2016-08-09 15:06:29 -04:00
Bill Burke 1633f062d5 Merge remote-tracking branch 'upstream/master' 2016-08-09 12:25:13 -04:00
Bill Burke ff703f935f component export/import 2016-08-09 12:25:04 -04:00
fkiss 4974079794 KEYCLOAK-3211 - ExportImportTest fix for Wildfly 2016-08-09 15:20:40 +02:00
Bill Burke d94515cdae Merge pull request #3117 from patriot1burke/master
deployer, jta lookup, merge user fed/storage
2016-08-08 17:46:35 -04:00
Bill Burke f838c697d1 Merge remote-tracking branch 'upstream/master' 2016-08-08 16:04:16 -04:00
Bill Burke d14de43ac7 merge User Federation/Storage menu 2016-08-08 16:02:06 -04:00
Marek Posolda e198e7e0b9 Merge pull request #3116 from mposolda/master
KEYCLOAK-3400 OIDC request with missing response_type should respond …
2016-08-08 21:50:08 +02:00
Bill Burke 83306963e8 jta transaction abstraction 2016-08-08 12:32:36 -04:00
mposolda 65e2f127c9 KEYCLOAK-3400 OIDC request with missing response_type should respond with error 2016-08-08 16:11:50 +02:00
Marek Posolda 64c2077c0b Merge pull request #3115 from mposolda/master
KEYCLOAK-2169 KEYCLOAK-3286 Support for at_hash and c_hash
2016-08-08 12:36:33 +02:00
mposolda 9be6777685 KEYCLOAK-2169 KEYCLOAK-3286 Support for at_hash and c_hash 2016-08-08 10:57:44 +02:00
Bill Burke f14f303dfe Merge remote-tracking branch 'upstream/master' 2016-08-07 11:50:44 -04:00
Bill Burke 33d7d89ad9 provider hot deployment 2016-08-07 11:41:52 -04:00
Marek Posolda 65c49c39f4 Merge pull request #3114 from mposolda/master
KEYCLOAK-3321 OIDC requests without 'nonce' claim should be rejected …
2016-08-05 16:45:56 +02:00
Marek Posolda 6c0f685c39 Merge pull request #2948 from thomasdarimont/issue/KEYCLOAK-3142-Add-ResourceType-to-AdminEvents
KEYCLOAK-3142 - Capture ResourceType that triggers an AdminEvent
2016-08-05 15:07:56 +02:00
mposolda e0a59baaf2 KEYCLOAK-3321 OIDC requests without 'nonce' claim should be rejected unless using the code flow. Started responseType tests 2016-08-05 15:05:26 +02:00
Marek Posolda 6a797a61a9 Merge pull request #3113 from vmuzikar/KEYCLOAK-3367
KEYCLOAK-3367 Improve stability of Adapters Tests
2016-08-05 09:44:52 +02:00
Thomas Darimont e49afb2d83 KEYCLOAK-3142 - Revised according to codereview
Liquibase Moved schema evolution configuration from jpa-changelog-2.1.0
to jpa-changelog-2.2.0.
Corrected wrong ResourceType references in tests.
Adapted AdminEvents copy-routines to be aware of resourceType attribute.
Added ResourceType enum to exposed ENUMS of ServerInfoAdminResource.

Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
2016-08-05 00:01:03 +02:00
Vaclav Muzikar 0d225f44de KEYCLOAK-3367 Improve stability of Adapters Tests 2016-08-04 14:43:49 +02:00
Thomas Darimont 586f6eeece KEYCLOAK-3142 - Capture ResourceType that triggers an AdminEvent
Introduced new ResourceType enum for AdminEvents which lists
the current supported ResourceTypes for which AdminEvents
can be fired.

Previously it was difficult for custom EventListeners to figure
out which ResourceType triggered an AdminEvent in order
to handle it appropriately, effectively forcing users to parse
the representation.
Having dedicated resource types as a marker on an AdminEvent helps
to ease custom EventListener code.

We now also allow filtering of admin events by ResourceType in the
admin-console.

Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
2016-08-04 11:30:02 +02:00
Bill Burke f91907c8f9 Merge pull request #3107 from thomasdarimont/issue/KEYCLOAK-3392-honor-web-context-for-odic-endpoint-link
KEYCLOAK-3392 Use authUrl prefix for OIDC Configuration link
2016-08-03 21:34:00 -04:00
Bill Burke 9e0667bc11 Merge pull request #3080 from trajakovic/issue/editAccountHtmlTtile
Fixing typo in account resource(s) bundle
2016-08-03 21:31:44 -04:00
Bill Burke a3ffb32532 Merge pull request #3060 from fkiss/master-ldaps
KEYCLOAK-2281 added ldap tests over ssl
2016-08-03 21:31:12 -04:00
Bill Burke 1e7cf9fb3f Merge pull request #3088 from thomasdarimont/issue/KEYCLOAK-3380-allow-ignore-pattern-in-filter
KEYCLOAK-3380 Allow to configure paths to skip in KeycloakOIDCFilter
2016-08-03 21:30:20 -04:00
Bill Burke f75c0d3e61 Merge pull request #3111 from patriot1burke/master
user storage provider jpa example
2016-08-03 21:27:30 -04:00
Bill Burke 534ee2e50c Merge remote-tracking branch 'upstream/master' 2016-08-03 19:16:45 -04:00
Bill Burke 70722d0d3d user storage provider jpa example 2016-08-03 19:16:11 -04:00
Marek Posolda 0292acd5e2 Merge pull request #3110 from mposolda/master
Master: Oracle & EAP7 overlay
2016-08-03 14:24:50 +02:00
mposolda bf3541414c KEYCLOAK-3393 Fix Keycloak on EAP7 overlay 2016-08-03 13:01:44 +02:00
mposolda 9242e972c0 Fix Oracle DB 2016-08-03 13:01:30 +02:00
Thomas Darimont 57a96fa6aa KEYCLOAK-3392 Use authUrl prefix for OIDC Configuration link
We now use the {{authUrl}} prefix for the OIDC configuration link
in the admin-console to honor different web-context paths.

Previously when a different web-context than /auth was configured
the generated link pointed to the wrong location.

Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
2016-08-02 15:52:22 +02:00
Bill Burke 7f08717dfb Merge pull request #3105 from patriot1burke/master
component model
2016-08-02 09:28:55 -04:00
Bill Burke 9365a40426 Merge pull request #3104 from zschwarz/exclude-test
KEYCLOAK-3389 Added general exclude for tests
2016-08-02 07:19:42 -04:00
Bill Burke ae58d64741 Merge pull request #3092 from vmuzikar/KEYCLOAK-3381
KEYCLOAK-3381 Fix and stabilize some Console UI tests
2016-08-02 07:19:28 -04:00
Bill Burke 4a8b4bcdec Merge pull request #3087 from zschwarz/password-policy
KEYCLOAK-3379 Password policy tests refactoring
2016-08-02 07:15:58 -04:00
Bill Burke e3aec098a2 Merge pull request #3064 from cainj13/oneSamlAttributeStatement
SamlProtocol should only drop attributes into a single attributeStatement
2016-08-02 07:14:08 -04:00
Bill Burke 3b9b673e5e turn off menu item 2016-08-02 06:57:48 -04:00
Bill Burke 17e75950fe more fixes 2016-08-02 06:56:22 -04:00
Bill Burke 1c75b03e59 props 2016-08-02 06:50:13 -04:00
Bill Burke d64e7394a7 fix 2016-08-01 14:55:06 -04:00
Bill Burke a8a77add39 fix 2016-08-01 12:07:02 -04:00
Bill Burke 5facec73e4 Merge remote-tracking branch 'upstream/master' 2016-08-01 11:19:09 -04:00
Bill Burke 91a267a0d8 component model 2016-08-01 11:18:58 -04:00
Vaclav Muzikar 0147fbe489 KEYCLOAK-3381 Fix and stabilize some Console UI tests 2016-08-01 15:10:18 +02:00
zschwarz e04ad9d7b6 Added general exclude for tests 2016-08-01 13:17:24 +02:00
Thomas Darimont 79c7203fe8 KEYCLOAK-3380 Allow to configure paths to skip in KeycloakOIDCFilter
We now allow configuration of path patterns which should not
be handled by the `KeycloakOIDCFilter` than can be specified via
the new init-parameter `keycloak.config.skipPattern` of
the `KeycloakOIDCFilter`.
Patterns are matched against the requestURI without the context-path.
A request for `/myapp/index.html` would be matched with `/index.html`
against the skip pattern.
This allows for for more flexible path handling when using the
`KeycloakOIDCFilter` in combination with existing applications.

Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
2016-08-01 11:43:49 +02:00
zschwarz 5011960cac Password policy tests refactoring 2016-07-29 10:24:13 +02:00
Tomislav Rajaković 2b3859f462 Fixing typo in account resource bundle: editAccountHtmlTtile -> editAccountHtmlTitle 2016-07-28 16:34:52 +02:00
Josh Cain 535a0763fc put imports back, new IDE snuck a * in there. 2016-07-22 14:57:07 -05:00
Josh Cain 283581f920 SamlProtocol should only drop attributes into a single attributeStatement element 2016-07-22 14:49:48 -05:00
fkiss e2ad7608c8 KEYCLOAK-2281 added ldap tests over ssl 2016-07-22 16:29:58 +02:00
620 changed files with 9935 additions and 2518 deletions

No files matched your search

+8 -1
View File
@@ -1,5 +1,12 @@
language: java
cache:
directories:
- $HOME/.m2
before_cache:
- rm -rf $HOME/.m2/repository/org/keycloak
env:
global:
- MAVEN_SKIP_RC=true
@@ -12,7 +19,7 @@ before_script:
- export MAVEN_SKIP_RC=true
install:
- ( mvn install -Pdistribution -DskipTests=true -B -V -q ) & ( MYPID=$!; while [ $(ps -ef | grep $MYPID | grep -v grep | wc -l) -gt 0 ]; do sleep 10; date; done; )
- travis_wait 30 mvn install -Pdistribution -DskipTests=true -B -V -q
script:
- mvn test -B
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -43,6 +43,7 @@ import org.keycloak.common.VerificationException;
import org.keycloak.adapters.authentication.ClientCredentialsProviderUtils;
import org.keycloak.constants.ServiceUrlConstants;
import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.representations.idm.OAuth2ErrorRepresentation;
import org.keycloak.util.JsonSerialization;
import org.keycloak.common.util.KeycloakUriBuilder;
@@ -102,9 +103,9 @@ public class DirectAccessGrantsLoginModule extends AbstractKeycloakLoginModule {
StringBuilder errorBuilder = new StringBuilder("Login failed. Invalid status: " + status);
if (entity != null) {
InputStream is = entity.getContent();
Map<String, String> errors = (Map<String, String>) JsonSerialization.readValue(is, Map.class);
errorBuilder.append(", OAuth2 error. Error: " + errors.get(OAuth2Constants.ERROR))
.append(", Error description: " + errors.get(OAuth2Constants.ERROR_DESCRIPTION));
OAuth2ErrorRepresentation errorRep = JsonSerialization.readValue(is, OAuth2ErrorRepresentation.class);
errorBuilder.append(", OAuth2 error. Error: " + errorRep.getError())
.append(", Error description: " + errorRep.getErrorDescription());
}
String error = errorBuilder.toString();
log.warn(error);
@@ -161,9 +162,9 @@ public class DirectAccessGrantsLoginModule extends AbstractKeycloakLoginModule {
if (entity != null) {
InputStream is = entity.getContent();
if (status == 400) {
Map<String, String> errors = (Map<String, String>) JsonSerialization.readValue(is, Map.class);
errorBuilder.append(", OAuth2 error. Error: " + errors.get(OAuth2Constants.ERROR))
.append(", Error description: " + errors.get(OAuth2Constants.ERROR_DESCRIPTION));
OAuth2ErrorRepresentation errorRep = JsonSerialization.readValue(is, OAuth2ErrorRepresentation.class);
errorBuilder.append(", OAuth2 error. Error: " + errorRep.getError())
.append(", Error description: " + errorRep.getErrorDescription());
} else {
if (is != null) is.close();
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-as7-integration-pom</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak AS7 / JBoss EAP 6 Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Jetty Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Keycloak OIDC Client Adapter Modules</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -47,6 +47,7 @@ import java.io.InputStream;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@@ -56,10 +57,18 @@ public class KeycloakOIDCFilter implements Filter {
protected AdapterDeploymentContext deploymentContext;
protected SessionIdMapper idMapper = new InMemorySessionIdMapper();
protected NodesRegistrationManagement nodesRegistrationManagement;
protected Pattern skipPattern;
private final static Logger log = Logger.getLogger(""+KeycloakOIDCFilter.class);
@Override
public void init(final FilterConfig filterConfig) throws ServletException {
String skipPatternDefinition = filterConfig.getInitParameter("keycloak.config.skipPattern");
if (skipPatternDefinition != null) {
skipPattern = Pattern.compile(skipPatternDefinition, Pattern.DOTALL);
}
String configResolverClass = filterConfig.getInitParameter("keycloak.config.resolver");
if (configResolverClass != null) {
try {
@@ -85,13 +94,7 @@ public class KeycloakOIDCFilter implements Filter {
if (pathParam != null) path = pathParam;
is = filterConfig.getServletContext().getResourceAsStream(path);
}
KeycloakDeployment kd;
if (is == null) {
log.fine("No adapter configuration. Keycloak is unconfigured and will deny all requests.");
kd = new KeycloakDeployment();
} else {
kd = KeycloakDeploymentBuilder.build(is);
}
KeycloakDeployment kd = createKeycloakDeploymentFrom(is);
deploymentContext = new AdapterDeploymentContext(kd);
log.fine("Keycloak is using a per-deployment configuration.");
}
@@ -99,13 +102,30 @@ public class KeycloakOIDCFilter implements Filter {
nodesRegistrationManagement = new NodesRegistrationManagement();
}
private KeycloakDeployment createKeycloakDeploymentFrom(InputStream is) {
if (is == null) {
log.fine("No adapter configuration. Keycloak is unconfigured and will deny all requests.");
return new KeycloakDeployment();
}
return KeycloakDeploymentBuilder.build(is);
}
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
log.fine("Keycloak OIDC Filter");
//System.err.println("Keycloak OIDC Filter: " + ((HttpServletRequest)req).getRequestURL().toString());
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
if (shouldSkip(request)) {
chain.doFilter(req, res);
return;
}
OIDCServletHttpFacade facade = new OIDCServletHttpFacade(request, response);
KeycloakDeployment deployment = deploymentContext.resolveDeployment(facade);
if (deployment == null || !deployment.isConfigured()) {
@@ -171,6 +191,26 @@ public class KeycloakOIDCFilter implements Filter {
}
/**
* Decides whether this {@link Filter} should skip the given {@link HttpServletRequest} based on the configured {@link KeycloakOIDCFilter#skipPattern}.
* Patterns are matched against the {@link HttpServletRequest#getRequestURI() requestURI} of a request without the context-path.
* A request for {@code /myapp/index.html} would be tested with {@code /index.html} against the skip pattern.
* Skipped requests will not be processed further by {@link KeycloakOIDCFilter} and immediately delegated to the {@link FilterChain}.
*
* @param request the request to check
* @return {@code true} if the request should not be handled,
* {@code false} otherwise.
*/
private boolean shouldSkip(HttpServletRequest request) {
if (skipPattern == null) {
return false;
}
String requestPath = request.getRequestURI().substring(request.getContextPath().length());
return skipPattern.matcher(requestPath).matches();
}
@Override
public void destroy() {
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Tomcat Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak WildFly Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Keycloak Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-saml-eap-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak SAML EAP Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-saml-eap-integration-pom</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak SAML Jetty Integration</name>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Keycloak SAML Client Adapter Modules</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak SAML Tomcat Integration</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-saml-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-saml-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-saml-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-saml-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak SAML Wildfly Integration</name>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Keycloak Client Adapter SPI Modules</name>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -25,7 +25,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-provider-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-provider-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -42,6 +42,10 @@ public interface OAuth2Constants {
String RESPONSE_TYPE = "response_type";
String ACCESS_TOKEN = "access_token";
String ID_TOKEN = "id_token";
String REFRESH_TOKEN = "refresh_token";
String AUTHORIZATION_CODE = "authorization_code";
@@ -37,12 +37,18 @@ public class OAuthErrorException extends Exception {
public static final String REQUEST_NOT_SUPPORTED = "request_not_supported";
public static final String REQUEST_URI_NOT_SUPPORTED = "request_uri_not_supported";
// OAuth2 Bearer Token Usage
public static final String INVALID_TOKEN = "invalid_token";
public static final String INSUFFICIENT_SCOPE = "insufficient_scope";
// OIDC Dynamic Client Registration
public static final String INVALID_REDIRECT_URI = "invalid_redirect_uri";
public static final String INVALID_CLIENT_METADATA = "invalid_client_metadata";
// Others
public static final String INVALID_CLIENT = "invalid_client";
public static final String INVALID_GRANT = "invalid_grant";
public static final String UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type";
public static final String INVALID_TOKEN = "invalid_token";
public static final String INSUFFICIENT_SCOPE = "insufficient_scope";
public OAuthErrorException(String error, String description, String message, Throwable cause) {
super(message, cause);
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.protocol.oidc.representations;
package org.keycloak.jose.jwk;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.keycloak.jose.jwk.JWK;
@@ -37,8 +37,20 @@ public class JWK {
public static final String PUBLIC_KEY_USE = "use";
public static final String SIG_USE = "sig";
public static final String ENCRYPTION_USE = "enc";
public enum Use {
SIG("sig"),
ENCRYPTION("enc");
private String str;
Use(String str) {
this.str = str;
}
public String asString() {
return str;
}
}
@JsonProperty(KEY_ID)
private String keyId;
@@ -67,7 +67,7 @@ public class JWKParser {
public PublicKey toPublicKey() {
String algorithm = jwk.getKeyType();
if (RSAPublicJWK.RSA.equals(algorithm)) {
if (isAlgorithmSupported(algorithm)) {
BigInteger modulus = new BigInteger(1, Base64Url.decode(jwk.getOtherClaims().get(RSAPublicJWK.MODULUS).toString()));
BigInteger publicExponent = new BigInteger(1, Base64Url.decode(jwk.getOtherClaims().get(RSAPublicJWK.PUBLIC_EXPONENT).toString()));
@@ -81,4 +81,8 @@ public class JWKParser {
}
}
public boolean isAlgorithmSupported(String algorithm) {
return RSAPublicJWK.RSA.equals(algorithm);
}
}
@@ -108,43 +108,29 @@ public class JWSBuilder {
return encodeAll(buffer, null);
}
public String rsa256(PrivateKey privateKey) {
public String sign(Algorithm algorithm, PrivateKey privateKey) {
StringBuffer buffer = new StringBuffer();
byte[] data = marshalContent();
encode(Algorithm.RS256, data, buffer);
encode(algorithm, data, buffer);
byte[] signature = null;
try {
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS256, privateKey);
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), algorithm, privateKey);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return encodeAll(buffer, signature);
}
public String rsa256(PrivateKey privateKey) {
return sign(Algorithm.RS256, privateKey);
}
public String rsa384(PrivateKey privateKey) {
StringBuffer buffer = new StringBuffer();
byte[] data = marshalContent();
encode(Algorithm.RS384, data, buffer);
byte[] signature = null;
try {
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS384, privateKey);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return encodeAll(buffer, signature);
return sign(Algorithm.RS384, privateKey);
}
public String rsa512(PrivateKey privateKey) {
StringBuffer buffer = new StringBuffer();
byte[] data = marshalContent();
encode(Algorithm.RS512, data, buffer);
byte[] signature = null;
try {
signature = RSAProvider.sign(buffer.toString().getBytes("UTF-8"), Algorithm.RS512, privateKey);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return encodeAll(buffer, signature);
return sign(Algorithm.RS512, privateKey);
}
@@ -0,0 +1,66 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.jose.jws.crypto;
import java.security.MessageDigest;
import java.util.Arrays;
import org.keycloak.common.util.Base64Url;
import org.keycloak.jose.jws.Algorithm;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class HashProvider {
// See "at_hash" and "c_hash" in OIDC specification
public static String oidcHash(Algorithm jwtAlgorithm, String input) {
byte[] digest = digest(jwtAlgorithm, input);
int hashLength = digest.length / 2;
byte[] hashInput = Arrays.copyOf(digest, hashLength);
return Base64Url.encode(hashInput);
}
private static byte[] digest(Algorithm algorithm, String input) {
String digestAlg = getJavaDigestAlgorithm(algorithm);
try {
MessageDigest md = MessageDigest.getInstance(digestAlg);
md.update(input.getBytes("UTF-8"));
return md.digest();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private static String getJavaDigestAlgorithm(Algorithm alg) {
switch (alg) {
case RS256:
return "SHA-256";
case RS384:
return "SHA-384";
case RS512:
return "SHA-512";
default:
throw new IllegalArgumentException("Not an RSA Algorithm");
}
}
}
@@ -27,6 +27,8 @@ public class IDToken extends JsonWebToken {
public static final String NONCE = "nonce";
public static final String AUTH_TIME = "auth_time";
public static final String SESSION_STATE = "session_state";
public static final String AT_HASH = "at_hash";
public static final String C_HASH = "c_hash";
public static final String NAME = "name";
public static final String GIVEN_NAME = "given_name";
public static final String FAMILY_NAME = "family_name";
@@ -60,6 +62,12 @@ public class IDToken extends JsonWebToken {
@JsonProperty(SESSION_STATE)
protected String sessionState;
@JsonProperty(AT_HASH)
protected String accessTokenHash;
@JsonProperty(C_HASH)
protected String codeHash;
@JsonProperty(NAME)
protected String name;
@@ -147,6 +155,22 @@ public class IDToken extends JsonWebToken {
this.sessionState = sessionState;
}
public String getAccessTokenHash() {
return accessTokenHash;
}
public void setAccessTokenHash(String accessTokenHash) {
this.accessTokenHash = accessTokenHash;
}
public String getCodeHash() {
return codeHash;
}
public void setCodeHash(String codeHash) {
this.codeHash = codeHash;
}
public String getName() {
return this.name;
}
@@ -18,7 +18,6 @@
package org.keycloak.representations.idm;
/**
*
* @author Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
*/
public class AdminEventRepresentation {
@@ -27,6 +26,7 @@ public class AdminEventRepresentation {
private String realmId;
private AuthDetailsRepresentation authDetails;
private String operationType;
private String resourceType;
private String resourcePath;
private String representation;
private String error;
@@ -63,6 +63,14 @@ public class AdminEventRepresentation {
this.operationType = operationType;
}
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public String getResourcePath() {
return resourcePath;
}
@@ -86,5 +94,4 @@ public class AdminEventRepresentation {
public void setError(String error) {
this.error = error;
}
}
@@ -25,6 +25,7 @@ package org.keycloak.representations.idm;
public class CertificateRepresentation {
protected String privateKey;
protected String publicKey;
protected String certificate;
public String getPrivateKey() {
@@ -35,6 +36,14 @@ public class CertificateRepresentation {
this.privateKey = privateKey;
}
public String getPublicKey() {
return publicKey;
}
public void setPublicKey(String publicKey) {
this.publicKey = publicKey;
}
public String getCertificate() {
return certificate;
}
@@ -0,0 +1,60 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.idm;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class ClientRegistrationTrustedHostRepresentation {
String hostName;
Integer count;
Integer remainingCount;
public static ClientRegistrationTrustedHostRepresentation create(String hostName, int count, int remainingCount) {
ClientRegistrationTrustedHostRepresentation rep = new ClientRegistrationTrustedHostRepresentation();
rep.setHostName(hostName);
rep.setCount(count);
rep.setRemainingCount(remainingCount);
return rep;
}
public String getHostName() {
return hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Integer getRemainingCount() {
return remainingCount;
}
public void setRemainingCount(Integer remainingCount) {
this.remainingCount = remainingCount;
}
}
@@ -17,6 +17,8 @@
package org.keycloak.representations.idm;
import org.keycloak.representations.idm.authorization.ResourceServerRepresentation;
import java.util.List;
import java.util.Map;
@@ -62,6 +64,7 @@ public class ClientRepresentation {
private Boolean useTemplateConfig;
private Boolean useTemplateScope;
private Boolean useTemplateMappers;
private ResourceServerRepresentation authorizationSettings;
public String getId() {
@@ -241,6 +244,9 @@ public class ClientRepresentation {
}
public Boolean getAuthorizationServicesEnabled() {
if (authorizationSettings != null) {
return true;
}
return authorizationServicesEnabled;
}
@@ -353,4 +359,11 @@ public class ClientRepresentation {
this.useTemplateMappers = useTemplateMappers;
}
public ResourceServerRepresentation getAuthorizationSettings() {
return authorizationSettings;
}
public void setAuthorizationSettings(ResourceServerRepresentation authorizationSettings) {
this.authorizationSettings = authorizationSettings;
}
}
@@ -0,0 +1,72 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.idm;
import org.keycloak.common.util.MultivaluedHashMap;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class ComponentExportRepresentation {
private String id;
private String name;
private String providerId;
private MultivaluedHashMap<String, ComponentExportRepresentation> subComponents = new MultivaluedHashMap<>();
private MultivaluedHashMap<String, String> config = new MultivaluedHashMap<>();
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getProviderId() {
return providerId;
}
public void setProviderId(String providerId) {
this.providerId = providerId;
}
public MultivaluedHashMap<String, String> getConfig() {
return config;
}
public void setConfig(MultivaluedHashMap<String, String> config) {
this.config = config;
}
public MultivaluedHashMap<String, ComponentExportRepresentation> getSubComponents() {
return subComponents;
}
public void setSubComponents(MultivaluedHashMap<String, ComponentExportRepresentation> subComponents) {
this.subComponents = subComponents;
}
}
@@ -0,0 +1,56 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.idm;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.keycloak.OAuth2Constants;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class OAuth2ErrorRepresentation {
private String error;
private String errorDescription;
public OAuth2ErrorRepresentation() {
}
public OAuth2ErrorRepresentation(String error, String errorDescription) {
this.error = error;
this.errorDescription = errorDescription;
}
@JsonProperty(OAuth2Constants.ERROR)
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
@JsonProperty(OAuth2Constants.ERROR_DESCRIPTION)
public String getErrorDescription() {
return errorDescription;
}
public void setErrorDescription(String errorDescription) {
this.errorDescription = errorDescription;
}
}
@@ -18,6 +18,7 @@
package org.keycloak.representations.idm;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.keycloak.common.util.MultivaluedHashMap;
import java.util.*;
@@ -109,6 +110,7 @@ public class RealmRepresentation {
private List<IdentityProviderRepresentation> identityProviders;
private List<IdentityProviderMapperRepresentation> identityProviderMappers;
private List<ProtocolMapperRepresentation> protocolMappers;
private MultivaluedHashMap<String, ComponentExportRepresentation> components;
protected Boolean internationalizationEnabled;
protected Set<String> supportedLocales;
protected String defaultLocale;
@@ -849,6 +851,14 @@ public class RealmRepresentation {
this.clientTemplates = clientTemplates;
}
public MultivaluedHashMap<String, ComponentExportRepresentation> getComponents() {
return components;
}
public void setComponents(MultivaluedHashMap<String, ComponentExportRepresentation> components) {
this.components = components;
}
@JsonIgnore
public boolean isIdentityFederationEnabled() {
return identityProviders != null && !identityProviders.isEmpty();
@@ -18,6 +18,7 @@
package org.keycloak.representations.oidc;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import org.keycloak.jose.jwk.JSONWebKeySet;
import java.util.List;
@@ -27,14 +28,20 @@ import java.util.List;
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
public class OIDCClientRepresentation {
// OIDC Dynamic client registration properties
private List<String> redirect_uris;
private String token_endpoint_auth_method;
private String token_endpoint_auth_signing_alg;
private List<String> grant_types;
private List<String> response_types;
private String application_type;
private String client_id;
private String client_secret;
@@ -47,7 +54,7 @@ public class OIDCClientRepresentation {
private String scope;
private String contacts;
private List<String> contacts;
private String tos_uri;
@@ -55,12 +62,49 @@ public class OIDCClientRepresentation {
private String jwks_uri;
private String jwks;
private JSONWebKeySet jwks;
private String sector_identifier_uri;
private String subject_type;
private String id_token_signed_response_alg;
private String id_token_encrypted_response_alg;
private String id_token_encrypted_response_enc;
private String userinfo_signed_response_alg;
private String userinfo_encrypted_response_alg;
private String userinfo_encrypted_response_enc;
private String request_object_signing_alg;
private String request_object_encryption_alg;
private String request_object_encryption_enc;
private Integer default_max_age;
private Boolean require_auth_time;
private List<String> default_acr_values;
private String initiate_login_uri;
private List<String> request_uris;
// OIDC Session Management
private List<String> post_logout_redirect_uris;
// Not sure from which specs this comes
private String software_id;
private String software_version;
// OIDC Dynamic Client Registration Response
private Integer client_id_issued_at;
private Integer client_secret_expires_at;
@@ -85,6 +129,14 @@ public class OIDCClientRepresentation {
this.token_endpoint_auth_method = token_endpoint_auth_method;
}
public String getTokenEndpointAuthSigningAlg() {
return token_endpoint_auth_signing_alg;
}
public void setTokenEndpointAuthSigningAlg(String token_endpoint_auth_signing_alg) {
this.token_endpoint_auth_signing_alg = token_endpoint_auth_signing_alg;
}
public List<String> getGrantTypes() {
return grant_types;
}
@@ -101,6 +153,14 @@ public class OIDCClientRepresentation {
this.response_types = responseTypes;
}
public String getApplicationType() {
return application_type;
}
public void setApplicationType(String applicationType) {
this.application_type = applicationType;
}
public String getClientId() {
return client_id;
}
@@ -149,11 +209,11 @@ public class OIDCClientRepresentation {
this.scope = scope;
}
public String getContacts() {
public List<String> getContacts() {
return contacts;
}
public void setContacts(String contacts) {
public void setContacts(List<String> contacts) {
this.contacts = contacts;
}
@@ -181,14 +241,150 @@ public class OIDCClientRepresentation {
this.jwks_uri = jwks_uri;
}
public String getJwks() {
public JSONWebKeySet getJwks() {
return jwks;
}
public void setJwks(String jwks) {
public void setJwks(JSONWebKeySet jwks) {
this.jwks = jwks;
}
public String getSectorIdentifierUri() {
return sector_identifier_uri;
}
public void setSectorIdentifierUri(String sectorIdentifierUri) {
this.sector_identifier_uri = sectorIdentifierUri;
}
public String getSubjectType() {
return subject_type;
}
public void setSubjectType(String subjectType) {
this.subject_type = subjectType;
}
public String getIdTokenSignedResponseAlg() {
return id_token_signed_response_alg;
}
public void setIdTokenSignedResponseAlg(String idTokenSignedResponseAlg) {
this.id_token_signed_response_alg = idTokenSignedResponseAlg;
}
public String getIdTokenEncryptedResponseAlg() {
return id_token_encrypted_response_alg;
}
public void setIdTokenEncryptedResponseAlg(String idTokenEncryptedResponseAlg) {
this.id_token_encrypted_response_alg = idTokenEncryptedResponseAlg;
}
public String getIdTokenEncryptedResponseEnc() {
return id_token_encrypted_response_enc;
}
public void setIdTokenEncryptedResponseEnc(String idTokenEncryptedResponseEnc) {
this.id_token_encrypted_response_enc = idTokenEncryptedResponseEnc;
}
public String getUserinfoSignedResponseAlg() {
return userinfo_signed_response_alg;
}
public void setUserinfoSignedResponseAlg(String userinfo_signed_response_alg) {
this.userinfo_signed_response_alg = userinfo_signed_response_alg;
}
public String getUserinfoEncryptedResponseAlg() {
return userinfo_encrypted_response_alg;
}
public void setUserinfoEncryptedResponseAlg(String userinfo_encrypted_response_alg) {
this.userinfo_encrypted_response_alg = userinfo_encrypted_response_alg;
}
public String getUserinfoEncryptedResponseEnc() {
return userinfo_encrypted_response_enc;
}
public void setUserinfoEncryptedResponseEnc(String userinfo_encrypted_response_enc) {
this.userinfo_encrypted_response_enc = userinfo_encrypted_response_enc;
}
public String getRequestObjectSigningAlg() {
return request_object_signing_alg;
}
public void setRequestObjectSigningAlg(String request_object_signing_alg) {
this.request_object_signing_alg = request_object_signing_alg;
}
public String getRequestObjectEncryptionAlg() {
return request_object_encryption_alg;
}
public void setRequestObjectEncryptionAlg(String request_object_encryption_alg) {
this.request_object_encryption_alg = request_object_encryption_alg;
}
public String getRequestObjectEncryptionEnc() {
return request_object_encryption_enc;
}
public void setRequestObjectEncryptionEnc(String request_object_encryption_enc) {
this.request_object_encryption_enc = request_object_encryption_enc;
}
public Integer getDefaultMaxAge() {
return default_max_age;
}
public void setDefaultMaxAge(Integer default_max_age) {
this.default_max_age = default_max_age;
}
public Boolean getRequireAuthTime() {
return require_auth_time;
}
public void setRequireAuthTime(Boolean require_auth_time) {
this.require_auth_time = require_auth_time;
}
public List<String> getDefaultAcrValues() {
return default_acr_values;
}
public void setDefaultAcrValues(List<String> default_acr_values) {
this.default_acr_values = default_acr_values;
}
public String getInitiateLoginUri() {
return initiate_login_uri;
}
public void setInitiateLoginUri(String initiate_login_uri) {
this.initiate_login_uri = initiate_login_uri;
}
public List<String> getRequestUris() {
return request_uris;
}
public void setRequestUris(List<String> requestUris) {
this.request_uris = requestUris;
}
public List<String> getPostLogoutRedirectUris() {
return post_logout_redirect_uris;
}
public void setPostLogoutRedirectUris(List<String> post_logout_redirect_uris) {
this.post_logout_redirect_uris = post_logout_redirect_uris;
}
public String getSoftwareId() {
return software_id;
}
@@ -0,0 +1,49 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak;
import java.security.Security;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.junit.Assert;
import org.junit.Test;
import org.keycloak.jose.jws.Algorithm;
import org.keycloak.jose.jws.crypto.HashProvider;
/**
* See "at_hash" in OIDC specification
*
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class AtHashTest {
static {
if (Security.getProvider("BC") == null) Security.addProvider(new BouncyCastleProvider());
}
@Test
public void testAtHash() throws Exception {
verifyHash("jHkWEdUXMU1BwAsC4vtUsZwnNvTIxEl0z9K3vx5KF0Y", "77QmUPtjPfzWtF2AnpK9RQ");
verifyHash("ya29.eQETFbFOkAs8nWHcmYXKwEi0Zz46NfsrUU_KuQLOLTwWS40y6Fb99aVzEXC0U14m61lcPMIr1hEIBA", "aUAkJG-u6x4RTWuILWy-CA");
}
private void verifyHash(String accessToken, String expectedAtHash) {
String atHash = HashProvider.oidcHash(Algorithm.RS256, accessToken);
Assert.assertEquals(expectedAtHash, atHash);
}
}
@@ -33,6 +33,7 @@ import org.junit.Test;
import org.keycloak.representations.IDToken;
import org.keycloak.representations.JsonWebToken;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.representations.oidc.OIDCClientRepresentation;
import org.keycloak.util.JsonSerialization;
/**
@@ -125,4 +126,23 @@ public class JsonParserTest {
System.out.println(sb.toString());
}
@Test
public void testReadOIDCClientRep() throws IOException {
String stringRep = "{\"subject_type\": \"public\", \"jwks_uri\": \"https://op.certification.openid.net:60720/export/jwk_60720.json\", \"contacts\": [\"roland.hedberg@umu.se\"], \"application_type\": \"web\", \"grant_types\": [\"authorization_code\"], \"post_logout_redirect_uris\": [\"https://op.certification.openid.net:60720/logout\"], \"redirect_uris\": [\"https://op.certification.openid.net:60720/authz_cb\"], \"response_types\": [\"code\"], \"require_auth_time\": true, \"default_max_age\": 3600}";
OIDCClientRepresentation clientRep = JsonSerialization.readValue(stringRep, OIDCClientRepresentation.class);
Assert.assertEquals("public", clientRep.getSubjectType());
Assert.assertTrue(clientRep.getRequireAuthTime());
Assert.assertEquals(3600, clientRep.getDefaultMaxAge().intValue());
Assert.assertEquals(1, clientRep.getRedirectUris().size());
Assert.assertEquals("https://op.certification.openid.net:60720/authz_cb", clientRep.getRedirectUris().get(0));
Assert.assertNull(clientRep.getJwks());
}
@Test
public void testReadOIDCClientRepWithJWKS() throws IOException {
String stringRep = "{\"token_endpoint_auth_method\": \"private_key_jwt\", \"subject_type\": \"public\", \"jwks_uri\": null, \"jwks\": {\"keys\": [{\"use\": \"enc\", \"e\": \"AQAB\", \"d\": \"lZQv0_81euRLeUYU84Aodh0ar7ymDlzWP5NMra4Jklkb-lTBWkI-u4RMsPqGYyW3KHRoL_pgzZXSzQx8RLQfER6timRWb--NxMMKllZubByU3RqH2ooNuocJurspYiXkznPW1Mg9DaNXL0C2hwWPQHTeUVISpjgi5TCOV1ccWVyksFruya_VNL1CIByB-L0GL1rqbKv32cDwi2A3_jJa61cpzfLSIBe-lvCO6tuiDsR4qgJnUwnndQFwEI_4mLmD3iNWXrc8N-poleV8mBfMqBB5fWwy_ZTFCpmQ5AywGmctaik_wNhMoWuA4tUfY6_1LdKld-5Cjq55eLtuJjtvuQ\", \"n\": \"tx3Hjdbc19lkTiohbJrNj4jf2_90MEE122CRrwtFu6saDywKcG7Bi7w2FMAK2oTkuWfqhWRb5BEGmnSXdiCEPO5d-ytqP3nwlZXHaCDYscpP8bB4YLhvCn7R8Efw6gwQle24QPRP3lYoFeuUbDUq7GKA5SfaZUvWoeWjqyLIaBspKQsC26_Umx1E4IXLrMSL6nkRnrYcVZBAXrYCeTP1XtsV38_lZVJfHSaJaUy4PKaj3yvgm93EV2CXybPti7CCMXZ34VqqWiF64pQjZsPu3ZTr7ha_TTQq499-zYRQNDvIVsBDLQQIgrbctuGqj6lrXb31Jj3JIEYqH_4h5X9d0Q\", \"q\": \"1q-r-bmMFbIzrLK2U3elksZq8CqUqZxlSfkGMZuVkxgYMS-e4FPzEp2iirG-eO11aa0cpMMoBdTnVdGJ_ZUR93w0lGf9XnQAJqxP7eOsrUoiW4VWlWH4WfOiLgpO-pFtyTz_JksYYaotc_Z3Zy-Szw6a39IDbuYGy1qL-15oQuc\", \"p\": \"2lrYPppRbcQWu4LtWN6tOVUrtCOPv1eLTKTc7q8vCMcem1Ox5QFB7KnUtNZ5Ni7wnZUeVDfimNebtjNsGvDSrpgIlo9dEnFBQsQIkzZ2SkoYfgmF8hNdi6P-BfRjdgYouy4c6xAnGDgSMTip1YnPRyvbMaoYT9E_tEcBW5wOeoc\", \"kid\": \"a0\", \"kty\": \"RSA\"}, {\"use\": \"sig\", \"e\": \"AQAB\", \"d\": \"DodXDEtkovWWGsMEXYy_nEEMCWyROMOebCnCv0ey3i4M4bh2dmwqgz0e-IKQAFlGiMkidGL1lNbq0uFS04FbuRAR06dYw1cbrNbDdhrWFxKTd1L5D9p-x-gW-YDWhpI8rUGRa76JXkOSxZUbg09_QyUd99CXAHh-FXi_ZkIKD8hK6FrAs68qhLf8MNkUv63DTduw7QgeFfQivdopePxyGuMk5n8veqwsUZsklQkhNlTYQqeM1xb2698ZQcNYkl0OssEsSJKRjXt-LRPowKrdvTuTo2p--HMI0pIEeFs7H_u5OW3jihjvoFClGPynHQhgWmQzlQRvWRXh6FhDVqFeGQ\", \"n\": \"zfZzttF7HmnTYwSMPdxKs5AoczbNS2mOPz-tN1g4ljqI_F1DG8cgQDcN_VDufxoFGRERo2FK6WEN41LhbGEyP6uL6wW6Cy29qE9QZcvY5mXrncndRSOkNcMizvuEJes_fMYrmP_lPiC6kWiqItTk9QBWqJfiYKhCx9cSDXsBmJXn3KWQCVHvj1ANFWW0CWLMKlWN-_NMNLIWJN_pEAocTZMzxSFBK1b5_5J8ZS7hfWRF6MQmjsJcz2jzA21SQZNpre3kwnTGRSwo05sAS-TyeadDqQPWgbqX69UzcGq5irhzN8cpZ_JaTk3Y_uV6owanTZLVvCgdjaAnMYeZhb0KFw\", \"q\": \"5E5XKK5njT-zzRqqTeY2tgP9PJBACeaH_xQRHZ_1ydE7tVd7HdgdaEHfQ1jvKIHFkknWWOBAY1mlBc4YDirLShB_voShD8C-Hx3nF5sne5fleVfU-sZy6Za4B2U75PcE62oZgCPauOTAEm9Xuvrt5aMMovyzR8ecJZhm9bw7naU\", \"p\": \"5vJHCSM3H3q4RltYzENC9RyZZV8EUmpkv9moyguT5t-BUGA-T4W_FGIxzOPXRWOckIplKkoDKhavUeNmTZMCUcue0nkICSJpvNE4Nb2p5PZk_QqSdQNvCasQtdojEG0AmfVD85SU551CYxJdLdDFOqyK2entpMr8lhokem189As\", \"kid\": \"a1\", \"kty\": \"RSA\"}, {\"d\": \"S4_OufhLBgXFMgIDMI1zlVe2uCExpcEAQ80J_lXfS8I\", \"use\": \"sig\", \"crv\": \"P-256\", \"kty\": \"EC\", \"y\": \"DBdNyq30mXmUs_BIvKMqaTTNO7HDhCi0YiC8GciwNYk\", \"x\": \"cYwzBoyjRjxj334bRTqanONf7DUYK-6TgiuN0DixJAk\", \"kid\": \"a2\"}, {\"d\": \"33TnYgdJtWAiVosKqUnz0zSmvWTbsx5-6pceynW6Xck\", \"use\": \"enc\", \"crv\": \"P-256\", \"kty\": \"EC\", \"y\": \"Cula95Eix1Ia77St3OULe6-UKWs5I06nmdfUzhXUQTs\", \"x\": \"wk8HBVxNNzj1gJBxPmmx9XYW1L61ObBGzxpRa6_OqWU\", \"kid\": \"a3\"}]}, \"application_type\": \"web\", \"contacts\": [\"roland.hedberg@umu.se\"], \"post_logout_redirect_uris\": [\"https://op.certification.openid.net:60784/logout\"], \"redirect_uris\": [\"https://op.certification.openid.net:60784/authz_cb\"], \"response_types\": [\"code\"], \"require_auth_time\": true, \"grant_types\": [\"authorization_code\"], \"default_max_age\": 3600}";
OIDCClientRepresentation clientRep = JsonSerialization.readValue(stringRep, OIDCClientRepresentation.class);
Assert.assertNotNull(clientRep.getJwks());
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -25,7 +25,7 @@
<parent>
<artifactId>keycloak-as7-eap6-adapter-dist-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-eap6-adapter-dist-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak AS7 / JBoss EAP 6 Adapter Distros</name>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.2.0.Test1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
Loaded 100 of 620 files, more files were not shown because too many files have changed in this diff. Show more