Compare commits

..
726 Commits
Author SHA1 Message Date
keycloak-bot 3f67c59e21 Set version to 2.0.0.Final 2016-06-30 06:54:55 +00:00
Stian Thorgersen 9d8a1edbe9 KEYCLOAK-3172 Add view authorization role to existing realms 2016-06-30 08:51:49 +02:00
Pedro Igor b0ff50652c [KEYCLOAK-3172] - Migrating older versions with authorization services. 2016-06-30 07:34:49 +02:00
Stian Thorgersen 1255118b9e Merge pull request #2969 from Bouhnosaure/patch-1
Update messages_fr.properties
2016-06-30 07:28:39 +02:00
Marek Posolda 4f548b350a Merge pull request #2973 from mposolda/2.0.x
KEYCLOAK-3194 Fix fuse adapter. Remove karaf related steps from README
2016-06-27 22:17:35 +02:00
mposolda 81472362d3 KEYCLOAK-3194 Fix fuse adapter. Remove karaf related steps from README 2016-06-27 15:42:17 +02:00
Alexandre 43ad2e1c12 Update messages_fr.properties
Change the word "adminitrateur" to "administrateur"

The "s" was missing in "admini-S-trateur"

That all !
2016-06-26 07:49:40 +09:00
Pedro Igor df8d4cd35d Merge pull request #2968 from iperdomo/2.0.x
[KEYCLOAK-3185] Fix navigation resource > permission
2016-06-24 23:38:08 -03:00
Iván Perdomo ad88de1f79 [KEYCLOAK-3185] Fix navigation resource > permission 2016-06-24 18:02:18 +02:00
keycloak-bot 96311381ef Set version to 2.0.0.Final-SNAPSHOT 2016-06-23 15:19:47 +00:00
keycloak-bot d2986abd13 Set version to 2.0.0.CR1 2016-06-23 13:50:29 +00:00
Stian Thorgersen ce17999d26 Merge pull request #2962 from stianst/master
Add retry to testPostEncryptedLoginLogout
2016-06-23 15:48:43 +02:00
Stian Thorgersen d869ab2823 Add retry to testPostEncryptedLoginLogout 2016-06-23 15:48:18 +02:00
Marek Posolda 5dc6f2f835 Merge pull request #2961 from mposolda/master
Fix Oracle DB
2016-06-23 14:58:28 +02:00
mposolda 9b9a656192 Fix Oracle DB 2016-06-23 13:23:44 +02:00
Marek Posolda 7e985dce85 Merge pull request #2960 from mposolda/master
Fix DB2 and MSSQL
2016-06-23 12:57:09 +02:00
Stian Thorgersen 184108c5ff Merge pull request #2959 from stianst/master
Remove old performance testsuite
2016-06-23 12:21:27 +02:00
mposolda f6ce1438fd Fix DB2 and MSSQL 2016-06-23 11:01:30 +02:00
Stian Thorgersen 1b9fe8edf7 Remove old performance testsuite 2016-06-23 10:59:02 +02:00
Marek Posolda e205535c55 Merge pull request #2958 from mposolda/master
Fix ResourceManagementTest.testFindById to pass with other RDBMS besi…
2016-06-23 10:57:40 +02:00
mposolda 5c25619cd6 Fix ResourceManagementTest.testFindById to pass with other RDBMS besides H2 2016-06-23 09:42:59 +02:00
Stian Thorgersen 2e2f34d94e Merge pull request #2957 from pedroigor/authz-changes
Changes to authz examples and some minor improvements
2016-06-23 07:49:47 +02:00
Pedro Igor 7eab4bc859 Updating example's README. 2016-06-23 01:02:39 -03:00
Pedro Igor 074a312fe5 Renaming authorization attributes. 2016-06-22 17:20:50 -03:00
Pedro Igor 7512abe9a7 Renaming Scopes tab to Authorization Scopes 2016-06-22 16:58:09 -03:00
Pedro Igor f48288865b [KEYCLOAK-3156] - Missing CORS when responding with denies 2016-06-22 14:39:07 -03:00
Pedro Igor 333bdb62dd [KEYCLOAK-3155] - Minor improvements to servlet-authz-app example 2016-06-22 14:36:43 -03:00
Pedro Igor 07824bdc4d [KEYCLOAK-3154] - Rename Photoz modules and directories to remove UMA identifier 2016-06-22 14:33:29 -03:00
Pedro Igor 905421a292 [KEYCLOAK-3152] - Keycloak Authorization JS Adapter 2016-06-22 14:28:02 -03:00
Marek Posolda 363e948141 Merge pull request #2956 from mposolda/master
KEYCLOAK-3141 Fix DB2 and some other DB issues
2016-06-22 19:25:15 +02:00
mposolda f7a2ad021e KEYCLOAK-3141 Fix DB2 and some other DB issues 2016-06-22 17:06:55 +02:00
Stian Thorgersen e2082ce29f Merge pull request #2950 from vramik/KEYCLOAK-3140
KEYCLOAK-3140 - fixed HTTP 404 Not Found by removing duplicate declaration of plugins in auth-server-jboss
2016-06-22 15:12:01 +02:00
Stian Thorgersen 462843cc9c Merge pull request #2955 from abstractj/readme-update
Update readme file with correct title
2016-06-22 15:11:50 +02:00
Stian Thorgersen 5890f7cae1 Merge pull request #2954 from stianst/master
KEYCLOAK-3093 Remove documentation from main repository
2016-06-22 15:11:38 +02:00
Bruno Oliveira 767c832f24 Update readme file with correct title 2016-06-22 09:48:59 -03:00
Bill Burke 6e4abe19f3 Merge pull request #2936 from tonswieb/master
KEYCLOAK-3100 Rearrange SingleLogoutService and NameIDFormat
2016-06-22 08:48:20 -04:00
Stian Thorgersen 107830bd2c KEYCLOAK-3093 Remove documentation from main repository 2016-06-22 13:40:21 +02:00
Marek Posolda 90d0ee7934 Merge pull request #2952 from mposolda/master
KEYCLOAK-3149 DB update triggered before DBLock was acquired
2016-06-21 18:28:50 +02:00
mposolda 5c731b4d14 KEYCLOAK-3149 DB update triggered before DBLock is retrieved 2016-06-21 17:14:25 +02:00
Pedro Igor 8402cedd82 Merge pull request #2946 from pedroigor/KEYCLOAK-3130
[KEYCLOAK-3130] - Permission checks to authorization admin endpoints
2016-06-21 10:50:29 -03:00
Marek Posolda 190a1beefa Merge pull request #2951 from mposolda/KEYCLOAK-2474
KEYCLOAK-2474 Possibility to add custom SPI and extend the data model
2016-06-21 15:31:12 +02:00
Pedro Igor 0a7504f9a8 Merge pull request #2945 from pedroigor/KEYCLOAK-3132
Changes to authz modules and dependencies
2016-06-21 10:12:54 -03:00
mposolda da945a69e6 KEYCLOAK-2474 Added test 2016-06-21 13:47:41 +02:00
mposolda c4513fdad9 KEYCLOAK-2474 Polishing. Support for separate changelock table per changelog. Support for authenticated endpoint in domain-extension example 2016-06-21 12:06:22 +02:00
Vlasta Ramik 48bd019165 fixed duplicate declaration of plugins in auth-server-jboss 2016-06-21 11:21:52 +02:00
Pedro Igor 5f91f4e466 [KEYCLOAK-3062] - Async configuration to KeycloakServer 2016-06-20 11:55:17 -03:00
Pedro Igor d5167c1632 [KEYCLOAK-3134] - Remove 'org.keycloak.keycloak-authz-server' module 2016-06-20 11:54:32 -03:00
Erik Mulder 44d7d776bc KEYCLOAK-2474: Added Example project for Domain Extension (WIP) 2016-06-20 11:29:14 +02:00
Erik Mulder f4ead484de KEYCLOAK-2474 Possibility to add custom SPI and extend the data model 2016-06-20 10:56:33 +02:00
Pedro Igor 6a1fb8f870 [KEYCLOAK-3132] - Single module for common policy providers 2016-06-17 20:38:03 -03:00
Pedro Igor dd279dd0fd [KEYCLOAK-3130] - Permission checks to authorization admin endpoints 2016-06-17 15:27:42 -03:00
Stian Thorgersen 111bcb7433 Merge pull request #2942 from stianst/master
Refactor authz changelog in to separate authz-master.xml
2016-06-17 15:26:43 +02:00
Stian Thorgersen 8f3cfed7c5 Merge pull request #2934 from fkiss/master-truststore
KEYCLOAK-2283 added email truststore test
2016-06-17 14:05:38 +02:00
Stian Thorgersen 807fc71626 Merge pull request #2939 from mhajas/fixEAP6
KEYCLOAK-3125 Fix ssl tests on EAP6
2016-06-17 14:02:23 +02:00
Stian Thorgersen 8ae08f0432 Merge pull request #2938 from mhajas/addJSConsoleTests-master
KEYCLOAK-3121 Add JS adapter tests
2016-06-17 14:01:21 +02:00
Stian Thorgersen 2beb1f2466 Merge branch 'KEYCLOAK-3052' of https://github.com/cargosoft/keycloak into cargosoft-KEYCLOAK-3052 2016-06-17 13:55:55 +02:00
Stian Thorgersen 1a9fada964 KEYCLOAK-2753 Refactor authz changelog into separate authz-master.xml 2016-06-17 13:40:22 +02:00
Stian Thorgersen 9030edc04d KEYCLOAK-2753 Removed unused imports from PolicyAdapter 2016-06-17 13:40:22 +02:00
Stian Thorgersen 3c0f7e2ee2 Merge pull request #2617 from pedroigor/KEYCLOAK-2753
[KEYCLOAK-2753] - Fine-grained Authorization Services
2016-06-17 13:40:15 +02:00
Pedro Igor 086c29112a [KEYCLOAK-2753] - Fine-grained Authorization Services 2016-06-17 02:07:34 -03:00
mhajas 0df2525298 Fix ssl tests on EAP6 2016-06-16 11:56:31 +02:00
mhajas cdb40fce19 Add JS adapter tests 2016-06-16 11:43:06 +02:00
Ton Swieb af5ac7dd6b KEYCLOAK-3100 Rearrange SingleLogoutService and NameIDFormat 2016-06-15 21:16:34 +02:00
Dimitri Teleguin 524ad9728a correct resource URL 2016-06-14 21:07:36 +03:00
fkiss b50513a946 KEYCLOAK-2283 added email truststore test 2016-06-14 13:49:16 +02:00
Dmitry Telegin 3203842b58 Fix KEYCLOAK-3052 2016-06-14 12:32:43 +03:00
Stian Thorgersen 2d036b58a6 Merge pull request #2932 from stianst/master
KEYCLOAK-3050 - fix npe on deployment
2016-06-13 21:16:04 +02:00
Michaël van de Giessen 55910f5f70 KEYCLOAK-3050 - fix npe on deployment 2016-06-13 20:15:41 +02:00
Stian Thorgersen c1e202eaf9 Merge pull request #2931 from stianst/master
KEYCLOAK-3091 Change brute force to use userId
2016-06-13 18:02:32 +02:00
Stian Thorgersen e538394e60 KEYCLOAK-3091 Change brute force to use userId 2016-06-13 15:30:13 +02:00
Stian Thorgersen 46b17e6149 Merge pull request #2928 from mposolda/KEYCLOAK-3106
KEYCLOAK-3106 EventStoreProviderTest.query is failing in some environ…
2016-06-13 15:05:19 +02:00
mposolda e6b3586b87 KEYCLOAK-3106 EventStoreProviderTest.query is failing in some environments 2016-06-13 15:02:10 +02:00
Stian Thorgersen bdaba4c85a Merge pull request #2926 from mposolda/master
KEYCLOAK-3105 Can't access single realm with the admin user from mast…
2016-06-13 14:50:19 +02:00
mposolda 1510ac5eb4 KEYCLOAK-3105 Can't access single realm with the admin user from master realm 2016-06-13 12:09:11 +02:00
Marek Posolda 443772d5ec Merge pull request #2924 from mposolda/master
KEYCLOAK-2028: Add preemptive access token refresh support to servlet adapters
2016-06-09 21:51:15 +02:00
mposolda 72736e5e47 KEYCLOAK-2028 Add test for token-minimum-time-to-live adapter option 2016-06-09 19:22:15 +02:00
Ben Loy ec180db39f KEYCLOAK-2028: Add preemptive access token refresh support
Add a new keycloak.json property and mechanism to automatically
refresh access tokens if they are going to expire in less than a configurable
amount of time.
2016-06-09 19:22:15 +02:00
Marek Posolda f6d075fbe4 Merge pull request #2922 from mposolda/master
KEYCLOAK-2714 Remove the pre-liquibase workarounds
2016-06-08 15:54:36 +02:00
mposolda 5fc5bafbb6 KEYCLOAK-2714 Remove the pre-liquibase workarounds 2016-06-08 14:40:33 +02:00
Stian Thorgersen a189545f81 Merge pull request #2920 from thomasdarimont/issue/KEYCLOAK-3092-Increase-number-of-users-shown-in-UserListing
KEYCLOAK-3092: Show 25 users per page in user list by default
2016-06-08 13:21:13 +02:00
Stian Thorgersen 1c694b4795 Merge pull request #2921 from thomasdarimont/issue/KEYCLOAK-3054-fix-npe-on-unknown-protocol-adjustment
KEYCLOAK-3054: Use string format for log message
2016-06-08 07:08:05 +02:00
Stian Thorgersen 819c42dad2 Merge pull request #2918 from chameleon82/issue/KEYCLOAK-3089-email-subject-internationalization
KEYCLOAK-3089 Change email subject encoding to utf-8/base64
2016-06-08 07:07:37 +02:00
Некрасов Александр Сергеевич 7bdccc21b2 KEYCLOAK-3089 Change email subject encoding to utf-8 2016-06-08 09:10:39 +06:00
Thomas Darimont a9f461bfd1 KEYCLOAK-3054: Use string format for log message
Need to use log.debugf(..) to correctly resolve the %s placeholder.
2016-06-07 21:56:04 +02:00
Thomas Darimont 56a565f913 KEYCLOAK-3092: Show 20 users per page in user list by default
More sensible default for number of users shown per page in
the user listing of the admin console.
This is also recommended in the patternfly guidelines.

Prior to the PR only 5 users were shown per page.
2016-06-07 13:23:03 +02:00
Stian Thorgersen b6a76b1267 Merge pull request #2917 from thomasdarimont/issue/KEYCLOAK-3054-fix-npe-on-unknown-protocol
KEYCLOAK-3054: Fix potential NPE in RealmsResource
2016-06-07 13:09:54 +02:00
Thomas Darimont 67a63a806e KEYCLOAK-3054: Fix potential NPE in RealmsResource
Prior to PR .well-known Endpoint threw NPE with if unknown
Protocol was provided.
2016-06-07 08:29:23 +02:00
Stian Thorgersen 816b01860b Merge pull request #2912 from thomasdarimont/issue/KEYCLOAK-2891-fix-openidc-endpoint-label-alignment
KEYCLOAK-2891: Fix label alignment for OIDC Endpoint link.
2016-06-07 07:07:17 +02:00
Stian Thorgersen ce2f009e76 Merge pull request #2915 from pdrozd/KEYCLOAK-3082
KEYCLOAK-3082 - clear queue before event
2016-06-07 07:00:42 +02:00
Stian Thorgersen d5a44db2de Merge pull request #2914 from pdrozd/master
KEYCLOAK-3085 - Add module org.jboss.resteasy.resteasy-jaxrs to integ…
2016-06-07 07:00:11 +02:00
Некрасов Александр Сергеевич 5474496867 KEYCLOAK-3089 Change email subject encoding to utf-8/base64 2016-06-07 09:11:46 +06:00
Pavel Drozd 54d9943a3b KEYCLOAK-3085 - Add module org.jboss.resteasy.resteasy-jaxrs to integration-arquillian-testsuite-providers 2016-06-06 11:51:20 +02:00
Pavel Drozd 81de73df8e KEYCLOAK-3082 - clear queue before event 2016-06-06 11:46:39 +02:00
Thomas Darimont 51312ff7ff KEYCLOAK-2891: Fix label alignment for OIDC Endpoint link.
This probably happend during merge.
2016-06-06 09:55:31 +02:00
Bill Burke b2d8c6bca2 Merge pull request #2418 from schmeedy/master
Fix k_query_bearer_token endpoint in proxy
2016-06-05 11:20:08 -04:00
Bill Burke 4c9a0b45d4 Merge pull request #2229 from thomasdarimont/issue/KEYCLOAK-2489-script-based-authenticator-definitions
KEYCLOAK-2489 - Add support for Script-based AuthenticationExecution definitions.
2016-06-05 11:12:05 -04:00
Bill Burke b3f3449e39 Merge pull request #2810 from thomasdarimont/issue/KEYCLOAK-2974-handle-ModelException-in-UsersResource
KEYCLOAK-2974: Handle ModelException in UsersResource
2016-06-05 11:06:32 -04:00
Bill Burke a76a4730e3 Merge pull request #2884 from thomasdarimont/issue/KEYCLOAK-2891-link-to-oidc-endpoints-from-admin-console
KEYCLOAK-2891: Add link to OpenID Endpoint Configuration to realm details page.
2016-06-05 11:06:11 -04:00
Bill Burke dbeb3353f8 Merge pull request #2911 from thomasdarimont/issue/KEYCLOAK-3081-oidc-support-user-role-mapper
KEYCLOAK-3081: Add client mappers to map user roles to token
2016-06-05 11:03:47 -04:00
Thomas Darimont a2d1c8313d KEYCLOAK-3081: Add client mapper to map user roles to token
Introduced two new client protocol mappers to propagate assigned user client / realm roles to a JWT ID/Access Token.
Each protocol mapper supports to use a prefix string that is prepended to each role name.

 The client role protocol mapper can specify from which client the roles should be considered.
 Composite Roles are resolved recursively.

Background:
Some OpenID Connect integrations like mod_auth_openidc don't support analyzing deeply nested or encoded structures.
In those scenarios it is helpful to be able to define custom client protocol mappers that allow to propagate a users's roles as a flat structure
(e.g. comma separated list) as a top-level  (ID/Access) Token attribute that can easily be matched with a regex.

In order to differentiate between client specific roles and realm roles it is possible to configure
both separately to be able to use the same role names with different contexts rendered as separate token attributes.
2016-06-03 15:52:58 +02:00
Marek Posolda 193233899f Merge pull request #2910 from mposolda/master
KEYCLOAK-3074 AdminEventStoreProviderTest fixes
2016-06-03 11:33:22 +02:00
mposolda c42b8f81e3 KEYCLOAK-3074 Change the TestingResourceProvider to always both firstResults and maxResults in JPA criteria query 2016-06-03 10:31:32 +02:00
mposolda 13bf36ce49 KEYCLOAK-3074 Change the signature of TestingResourceProvider.getAdminEvents to use String instead of java.util.Date 2016-06-03 10:31:24 +02:00
Stian Thorgersen 31eee347d4 Merge pull request #2895 from mhajas/fixMissingPOM
KEYCLOAK-3051 Fix missing version in POM
2016-06-02 18:55:03 +02:00
Stian Thorgersen c37f1c24ee Merge pull request #2900 from tkyjovsk/performance-tests
Updates to the performance tests.
2016-06-02 18:54:47 +02:00
Stian Thorgersen fba78f3e2a Merge pull request #2908 from mstruk/KEYCLOAK-2879-a
KEYCLOAK-2879 UserResource
2016-06-02 18:53:53 +02:00
Marko Strukelj ec258c6515 KEYCLOAK-2879 UserResource 2016-06-02 15:23:18 +02:00
Stian Thorgersen 087f84bfff Merge pull request #2901 from mposolda/master
KEYCLOAK-3065 Remove 'provider' from realmCache in keycloak-server.js…
2016-06-02 14:58:16 +02:00
Stian Thorgersen 733a51b1ea Merge pull request #2903 from pedroigor/KEYCLOAK-3068
[KEYCLOAK-3068] - Setting XInclude to false
2016-06-02 07:59:17 +02:00
Stian Thorgersen 4141690857 Merge pull request #2905 from pedroigor/KEYCLOAK-3069
[KEYCLOAK-3069] - Adding back javax.xml.soap.api dependency
2016-06-02 07:58:35 +02:00
Pedro Igor 0ad86b3a53 [KEYCLOAK-3069] - Adding javax.xml.soap.api dependency 2016-06-01 16:57:06 -03:00
Pedro Igor a39907de76 [KEYCLOAK-3068] - Setting XInclude to false 2016-06-01 16:43:02 -03:00
mposolda fd2fc34386 KEYCLOAK-3065 Remove 'provider' from realmCache in keycloak-server.json to have 'enabled' switch working 2016-06-01 17:25:51 +02:00
Stian Thorgersen 93d3a0eb38 Merge pull request #2898 from stianst/master
KEYCLOAK-3066
2016-06-01 16:30:06 +02:00
Tomas Kyjovsky ef95510da4 Updates to the performance tests.
Conflicts:
	testsuite/integration-arquillian/tests/other/adapters/jboss/remote/pom.xml
	testsuite/integration-arquillian/tests/other/clean-start/pom.xml
2016-06-01 16:06:51 +02:00
Stian Thorgersen 8fab2f0718 KEYCLOAK-3066
Uploaded Realm Certificate is not validated
2016-06-01 15:12:21 +02:00
mhajas 6da8ca70dc Fix missing version in POM 2016-05-27 12:09:20 +02:00
Stian Thorgersen 2343e517c9 Merge pull request #2891 from pedroigor/KEYCLOAK-2894
[KEYCLOAK-2894] - Fixing saml signature validation
2016-05-26 16:57:13 +02:00
Pedro Igor 60f954a497 [KEYCLOAK-2894] - Fixing saml signature validation 2016-05-26 10:48:30 -03:00
Stian Thorgersen af30142097 Merge pull request #2886 from ssilvert/migrate-events
KEYCLOAK-2912 Migrate events package to new testsuite
2016-05-26 15:01:57 +02:00
Stian Thorgersen c5e287b7b1 Merge pull request #2885 from fernandomora/fix-base-theme-login
KEYCLOAK-3045 Fixes displaying message on login using base theme
2016-05-26 08:40:06 +02:00
Stian Thorgersen c206ae13db Merge pull request #2889 from mposolda/master
Admin events fixes and more tests
2016-05-26 08:29:51 +02:00
mposolda 882dbc3f25 KEYCLOAK-3006 Fix admin event inconsistencies related to roles (points 1,3,4,15,16 from JIRA) 2016-05-25 23:18:01 +02:00
mposolda 022be3aee5 KEYCLOAK-3006 Fix admin event inconsistencies (points 2,5-14 from JIRA) 2016-05-25 23:17:47 +02:00
Thomas Darimont 5f73c338d8 KEYCLOAK-2947: Include group representation for GroupMembership changes in AdminEvents
We now include the full group representation in AdminEvents
for Group Membership changes.
This enables EventListener to propagate potential role / attribute
chnages based on the removal / addition of the group.
2016-05-25 23:17:35 +02:00
mposolda f58936025f KEYCLOAK-3003 Support for admin events in AuthenticationManagementResource 2016-05-25 23:17:24 +02:00
Stan Silvert 1042a22cf7 KEYCLOAK-2912 Migrate events package to new testsuite 2016-05-25 15:22:17 -04:00
Fernando Mora 5148e69006 Fixes displaying message on login using base theme
Using base theme produces an error when login page tries to display a message.
The following properties that are not defined in base theme (only in keycloak theme) are being called without default_value operator "!"

* Steps to Reproduce:
1. Set `base` theme as `Login Theme`
2. Sign out
3. Try to sign in using and invalid username/password

* Expected behaviour:
  * Message `Invalid username or password.`is shown
* Actual behavior:
  * Bank page is shown and following stackatrace in logs:
```
15:58:19,575 ERROR [freemarker.runtime] (default task-9) Error executing FreeMarker template: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> properties.kcFeedbackErrorIcon  [in template "template.ftl" at line 67, column 76]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${properties.kcFeedbackErrorIcon}  [in template "template.ftl" in macro "registrationLayout" at line 67, column 74]
	- Reached through: @layout.registrationLayout displayInf...  [in template "login.ftl" at line 2, column 1]
----
	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131)
	at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:355)
	at freemarker.core.Expression.evalAndCoerceToString(Expression.java:82)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:41)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.MixedContent.accept(MixedContent.java:54)
	at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.MixedContent.accept(MixedContent.java:54)
	at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.MixedContent.accept(MixedContent.java:54)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.Macro$Context.runMacro(Macro.java:184)
	at freemarker.core.Environment.invoke(Environment.java:701)
	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.MixedContent.accept(MixedContent.java:54)
	at freemarker.core.Environment.visit(Environment.java:324)
	at freemarker.core.Environment.process(Environment.java:302)
	at freemarker.template.Template.process(Template.java:325)
	at org.keycloak.theme.FreeMarkerUtil.processTemplate(FreeMarkerUtil.java:61)
	at org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider.createResponse(FreeMarkerLoginFormsProvider.java:314)
	at org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider.createLogin(FreeMarkerLoginFormsProvider.java:431)
	at org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator.invalidUser(AbstractUsernameFormAuthenticator.java:58)
	at org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator.invalidUser(AbstractUsernameFormAuthenticator.java:87)
	at org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator.validateUserAndPassword(AbstractUsernameFormAuthenticator.java:141)
	at org.keycloak.authentication.authenticators.browser.UsernamePasswordForm.validateForm(UsernamePasswordForm.java:56)
	at org.keycloak.authentication.authenticators.browser.UsernamePasswordForm.action(UsernamePasswordForm.java:49)
	at org.keycloak.authentication.DefaultAuthenticationFlow.processAction(DefaultAuthenticationFlow.java:84)
	at org.keycloak.authentication.DefaultAuthenticationFlow.processAction(DefaultAuthenticationFlow.java:75)
	at org.keycloak.authentication.AuthenticationProcessor.authenticationAction(AuthenticationProcessor.java:756)
	at org.keycloak.services.resources.LoginActionsService.processFlow(LoginActionsService.java:359)
	at org.keycloak.services.resources.LoginActionsService.processAuthentication(LoginActionsService.java:341)
	at org.keycloak.services.resources.LoginActionsService.authenticateForm(LoginActionsService.java:386)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
	at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:138)
	at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:101)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:88)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
```
2016-05-25 18:38:11 +02:00
Thomas Darimont 08320890b1 KEYCLOAK-2891: Add link to OpenID Endpoint Configuration to realm details page
We now show a link to the OIDC Endpoints configuration in the realm
details page.
This makes it easier for users to find the OIDC endpoints.
2016-05-25 14:26:44 +02:00
Stian Thorgersen 5ed09acd94 Merge pull request #2881 from stianst/KEYCLOAK-3034
KEYCLOAK-3034 NullPointerException when log in via Twitter
2016-05-25 13:44:05 +02:00
Stian Thorgersen 4728729302 Merge pull request #2882 from stianst/master
KEYCLOAK-3029
2016-05-25 08:56:25 +02:00
Stian Thorgersen d016ea4116 KEYCLOAK-3029 2016-05-25 08:55:45 +02:00
Stian Thorgersen fa3a2aafec KEYCLOAK-3034 NullPointerException when log in via Twitter 2016-05-25 08:10:55 +02:00
Stian Thorgersen d85f9cb4e2 Merge pull request #2858 from thomasdarimont/issue/KEYCLOAK-3021-add-realm-display-name-to-otpauth-uri-label
KEYCLOAK-3021: Add Realm Display Name to the label part of the otpauth URI
2016-05-25 07:29:14 +02:00
Stian Thorgersen 9edec8e4a6 Merge pull request #2875 from abstractj/KEYCLOAK-3023
OAuthRedirectUriTest.testLocalhost fails on wildfly
2016-05-25 07:25:22 +02:00
Stian Thorgersen f12c54387c Merge pull request #2873 from vramik/KEYCLOAK-3024
KEYCLOAK-3024 support for smoke test - clean start domain mode
2016-05-25 07:24:14 +02:00
Stian Thorgersen d51a2cde2f Merge pull request #2859 from ssilvert/migrate-i18n
KEYCLOAK-2913 Migrate i18n package to new testsuite
2016-05-25 07:22:54 +02:00
Stian Thorgersen 39d2c3ad81 Merge pull request #2878 from stianst/master
KEYCLOAK-3020 Fix migration docs
2016-05-25 06:51:26 +02:00
Stian Thorgersen 6ee11a94b4 KEYCLOAK-3020 Fix migration docs 2016-05-25 06:50:52 +02:00
Bruno Oliveira b2850ec1d5 OAuthRedirectUriTest.testLocalhost fails on wildfly 2016-05-24 07:24:36 -03:00
Stan Silvert 8d56ab90ba KEYCLOAK-2913 Switch to use xpath for finding links instead of adding an
id.
2016-05-23 09:23:01 -04:00
Stian Thorgersen 3e4f5f40dc Merge pull request #2871 from stianst/KEYCLOAK-3008
KEYCLOAK-3008 Upload Realm Keys doesn't work
2016-05-23 14:01:22 +02:00
Stian Thorgersen 097c49149c Merge pull request #2867 from stianst/KEYCLOAK-3020
KEYCLOAK-3020
2016-05-23 13:59:13 +02:00
Vlasta Ramik a37d43714d support for smoke test - clean start domain mode 2016-05-23 13:29:05 +02:00
Stian Thorgersen ff20c530cd Merge pull request #2869 from stianst/KEYCLOAK-2851
KEYCLOAK-2851 InitialAccessTokenTest#createExpired fails occasionally
2016-05-23 12:04:23 +02:00
Stian Thorgersen e0ae98eb95 Merge pull request #2850 from wyvie/samltest
KEYCLOAK-3000: fixed the saml brokering tests
2016-05-23 11:23:27 +02:00
Stian Thorgersen 477c0872b0 KEYCLOAK-3020
Increase default password hashing intervals to 20K
2016-05-23 11:20:31 +02:00
Stian Thorgersen 27bdc996e7 KEYCLOAK-3008 Upload Realm Keys doesn't work 2016-05-23 10:35:23 +02:00
Stian Thorgersen e52f7c56a9 KEYCLOAK-2851 InitialAccessTokenTest#createExpired fails occasionally 2016-05-23 09:34:33 +02:00
Stian Thorgersen 74809b4132 Merge pull request #2864 from mhajas/fixOfflineServlets
KEYCLOAK-3025 Fix offline servlet adapter tests and refactoring
2016-05-23 08:41:42 +02:00
Stian Thorgersen bee9ba0c19 Merge pull request #2862 from mhajas/fixSSLOnWildfly-master
KEYCLOAK-3022 Fix ssl adapter tests on wildfly
2016-05-23 08:40:12 +02:00
Stian Thorgersen f4995410f8 Merge pull request #2856 from vmuzikar/KEYCLOAK-3013
KEYCLOAK-3013 Fix Upload Keystore tests in ClientAuthSignedJWTTest
2016-05-23 08:37:07 +02:00
mhajas 22a94100c8 Fix offline servlets and refactoring 2016-05-20 15:09:54 +02:00
mhajas 183feeb952 Fix ssl adapter tests on wildfly 2016-05-20 14:53:44 +02:00
Stan Silvert 049b0dda23 KEYCLOAK-2913 Migrate i18n package to new testsuite 2016-05-20 08:04:07 -04:00
Thomas Darimont 4bc64350b2 KEYCLOAK-3021: Add Realm Display Name to the label part of the otpauth URI.
Due to the  removal of the realm-displayname as a result of changes made for KEYCLOAK-2410
 the otpauth URI no longer included the realm display name as a hint for the user to which system an
 authenticator belongs to.

We now ensure that the realm display name is again part of the label component of the otpauth URI.
This enables a user to better distinguish between user accounts for different systems.
2016-05-20 13:59:19 +02:00
Vaclav Muzikar 7f474f574c KEYCLOAK-3013 Fix Upload Keystore tests in ClientAuthSignedJWTTest 2016-05-20 10:22:48 +02:00
Stian Thorgersen af7fd0ef61 Merge pull request #2855 from raehalme/KEYCLOAK-3016-master
KEYCLOAK-3016: BasicAuthRequestAuthenticator consumes HttpEntity on errors
2016-05-20 09:14:37 +02:00
Stian Thorgersen 7f3ccad4cc Merge pull request #2852 from abstractj/OAuthRedirectUriTest
OAuthRedirectUriTest migration
2016-05-20 09:13:01 +02:00
Stian Thorgersen 264c816f08 Merge pull request #2846 from ssilvert/migrate-composites
KEYCLOAK-2911 Migrate composites package to new testsuite.
2016-05-20 09:12:30 +02:00
Stian Thorgersen a6f8ff44a6 Merge pull request #2844 from vmuzikar/KEYCLOAK-3011
KEYCLOAK-3011 Fix WelcomePageTest
2016-05-20 09:10:52 +02:00
Stian Thorgersen c03c5d2fe9 Merge pull request #2843 from vramik/KEYCLOAK-3010
KEYCLOAK-3010 Add support for smoke test - clean start - standalone mode
2016-05-20 09:07:06 +02:00
Stian Thorgersen fcfe8582de Merge pull request #2838 from abstractj/KEYCLOAK-2908
KEYCLOAK-2908 - Migration of oidc package
2016-05-20 08:56:43 +02:00
Stian Thorgersen 63af03f11c Merge pull request #2833 from vmuzikar/master
KEYCLOAK-3004 Fix PKCS12 tests in ClientAuthSignedJWTTest
2016-05-20 08:55:15 +02:00
Stian Thorgersen fe841e560d Merge pull request #2832 from ssilvert/migrate-account
KEYCLOAK-2909 Migrate account package to new testsuite
2016-05-20 08:40:15 +02:00
wyvie 88583362ad KEYCLOAK-3000: fixed the saml brokering tests 2016-05-19 14:30:48 +02:00
Thomas Raehalme babe94c50d KEYCLOAK-3016: BasicAuthRequestAuthenticator now consumes HttpEntity also on errors. 2016-05-19 08:47:51 +03:00
Bruno Oliveira e7c98bd31b OAuthRedirectUriTest migration 2016-05-18 18:24:10 -03:00
Stan Silvert 771b4c5b6e KEYCLOAK-2911 Migrate composites package to new testsuite. 2016-05-17 10:23:47 -04:00
Vlasta Ramik ef716b8b94 Add support for smoke test - clean start - standalone mode 2016-05-17 13:55:24 +02:00
Vaclav Muzikar 6bcd72f7f2 KEYCLOAK-3011 Fix WelcomePageTest 2016-05-17 13:25:05 +02:00
Bruno Oliveira c434dc8dcc KEYCLOAK-2908 - Migration of oidc package 2016-05-14 00:50:23 -03:00
Marek Posolda 92db7b3618 Merge pull request #2831 from mposolda/master
KEYCLOAK-2881 Admin events testing
2016-05-13 13:43:47 +02:00
Vaclav Muzikar 62d6bf1dec KEYCLOAK-3004 Fix PKCS12 tests in ClientAuthSignedJWTTest
Use smaller keys to avoid illegal key size exception
2016-05-13 13:32:43 +02:00
mposolda fc9dbcf6cb KEYCLOAK-2881 Admin events testing 2016-05-13 11:29:08 +02:00
Stian Thorgersen 7193b54419 Merge pull request #2829 from stianst/master
Ignore KcSamlBrokerTest
2016-05-13 08:21:37 +02:00
Stian Thorgersen 686e48e9e2 Ignore KcSamlBrokerTest 2016-05-13 08:20:49 +02:00
Stian Thorgersen d8ea4bbc00 Merge pull request #2825 from thomasdarimont/issue/KEYCLOAK-2994-reword-login-messages-in-base-theme
KEYCLOAK-2994: Revise german translations for login pages in base theme
2016-05-13 07:53:32 +02:00
Stian Thorgersen 9467370a8f Merge pull request #2826 from vmuzikar/master
KEYCLOAK-2995 Revert changes from KEYCLOAK-2989 in JWTClientCredentialsProvider
2016-05-13 07:50:24 +02:00
Stian Thorgersen fff595b163 Merge pull request #2823 from mstruk/KEYCLOAK-2993
KEYCLOAK-2993 Fix integration-arquillian tests failing with -Pauth-server-wildfly
2016-05-13 07:32:21 +02:00
Stan Silvert a46982f8ec KEYCLOAK-2909 Migrate account package to new testsuite 2016-05-12 15:52:45 -04:00
Stian Thorgersen 4ddd2ae31d Merge pull request #2821 from mstruk/KEYCLOAK-2863
KEYCLOAK-2863 ClientAttributeCertificateResource
2016-05-12 16:50:40 +02:00
Stian Thorgersen 1c1afc9eaa Merge pull request #2818 from pdrozd/master
KEYCLOAK-2988 - Fix kerberos tests - able to run with Windows and RHIDM.
2016-05-12 16:43:42 +02:00
Vaclav Muzikar e6f0da99e6 KEYCLOAK-2995 Revert changes from KEYCLOAK-2989 in JWTClientCredentialsProvider 2016-05-12 10:45:45 +02:00
Thomas Darimont c59fdb4299 KEYCLOAK-2994: Revise german translations for login pages in base theme
Reworded some german translations and fixed some spelling errors.

This could also be applied to 1.9.x.
2016-05-12 10:41:09 +02:00
Marko Strukelj 0878109647 KEYCLOAK-2993 Fix integration-arquillian tests failing with -Pauth-server-wildfly 2016-05-12 09:39:25 +02:00
Stian Thorgersen 74ff101de4 Merge pull request #2819 from vmuzikar/master
KEYCLOAK-2989 Extend ClientAuthSignedJWTTest
2016-05-12 06:42:15 +02:00
Marko Strukelj ebc184bf94 KEYCLOAK-2863 ClientAttributeCertificateResource 2016-05-11 15:22:39 +02:00
Stian Thorgersen a09f38589f Merge pull request #2815 from abstractj/AuthorizationCodeTest
Migration of AuthorizationCodeTest
2016-05-11 14:09:13 +02:00
Bruno Oliveira 4664bb01d8 Migration of AuthorizationCodeTest 2016-05-11 06:21:12 -03:00
Stian Thorgersen c9e92bce60 Merge pull request #2813 from abstractj/OAuthGrantTest
OAuthGrantTest migration
2016-05-11 06:57:58 +02:00
Stian Thorgersen c04c047fbd Merge pull request #2781 from wyvie/brokering
KEYCLOAK-2971: Added basic oidc broker testing to the new testsuite
2016-05-11 06:57:36 +02:00
wyvie 9e857fe245 KEYCLOAK-2990: added test for single logout to broker testing (new testsuite) 2016-05-10 15:19:44 +02:00
Vaclav Muzikar 9ad584b34d KEYCLOAK-2989 Extend ClientAuthSignedJWTTest 2016-05-10 13:30:55 +02:00
Pavel Drozd 43ab806f8d KEYCLOAK-2988 - Fix kerberos tests - able to run with Windows and RHIDM. 2016-05-10 11:28:43 +02:00
wyvie 18a64103cd KEYCLOAK-2971: saml provider with signature in broker test 2016-05-10 11:07:19 +02:00
Bruno Oliveira bb6a7e357f OAuthGrantTest migration 2016-05-09 11:03:47 -03:00
Stian Thorgersen 0ec23fd40b Merge pull request #2812 from stianst/master
KEYCLOAK-2880 Refactor PermissionTest to not require Java8
2016-05-09 08:28:12 +02:00
Stian Thorgersen d43b230b93 KEYCLOAK-2880 Refactor PermissionTest to not require Java8 2016-05-09 07:25:03 +02:00
Marek Posolda 43b51d4a30 Merge pull request #2809 from mposolda/master
KEYCLOAK-2862 AuthenticationManagementResource tests
2016-05-06 21:29:35 +02:00
mposolda bea2678e85 KEYCLOAK-2862 AuthenticationManagementResource tests 2016-05-06 20:19:58 +02:00
Thomas Darimont 146a26e714 KEYCLOAK-2974: Handle ModelException in UsersResource
We now handle ModelExceptions thrown while creating and updating
a new User by rolling back the transaction and presenting
an error message with a HTTP 409 (conflict) code.
Previously only ModelDuplicateExceptions were handled and
ModelExceptions, e.g. due to a failed database operation
lead to a HTTP 500 server error.
2016-05-06 20:17:22 +02:00
Marek Posolda 016a19fcee Merge pull request #2807 from vramik/KEYCLOAK-2936
KEYCLOAK-2936 add app.server.java.home to karaf arquillian.xsl to be able to run fu…
2016-05-06 20:06:21 +02:00
Stian Thorgersen 9949101fba Merge pull request #2804 from stianst/master
Close admin client after test
2016-05-06 16:27:29 +02:00
wyvie 30f4f920c1 KEYCLOAK-2971: saml provider without signature in broker test 2016-05-06 16:04:39 +02:00
Vlasta Ramik 22200d857c add app.server.java.home to karaf arquillian.xsl to be able to run fuse tests on jdk7, minor test fix 2016-05-06 15:09:59 +02:00
Stian Thorgersen 713909fac9 Close admin client after test 2016-05-06 15:01:32 +02:00
Stian Thorgersen f4d751c839 Merge pull request #2786 from stianst/master
KEYCLOAK-2865 Extend coverage of client admin endpoints
2016-05-06 11:13:15 +02:00
Marek Posolda 411b71bcbb Merge pull request #2768 from vramik/KEYCLOAK-2936
KEYCLOAK-2936 Add app server module and test module for testing fuse6.3, ...
2016-05-06 08:37:34 +02:00
Stian Thorgersen 0ca117b8e9 KEYCLOAK-2865 Extend coverage of client admin endpoints 2016-05-06 08:08:52 +02:00
Marek Posolda ce450e3806 Merge pull request #2801 from mposolda/master
KEYCLOAK-2805 KEYCLOAK-2777 Fuse 6.3 support
2016-05-06 08:00:14 +02:00
Stian Thorgersen f2c1c26385 Merge pull request #2802 from dbarentine/master
KEYCLOAK-2973 Persist federated identity on token update
2016-05-06 07:07:40 +02:00
Stian Thorgersen dbd906b330 Merge pull request #2798 from abstractj/OAuthDance
Migration of OAuthDanceClientSessionExtensionTest
2016-05-06 07:06:22 +02:00
Stian Thorgersen b7e70ea7e3 Merge pull request #2796 from abstractj/RefreshTokenTest
Refresh token test
2016-05-06 07:05:36 +02:00
Stian Thorgersen 0c5d1c7090 Merge pull request #2794 from mstruk/KEYCLOAK-2869
KEYCLOAK-2869 IdentityProvidersResource/IdentityProviderResource
2016-05-06 07:03:52 +02:00
Stian Thorgersen 1d87d1cce1 Merge pull request #2792 from ssilvert/migrate-forms
KEYCLOAK-2906 Migrate forms package to new testsuite
2016-05-06 07:00:10 +02:00
Stian Thorgersen 39019eed10 Merge pull request #2791 from mhajas/SAML-stability
KEYCLOAK-2959 KEYCLOAK-2459 Refactor and improve stability of SAML adapter tests
2016-05-06 06:59:03 +02:00
Stian Thorgersen ddc9766ec9 Merge pull request #2789 from stianst/KEYCLOAK-2549
KEYCLOAK-2549 Re-create master admin client if master realm is overwr…
2016-05-06 06:58:19 +02:00
Dane Barentine 2f4c2c20f9 KEYCLOAK-2973 Persist federated identity on token update 2016-05-05 14:51:17 -07:00
mposolda 741e10060e KEYCLOAK-2805 Minor changes - cleanup and docs 2016-05-05 22:55:53 +02:00
Bruno Oliveira 2a60f65229 Migration of OAuthDanceClientSessionExtensionTest 2016-05-05 15:29:51 -03:00
Bruno Oliveira a5687e4660 Migration of RefreshTokenTest 2016-05-05 15:20:52 -03:00
Marko Strukelj f337085ed0 KEYCLOAK-2869 IdentityProvidersResource/IdentityProviderResource 2016-05-05 17:04:45 +02:00
Bruno Oliveira 8418fec113 Replace by ClientManager and make the code less verbose 2016-05-05 11:53:17 -03:00
Paolo Antinori 534a7b6e59 KEYCLOAK-2777 - Examples Fuse. Correct Parent pom reference 2016-05-05 15:23:45 +02:00
Paolo Antinori 87a7879e71 KEYCLOAK-2777 - Added PathBasedKeycloakConfigResolver for OSGi + examples 2016-05-05 15:23:35 +02:00
Paolo Antinori d35f8c1905 KEYCLOAK-2805 - Update docs for JBoss Fuse 6.3 2016-05-05 15:22:14 +02:00
Paolo Antinori 53799297b3 KEYCLOAK-2805 - Moved cxf.version up to the main pom 2016-05-05 15:22:03 +02:00
Paolo Antinori f5f36545f3 KEYCLOAK-2805 - Support for JBoss Fuse 6.3
Upgrade of CXF, Jetty and Pax-Web required to rewrite part of the integration.
2016-05-05 15:21:51 +02:00
mhajas 40bf5fb5d2 Refactor and improve stability of SAML tests 2016-05-05 12:31:55 +02:00
Marek Posolda 49dc5363bb Merge pull request #2783 from mposolda/master
Easier MariaDB support in tests
2016-05-05 10:04:38 +02:00
Stian Thorgersen 1cc4cc30a6 KEYCLOAK-2549 Re-create master admin client if master realm is overwritten on import 2016-05-05 07:19:32 +02:00
Stian Thorgersen 8799405673 Merge pull request #2784 from abstractj/RHSSO-121
RHSSO-121: Offline Tokens
2016-05-05 06:35:58 +02:00
Bruno Oliveira 9a3bea7062 RHSSO-121: Offline Tokens 2016-05-04 22:48:59 -03:00
Stan Silvert c392f6659e KEYCLOAK-2906 Migrate forms package to new testsuite 2016-05-04 18:46:38 -04:00
mposolda 6a75aec6d8 Easier MariaDB support in tests 2016-05-04 23:08:30 +02:00
wyvie a867a1646a KEYCLOAK-2971: Added basic oidc broker testing to the new testsuite 2016-05-04 17:29:56 +02:00
Stian Thorgersen 5abe06a2b7 Merge pull request #2778 from stianst/master
KEYCLOAK-2880 Permissions tests for admin endpoints
2016-05-04 16:54:25 +02:00
Stian Thorgersen aba69e0628 Suppress log output from resteasy during tests 2016-05-04 13:57:28 +02:00
Stian Thorgersen 2355db57da KEYCLOAK-2880 Permissions tests for admin endpoints 2016-05-04 08:25:05 +02:00
Stian Thorgersen 7796bf3510 Merge pull request #2776 from mhajas/jsconsole-stability
KEYCLOAK-2916 Improve stability of JS-console
2016-05-04 06:35:11 +02:00
mhajas 09d1c8bafc Improve stability of JS-console tests 2016-05-03 15:06:10 +02:00
Stian Thorgersen dcc9e30e8d Merge pull request #2767 from stianst/master
Moved ClientRedirectTest to new testsuite
2016-05-03 05:43:13 +02:00
Vlasta Ramik 01a96b62dc Add app server module and test module for testing fuse6.3, rename feature in fuse6.2 tests 2016-04-28 14:50:10 +02:00
Stian Thorgersen a206a6d16d Merge pull request #2765 from stianst/master
KEYCLOAK-2932 KEYCLOAK-2934
2016-04-28 14:29:22 +02:00
Stian Thorgersen 19c29387fa Moved ClientRedirectTest to new testsuite 2016-04-28 13:42:18 +02:00
Stian Thorgersen 3565706379 Merge pull request #2763 from mposolda/master
KEYCLOAK-2903 Document proxy-address-forwarding with reverse proxy/lo…
2016-04-28 13:11:19 +02:00
Stian Thorgersen 6ec19d0b63 KEYCLOAK-2932 KEYCLOAK-2934 2016-04-28 13:07:15 +02:00
mposolda 71247538ee KEYCLOAK-2903 Document proxy-address-forwarding with reverse proxy/loadbalancer setup 2016-04-28 13:02:39 +02:00
Stian Thorgersen b491a10aa9 Merge pull request #2761 from stianst/master
KEYCLOAK-2933
2016-04-28 13:01:54 +02:00
Stian Thorgersen 20dac1d885 KEYCLOAK-2933
RealmTest is failing on WildFly
2016-04-28 12:22:41 +02:00
Stian Thorgersen 1de3d143aa Merge pull request #2759 from vramik/KEYCLOAK-2928
KEYCLOAK-2928 Enabled/edited CustomAuthFlowCookieTest
2016-04-28 11:03:31 +02:00
Vlasta Ramik 0b875d4688 Enabled/edited CustomAuthFlowCookieTest 2016-04-28 10:22:54 +02:00
Stian Thorgersen acba6cd210 Merge pull request #2748 from thomasdarimont/issue/KEYCLOAK-2924-AdminEvents-on-group-membership-changes
KEYCLOAK-2924: Fire AdminEvents on user group membership changes.
2016-04-28 08:37:46 +02:00
Stian Thorgersen 231e049771 Merge pull request #2753 from ssilvert/migrate-actions
KEYCLOAK-2905 Migrate actions package from old testsuite
2016-04-28 06:43:55 +02:00
Bill Burke 43e88b4d73 Merge pull request #2755 from patriot1burke/master
add bind addresses to domain template
2016-04-27 22:09:07 -04:00
Bill Burke c52da46e54 add bind addresses to domain template 2016-04-27 22:05:01 -04:00
Stan Silvert 29d6832882 KEYCLOAK-2905 Migrate actions package from old testsuite 2016-04-27 14:09:46 -04:00
Bill Burke 15f4c764bc Merge pull request #2752 from patriot1burke/master
KEYCLOAK-2922 KEYCLOAK-2920
2016-04-27 11:37:20 -04:00
Bill Burke 35a9527407 Merge pull request #2750 from stianst/master
KEYCLOAK-2927 Rename add-user script to add-user-keycloak
2016-04-27 11:05:26 -04:00
Bill Burke cd8ba1653d KEYCLOAK-2922 KEYCLOAK-2920 2016-04-27 10:36:36 -04:00
Stian Thorgersen 8d9047c338 KEYCLOAK-2927 Rename add-user script to add-user-keycloak 2016-04-27 16:18:42 +02:00
Thomas Darimont c8d47926b8 KEYCLOAK-2489 - Add support for Script-based AuthenticationExecution definitions.
This is a POC for script based authenticator support.
Introduced a ScriptBasedAuthenticator that is bootstraped via a
ScriptBasedAuthenticatorFactory can be execute a configured script
against a provided execution context.
Added an alias property to the AuthFlowExecutionRepresentation in order
to be able to differentiate multiple instances of an Authenticator
within the same AuthFlow.

For convenience editing the AngularJS bindings for the ACE editor were
added for fancy script editing - this needs to be cut down a bit wrt to
themes and supported scripts - e.g. we probably don't expect users to write
authenticator scripts in Cobol...
Removed currently not needed ACE sytax highlighting and themes.

Scripting is now available to all keycloak components that have access to the KeycloakSession.
Introduced new Scripting SPI for configurable scripting providers.
2016-04-27 14:37:13 +02:00
Stian Thorgersen 83370f0666 Merge pull request #2737 from mhajas/adapter-ssl-PR
KEYCLOAK-2915 Fix adapter ssl tests on EAP/EAP6
2016-04-27 13:50:08 +02:00
Stian Thorgersen d77c1e616f Merge pull request #2734 from vramik/KEYCLOAK-2889
KEYCLOAK-2889 Fix adapter tests for Karaf/Fuse
2016-04-27 13:49:27 +02:00
Stian Thorgersen ae56bb30c9 Merge pull request #2747 from stianst/KEYCLOAK-2871-master
KEYCLOAK-2871 Extend coverage on RealmAdminResource
2016-04-27 13:38:25 +02:00
Thomas Darimont 27ef919d07 KEYCLOAK-2924: Fire AdminEvents on user group membership changes.
We now fire AdminEvents if a user joins or leaves a group.
This information can be used to deduce potential role changes
in custom event listeners.
2016-04-27 11:17:23 +02:00
Marek Posolda dcb6cedfb7 Merge pull request #2743 from mposolda/master-loadbalancer
KEYCLOAK-2903 Fix WelcomeResource to not allow requests forwarded fro…
2016-04-27 11:10:45 +02:00
Stian Thorgersen 95724e36f3 KEYCLOAK-2871 Extend coverage on RealmAdminResource 2016-04-27 10:29:24 +02:00
Marek Posolda ce58f00caa Merge pull request #2745 from mposolda/master
KEYCLOAK-2898 Fix GroupMappersTest on wildfly. Clearing AssertEvents …
2016-04-26 18:01:25 +02:00
mposolda 225523fee0 KEYCLOAK-2898 Fix GroupMappersTest on wildfly. Clearing AssertEvents events queue before test instead of after 2016-04-26 16:10:40 +02:00
mposolda c7335fa242 KEYCLOAK-2903 Fix WelcomeResource to not allow requests forwarded from proxy/loadbalancer 2016-04-26 12:03:43 +02:00
mhajas 57ccbb7f49 Fix adapter ssl tests on EAP/EAP6 2016-04-26 09:15:12 +02:00
Stian Thorgersen 4433a058a4 Merge pull request #2726 from abstractj/RHSSO-106-master
RHSSO-106: Migration of ResourceOwnerPasswordCredentialsGrantTest
2016-04-25 19:46:12 +02:00
Vlasta Ramik bf76be21c7 Fix adapter tests for Karaf/Fuse 2016-04-25 15:29:41 +02:00
Bruno Oliveira bbe7ff1dce RHSSO-106: Migration of ResourceOwnerPasswordCredentialsGrantTest 2016-04-25 10:15:27 -03:00
Marek Posolda 5f16f0ede8 Merge pull request #2732 from mposolda/master
KEYCLOAK-2900
2016-04-25 15:00:09 +02:00
Stian Thorgersen 7dd2b3d7be Merge pull request #2730 from abstractj/RHSSO-130
RHSSO-130: AccessTokenTest migration
2016-04-25 13:43:03 +02:00
Stian Thorgersen 320a9da585 Merge pull request #2711 from ssilvert/migrate-LoginTest
Migrate LoginTest
2016-04-25 13:40:51 +02:00
mposolda fa8b272e76 KEYCLOAK-2900 2016-04-25 13:20:29 +02:00
Marek Posolda 6c3d31dd4c Merge pull request #2728 from mstruk/KEYCLOAK-2899
KEYCLOAK-2899 Tests fail with -Pauth-server-wildfly due to missing logging dependecy
2016-04-22 21:37:48 +02:00
Bruno Oliveira 1cc4ca2e71 RHSSO-130: AccessTokenTest migration 2016-04-22 16:30:57 -03:00
Marko Strukelj eea19e7850 KEYCLOAK-2899 Tests fail with -Pauth-server-wildfly due to missing logging dependecy 2016-04-22 19:48:13 +02:00
Marek Posolda 2047363e86 Merge pull request #2722 from mstruk/KEYCLOAK-2893
KEYCLOAK-2893 Fix TokenIntrospectionTest
2016-04-22 15:16:17 +02:00
Marek Posolda 0d88c9050a Merge pull request #2718 from abstractj/RHSSO-108-client-auth-signed
Rhsso 108 client auth signed
2016-04-22 15:07:10 +02:00
Marek Posolda 236fcd66d4 Merge pull request #2721 from mposolda/master
KEYCLOAK-2878 UserFederation admin tests
2016-04-22 15:00:44 +02:00
Marko Strukelj 1a5517f986 KEYCLOAK-2893 Fix TokenIntrospectionTest 2016-04-22 14:23:59 +02:00
mposolda 01cc0d0e1d KEYCLOAK-2878 Added UserFederationLdapConnectionTest 2016-04-22 14:03:51 +02:00
mposolda e0aedfb93d KEYCLOAK-2878 UserFederation mapper testing 2016-04-22 14:03:42 +02:00
Marek Posolda 0797cf6db7 Merge pull request #2716 from mstruk/KEYCLOAK-2893
KEYCLOAK-2893 Fix TokenIntrospectionTest
2016-04-22 13:42:54 +02:00
Bruno Oliveira ec77970021 Inclusion of try/finally suggested by Stian 2016-04-22 08:29:32 -03:00
Bruno Oliveira 30f34173c5 RHSSO-108: Migration of ClientAuthSignedJWTTest 2016-04-22 08:29:28 -03:00
Marko Strukelj 0e52781a1f KEYCLOAK-2893 Fix TokenIntrospectionTest 2016-04-22 11:18:09 +02:00
Marek Posolda 10bda7c96d Merge pull request #2715 from mposolda/master
UserFederation admin testing
2016-04-22 00:43:37 +02:00
mposolda afcdce6b71 Simplified calling of AuthenticationManagementResource.getExecutions() 2016-04-21 23:11:25 +02:00
mposolda f6a718f10a KEYCLOAK-2878 Testing of UserFederation admin REST endpoints 2016-04-21 23:11:14 +02:00
Stan Silvert 9335ab6b22 Migrate LoginTest 2016-04-21 09:37:54 -04:00
Stian Thorgersen 631dcd93e6 Merge pull request #2707 from stianst/KEYCLOAK-2866
KEYCLOAK-2866 KEYCLOAK-2874 Test role mapping resource
2016-04-21 14:58:15 +02:00
Stian Thorgersen 756cc0dca0 KEYCLOAK-2866 KEYCLOAK-2874 Test role mapping resource 2016-04-21 14:21:27 +02:00
Stian Thorgersen 9fcef2c80f Merge pull request #2705 from stianst/KEYCLOAK-2868
KEYCLOAK-2868 Extend coverage of GroupResource tests
2016-04-21 13:38:14 +02:00
Stian Thorgersen 19b05ad62f Merge pull request #2704 from stianst/KEYCLOAK-2838
KEYCLOAK-2838: Add cookie storage fallback to keycloak.js
2016-04-21 13:37:52 +02:00
Stian Thorgersen 578b5e2b59 KEYCLOAK-2868 Extend coverage of GroupResource tests 2016-04-21 11:52:20 +02:00
Stian Thorgersen 6776f5c341 Merge pull request #2701 from stianst/KEYCLOAK-2873
KEYCLOAK-2873 / KEYCLOAK-2875 Test RoleContainerResource
2016-04-21 11:47:50 +02:00
Maximilian Szengel c3c3b90fb9 KEYCLOAK-2838: Add cookie storage fallback to keycloak.js 2016-04-21 11:07:41 +02:00
Stian Thorgersen 34d5e85316 KEYCLOAK-2873 / KEYCLOAK-2875 Test RoleContainerResource 2016-04-21 10:58:46 +02:00
Stian Thorgersen d0a9e45826 Merge pull request #2700 from stianst/KEYCLOAK-2864
KEYCLOAK-2864 Test InitialAccessTokenResource
2016-04-21 10:27:11 +02:00
Stian Thorgersen 23b4b4283b KEYCLOAK-2864 Test InitialAccessTokenResource 2016-04-21 09:44:29 +02:00
Stian Thorgersen 673253a539 Merge pull request #2697 from stianst/KEYCLOAK-2872
KEYCLOAK-2872 Test RoleByIdResource
2016-04-21 09:31:43 +02:00
Stian Thorgersen 4f5b71d81a KEYCLOAK-2872 Test RoleByIdResource 2016-04-21 07:09:25 +02:00
Stian Thorgersen 70ae0b2317 Merge pull request #2694 from abstractj/RHSSO-108
RHSSO-108: Client signed token authentication (master)
2016-04-21 06:19:25 +02:00
Stian Thorgersen d91a9df177 Merge pull request #2696 from stianst/master
Ignore failing CustomAuthFlowCookieTest
2016-04-21 06:07:33 +02:00
Stian Thorgersen 27fd5f395f Ignore failing CustomAuthFlowCookieTest 2016-04-21 06:05:45 +02:00
Bruno Oliveira 2f3b5e9b88 RHSSO-108: Client signed token authentication 2016-04-20 20:47:50 -03:00
Stian Thorgersen 9edc2000e7 Merge pull request #2690 from stianst/role-assertevents
Made AssertEvents work with @Rule
2016-04-20 21:44:47 +02:00
Stian Thorgersen b6257e66b3 Merge pull request #2679 from pedroigor/KEYCLOAK-2835
[KEYCLOAK-2835] - Adding SOAP binding to the list of supported SingleSignOnService.
2016-04-20 20:13:49 +02:00
Stian Thorgersen 890af8da52 Made AssertEvents work with @Rule 2016-04-20 20:09:09 +02:00
Stian Thorgersen 974906d37f Merge pull request #2688 from ssilvert/master
Rename oauthClient to oauth in AbstractKeycloakTst
2016-04-20 19:40:50 +02:00
Stian Thorgersen f2f2158154 Merge pull request #2687 from mposolda/master
KEYCLOAK-2842 Not possible to add new execution under registration flow
2016-04-20 19:40:34 +02:00
Stian Thorgersen ea99a05ffe Merge pull request #2684 from mstruk/assert-events-refactor
KEYCLOAK-2755 Refactor testsuite events provider
2016-04-20 19:36:57 +02:00
Stian Thorgersen 0cffa5740d Merge pull request #2683 from stianst/KEYCLOAK-2861-master
KEYCLOAK-2861 Test AttackDetectionResource
2016-04-20 19:36:11 +02:00
mposolda a341889d2c KEYCLOAK-2842 Not possible to add new execution under registration flow 2016-04-20 18:39:11 +02:00
Stan Silvert 9007f8b19c Rename oauthClient to oauth in AbstractKeycloakTst 2016-04-20 12:37:38 -04:00
Marko Strukelj b8832d2d71 KEYCLOAK-2755 Refactor testsuite events provider 2016-04-20 16:43:20 +02:00
Stian Thorgersen 86dfcecef6 KEYCLOAK-2861 Test AttackDetectionResource 2016-04-20 16:21:57 +02:00
Stian Thorgersen 8efbdce810 Merge pull request #2680 from stianst/KEYCLOAK-2850
Moved admin tests from endpoint package back to admin package
2016-04-20 15:35:49 +02:00
Stian Thorgersen 1667ada111 Moved admin tests from endpoint package back to admin package 2016-04-20 14:56:07 +02:00
Stian Thorgersen b6ed681402 Merge pull request #2677 from stianst/KEYCLOAK-2850
KEYCLOAK-2850 Migrated ImpersonationTest and added builders
2016-04-20 14:48:05 +02:00
Marek Posolda 2dcf96eaad Merge pull request #2675 from mposolda/master
Client template fixes
2016-04-20 14:13:55 +02:00
Stian Thorgersen b8b40e75ef KEYCLOAK-2850 Migrated ImpersonationTest and added builders 2016-04-20 13:52:08 +02:00
Pedro Igor 81e4f4b351 [KEYCLOAK-2835] - Adding SOAP binding to the list of supported SingleSignOnService. 2016-04-20 08:48:59 -03:00
mposolda afc8179cf8 KEYCLOAK-2846 export/import of clientTemplate scopes 2016-04-20 13:30:01 +02:00
mposolda 919a3791ea KEYCLOAK-2844 Unexpected error when trying to remove clientTemplate in use 2016-04-20 13:25:13 +02:00
Stian Thorgersen e490a6e3bd Merge pull request #2673 from stianst/master
KEYCLOAK-2850 Migrated ConcurrencyTest
2016-04-20 12:49:48 +02:00
Stian Thorgersen eab548d7f0 Merge pull request #2671 from stianst/KEYCLOAK-2491
KEYCLOAK-2491 Fix permissions in admin console to match permissions i…
2016-04-20 12:49:28 +02:00
Stian Thorgersen 37256b6b8f KEYCLOAK-2850 Migrated ConcurrencyTest 2016-04-20 10:07:16 +02:00
Stian Thorgersen 04d76b0052 KEYCLOAK-2491 Fix permissions in admin console to match permissions in admin endpoints 2016-04-20 09:57:57 +02:00
Marek Posolda ecd3d2187f Merge pull request #2670 from mposolda/master
KEYCLOAK-2850 Migrate RealmTest from old testsuite to new
2016-04-20 09:33:47 +02:00
Stian Thorgersen b3d40c6f85 Merge pull request #2667 from stianst/KEYCLOAK-2832
KEYCLOAK-2832
2016-04-20 09:10:49 +02:00
mposolda d415bdb3d2 Remove AbstractAdminTest.assertNames and related methods (as they are available in Assert class) 2016-04-20 08:22:42 +02:00
mposolda 060527ac67 KEYCLOAK-2850 migrate RealmTest from old testsuite to new 2016-04-20 08:22:32 +02:00
Stian Thorgersen f71273a1f9 KEYCLOAK-2832
Authentication failure logs at ERROR level
2016-04-20 07:32:07 +02:00
Stian Thorgersen 656161ff61 Merge pull request #2651 from mhajas/truststore
KEYCLOAK-2841 Trustore support in adapter tests
2016-04-20 06:57:01 +02:00
Marek Posolda 2044e47d03 Merge pull request #2666 from mposolda/master
KEYCLOAK-2852 Moved JAAS classes back to package org.keycloak.adapter…
2016-04-19 23:00:02 +02:00
mposolda 6baa2228e7 KEYCLOAK-2852 Moved JAAS classes back to package org.keycloak.adapters.jaas 2016-04-19 22:19:10 +02:00
Stian Thorgersen d9f82affb0 Merge pull request #2664 from stianst/master
Migrate pages from old testsuite, make OAuthClient injectable
2016-04-19 22:08:47 +02:00
Stian Thorgersen d2e3389414 Removed duplicated ClientInitialAccessTest 2016-04-19 20:34:59 +02:00
Stian Thorgersen 7cf77e1bb4 Merge pull request #2662 from vmuzikar/master
KEYCLOAK-2854 Fix Client Settings Console UI test
2016-04-19 20:32:09 +02:00
Stian Thorgersen da2ad8f645 Merge pull request #2661 from mmerdes/patch-1
Update spring-boot-adapter.xml
2016-04-19 20:31:32 +02:00
Stian Thorgersen f4a41071ea Merge pull request #2652 from abstractj/apiutil-removal
Removal of duplicated API Util
2016-04-19 20:31:15 +02:00
Stian Thorgersen a44add29b4 Merge pull request #2646 from tkyjovsk/performance-tests
Added module 'adapters/jboss/remote' with performance tests.
2016-04-19 20:30:26 +02:00
Stian Thorgersen de8ffae427 Migrate pages from old testsuite, make OAuthClient injectable 2016-04-19 20:16:55 +02:00
Vaclav Muzikar 3d370f9d11 KEYCLOAK-2854 Fix Client Settings Console UI test 2016-04-19 17:54:58 +02:00
Matthias Merdes 257ccbb939 Update spring-boot-adapter.xml
fixed typo in spring boot example configuration
2016-04-19 17:02:37 +02:00
Marek Posolda bead313e27 Merge pull request #2658 from stianst/KEYCLOAK-2850
KEYCLOAK-2850 Migrate admin endpoint identity provider test
2016-04-19 16:24:52 +02:00
Marek Posolda 0ad4041fd9 Merge pull request #2656 from mposolda/master
KEYCLOAK-2849 Admin endpoint tests for client templates
2016-04-19 15:22:11 +02:00
Bruno Oliveira 8d1108ba1b Removal of duplicated API Util 2016-04-19 10:21:17 -03:00
mposolda fb5e5d5cb6 KEYCLOAK-2849 Admin endpoint tests for client templates 2016-04-19 14:37:38 +02:00
Stian Thorgersen 899c9f48e9 KEYCLOAK-2850 Migrate admin endpoint identity provider test 2016-04-19 14:27:16 +02:00
Stian Thorgersen 2d36d48356 Merge pull request #2654 from stianst/KEYCLOAK-2828
KEYCLOAK-2828
2016-04-19 13:44:14 +02:00
Stian Thorgersen 5606160e70 KEYCLOAK-2828 Refactor contribution and add tests 2016-04-19 13:09:00 +02:00
Thomas Raehalme cd1094c3ad KEYCLOAK-2828: LoginStatusIframeEndpoint now sets the P3P header.
IE requires a P3P header to be present in <iframe /> response. Otherwise
cookies are forbidden. The value of the header does not seem to matter.
2016-04-19 10:24:28 +02:00
Marek Posolda 069d362778 Merge pull request #2649 from pdrozd/KEYCLOAK-2839
KEYCLOAK-2839 - kerberos tests migration.
2016-04-18 20:05:58 +02:00
mhajas 77c37ccaf6 Trustore support in adapter tests + fix tests 2016-04-18 16:14:10 +02:00
Pavel Drozd c52c2eb471 KEYCLOAK-2839 - kerberos tests migration. 2016-04-18 14:37:33 +02:00
Tomas Kyjovsky 92d9808cc0 Added module 'adapters/jboss/remote' with performance tests. 2016-04-18 14:10:36 +02:00
Bill Burke 8830f87a76 Merge pull request #2644 from patriot1burke/master
KEYCLOAK-2740
2016-04-15 17:42:26 -04:00
Bill Burke 600f429abb KEYCLOAK-2740 2016-04-15 16:49:06 -04:00
Bill Burke fdcc2d32f6 Merge pull request #2607 from vramik/KEYCLOAK-2757
KEYCLOAK-2757 Add tests to cover custom auth flows
2016-04-15 16:28:05 -04:00
Bill Burke 9083bbf669 Merge pull request #2643 from patriot1burke/master
KEYCLOAK-2584
2016-04-15 16:27:39 -04:00
Bill Burke 58b5c3d75d KEYCLOAK-2584 2016-04-15 15:15:04 -04:00
Stian Thorgersen 44c3a56a21 Merge pull request #2635 from ssilvert/migrate-oauth-client-2
KEYCLOAK-2743: Port OAuthClient to new testsuite
2016-04-15 08:41:46 +02:00
Stan Silvert 6805b991e1 Move test under 'endpoint' package. 2016-04-14 19:46:15 -04:00
Stan Silvert e25a0d3cf1 Create TestRealmKeycloakTest as common base class for tests that need
testrealm.json.  Rename admin packaget to endpoint.  Rename legacy package
to match old testsuite.
test suite.
2016-04-14 15:39:32 -04:00
Stan Silvert ca72a3bd70 KEYCLOAK-2743: Port OAuthClient to new testsuite 2016-04-14 15:39:03 -04:00
Stian Thorgersen 3f6377b31f Merge pull request #2634 from stianst/master
KEYCLOAK-2827 ModuleLoadError: org.keycloak.keycloak-core-public:main
2016-04-14 15:30:05 +02:00
Stian Thorgersen 0008d50dfa KEYCLOAK-2827 ModuleLoadError: org.keycloak.keycloak-core-public:main 2016-04-14 15:23:21 +02:00
Stian Thorgersen a723dde180 Merge pull request #2632 from stianst/master
KEYCLOAK-2825 KEYCLOAK-2826 Remove private for org.keycloak.keycloak-…
2016-04-14 15:21:36 +02:00
Stian Thorgersen 9ef29b6a3e KEYCLOAK-2825 KEYCLOAK-2826 Remove private for org.keycloak.keycloak-adapter-core and org.keycloak.keycloak-adapter-spi modules 2016-04-14 14:41:40 +02:00
Marek Posolda 2a5fd36b6c Merge pull request #2630 from mposolda/master
KEYCLOAK-2823 Password policy 'hashAlgorithm' value not correctly sho…
2016-04-14 13:56:03 +02:00
Stian Thorgersen 2d9bb402fc Merge pull request #2628 from ilanddev/master
KEYCLOAK-2821 Add adapter option
2016-04-14 13:23:11 +02:00
mposolda 44ea920f92 KEYCLOAK-2823 Password policy 'hashAlgorithm' value not correctly shown in admin console 2016-04-14 13:16:14 +02:00
Jonathan Masmejean b4ce19c231 fix formating issue. 2016-04-14 12:00:41 +02:00
Jonathan Masmejean 93b54ce13a KEYCLOAK-2821 : Add the adapter option
You just can add an 'adapter' option to the kc.init() function like :

kc.init({adapter: "default | cordova"});

This will allow the users to choose the adapter they want. They can force the use of the default adapter even if they are using cordova or use the cordova adapter even if they are using a regular desktop.

If you omit this parameter, it just fallback to the old way. So, if you are under cordova it will run the cordova adapter and if you are under a desktop, it will load the default adapter instead.

Hope this can help.
2016-04-14 11:59:34 +02:00
Marek Posolda 3275b528f9 Merge pull request #2627 from mposolda/master
Migration and mongo fix
2016-04-14 11:48:16 +02:00
mposolda 5263101bc0 KEYCLOAK-2820 Mongo doesn't start on wildfly 2016-04-14 10:43:57 +02:00
mposolda 32d7464e52 KEYCLOAK-2819 Fix realm security header setup after migration 2016-04-14 10:43:48 +02:00
Stian Thorgersen 9e3fa4b566 Merge pull request #2624 from stianst/master
KEYCLOAK-2818
2016-04-14 09:14:31 +02:00
Stian Thorgersen f64ffcbefe KEYCLOAK-2818
Fix poms not updated by versions plugin
2016-04-14 08:16:07 +02:00
Stian Thorgersen 3bc57c19f0 Fix to cors-example-fix 2016-04-14 07:09:35 +02:00
Stian Thorgersen 5328d760fa Merge branch 'cors-example-fix-master' of https://github.com/abstractj/keycloak 2016-04-14 07:08:12 +02:00
Stian Thorgersen 8095587e63 Merge pull request #2623 from patriot1burke/master
merge adapter-spi adapter-spi-public
2016-04-14 07:03:50 +02:00
Stian Thorgersen 5c4bcdce57 Merge pull request #2621 from abstractj/minor-fix-master
There's no such profile for this example (master)
2016-04-14 07:02:43 +02:00
Stian Thorgersen 125eff9a95 Merge pull request #2618 from abstractj/angular2-example
Example points to wrong KC version
2016-04-14 07:00:34 +02:00
Stian Thorgersen 641dc9b3ef Merge pull request #2620 from abstractj/cordova-master
inappbrowser plugin returns 404 with the current namespace (master)
2016-04-14 06:59:58 +02:00
Bill Burke b080e1e782 merge adapter-spi adapter-spi-public 2016-04-13 22:25:30 -04:00
Bruno Oliveira f103480518 There's no such profile for this example 2016-04-13 15:50:24 -03:00
Bruno Oliveira 9af8af73bf inappbrowser plugin returns 404 with the current namespace 2016-04-13 15:48:48 -03:00
Bruno Oliveira 7279c88638 Fix the broken logout URL 2016-04-13 15:47:23 -03:00
Bruno Oliveira a714896264 Make the client URL match exactly the same configured at the realm 2016-04-13 15:47:15 -03:00
Bruno Oliveira 29eadf915a Example points to wrong KC version 2016-04-13 15:45:41 -03:00
Marek Posolda 3d310f8cc6 Merge pull request #2611 from mposolda/master
KEYCLOAK-2812 Make testsuite-arquillian working with -Pauth-server-wi…
2016-04-13 16:41:24 +02:00
mposolda 5a108c60a0 KEYCLOAK-2812 Make testsuite-arquillian working with -Pauth-server-wildfly 2016-04-13 16:05:03 +02:00
Marek Posolda 59535e4c43 Merge pull request #2608 from mposolda/master
KEYCLOAK-2811 FederationProvidersIntegrationTest.testReadOnly failing…
2016-04-13 13:50:04 +02:00
mposolda df1c111a72 KEYCLOAK-2811 FederationProvidersIntegrationTest.testReadOnly failing on MSAD 2016-04-13 12:40:39 +02:00
Marek Posolda 7bcd954e91 Merge pull request #2604 from mposolda/master
KEYCLOAK-2809 NPE when removing role, which is in scope of some Clien…
2016-04-13 12:39:04 +02:00
Vlasta Ramik 1754f242c7 Add tests to cover custom auth flows 2016-04-13 12:34:20 +02:00
Stian Thorgersen 794c4bc5f1 Merge pull request #2602 from stianst/KEYCLOAK-2810
KEYCLOAK-2810 Added robots.txt and robots meta header
2016-04-13 11:58:20 +02:00
mposolda 3c3bbdbbdb KEYCLOAK-2809 NPE when removing role, which is in scope of some ClientTemplate 2016-04-13 11:49:29 +02:00
Stian Thorgersen 6a428c8ee7 KEYCLOAK-2810 Added robots.txt and robots meta header 2016-04-13 11:22:57 +02:00
Marek Posolda d1a3ff8707 Merge pull request #2599 from mposolda/master
Fix testsuite with Mongo
2016-04-13 11:06:51 +02:00
Stian Thorgersen 9f0149d69c Merge pull request #2600 from stianst/KEYCLOAK-2804
KEYCLOAK-2804 Prevent browser from prefilling username/password into …
2016-04-13 10:39:46 +02:00
Stian Thorgersen bb3937e3c1 KEYCLOAK-2804 Prevent browser from prefilling username/password into non-login form 2016-04-13 10:00:48 +02:00
mposolda a52fb53ac7 Fix testsuite with Mongo 2016-04-13 09:55:28 +02:00
Bill Burke d5c0769499 Merge pull request #2596 from patriot1burke/master
KEYCLOAK-2790
2016-04-12 19:45:27 -04:00
Bill Burke 8f7f9e0b9c KEYCLOAK-2790 2016-04-12 18:25:23 -04:00
Bill Burke 6b261cd6e9 Merge pull request #2585 from mhajas/secureDeployment-PR
KEYCLOAK-2199 Add tests for secure deployment
2016-04-12 17:53:29 -04:00
Bill Burke b2a803929d Merge pull request #2567 from cpitman/proxy-headers
KEYCLOAK-2791 - Proxy handling for X-Forwarded headers
2016-04-12 17:53:15 -04:00
Bill Burke 137edf9b1a Merge pull request #2587 from vramik/KEYCLOAK-2794
KEYCLOAK-2794 Change undertow-embedded version
2016-04-12 17:52:45 -04:00
Bill Burke 3a669ad7d5 Merge pull request #2594 from patriot1burke/master
public private api
2016-04-12 17:51:57 -04:00
Bill Burke 7ec82ee7e2 public/private api 2016-04-12 16:48:30 -04:00
Bill Burke 515ed226be Merge remote-tracking branch 'upstream/master' 2016-04-12 15:19:58 -04:00
Bill Burke cca91dd175 public/private 2016-04-12 15:19:46 -04:00
Stian Thorgersen ca46621782 Merge pull request #2591 from stianst/KEYCLOAK-2807
KEYCLOAK-2807 Fix server info providers page
2016-04-12 16:18:17 +02:00
Stian Thorgersen 1c2eafeb80 KEYCLOAK-2807 Fix server info providers page 2016-04-12 15:38:52 +02:00
Stian Thorgersen 7109ad247f Merge pull request #2589 from stianst/KEYCLOAK-2799
KEYCLOAK-2799 Show error for identity brokering login if user is disa…
2016-04-12 14:11:15 +02:00
Stian Thorgersen 538e49117f KEYCLOAK-2799 Show error for identity brokering login if user is disabled 2016-04-12 13:14:42 +02:00
Stian Thorgersen fcf7b28b8f Merge pull request #2583 from stianst/KEYCLOAK-2803
KEYCLOAK-2803 Fix failure to add execution to client flow
2016-04-12 13:05:05 +02:00
Vlasta Ramik 36266b8574 Change undertow-embedded version from snapshot to released version 1.0.0.Alpha2 2016-04-12 09:40:57 +02:00
mhajas 8d15520939 Add tests for secure deployment 2016-04-12 09:13:15 +02:00
Stian Thorgersen 350a9cd997 KEYCLOAK-2803 Fix failure to add execution to client flow 2016-04-12 08:04:15 +02:00
Stian Thorgersen a67ead6a1b Merge pull request #2581 from stianst/KEYCLOAK-2770
KEYCLOAK-2770 Close mail transport after sending message
2016-04-12 07:43:56 +02:00
Stian Thorgersen 512a5ef079 Merge pull request #2572 from pdrozd/KEYCLOAK-2794
KEYCLOAK-2794 - changed version of undertow-embedded.
2016-04-12 07:42:13 +02:00
Stian Thorgersen d748f7e459 Merge pull request #2573 from stianst/KEYCLOAK-2700
KEYCLOAK-2700 Import existing realm fails due to can't delete group
2016-04-12 07:20:01 +02:00
Stian Thorgersen bd2238dbb8 KEYCLOAK-2770 Close mail transport after sending message 2016-04-12 07:06:52 +02:00
Marek Posolda bed8db7466 Merge pull request #2579 from mposolda/master
Identity brokering error handling fixes
2016-04-12 00:08:52 +02:00
mposolda e4f75409c9 KEYCLOAK-2802 NPE during identity broker cancelled from account mgmt 2016-04-11 23:31:24 +02:00
mposolda 98ad9b7e7c KEYCLOAK-2801 Redirected to login theme error page after failed social linking from account management 2016-04-11 23:30:18 +02:00
Marek Posolda 9579a7317e Merge pull request #2577 from mposolda/master
KEYCLOAK-2769 Better error handling of expired code in IdentityBroker…
2016-04-11 18:56:27 +02:00
mposolda 3e9ba71baa KEYCLOAK-2769 Better error handling of expired code in IdentityBrokerService 2016-04-11 18:20:26 +02:00
Marek Posolda 23e261244c Merge pull request #2575 from mposolda/master
KEYCLOAK-2795 Testsuite fails sometimes with NPE in LockServiceFactor…
2016-04-11 10:50:56 +02:00
mposolda 65f94fdf84 KEYCLOAK-2795 Testsuite fails sometimes with NPE in LockServiceFactory.getLockService 2016-04-11 10:09:15 +02:00
Stian Thorgersen e588860c21 KEYCLOAK-2700 Import existing realm fails due to can't delete group 2016-04-11 09:18:57 +02:00
Stian Thorgersen dccc338622 Merge pull request #2569 from stianst/KEYCLOAK-2766
KEYCLOAK-2766 Add missing id to AuthenticatorConfigRepresentation
2016-04-11 08:35:30 +02:00
Pavel Drozd ba788eb678 KEYCLOAK-2794 - changed version of undertow-embedded. 2016-04-11 08:04:19 +02:00
Stian Thorgersen 01beff741d KEYCLOAK-2766 Add missing id to AuthenticatorConfigRepresentation 2016-04-11 07:42:55 +02:00
Stian Thorgersen 5b156595fb Merge pull request #2561 from vramik/KEYCLOAK-2783-2.x
KEYCLOAK-2783 added nexus-staging-maven-plugin
2016-04-11 07:14:45 +02:00
Stian Thorgersen 19deb7c65e Merge pull request #2562 from guusdk/KEYCLOAK-2785
KEYCLOAK-2785: Admin client should be able to delete a user.
2016-04-11 07:14:06 +02:00
Stian Thorgersen 58b66b788f Merge pull request #2558 from mhajas/js-console-stability-PR
KEYCLOAK-2780 Better stability in JSConsole test
2016-04-11 07:12:22 +02:00
Stian Thorgersen 0447d857fd Merge pull request #2556 from mhajas/secure-porta-PR
KEYCLOAK-2779 Fix DemoServletAdpater tests
2016-04-11 07:11:19 +02:00
Stian Thorgersen 42b00ae080 Merge pull request #2554 from mhajas/eap6URLs-PR
KEYCLOAK-2778 Fix urls on eap6
2016-04-11 07:09:48 +02:00
Chris Pitman eb8d02a691 KEYCLOAK-2791 - Proxy handling for X-Forwarded headers 2016-04-09 02:11:59 -04:00
Marek Posolda 1ba6a27d0e Merge pull request #2564 from mposolda/master
KEYCLOAK-2769 Fix NPE during 'Identity Broker cancelled' and instead …
2016-04-08 22:14:19 +02:00
mposolda ee9c87877f KEYCLOAK-2769 Fix NPE during 'Identity Broker cancelled' and instead show keycloak 'we are sorry' page 2016-04-08 19:07:06 +02:00
Guus der Kinderen 38670df49a KEYCLOAK-2785: Admin client should be able to delete a user.
The delete user service should be exposed in the admin client.
2016-04-08 16:34:46 +02:00
Vlasta Ramik 54e745c6c9 added nexus-staging-maven-plugin 2016-04-08 15:40:26 +02:00
mhajas d730da757e Better stability in JSConsole test 2016-04-08 13:55:33 +02:00
mhajas fbca45d336 Fix DemoServlet test 2016-04-08 13:38:42 +02:00
mhajas ff66d471e2 Fix timeouts in DemoServlets tests 2016-04-08 13:37:22 +02:00
mhajas c65a156939 Fix urls on eap6 2016-04-08 13:26:16 +02:00
Marek Posolda def40448ac Merge pull request #2553 from mposolda/master
KEYCLOAK-2614 Refactor database lock to use 'SELECT FOR UPDATE' pessi…
2016-04-08 13:18:46 +02:00
mposolda 90fc721315 KEYCLOAK-2614 Refactor database lock to use 'SELECT FOR UPDATE' pessimistic locking 2016-04-08 12:20:54 +02:00
Stian Thorgersen ed97a9b6f3 Merge pull request #2551 from stianst/KEYCLOAK-2683
KEYCLOAK-2683 Remove QRCodeResource and embed QR code in image
2016-04-08 09:53:28 +02:00
Stian Thorgersen 8ea057a122 KEYCLOAK-2683 Remove QRCodeResource and embed QR code in image 2016-04-08 09:00:57 +02:00
Stian Thorgersen 5167b623d5 Merge pull request #2548 from stianst/master
KEYCLOAK-2774
2016-04-08 06:59:55 +02:00
Stian Thorgersen 1e1bf97ffc KEYCLOAK-2774
Adapters logout section points to removed tokens endpoint
2016-04-08 06:59:39 +02:00
Stian Thorgersen ef1f34d933 Merge pull request #2544 from vmuzikar/master
KEYCLOAK-2772 Add deletion test to GroupTest
2016-04-08 06:51:29 +02:00
Stian Thorgersen 57a14627e1 Merge pull request #2543 from stianst/KEYCLOAK-2646
KEYCLOAK-2646 Admin console shows 'Page not found' after password reset
2016-04-07 19:37:01 +02:00
Stian Thorgersen 1cba5e5428 Merge pull request #2546 from grossws/fix-PR-2449
Revert accidentally removed ResteasyClient configuration in admin
2016-04-07 19:35:43 +02:00
Konstantin Gribov 974c5615af Revert accidentally removed ResteasyClient configuration in admin
Fixes accidentally removed in PR #2449 ResteasyClient pool size parameter in
`org.keycloak.admin.client.Keycloak`.
2016-04-07 20:24:57 +03:00
Vaclav Muzikar 861e44b9c8 KEYCLOAK-2772 Add deletion test to GroupTest 2016-04-07 18:03:51 +02:00
Stian Thorgersen c1a8e692d0 Merge pull request #2538 from stianst/KEYCLOAK-2751
KEYCLOAK-2751
2016-04-07 16:27:11 +02:00
Stian Thorgersen 2a9304eb79 KEYCLOAK-2646 Admin console shows 'Page not found' after password reset 2016-04-07 16:26:20 +02:00
Stian Thorgersen e8932bbea0 Merge pull request #2449 from grossws/KEYCLOAK-2236
KEYCLOAK-2236 add service account support to keycloak-admin-client
2016-04-07 15:45:10 +02:00
Stian Thorgersen 63ad95a766 Merge pull request #2539 from guusdk/KEYCLOAK-2767
KEYCLOAK-2767: Should return a primitive if possible.
2016-04-07 15:41:33 +02:00
Stian Thorgersen b6d861fea6 KEYCLOAK-2751
Separate HTTP status codes for REST API errors
2016-04-07 15:39:12 +02:00
Konstantin Gribov 96424536a7 Add service account support to Keycloak admin client
Added grant_type=client_credentials support to keycloak-admin-client
so `keycloak-admin-client` can be used with service client account.

Fixes #KEYCLOAK-2236
2016-04-07 15:24:07 +03:00
Stian Thorgersen b86f15f32a Merge pull request #2381 from thomasdarimont/issue/KEYCLOAK-2054
KEYCLOAK-2054 - Allow to configure proxy for auth-server requests in adapters.
2016-04-07 14:02:36 +02:00
Guus der Kinderen be578684b9 KEYCLOAK-2767: Should return a primitive if possible.
A JSON primitive is valid JSON. There is no need to construct a JSON object
just for the sake of being JSON complient. This keeps things nice and simple.
2016-04-07 13:19:29 +02:00
Thomas Darimont bccc5fa7b1 KEYCLOAK-2054 - Allow to configure proxy for auth-server requests in adapters.
Previously the adapter configuration did not support specifying a proxy
for auth-server requests issued via the Apache HTTP Client by Keycloak.
This made it very difficult to connect an Application with Keycloak
that was required to use a proxy.

Introduced new `proxy-url` attribute to the adapter configuration
which makes it possible to configure a proxy to be used for auth-server
requests. Proxy-Host, Proxy-Port and Proxy-Scheme are taken from the
configured proxy URL.
Note that proxies that require authentication are currently not supported.
2016-04-07 11:09:40 +02:00
Stian Thorgersen d98cd4235c Merge pull request #2535 from stianst/master
KEYCLOAK-2763
2016-04-07 09:37:00 +02:00
Stian Thorgersen 08a0862369 KEYCLOAK-2763
Document requirement to use a secure private network for clustering
2016-04-07 09:36:43 +02:00
Stian Thorgersen f2dd556323 Merge pull request #2532 from stianst/KEYCLOAK-2762
KEYCLOAK-2762 Renaming a realm without saving the form affects all li…
2016-04-07 09:34:35 +02:00
Stian Thorgersen 6dc1194247 Merge pull request #2508 from guusdk/KEYCLOAK-2731
KEYCLOAK-2731: Improve thread safety of TokenManager
2016-04-07 07:36:22 +02:00
Stian Thorgersen a7c956bf10 Merge pull request #2505 from guusdk/KEYCLOAK-2746
KEYCLOAK-2746: By default, allow for concurrent usage
2016-04-07 07:35:39 +02:00
Stian Thorgersen 0907feb508 Merge pull request #2446 from guusdk/KEYCLOAK-2726
KEYCLOAK-2726: Invalidate token upon failure
2016-04-07 07:24:03 +02:00
Stian Thorgersen 30e2709bd0 Merge pull request #2443 from guusdk/KEYCLOAK-2721
KEYCLOAK-2721: Do not recreate TokenService proxy
2016-04-07 07:20:46 +02:00
Stian Thorgersen f585f5dfc9 Merge pull request #2530 from stianst/KEYCLOAK-2761
KEYCLOAK-2761 Broken on/off switch at Client Mappers with specific wi…
2016-04-07 07:13:35 +02:00
Stian Thorgersen 61ae15cf56 KEYCLOAK-2762 Renaming a realm without saving the form affects all links in Console 2016-04-07 06:59:21 +02:00
Stian Thorgersen 139e19514b Merge pull request #2528 from stianst/KEYCLOAK-2760
KEYCLOAK-2760
2016-04-07 06:51:24 +02:00
Stian Thorgersen 19b82f00d4 Merge pull request #2527 from stianst/KEYCLOAK-2759
KEYCLOAK-2759 Fix error message when renaming realm to name that exists
2016-04-07 06:50:55 +02:00
Stian Thorgersen 623ec6c510 Merge pull request #2524 from stianst/KEYCLOAK-2758
KEYCLOAK-2758
2016-04-07 06:50:05 +02:00
Stian Thorgersen a1b6310777 Merge pull request #2523 from winfinit/master
added text wrapping in js-console example
2016-04-07 06:28:54 +02:00
Stian Thorgersen d395a9e318 KEYCLOAK-2761 Broken on/off switch at Client Mappers with specific window width 2016-04-07 06:18:40 +02:00
Stian Thorgersen 729d73bb17 KEYCLOAK-2760
Cannot delete a client template mapper with a little trash icon in heading
2016-04-07 06:06:55 +02:00
Stian Thorgersen 2694e003c4 KEYCLOAK-2759 Fix error message when renaming realm to name that exists 2016-04-07 06:00:31 +02:00
Stian Thorgersen 5854e44391 KEYCLOAK-2758
Weird behavior of add/remove button for 'Valid Redirect URIs' in a client settings form
2016-04-07 05:43:07 +02:00
Roman Jurkov 361f0b5048 added text wrapping in js-console example 2016-04-06 13:49:47 -04:00
Stian Thorgersen 8de8446cb5 Merge pull request #2520 from stianst/KEYCLOAK-2756
KEYCLOAK-2756
2016-04-06 19:25:53 +02:00
Stian Thorgersen 6ccf3549ad KEYCLOAK-2756
Renaming a realm breaks down the Clients
2016-04-06 15:18:49 +02:00
Marek Posolda c469109d22 Merge pull request #2517 from mposolda/master
KEYCLOAK-1982 Some builtin objects might be missing when import JSON exported from previous versions
2016-04-06 13:24:32 +02:00
Stian Thorgersen 8164c05cb8 Merge pull request #2519 from stianst/master
KEYCLOAK-2752
2016-04-06 13:19:42 +02:00
Stian Thorgersen b8c08d05bf KEYCLOAK-2752
Update documentation re directory for providers
2016-04-06 13:18:23 +02:00
Stian Thorgersen 0419bb2232 Merge pull request #2514 from stianst/KEYCLOAK-2590
KEYCLOAK-2590 Add custom rest endpoint to set time offset
2016-04-06 12:58:13 +02:00
mposolda 72371e5d76 KEYCLOAK-1982 Some builtin objects might be missing when import JSON exported from old versions 2016-04-06 11:43:58 +02:00
mposolda f0b168c18f Ensure KeycloakSessionFactory.close is called before shutdown of auth-server-undertow 2016-04-06 11:43:49 +02:00
mposolda 3d5055d920 KEYCLOAK-2737 Handle the databaseSchema: 'validate' against empty database 2016-04-06 11:43:41 +02:00
Stian Thorgersen 0fc4ca0d12 KEYCLOAK-2590 Add custom rest endpoint to set time offset 2016-04-06 11:14:37 +02:00
Stian Thorgersen 4db73942e6 Merge pull request #2512 from stianst/KEYCLOAK-2262
KEYCLOAK-2262
2016-04-06 11:12:02 +02:00
Stian Thorgersen 0c829cd605 KEYCLOAK-2262 Refactor realm resource provider, remove admin resource provider and added example 2016-04-06 10:24:30 +02:00
Pedro Igor e876a3c988 [KEYCLOAK-2262] - New SPIs to extend both Realm and Admin RESTful APIs 2016-04-06 09:43:24 +02:00
Stian Thorgersen 91cbfbd37f Merge pull request #2511 from stianst/KEYCLOAK-2748
KEYCLOAK-2748
2016-04-06 09:10:23 +02:00
Stian Thorgersen 4a285bae9b KEYCLOAK-2748
Mark modules as private
2016-04-06 08:07:33 +02:00
Guus der Kinderen 804dd13abd KEYCLOAK-2731: Improve thread safety of TokenManager
This commit guards access to the non-final fields of TokenManager by its intrinsic lock.
2016-04-05 15:01:37 +02:00
Stian Thorgersen 0d6c72a378 Merge pull request #2503 from stianst/KEYCLOAK-2707
KEYCLOAK-2707 Fix account management layout for medium size screens
2016-04-05 13:26:02 +02:00
Marek Posolda 17b84df631 Merge pull request #2507 from mposolda/master
KEYCLOAK-2623 Remove auth-server-url-for-backend-requests from adapters
2016-04-05 13:09:47 +02:00
mposolda 784b724fe0 Removed docker-cluster as integration-arquillian has support for clustering tests now 2016-04-05 11:45:34 +02:00
mposolda 65dc7ddb44 KEYCLOAK-2623 Remove auth-server-url-for-backend-requests from adapters 2016-04-05 11:43:41 +02:00
Guus der Kinderen 120b880427 KEYCLOAK-2746: By default, allow for concurrent usage
The nature of Keycloak makes it very plausible that it is used in
a concurrent setting. With that in mind, it would make sense to,
by default, allow for more than one concurrent Resteasy connection
in the admin client code.
2016-04-05 11:34:02 +02:00
Stian Thorgersen a4335c3eb8 Merge pull request #2502 from velias/KEYCLOAK-2670-master
KEYCLOAK-2670 for master - client app is able to push additional HTTP GET
2016-04-05 11:20:06 +02:00
Stian Thorgersen 373ded9761 Merge pull request #2500 from vmuzikar/master
KEYCLOAK-2745 More UI tests stabilization
2016-04-05 11:19:01 +02:00
Stian Thorgersen 3e9ae7aa82 Merge pull request #2498 from stianst/KEYCLOAK-2722
KEYCLOAK-2722 Check user session in token introspection endpoint
2016-04-05 11:18:32 +02:00
Vlastimil Elias 21a2a47172 KEYCLOAK-2670 - client app is able to push additional HTTP GET
parameters in initial OpenID auth request for use in Auth flows
2016-04-05 10:41:28 +02:00
Stian Thorgersen 92c1e01d0e KEYCLOAK-2707 Fix account management layout for medium size screens 2016-04-05 10:30:43 +02:00
Vaclav Muzikar 3dbf5ee389 KEYCLOAK-2745 More UI tests stabilization 2016-04-05 10:13:40 +02:00
Stian Thorgersen 55c5e9a381 KEYCLOAK-2722 Check user session in token introspection endpoint 2016-04-05 09:31:39 +02:00
Stian Thorgersen 1f26765546 Merge pull request #2496 from stianst/KEYCLOAK-2652
KEYCLOAK-2652 Added fasterxml modules to as7 adapter dist
2016-04-05 08:57:54 +02:00
Stian Thorgersen c4a11cd52a Merge pull request #2494 from stianst/KEYCLOAK-2711
KEYCLOAK-2711
2016-04-05 08:54:35 +02:00
Stian Thorgersen b924cf9e9f Merge pull request #2492 from stianst/KEYCLOAK-2704
KEYCLOAK-2704
2016-04-05 08:54:18 +02:00
Marek Posolda 1714422b10 Merge pull request #2487 from mposolda/master
databaseSchema option - proper support for "validate" for both JPA and Mongo
2016-04-05 08:48:33 +02:00
Stian Thorgersen 7cea4f6695 KEYCLOAK-2652 Added fasterxml modules to as7 adapter dist 2016-04-05 08:02:32 +02:00
Stian Thorgersen 85622ac522 KEYCLOAK-2711
Button for 'impersonate user' is visible when I am creating new user
2016-04-05 07:53:57 +02:00
Stian Thorgersen 48551d362a KEYCLOAK-2704
User count missing in REST admin endpoint
2016-04-05 07:48:20 +02:00
Bill Burke cee8fee504 Merge pull request #2490 from patriot1burke/master
KEYCLOAK-2669
2016-04-04 21:14:13 -04:00
Bill Burke 9a4308e092 fix again 2016-04-04 20:36:40 -04:00
Bill Burke 93b3f448d3 fix 2016-04-04 21:23:09 -04:00
Bill Burke 8beff63dc0 KEYCLOAK-2669 2016-04-04 21:12:55 -04:00
Bill Burke 6b5f26ab23 Merge pull request #2488 from patriot1burke/master
KEYCLOAK-2738
2016-04-04 18:54:46 -04:00
Bill Burke 4ed1061487 KEYCLOAK-2738 2016-04-04 18:47:11 -04:00
mposolda 3a8b450575 KEYCLOAK-2737 connectionsMongo: Support for 'databaseSchema: validate' 2016-04-04 22:24:33 +02:00
mposolda e6df30602e KEYCLOAK-2744 connectionsJpa: the databaseSchema 'validate' should check if database schema is updated to latest version 2016-04-04 22:24:25 +02:00
Bill Burke 72299b4844 Merge pull request #2481 from stianst/KEYCLOAK-2742
KEYCLOAK-2742
2016-04-04 12:54:22 -04:00
Stian Thorgersen 4e4559fdc2 Merge pull request #2484 from stianst/master
Minor update to themes README.txt
2016-04-04 15:26:29 +02:00
Stian Thorgersen dcdef4daa4 Minor update to themes README.txt 2016-04-04 15:26:04 +02:00
Stian Thorgersen 9299591272 KEYCLOAK-2742
Broken navigation links while creating/editing a Client Mapper
2016-04-04 15:17:15 +02:00
Stian Thorgersen 571a4389e9 Merge pull request #2479 from stianst/KEYCLOAK-2651
KEYCLOAK-2651
2016-04-04 10:05:00 +02:00
Stian Thorgersen 78b11bca84 Merge pull request #2477 from stianst/KEYCLOAK-2608
KEYCLOAK-2608
2016-04-04 10:04:45 +02:00
Stian Thorgersen ff73e1a36a KEYCLOAK-2651
No CSRF protection or general security headers on welcome page
2016-04-04 09:07:21 +02:00
Stian Thorgersen 134c9b11c0 KEYCLOAK-2608
Timestamp resolution of 1s for Event.time is inappropriate for use with tests
2016-04-04 08:30:01 +02:00
Bill Burke dfa7c76331 Merge pull request #2475 from patriot1burke/master
KEYCLOAK-2662
2016-04-01 17:55:42 -04:00
Bill Burke f21cede378 KEYCLOAK-2662 2016-04-01 16:43:38 -04:00
Bill Burke 80dfc63768 Merge pull request #2458 from vmuzikar/master
KEYCLOAK-2732
2016-04-01 16:03:01 -04:00
Bill Burke 29ffe96388 Merge pull request #2473 from patriot1burke/master
KEYCLOAK-2512
2016-04-01 16:01:53 -04:00
Bill Burke 4d5ae5dd68 KEYCLOAK-2512 2016-04-01 14:50:26 -04:00
Marek Posolda 6a3b5cd4c0 Merge pull request #2470 from mposolda/master
KEYCLOAK-2737 Remove 'databaseSchema' property from connectionsMongo
2016-04-01 18:48:42 +02:00
mposolda afd3a36ee4 KEYCLOAK-2737 Remove 'databaseSchema' property from connectionsMongo 2016-04-01 16:55:06 +02:00
Marek Posolda e02d0ed629 Merge pull request #2468 from mposolda/master
KEYCLOAK-2613 KEYCLOAK-2413 Export/import fixes and improvements
2016-04-01 16:46:17 +02:00
mposolda a4d9aaf916 KEYCLOAK-2613 Add version to RealmRepresentation in JSON exports 2016-04-01 16:04:58 +02:00
mposolda f83b67cdf5 KEYCLOAK-2413 Very slow export/import of realms with large users count 2016-04-01 16:04:48 +02:00
Marek Posolda 46f6b97c26 Merge pull request #2466 from mposolda/master
Fix LDAPGroupMapperTest with MSAD and Mongo
2016-04-01 11:22:56 +02:00
mposolda 5d7b549323 Fix LDAPGroupMapperTest with MSAD and Mongo 2016-04-01 10:44:35 +02:00
Marek Posolda 7f88e769f2 Merge pull request #2464 from mposolda/master
KEYCLOAK-2661 Broken migration from Keycloak 1.5 with Mongo 3
2016-04-01 09:28:29 +02:00
mposolda 36bc97e3cd KEYCLOAK-2661 Broken migration from Keycloak 1.5 with Mongo 3 2016-03-31 22:30:41 +02:00
Bill Burke 3b55bd08a6 Merge pull request #2462 from patriot1burke/master
KEYCLOAK-2621
2016-03-31 14:34:23 -04:00
Bill Burke d35ccd9a5e KEYCLOAK-2621 2016-03-31 14:33:41 -04:00
Bill Burke 0fea54ebb5 Merge pull request #2460 from patriot1burke/master
KEYCLOAK-2516
2016-03-31 13:58:06 -04:00
Bill Burke 7c9dbdfc91 KEYCLOAK-2516 2016-03-31 13:56:46 -04:00
Vaclav Muzikar 4ce8b2431b KEYCLOAK-2732 2016-03-31 18:16:03 +02:00
Marek Posolda e506e385f1 Merge pull request #2457 from mposolda/master
KEYCLOAK-2610 Performance improve - add more indexes to database
2016-03-31 13:36:07 +02:00
mposolda c52500ce88 KEYCLOAK-2610 Add more indexes to database 2016-03-31 11:50:02 +02:00
mposolda 6ab411b2de KEYCLOAK-2610 More operations added to ManyUsersTest 2016-03-31 11:49:51 +02:00
Bill Burke e7f7a5f6c8 Merge pull request #2454 from patriot1burke/master
KEYCLOAK-2716
2016-03-30 20:26:44 -04:00
Bill Burke d1552cd6e8 resolve conflict 2016-03-30 18:23:40 -04:00
Bill Burke 545fb8b849 KEYCLOAK-2716 2016-03-30 18:15:11 -04:00
Bill Burke f71a6ec904 Merge pull request #2452 from patriot1burke/master
KEYCLOAK-2490
2016-03-30 15:49:16 -04:00
Bill Burke e4fcaad243 Merge pull request #2450 from patriot1burke/master
KEYCLOAK-2691
2016-03-30 15:46:34 -04:00
Bill Burke 9cf788c590 KEYCLOAK-2490 2016-03-30 15:41:46 -04:00
Bill Burke 3d3d526e30 Merge pull request #2444 from mhajas/js-console-up-PR
KEYCLOAK-2725 Run js-console example on non-relative scanario + tests of implicit flow
2016-03-30 15:16:50 -04:00
Bill Burke 020d090aee Merge pull request #2430 from mstruk/assert-events
KEYCLOAK-2589 KEYCLOAK-2607 KEYCLOAK-2597 Port AssertEvents to integration-arquillian
2016-03-30 15:16:25 -04:00
Bill Burke 1d2fef5b9b Merge pull request #2447 from tkyjovsk/KEYCLOAK-2641-fix
KEYCLOAK-2641 fix
2016-03-30 15:15:54 -04:00
Bill Burke 2cc3588be5 Merge remote-tracking branch 'upstream/master' 2016-03-30 15:07:35 -04:00
Bill Burke 12bf4b498e KEYCLOAK-2691 2016-03-30 15:07:24 -04:00
Tomas Kyjovsky 6b6a673642 KEYCLOAK-2641 updated READMEs 2016-03-30 18:11:09 +02:00
Guus der Kinderen ad7a6c4854 KEYCLOAK-2726: Invalidate token upon failure
When a token managed by TokenManager is known to be invalid, it should no
longer be used. This commit adds a response listener to the only filter
using TokenManager, which causes, upon authentication failure, to
invalidate the token that was used.
2016-03-30 15:33:58 +02:00
Tomas Kyjovsky 47773371e3 KEYCLOAK-2641 Fixed location of module.xsl 2016-03-30 14:48:19 +02:00
mhajas d0aeb25f14 Run js-console example on non-relative scanario + tests of implicit flow 2016-03-30 11:52:05 +02:00
Guus der Kinderen 89158c9dcf KEYCLOAK-2721: Do not recreate TokenService proxy
By re-using the service proxy, classloading issues can be prevented.
2016-03-29 11:11:35 +02:00
Bill Burke dfc4cf36a2 Merge pull request #2441 from ssilvert/group-export
KEYCLOAK-2619: Partial Import doesn't support groups
2016-03-28 22:58:28 -04:00
Stan Silvert 0f52768064 KEYCLOAK-2619: Partial Import doesn't support groups 2016-03-28 14:26:34 -04:00
Bill Burke 2641a93943 Merge pull request #2439 from patriot1burke/master
KEYCLOAK-2718
2016-03-28 12:01:22 -04:00
Bill Burke 1dd4bdf0b7 KEYCLOAK-2718 2016-03-28 11:13:02 -04:00
Bill Burke 73d74f69c3 Merge pull request #2437 from patriot1burke/master
KEYCLOAK-2698
2016-03-28 10:21:54 -04:00
Bill Burke 28c70fa8ab KEYCLOAK-2698 2016-03-28 10:20:27 -04:00
Bill Burke 17fcc38157 Merge pull request #2426 from tkyjovsk/fail-if-no-tests-false
Arq. TestSuite Surefire config: failIfNoTests=false
2016-03-28 08:48:01 -04:00
Bill Burke add41ea92b Merge pull request #2435 from patriot1burke/master
KEYCLOAK-2584
2016-03-25 00:08:32 -04:00
Bill Burke e497eb0950 KEYCLOAK-2584 2016-03-24 21:26:09 -04:00
Bill Burke cb4f95416c Merge pull request #2433 from patriot1burke/master
KEYCLOAK-2624
2016-03-24 16:52:29 -04:00
Bill Burke b253fe9532 Merge remote-tracking branch 'upstream/master' 2016-03-24 15:57:01 -04:00
Bill Burke e2436c4722 KEYCLOAK-2624 2016-03-24 15:56:40 -04:00
Marko Strukelj 76a4db5d54 KEYCLOAK-2597 Invalid children group location header response 2016-03-24 17:13:00 +01:00
Marko Strukelj 790a068bdb KEYCLOAK-2607 Migrate Group tests to ARQ testsuite 2016-03-24 17:13:00 +01:00
Marko Strukelj 95d222348d KEYCLOAK-2589 Copy AssertEvents to Arquillian testsuite and modify to pull events from admin endpoints 2016-03-24 17:13:00 +01:00
Marek Posolda 7bdf9f4ba1 Merge pull request #2429 from mposolda/master
KEYCLOAK-2713 Fix error at startup
2016-03-24 16:12:06 +01:00
mposolda c9545e16f7 KEYCLOAK-2713 Fix error at startup 2016-03-24 15:30:53 +01:00
Tomas Kyjovsky f6dea6752c Arq. TestSuite Surefire config: failIfNoTests=false 2016-03-24 15:08:55 +01:00
Bill Burke 0f5caffbab Merge pull request #2421 from tkyjovsk/KEYCLOAK-2641
KEYCLOAK-2641 moved app-server configurations from adapter tests
2016-03-24 09:31:42 -04:00
Bill Burke 16061ec727 Merge pull request #2424 from patriot1burke/master
KEYCLOAK-2543
2016-03-24 09:30:39 -04:00
Bill Burke 6030a65d1b KEYCLOAK-2543 2016-03-24 08:49:08 -04:00
Marek Posolda 29c7cb9061 Merge pull request #2420 from mposolda/master
Fixes and performance improvements for "create user"
2016-03-24 11:58:38 +01:00
Tomas Kyjovsky a9c7bbd44c KEYCLOAK-2641 moved app-server configurations from adapter tests to servers/app-server module 2016-03-24 11:24:21 +01:00
mposolda c973dc9eee KEYCLOAK-2610 Ommit checks for default roles and groups during creation of user 2016-03-24 11:11:35 +01:00
mposolda 16ec76e864 KEYCLOAK-2712 Default required actions not added when user created through admin console 2016-03-24 11:11:35 +01:00
mposolda 20fe2b75b5 KEYCLOAK-2710 Improve hibernate statistics report 2016-03-24 11:11:35 +01:00
Martin Schmied d7fbfc05e8 Fix k_query_bearer_token endpoint in proxy
`org.keycloak.adapters.AuthenticatedActionsHandler` which handles token
requests performs blocking IO. However, the exchange is in non-blocking
mode when it reaches this handler in Keycloak proxy.
2016-03-24 09:32:55 +01:00
Stian Thorgersen 8f1292494f Merge pull request #2411 from vmuzikar/KEYCLOAK-2697
[KEYCLOAK-2697] Fix some UI tests stability
2016-03-24 08:19:45 +00:00
Stian Thorgersen 0ef36096fb Merge pull request #2407 from vmuzikar/KEYCLOAK-2694
[KEYCLOAK-2694] Add system property for test constants location
2016-03-24 08:18:31 +00:00
Stian Thorgersen 5181e95776 Merge pull request #2405 from vramik/KEYCLOAK-2676
KEYCLOAK-2676 - Review clients tests
2016-03-24 08:17:27 +00:00
Marek Posolda cc02b16742 Merge pull request #2415 from mposolda/master
DB tuning - step 1
2016-03-23 23:29:20 +01:00
mposolda 50f8846c3d KEYCLOAK-2610 Improve performance of creating users with MySQL 2016-03-23 22:36:31 +01:00
mposolda 22ce20ff6b KEYCLOAK-2710 Possibility to log some hibernate statistics 2016-03-23 22:36:31 +01:00
Marek Posolda 0dea5eac46 Merge pull request #2413 from mposolda/master
Caching of identityProvider links
2016-03-22 22:26:45 +01:00
mposolda f9595fc6c5 KEYCLOAK-2632 Remove flag from UserCacheSession.invalidateUsers 2016-03-22 21:39:35 +01:00
mposolda 4c6dd10e48 KEYCLOAK-2632 Caching of identity provider links 2016-03-22 21:39:35 +01:00
Vaclav Muzikar 25363a91f9 [KEYCLOAK-2697] Fix some UI tests stability 2016-03-22 13:57:23 +01:00
Marek Posolda 756cea5fb2 Merge pull request #2410 from mposolda/master
LDAP fixes
2016-03-22 13:43:12 +01:00
mposolda 7ffd6dc7a7 KEYCLOAK-2696 Unexpected error when trying to delete role mappings from read-only LDAP role mapper 2016-03-22 13:03:49 +01:00
mposolda 4a06d7590e KEYCLOAK-2682 NPE when LDAP groups points to non-existent user 2016-03-22 13:03:48 +01:00
Vaclav Muzikar 18b07190bf Add system property for test constants location
(cherry picked from commit f9afa13)
2016-03-22 12:17:13 +01:00
Vlasta Ramik 1cfe58bccd KEYCLOAK-2676 - Review clients tests 2016-03-22 11:57:41 +01:00
Stian Thorgersen 705a598ce6 Merge pull request #2402 from stianst/master
KEYCLOAK-2657 Remove copyright.txt and README.txt from server dist
2016-03-22 08:34:38 +00:00
Stian Thorgersen 23091ec738 KEYCLOAK-2657 Remove copyright.txt and README.txt from server dist 2016-03-22 07:28:45 +00:00
Stian Thorgersen 2c9172f707 Merge pull request #2399 from stianst/KEYCLOAK-2469
Keycloak 2469
2016-03-22 08:09:59 +01:00
Marek Posolda 741fa16ec7 Merge pull request #2401 from mposolda/master
Caching of user consents and serviceAccount links
2016-03-22 08:03:31 +01:00
mposolda 5c912d3501 KEYCLOAK-2631 Caching of service account links 2016-03-22 07:08:47 +01:00
mposolda e2e96f7183 KEYCLOAK-2630 Add caching for user consents 2016-03-22 07:07:42 +01:00
mposolda 4193856fbb KEYCLOAK-2687 ZIPException during import big number of users 2016-03-22 07:04:54 +01:00
Stian Thorgersen e56759a6c0 Merge pull request #2382 from jblashka/master
Fix JS error when working with theme i18n settings
2016-03-21 16:08:38 +01:00
Stian Thorgersen ce717fa20e KEYCLOAK-2469 Minor changes 2016-03-21 15:45:53 +01:00
Stian Thorgersen 204d226267 Merge branch 'issue/KEYCLOAK-2469' of https://github.com/thomasdarimont/keycloak into thomasdarimont-issue/KEYCLOAK-2469 2016-03-21 15:30:48 +01:00
Stian Thorgersen ca67e8a764 Merge pull request #2398 from vramik/master-KEYCLOAK-2690
KEYCLOAK-2690 - create page source file when test fails
2016-03-21 15:26:30 +01:00
Stian Thorgersen 60667e65e7 Merge pull request #2395 from mhajas/mellon-realm-PR
KEYCLOAK-2689 Modify mod_auth_mellon realm for rhel7
2016-03-21 15:21:26 +01:00
Stian Thorgersen 3b7101650e Merge pull request #2393 from mhajas/mellon-timeout-PR
KEYCLOAK-2688 Modified session length in mod_auth_mellon test
2016-03-21 15:21:00 +01:00
Stian Thorgersen 82300a90f8 Merge pull request #2388 from pdrozd/KEYCLOAK-2685
KEYCLOAK-2685 - Updated EAP7 namespaces
2016-03-21 15:20:26 +01:00
Jared Blashka 49c5610971 Remove admin theme from i18n consideration 2016-03-21 09:42:00 -04:00
Vlasta Ramik 75ef3efd15 create page source file when test fails 2016-03-21 14:19:11 +01:00
mhajas e7ec454f81 Modify realm for rhel7 2016-03-21 12:41:17 +01:00
mhajas a80a65c525 Modified session length 2016-03-21 12:32:51 +01:00
Stian Thorgersen 973619d7c0 Merge pull request #2380 from thomasdarimont/issue/KEYCLOAK-2664
KEYCLOAK-2664 - QRCodeResource should prohibit caching of the generated image
2016-03-21 10:38:39 +01:00
Stian Thorgersen 50ed089980 Merge pull request #2378 from vmuzikar/master
Add properties file for some "constants" used in integration tests
2016-03-21 10:37:29 +01:00
Stian Thorgersen 3e208c10aa Merge pull request #2389 from thomasdarimont/issue/KEYCLOAK-2686-migration-from-191-to-192
KEYCLOAK-2686 - Fix failing migration from 1.9.1 to 1.9.2.
2016-03-21 10:30:44 +01:00
Thomas Darimont fa8af64098 KEYCLOAK-2686 - Fix failing migration from 1.9.1 to 1.9.2.
Since the `Map` returned by `realm.getBrowserSecurityHeaders()` is unmodifiable
we need to add the new header setting to a copy of the map which we then set
on the realm.
2016-03-21 09:52:25 +01:00
Pavel Drozd c61b457c02 KEYCLOAK-2685 - Updated EAP7 namespaces 2016-03-21 08:48:47 +01:00
Marek Posolda 5c98b8c6ae Merge pull request #2384 from mposolda/master
KEYCLOAK-2681 JS adapter init function with initOptions argument does…
2016-03-18 14:16:51 +01:00
Thomas Darimont 3e6b6507f4 KEYCLOAK-2664 - QRCodeResource should prohibit caching of the generated image
Added cache-control headers to avoid caching for generated
QRCode images.

Adjusted CacheControlUtil#noCache() to avoid caching more aggressively.
2016-03-18 12:18:07 +01:00
Marek Posolda d285721063 Merge pull request #2383 from ratcashdev/master
Fix when importing empty uniqueMember attributes
2016-03-18 12:18:02 +01:00
mposolda 95a1fc32eb KEYCLOAK-2681 JS adapter init function with initOptions argument doesn't call success callback 2016-03-18 12:06:46 +01:00
ratcashdev 13d2f872ff KEYCLOAK-2679: Fix when importing empty uniqueMember attributes 2016-03-18 09:55:35 +01:00
Jared Blashka 7a05078030 Fix JS error when working with theme i18n 2016-03-16 18:28:06 -04:00
Vaclav Muzikar 5c3159c83d Merge with upstream 2016-03-14 16:09:56 +01:00
Marek Posolda f63655edf3 Merge pull request #2377 from mposolda/master
KEYCLOAK-2634 Better error reporting if password update failed due to…
2016-03-14 14:32:28 +01:00
mposolda 23aa490c72 KEYCLOAK-2634 Better error reporting if password update failed due to MSAD password policy 2016-03-14 13:36:20 +01:00
Marek Posolda 1691ae7e29 Merge pull request #2374 from mposolda/master
A bit more details about Kerberos and LDAP mappers in docs
2016-03-14 11:52:36 +01:00
mposolda 804fb2dc96 A bit more details about Kerberos and LDAP mappers in docs 2016-03-14 11:52:04 +01:00
Marek Posolda 975dcb68a9 Merge pull request #2373 from mposolda/master
LDAP fixes
2016-03-14 10:32:20 +01:00
mposolda e24ce91e81 KEYCLOAK-2659 Allow sync all roles even if there are more than 1000 2016-03-14 09:39:22 +01:00
mposolda 2d188068c4 KEYCLOAK-2644 Delete user with a READ_ONLY LDAP federation provider just from Keycloak DB 2016-03-14 09:39:14 +01:00
Marek Posolda 214cd2ac22 Merge pull request #2370 from mposolda/master
LDAP fixes
2016-03-11 23:12:06 +01:00
mposolda 1142ed5583 KEYCLOAK-2655 Support of lazy sync LDAP groups, which user is member of 2016-03-11 22:33:03 +01:00
mposolda 85ccd64e01 KEYCLOAK-2643 Added write-only property to LDAP full-name attribute mapper 2016-03-11 22:32:55 +01:00
mposolda 73c3534e7a KEYCLOAK-2629 LDAP Federation provider - input fields validation 2016-03-11 22:32:45 +01:00
mposolda c6a7d0b772 KEYCLOAK-2640 LDAP group sync does not sync more than 1000 groups 2016-03-11 22:32:35 +01:00
Stian Thorgersen 4f0d827aca Merge pull request #2368 from stianst/KEYCLOAK-2593
KEYCLOAK-2593 Character set missing from responses and no content sni…
2016-03-11 16:23:18 +01:00
Stian Thorgersen 7342261dbe KEYCLOAK-2593 Character set missing from responses and no content sniffing defense in place 2016-03-11 15:31:15 +01:00
Stian Thorgersen 8f2c5af7d1 Merge pull request #2365 from stianst/KEYCLOAK-2612
KEYCLOAK-2612 Set default eviction strategy for users cache
2016-03-11 15:23:56 +01:00
Stian Thorgersen 018b104cbf KEYCLOAK-2612 Set default eviction strategy for users cache 2016-03-11 13:01:57 +01:00
Stian Thorgersen b3bb68aed7 Merge pull request #2364 from stianst/KEYCLOAK-2637
KEYCLOAK-2637
2016-03-11 13:00:54 +01:00
Stian Thorgersen bdfc9b8efc KEYCLOAK-2637
ModelExceptionMapper uses AdminMessagesProvider which loads messages outside of themes
2016-03-11 12:08:28 +01:00
Stian Thorgersen 3b1987cb3a Merge pull request #2360 from stianst/KEYCLOAK-2636
KEYCLOAK-2636
2016-03-11 11:11:53 +01:00
Marek Posolda 18c0e8946a Merge pull request #2361 from mposolda/master
KEYCLOAK-2628 protected method to IdpCreateUserIfUniqueAuthenticator …
2016-03-11 11:08:17 +01:00
mposolda 25f965aa2e KEYCLOAK-2628 protected method to IdpCreateUserIfUniqueAuthenticator after user is registered 2016-03-11 10:05:41 +01:00
Stian Thorgersen 50e5d203b3 KEYCLOAK-2636
Tooltip for redirect uri is wrong
2016-03-11 06:39:25 +01:00
Thomas Darimont 41358eea4d KEYCLOAK-2469 - Introduced new redirect endpoint for clients.
Previously one had to configure hardcoded urls to link from one client
application to others since keycloak didn't provide a way to get the
actual client URL by providing clientId and realm information.

We now support a new endpoint with the path {realm}/clients/{client_id}/redirect
that responds to GET requests with a 307 (temporary redirect) with the
configured client URL. This allows to refer to any client just by the
realmName and clientId and let Keycloak redirect to the actual client
application.

Add documentation for new redirect endpoint.
2016-03-10 23:45:22 +01:00
Bill Burke 4b69cb4551 Merge pull request #2359 from patriot1burke/master
refactor user cache.
2016-03-10 14:15:37 -05:00
Bill Burke b0264d528d trace log 2016-03-10 13:29:05 -05:00
Bill Burke 82ad26189f refactor user cache 2016-03-10 13:01:21 -05:00
Bill Burke cd299c995b refactor cache 2016-03-10 13:01:20 -05:00
helio-frota 2ab8f320c3 minor update javascript adapter docs 2016-03-10 13:01:19 -05:00
Stian Thorgersen 36f2febde1 Next is 2.0.0.CR1 2016-03-10 13:01:18 -05:00
Stian Thorgersen dbc49dd742 Revert "Updated docs for KEYCLOAK-1020"
This reverts commit 6fe3a3da71.
2016-03-10 13:01:16 -05:00
Stian Thorgersen 55e9f2e21b Allow ignoring patterns in LogChecker 2016-03-10 13:01:16 -05:00
Bruno Oliveira dd3e6b29bf Let the admin manage her own account 2016-03-10 13:01:15 -05:00
Vlasta Ramik 81f1baff33 KEYCLOAK-2586 - fix URL providers on classpath for graphene 2.1.0.Aplha3 2016-03-10 13:01:14 -05:00
mposolda e3f24f58df Fix failing test 2016-03-10 13:01:13 -05:00
mposolda 1939f25a71 KEYCLOAK-2601 Fix incorrectly autodetected dialect with MSSQL2014 2016-03-10 13:01:12 -05:00
Stian Thorgersen 76df229967 Next is 1.9.2.Final 2016-03-10 13:01:10 -05:00
mposolda 3ce6deaa1b Log DB info in arquillian testsuite 2016-03-10 13:01:09 -05:00
mposolda 428b85f1f8 Disable DBLockTest for now 2016-03-10 13:01:08 -05:00
mposolda 89a1141f8d Added exclusion of old commons-io dependency as it's causing issues in some environments 2016-03-10 13:01:07 -05:00
mposolda 12e5dfa3e5 Fix DB2 2016-03-10 13:01:06 -05:00
mposolda 4ff4f69343 KEYCLOAK-2611 Keycloak fails to start with Oracle DB 2016-03-10 13:01:05 -05:00
Stian Thorgersen 06545f2543 KEYCLOAK-2596 Fix import with dir and ignore existing 2016-03-10 13:01:04 -05:00
Marek Baluch 9e836162b7 KPR-87 - Agreement on terms and conditions as part of authentication - Tests 2016-03-10 13:01:03 -05:00
mposolda 42f4e7fef8 KEYCLOAK-2583 Synchronize users after creating ldap federation provider 2016-03-10 13:01:02 -05:00
mposolda 0708bceea7 KEYCLOAK-2582 Wrong message after synchronization (removing user from ldap) 2016-03-10 13:01:01 -05:00
Dane Barentine f72b0f3f6d Use createCredential so that authentication will work with both 2.x and 3.x MongoDB servers 2016-03-10 13:01:00 -05:00
Tomas Kyjovsky a27fd7ae1f Added workaround for KEYCLOAK-2560 to jpa-performance tests.
Optional delete/reimport realm phases.
2016-03-10 13:00:59 -05:00
mhajas 768a3ab941 IPv6 in login events 2016-03-10 13:00:58 -05:00
mhajas 5790dd44a4 Make adapter tests run also on EAP6 and EAP7 2016-03-10 13:00:57 -05:00
Farana, Zdenek 3b44ebb6d9 Updated docs for KEYCLOAK-1020 2016-03-10 13:00:56 -05:00
mhajas d2b5cf08c6 IdpInitiated login unauthorized test 2016-03-10 13:00:55 -05:00
mposolda f8ec178fae KEYCLOAK-2529 More proper handling of DB errors during migration 2016-03-10 13:00:54 -05:00
mposolda 062c8a06ab Fix testsuite with mongo 2016-03-10 13:00:53 -05:00
mposolda 6a48e00039 Check performance of multiple get calls over cluster 2016-03-10 13:00:52 -05:00
mposolda 6d0e5d6ad1 KEYCLOAK-2529 Concurrent startup by more cluster nodes at the same time. Added DBLockProvider 2016-03-10 13:00:51 -05:00
Stian Thorgersen 001ae5146a KEYCLOAK-2605 Revert upgrade of Arquillian Graphene 2016-03-10 13:00:50 -05:00
Stan Silvert 23175bf925 Make imports in ServerInfoAdminResource explicitly point to the new
packages.
2016-03-10 13:00:49 -05:00
Stan Silvert cf10a09008 KEYCLOAK-2535: ClientResource endpoint tests 2016-03-10 13:00:48 -05:00
Bruno Oliveira 8a4a1660a4 Client registration won't compile without these changes 2016-03-10 13:00:47 -05:00
Stian Thorgersen 4e0e4df630 KEYCLOAK-2592 Set secure on OAuth_Token_Request_State cookie 2016-03-10 13:00:46 -05:00
Stian Thorgersen 0519f0fed5 KEYCLOAK-2592 Set http-only on OAuth_Token_Request_State cookie 2016-03-10 13:00:45 -05:00
Stian Thorgersen 36f64b2e23 Merge pull request #2358 from helio-frota/minor_update_docs
minor update javascript adapter docs
2016-03-10 13:50:24 +01:00
helio-frota 94a2c3ab0e minor update javascript adapter docs 2016-03-10 09:16:45 -03:00
Stian Thorgersen 28fe13a800 Next is 2.0.0.CR1 2016-03-10 08:13:00 +01:00
Vaclav Muzikar 2d7424c697 Add support for testing default theme name in prop file 2016-02-26 13:59:28 +01:00
Vaclav Muzikar ddc0792733 Merge branch 'master' of https://github.com/keycloak/keycloak 2016-02-26 12:25:47 +01:00
Vaclav Muzikar cd063c6a36 Add LDAP vendors test 2016-02-25 17:52:11 +01:00
Vaclav Muzikar a35aa47f27 Add support for some test constants in props file 2016-02-25 17:51:38 +01:00
1297 changed files with 49058 additions and 22409 deletions

No files matched your search

+6 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -65,6 +65,11 @@
<artifactId>keycloak-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
@@ -456,6 +456,16 @@ public class AdapterDeploymentContext {
public void setTurnOffChangeSessionIdOnLogin(boolean turnOffChangeSessionIdOnLogin) {
delegate.setTurnOffChangeSessionIdOnLogin(turnOffChangeSessionIdOnLogin);
}
@Override
public int getTokenMinimumTimeToLive() {
return delegate.getTokenMinimumTimeToLive();
}
@Override
public void setTokenMinimumTimeToLive(final int tokenMinimumTimeToLive) {
delegate.setTokenMinimumTimeToLive(tokenMinimumTimeToLive);
}
}
protected KeycloakUriBuilder getBaseBuilder(HttpFacade facade, String base) {
@@ -18,10 +18,12 @@
package org.keycloak.adapters;
import org.jboss.logging.Logger;
import org.keycloak.AuthorizationContext;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.authorization.PolicyEnforcer;
import org.keycloak.common.util.UriUtils;
import org.keycloak.constants.AdapterConstants;
import org.keycloak.representations.AccessToken;
import org.keycloak.common.util.UriUtils;
import java.io.IOException;
import java.util.Set;
@@ -55,6 +57,9 @@ public class AuthenticatedActionsHandler {
queryBearerToken();
return true;
}
if (!isAuthorized()) {
return true;
}
return false;
}
@@ -124,4 +129,24 @@ public class AuthenticatedActionsHandler {
}
return false;
}
private boolean isAuthorized() {
PolicyEnforcer policyEnforcer = this.deployment.getPolicyEnforcer();
if (policyEnforcer == null) {
log.debugv("Policy enforcement is disabled.");
return true;
}
try {
OIDCHttpFacade facade = (OIDCHttpFacade) this.facade;
AuthorizationContext authorizationContext = policyEnforcer.enforce(facade);
RefreshableKeycloakSecurityContext session = (RefreshableKeycloakSecurityContext) facade.getSecurityContext();
session.setAuthorizationContext(authorizationContext);
return authorizationContext.isGranted();
} catch (Exception e) {
throw new RuntimeException("Failed to enforce policy decisions.", e);
}
}
}
@@ -24,6 +24,7 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.jboss.logging.Logger;
import org.keycloak.OAuth2Constants;
import org.keycloak.adapters.authentication.ClientCredentialsProviderUtils;
@@ -104,6 +105,7 @@ public class BasicAuthRequestAuthenticator extends BearerTokenRequestAuthenticat
int status = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
if (status != 200) {
EntityUtils.consumeQuietly(entity);
throw new java.io.IOException("Bad status: " + status);
}
if (entity == null) {
@@ -17,9 +17,11 @@
package org.keycloak.adapters;
import org.apache.http.HttpHost;
import org.apache.http.client.CookieStore;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.params.ConnRoutePNames;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
@@ -34,9 +36,9 @@ import org.apache.http.impl.conn.SingleClientConnManager;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.common.util.EnvUtil;
import org.keycloak.common.util.KeystoreUtil;
import org.keycloak.representations.adapters.config.AdapterConfig;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
@@ -46,6 +48,7 @@ import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.io.IOException;
import java.net.URI;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
@@ -112,6 +115,7 @@ public class HttpClientBuilder {
protected TimeUnit socketTimeoutUnits = TimeUnit.MILLISECONDS;
protected long establishConnectionTimeout = -1;
protected TimeUnit establishConnectionTimeoutUnits = TimeUnit.MILLISECONDS;
protected HttpHost proxyHost;
/**
@@ -121,8 +125,7 @@ public class HttpClientBuilder {
* @param unit
* @return
*/
public HttpClientBuilder socketTimeout(long timeout, TimeUnit unit)
{
public HttpClientBuilder socketTimeout(long timeout, TimeUnit unit) {
this.socketTimeout = timeout;
this.socketTimeoutUnits = unit;
return this;
@@ -135,8 +138,7 @@ public class HttpClientBuilder {
* @param unit
* @return
*/
public HttpClientBuilder establishConnectionTimeout(long timeout, TimeUnit unit)
{
public HttpClientBuilder establishConnectionTimeout(long timeout, TimeUnit unit) {
this.establishConnectionTimeout = timeout;
this.establishConnectionTimeoutUnits = unit;
return this;
@@ -287,16 +289,20 @@ public class HttpClientBuilder {
cm = new SingleClientConnManager(registry);
}
BasicHttpParams params = new BasicHttpParams();
if (socketTimeout > -1)
{
if (proxyHost != null) {
params.setParameter(ConnRoutePNames.DEFAULT_PROXY, proxyHost);
}
if (socketTimeout > -1) {
HttpConnectionParams.setSoTimeout(params, (int) socketTimeoutUnits.toMillis(socketTimeout));
}
if (establishConnectionTimeout > -1)
{
HttpConnectionParams.setConnectionTimeout(params, (int)establishConnectionTimeoutUnits.toMillis(establishConnectionTimeout));
if (establishConnectionTimeout > -1) {
HttpConnectionParams.setConnectionTimeout(params, (int) establishConnectionTimeoutUnits.toMillis(establishConnectionTimeout));
}
DefaultHttpClient client = new DefaultHttpClient(cm, params);
if (disableCookieCache) {
client.setCookieStore(new CookieStore() {
@Override
@@ -364,6 +370,28 @@ public class HttpClientBuilder {
} else {
trustStore(truststore);
}
configureProxyForAuthServerIfProvided(adapterConfig);
return build();
}
/**
* Configures a the proxy to use for auth-server requests if provided.
* <p>
* If the given {@link AdapterConfig} contains the attribute {@code proxy-url} we use the
* given URL as a proxy server, otherwise the proxy configuration is ignored.
* </p>
*
* @param adapterConfig
*/
private void configureProxyForAuthServerIfProvided(AdapterConfig adapterConfig) {
if (adapterConfig == null || adapterConfig.getProxyUrl() == null || adapterConfig.getProxyUrl().trim().isEmpty()) {
return;
}
URI uri = URI.create(adapterConfig.getProxyUrl());
this.proxyHost = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());
}
}
@@ -20,6 +20,7 @@ package org.keycloak.adapters;
import org.apache.http.client.HttpClient;
import org.jboss.logging.Logger;
import org.keycloak.adapters.authentication.ClientCredentialsProvider;
import org.keycloak.adapters.authorization.PolicyEnforcer;
import org.keycloak.constants.ServiceUrlConstants;
import org.keycloak.common.enums.RelativeUrlsUsed;
import org.keycloak.common.enums.SslRequired;
@@ -77,6 +78,8 @@ public class KeycloakDeployment {
protected boolean turnOffChangeSessionIdOnLogin;
protected volatile int notBefore;
protected int tokenMinimumTimeToLive;
private PolicyEnforcer policyEnforcer;
public KeycloakDeployment() {
}
@@ -357,4 +360,20 @@ public class KeycloakDeployment {
public void setTurnOffChangeSessionIdOnLogin(boolean turnOffChangeSessionIdOnLogin) {
this.turnOffChangeSessionIdOnLogin = turnOffChangeSessionIdOnLogin;
}
public int getTokenMinimumTimeToLive() {
return tokenMinimumTimeToLive;
}
public void setTokenMinimumTimeToLive(final int tokenMinimumTimeToLive) {
this.tokenMinimumTimeToLive = tokenMinimumTimeToLive;
}
public void setPolicyEnforcer(PolicyEnforcer policyEnforcer) {
this.policyEnforcer = policyEnforcer;
}
public PolicyEnforcer getPolicyEnforcer() {
return policyEnforcer;
}
}
@@ -21,10 +21,12 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.jboss.logging.Logger;
import org.keycloak.adapters.authentication.ClientCredentialsProviderUtils;
import org.keycloak.adapters.authorization.PolicyEnforcer;
import org.keycloak.common.enums.SslRequired;
import org.keycloak.common.util.PemUtils;
import org.keycloak.enums.TokenStore;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.common.util.PemUtils;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.util.SystemPropertiesJsonParserFactory;
import java.io.IOException;
@@ -94,6 +96,7 @@ public class KeycloakDeploymentBuilder {
deployment.setAlwaysRefreshToken(adapterConfig.isAlwaysRefreshToken());
deployment.setRegisterNodeAtStartup(adapterConfig.isRegisterNodeAtStartup());
deployment.setRegisterNodePeriod(adapterConfig.getRegisterNodePeriod());
deployment.setTokenMinimumTimeToLive(adapterConfig.getTokenMinimumTimeToLive());
if (realmKeyPem == null && adapterConfig.isBearerOnly() && adapterConfig.getAuthServerUrl() == null) {
throw new IllegalArgumentException("For bearer auth, you must set the realm-public-key or auth-server-url");
@@ -109,6 +112,12 @@ public class KeycloakDeploymentBuilder {
deployment.setTurnOffChangeSessionIdOnLogin(adapterConfig.getTurnOffChangeSessionIdOnLogin());
}
PolicyEnforcerConfig policyEnforcerConfig = adapterConfig.getPolicyEnforcerConfig();
if (policyEnforcerConfig != null) {
deployment.setPolicyEnforcer(new PolicyEnforcer(deployment, adapterConfig));
}
log.debug("Use authServerUrl: " + deployment.getAuthServerBaseUrl() + ", tokenUrl: " + deployment.getTokenUrl() + ", relativeUrls: " + deployment.getRelativeUrls());
return deployment;
}
@@ -18,9 +18,11 @@
package org.keycloak.adapters;
import org.jboss.logging.Logger;
import org.keycloak.AuthorizationContext;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.RSATokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.common.util.Time;
import org.keycloak.representations.AccessToken;
import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.representations.IDToken;
@@ -74,7 +76,11 @@ public class RefreshableKeycloakSecurityContext extends KeycloakSecurityContext
}
public boolean isActive() {
return token != null && this.token.isActive() && this.token.getIssuedAt() > deployment.getNotBefore();
return token != null && this.token.isActive() && deployment!=null && this.token.getIssuedAt() > deployment.getNotBefore();
}
public boolean isTokenTimeToLiveSufficient(AccessToken token) {
return token != null && (token.getExpiration() - this.deployment.getTokenMinimumTimeToLive()) > Time.currentTime();
}
public KeycloakDeployment getDeployment() {
@@ -95,7 +101,7 @@ public class RefreshableKeycloakSecurityContext extends KeycloakSecurityContext
if (log.isTraceEnabled()) {
log.trace("checking whether to refresh.");
}
if (isActive()) return true;
if (isActive() && isTokenTimeToLiveSufficient(this.token)) return true;
}
if (this.deployment == null || refreshToken == null) return false; // Might be serialized in HttpSession?
@@ -130,6 +136,13 @@ public class RefreshableKeycloakSecurityContext extends KeycloakSecurityContext
log.error("failed verification of token");
return false;
}
// If the TTL is greater-or-equal to the expire time on the refreshed token, have to abort or go into an infinite refresh loop
if (!isTokenTimeToLiveSufficient(token)) {
log.error("failed to refresh the token with a longer time-to-live than the minimum");
return false;
}
if (response.getNotBeforePolicy() > deployment.getNotBefore()) {
deployment.setNotBefore(response.getNotBeforePolicy());
}
@@ -145,4 +158,8 @@ public class RefreshableKeycloakSecurityContext extends KeycloakSecurityContext
tokenStore.refreshCallback(this);
return true;
}
public void setAuthorizationContext(AuthorizationContext authorizationContext) {
this.authorizationContext = authorizationContext;
}
}
@@ -0,0 +1,256 @@
/*
* 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.adapters.authorization;
import org.jboss.logging.Logger;
import org.keycloak.AuthorizationContext;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.HttpFacade.Request;
import org.keycloak.adapters.spi.HttpFacade.Response;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.ResourceRepresentation;
import org.keycloak.authorization.client.resource.ProtectedResource;
import org.keycloak.representations.AccessToken;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.EnforcementMode;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import org.keycloak.representations.authorization.Permission;
import java.net.URI;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public abstract class AbstractPolicyEnforcer {
private static Logger LOGGER = Logger.getLogger(AbstractPolicyEnforcer.class);
private final PolicyEnforcerConfig enforcerConfig;
private final PolicyEnforcer policyEnforcer;
private List<PathConfig> paths;
private AuthzClient authzClient;
private PathMatcher pathMatcher;
public AbstractPolicyEnforcer(PolicyEnforcer policyEnforcer) {
this.policyEnforcer = policyEnforcer;
this.enforcerConfig = policyEnforcer.getEnforcerConfig();
this.authzClient = policyEnforcer.getClient();
this.pathMatcher = new PathMatcher();
this.paths = policyEnforcer.getPaths();
}
public AuthorizationContext authorize(OIDCHttpFacade httpFacade) {
EnforcementMode enforcementMode = this.enforcerConfig.getEnforcementMode();
if (EnforcementMode.DISABLED.equals(enforcementMode)) {
return createEmptyAuthorizationContext(true);
}
AccessToken accessToken = httpFacade.getSecurityContext().getToken();
Request request = httpFacade.getRequest();
Response response = httpFacade.getResponse();
String pathInfo = URI.create(request.getURI()).getPath().substring(1);
String path = pathInfo.substring(pathInfo.indexOf('/'), pathInfo.length());
PathConfig pathConfig = this.pathMatcher.matches(path, this.paths);
LOGGER.debugf("Checking permissions for path [%s] with config [%s].", request.getURI(), pathConfig);
if (pathConfig == null) {
if (EnforcementMode.PERMISSIVE.equals(enforcementMode)) {
return createAuthorizationContext(accessToken);
}
LOGGER.debugf("Could not find a configuration for path [%s]", path);
response.sendError(403, "Could not find a configuration for path [" + path + "].");
return createEmptyAuthorizationContext(false);
}
PathConfig actualPathConfig = resolvePathConfig(pathConfig, request);
Set<String> requiredScopes = getRequiredScopes(actualPathConfig, request);
if (isAuthorized(actualPathConfig, requiredScopes, accessToken, httpFacade)) {
try {
return createAuthorizationContext(accessToken);
} catch (Exception e) {
throw new RuntimeException("Error processing path [" + actualPathConfig.getPath() + "].", e);
}
}
if (!challenge(actualPathConfig, requiredScopes, httpFacade)) {
LOGGER.debugf("Sending challenge to the client. Path [%s]", pathConfig);
response.sendError(403, "Authorization failed.");
}
return createEmptyAuthorizationContext(false);
}
protected abstract boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade);
protected boolean isAuthorized(PathConfig actualPathConfig, Set<String> requiredScopes, AccessToken accessToken, OIDCHttpFacade httpFacade) {
Request request = httpFacade.getRequest();
PolicyEnforcerConfig enforcerConfig = getEnforcerConfig();
String accessDeniedPath = enforcerConfig.getAccessDeniedPath();
if (accessDeniedPath != null) {
if (request.getURI().contains(accessDeniedPath)) {
return true;
}
}
AccessToken.Authorization authorization = accessToken.getAuthorization();
if (authorization == null) {
return false;
}
List<Permission> permissions = authorization.getPermissions();
for (Permission permission : permissions) {
Set<String> allowedScopes = permission.getScopes();
if (permission.getResourceSetId() != null) {
if (isResourcePermission(actualPathConfig, permission)) {
if (((allowedScopes == null || allowedScopes.isEmpty()) && requiredScopes.isEmpty()) || allowedScopes.containsAll(requiredScopes)) {
LOGGER.debugf("Authorization GRANTED for path [%s]. Permissions [%s].", actualPathConfig, permissions);
if (request.getMethod().equalsIgnoreCase("DELETE") && actualPathConfig.isInstance()) {
this.paths.remove(actualPathConfig);
}
return true;
}
}
} else {
if ((allowedScopes.isEmpty() && requiredScopes.isEmpty()) || allowedScopes.containsAll(requiredScopes)) {
LOGGER.debugf("Authorization GRANTED for path [%s]. Permissions [%s].", actualPathConfig, permissions);
return true;
}
}
}
LOGGER.debugf("Authorization FAILED for path [%s]. No enough permissions [%s].", actualPathConfig, permissions);
return false;
}
protected AuthzClient getAuthzClient() {
return this.authzClient;
}
protected PolicyEnforcerConfig getEnforcerConfig() {
return enforcerConfig;
}
protected PolicyEnforcer getPolicyEnforcer() {
return policyEnforcer;
}
private AuthorizationContext createEmptyAuthorizationContext(final boolean granted) {
return new AuthorizationContext() {
@Override
public boolean hasPermission(String resourceName, String scopeName) {
return granted;
}
@Override
public boolean hasResourcePermission(String resourceName) {
return granted;
}
@Override
public boolean hasScopePermission(String scopeName) {
return granted;
}
@Override
public List<Permission> getPermissions() {
return Collections.EMPTY_LIST;
}
@Override
public boolean isGranted() {
return granted;
}
};
}
private PathConfig resolvePathConfig(PathConfig originalConfig, Request request) {
if (originalConfig.hasPattern()) {
String pathInfo = URI.create(request.getURI()).getPath().substring(1);
String path = pathInfo.substring(pathInfo.indexOf('/'), pathInfo.length());
ProtectedResource resource = this.authzClient.protection().resource();
Set<String> search = resource.findByFilter("uri=" + path);
if (!search.isEmpty()) {
// resource does exist on the server, cache it
ResourceRepresentation targetResource = resource.findById(search.iterator().next()).getResourceDescription();
PathConfig config = new PathConfig();
config.setId(targetResource.getId());
config.setName(targetResource.getName());
config.setType(targetResource.getType());
config.setPath(targetResource.getUri());
config.setScopes(originalConfig.getScopes());
config.setMethods(originalConfig.getMethods());
config.setInstance(true);
config.setParentConfig(originalConfig);
this.paths.add(config);
return config;
}
}
return originalConfig;
}
private Set<String> getRequiredScopes(PathConfig pathConfig, Request request) {
Set<String> requiredScopes = new HashSet<>();
requiredScopes.addAll(pathConfig.getScopes());
String method = request.getMethod();
for (PolicyEnforcerConfig.MethodConfig methodConfig : pathConfig.getMethods()) {
if (methodConfig.getMethod().equals(method)) {
requiredScopes.addAll(methodConfig.getScopes());
}
}
return requiredScopes;
}
private AuthorizationContext createAuthorizationContext(AccessToken accessToken) {
return new AuthorizationContext(accessToken, this.paths);
}
private boolean isResourcePermission(PathConfig actualPathConfig, Permission permission) {
// first we try a match using resource id
boolean resourceMatch = permission.getResourceSetId().equals(actualPathConfig.getId());
// as a fallback, check if the current path is an instance and if so, check if parent's id matches the permission
if (!resourceMatch && actualPathConfig.isInstance()) {
resourceMatch = permission.getResourceSetId().equals(actualPathConfig.getParentConfig().getId());
}
return resourceMatch;
}
}
@@ -0,0 +1,80 @@
/*
* 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.adapters.authorization;
import org.jboss.logging.Logger;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.PermissionRequest;
import org.keycloak.authorization.client.resource.PermissionResource;
import org.keycloak.authorization.client.resource.ProtectionResource;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import java.util.List;
import java.util.Set;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class BearerTokenPolicyEnforcer extends AbstractPolicyEnforcer {
private static Logger LOGGER = Logger.getLogger(BearerTokenPolicyEnforcer.class);
public BearerTokenPolicyEnforcer(PolicyEnforcer enforcer) {
super(enforcer);
}
@Override
protected boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
if (getEnforcerConfig().getUmaProtocolConfig() != null) {
challengeUmaAuthentication(pathConfig, requiredScopes, facade);
} else {
challengeEntitlementAuthentication(facade);
}
return true;
}
private void challengeEntitlementAuthentication(OIDCHttpFacade facade) {
HttpFacade.Response response = facade.getResponse();
AuthzClient authzClient = getAuthzClient();
String clientId = authzClient.getConfiguration().getClientId();
String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/entitlement";
response.setStatus(401);
response.setHeader("WWW-Authenticate", "KC_ETT realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\"");
}
private void challengeUmaAuthentication(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
HttpFacade.Response response = facade.getResponse();
AuthzClient authzClient = getAuthzClient();
String ticket = getPermissionTicket(pathConfig, requiredScopes, authzClient);
String clientId = authzClient.getConfiguration().getClientId();
String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/authorize";
response.setStatus(401);
response.setHeader("WWW-Authenticate", "UMA realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\",ticket=\"" + ticket + "\"");
}
private String getPermissionTicket(PathConfig pathConfig, Set<String> requiredScopes, AuthzClient authzClient) {
ProtectionResource protection = authzClient.protection();
PermissionResource permission = protection.permission();
PermissionRequest permissionRequest = new PermissionRequest();
permissionRequest.setResourceSetId(pathConfig.getId());
permissionRequest.setScopes(requiredScopes);
return permission.forResource(permissionRequest).getTicket();
}
}
@@ -0,0 +1,119 @@
/*
* 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.adapters.authorization;
import org.jboss.logging.Logger;
import org.keycloak.RSATokenVerifier;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.authorization.client.AuthorizationDeniedException;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.AuthorizationRequest;
import org.keycloak.authorization.client.representation.AuthorizationResponse;
import org.keycloak.authorization.client.representation.EntitlementResponse;
import org.keycloak.authorization.client.representation.PermissionRequest;
import org.keycloak.authorization.client.representation.PermissionResponse;
import org.keycloak.representations.AccessToken;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import java.util.Set;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
private static Logger LOGGER = Logger.getLogger(KeycloakAdapterPolicyEnforcer.class);
public KeycloakAdapterPolicyEnforcer(PolicyEnforcer policyEnforcer) {
super(policyEnforcer);
}
@Override
protected boolean isAuthorized(PathConfig pathConfig, Set<String> requiredScopes, AccessToken accessToken, OIDCHttpFacade httpFacade) {
int retry = 2;
AccessToken original = accessToken;
while (retry >= 0) {
if (super.isAuthorized(pathConfig, requiredScopes, accessToken, httpFacade)) {
original.setAuthorization(accessToken.getAuthorization());
return true;
}
accessToken = requestAuthorizationToken(pathConfig, requiredScopes, httpFacade);
if (accessToken == null) {
return false;
}
retry--;
}
return false;
}
@Override
protected boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
String accessDeniedPath = getEnforcerConfig().getAccessDeniedPath();
HttpFacade.Response response = facade.getResponse();
if (accessDeniedPath != null) {
response.setStatus(302);
response.setHeader("Location", accessDeniedPath);
} else {
response.sendError(403);
}
return true;
}
private AccessToken requestAuthorizationToken(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade httpFacade) {
try {
String accessToken = httpFacade.getSecurityContext().getTokenString();
AuthzClient authzClient = getAuthzClient();
KeycloakDeployment deployment = getPolicyEnforcer().getDeployment();
if (getEnforcerConfig().getUmaProtocolConfig() != null) {
LOGGER.debug("Obtaining authorization for authenticated user.");
PermissionRequest permissionRequest = new PermissionRequest();
permissionRequest.setResourceSetId(pathConfig.getId());
permissionRequest.setScopes(requiredScopes);
PermissionResponse permissionResponse = authzClient.protection().permission().forResource(permissionRequest);
AuthorizationRequest authzRequest = new AuthorizationRequest(permissionResponse.getTicket());
AuthorizationResponse authzResponse = authzClient.authorization(accessToken).authorize(authzRequest);
if (authzResponse != null) {
return RSATokenVerifier.verifyToken(authzResponse.getRpt(), deployment.getRealmKey(), deployment.getRealmInfoUrl());
}
return null;
} else {
LOGGER.debug("Obtaining entitlements for authenticated user.");
EntitlementResponse authzResponse = authzClient.entitlement(accessToken).getAll(authzClient.getConfiguration().getClientId());
return RSATokenVerifier.verifyToken(authzResponse.getRpt(), deployment.getRealmKey(), deployment.getRealmInfoUrl());
}
} catch (AuthorizationDeniedException e) {
return null;
} catch (Exception e) {
throw new RuntimeException("Unexpected error during authorization request.", e);
}
}
}
@@ -0,0 +1,103 @@
/*
* 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.adapters.authorization;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import java.util.List;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
class PathMatcher {
private static final String ANY_RESOURCE_PATTERN = "/*";
PathConfig matches(final String requestedUri, List<PathConfig> paths) {
PathConfig actualConfig = null;
for (PathConfig entry : paths) {
String protectedUri = entry.getPath();
String selectedUri = null;
if (protectedUri.equals(ANY_RESOURCE_PATTERN) && actualConfig == null) {
selectedUri = protectedUri;
}
int suffixIndex = protectedUri.indexOf(ANY_RESOURCE_PATTERN + ".");
if (suffixIndex != -1) {
String protectedSuffix = protectedUri.substring(suffixIndex + ANY_RESOURCE_PATTERN.length());
if (requestedUri.endsWith(protectedSuffix)) {
selectedUri = protectedUri;
}
}
if (protectedUri.equals(requestedUri)) {
selectedUri = protectedUri;
}
if (protectedUri.endsWith(ANY_RESOURCE_PATTERN)) {
String formattedPattern = removeWildCardsFromUri(protectedUri);
if (!formattedPattern.equals("/") && requestedUri.startsWith(formattedPattern)) {
selectedUri = protectedUri;
}
if (!formattedPattern.equals("/") && formattedPattern.endsWith("/") && formattedPattern.substring(0, formattedPattern.length() - 1).equals(requestedUri)) {
selectedUri = protectedUri;
}
}
int startRegex = protectedUri.indexOf('{');
if (startRegex != -1) {
String prefix = protectedUri.substring(0, startRegex);
if (requestedUri.startsWith(prefix)) {
selectedUri = protectedUri;
}
}
if (selectedUri != null) {
selectedUri = protectedUri;
}
if (selectedUri != null) {
if (actualConfig == null) {
actualConfig = entry;
} else {
if (actualConfig.equals(ANY_RESOURCE_PATTERN)) {
actualConfig = entry;
}
if (protectedUri.startsWith(removeWildCardsFromUri(actualConfig.getPath()))) {
actualConfig = entry;
}
}
}
}
return actualConfig;
}
private String removeWildCardsFromUri(String protectedUri) {
return protectedUri.replaceAll("/[*]", "/");
}
}
@@ -0,0 +1,205 @@
/*
* 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.adapters.authorization;
import org.jboss.logging.Logger;
import org.keycloak.AuthorizationContext;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.Configuration;
import org.keycloak.authorization.client.representation.RegistrationResponse;
import org.keycloak.authorization.client.representation.ResourceRepresentation;
import org.keycloak.authorization.client.representation.ScopeRepresentation;
import org.keycloak.authorization.client.resource.ProtectedResource;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import org.keycloak.representations.authorization.Permission;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class PolicyEnforcer {
private static Logger LOGGER = Logger.getLogger(PolicyEnforcer.class);
private final KeycloakDeployment deployment;
private final PathMatcher pathMatcher;
private final AuthzClient authzClient;
private final PolicyEnforcerConfig enforcerConfig;
private final List<PathConfig> paths;
public PolicyEnforcer(KeycloakDeployment deployment, AdapterConfig adapterConfig) {
this.deployment = deployment;
this.enforcerConfig = adapterConfig.getPolicyEnforcerConfig();
this.authzClient = AuthzClient.create(new Configuration(adapterConfig.getAuthServerUrl(), adapterConfig.getRealm(), adapterConfig.getResource(), adapterConfig.getCredentials(), deployment.getClient()));
this.pathMatcher = new PathMatcher();
this.paths = configurePaths(this.authzClient.protection().resource(), this.enforcerConfig);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Initialization complete. Path configurations:");
for (PathConfig pathConfig : this.paths) {
LOGGER.debug(pathConfig);
}
}
}
public AuthorizationContext enforce(OIDCHttpFacade facade) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debugv("Policy enforcement is enable. Enforcing policy decisions for path [{0}].", facade.getRequest().getURI());
}
AuthorizationContext context;
if (deployment.isBearerOnly()) {
context = new BearerTokenPolicyEnforcer(this).authorize(facade);
} else {
context = new KeycloakAdapterPolicyEnforcer(this).authorize(facade);
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debugv("Policy enforcement result for path [{0}] is : {1}", facade.getRequest().getURI(), context.isGranted() ? "GRANTED" : "DENIED");
LOGGER.debugv("Returning authorization context with permissions:");
for (Permission permission : context.getPermissions()) {
LOGGER.debug(permission);
}
}
return context;
}
PolicyEnforcerConfig getEnforcerConfig() {
return enforcerConfig;
}
AuthzClient getClient() {
return authzClient;
}
List<PathConfig> getPaths() {
return paths;
}
KeycloakDeployment getDeployment() {
return deployment;
}
private List<PathConfig> configurePaths(ProtectedResource protectedResource, PolicyEnforcerConfig enforcerConfig) {
if (enforcerConfig.getPaths().isEmpty()) {
LOGGER.info("No path provided in configuration.");
return configureAllPathsForResourceServer(protectedResource);
} else {
LOGGER.info("Paths provided in configuration.");
return configureDefinedPaths(protectedResource, enforcerConfig);
}
}
private List<PathConfig> configureDefinedPaths(ProtectedResource protectedResource, PolicyEnforcerConfig enforcerConfig) {
List<PathConfig> paths = new ArrayList<>();
for (PathConfig pathConfig : enforcerConfig.getPaths()) {
Set<String> search;
String resourceName = pathConfig.getName();
String path = pathConfig.getPath();
if (resourceName != null) {
LOGGER.debugf("Trying to find resource with name [%s] for path [%s].", resourceName, path);
search = protectedResource.findByFilter("name=" + resourceName);
} else {
LOGGER.debugf("Trying to find resource with uri [%s] for path [%s].", path, path);
search = protectedResource.findByFilter("uri=" + path);
}
if (search.isEmpty()) {
if (enforcerConfig.isCreateResources()) {
LOGGER.debugf("Creating resource on server for path [%s].", pathConfig);
ResourceRepresentation resource = new ResourceRepresentation();
resource.setName(resourceName);
resource.setType(pathConfig.getType());
resource.setUri(path);
HashSet<ScopeRepresentation> scopes = new HashSet<>();
for (String scopeName : pathConfig.getScopes()) {
ScopeRepresentation scope = new ScopeRepresentation();
scope.setName(scopeName);
scopes.add(scope);
}
resource.setScopes(scopes);
RegistrationResponse registrationResponse = protectedResource.create(resource);
pathConfig.setId(registrationResponse.getId());
} else {
throw new RuntimeException("Could not find matching resource on server with uri [" + path + "] or name [" + resourceName + ". Make sure you have created a resource on the server that matches with the path configuration.");
}
} else {
pathConfig.setId(search.iterator().next());
}
paths.add(pathConfig);
}
return paths;
}
private List<PathConfig> configureAllPathsForResourceServer(ProtectedResource protectedResource) {
LOGGER.info("Querying the server for all resources associated with this application.");
List<PathConfig> paths = new ArrayList<>();
for (String id : protectedResource.findAll()) {
RegistrationResponse response = protectedResource.findById(id);
ResourceRepresentation resourceDescription = response.getResourceDescription();
if (resourceDescription.getUri() != null) {
paths.add(createPathConfig(resourceDescription));
}
}
return paths;
}
private PathConfig createPathConfig(ResourceRepresentation resourceDescription) {
PathConfig pathConfig = new PathConfig();
pathConfig.setId(resourceDescription.getId());
pathConfig.setName(resourceDescription.getName());
pathConfig.setPath(resourceDescription.getUri());
List<String> scopeNames = new ArrayList<>();
for (ScopeRepresentation scope : resourceDescription.getScopes()) {
scopeNames.add(scope.getName());
}
pathConfig.setScopes(scopeNames);
pathConfig.setType(resourceDescription.getType());
return pathConfig;
}
}
@@ -38,13 +38,13 @@ import javax.security.auth.spi.LoginModule;
import org.jboss.logging.Logger;
import org.keycloak.KeycloakPrincipal;
import org.keycloak.RSATokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.AdapterUtils;
import org.keycloak.common.util.FindFile;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.KeycloakDeploymentBuilder;
import org.keycloak.adapters.RefreshableKeycloakSecurityContext;
import org.keycloak.common.VerificationException;
import org.keycloak.common.util.FindFile;
import org.keycloak.representations.AccessToken;
import org.keycloak.common.util.reflections.Reflections;
File mode changed.
@@ -61,6 +61,7 @@ public class KeycloakDeploymentBuilderTest {
assertEquals(1000, deployment.getRegisterNodePeriod());
assertEquals(TokenStore.COOKIE, deployment.getTokenStore());
assertEquals("email", deployment.getPrincipalAttribute());
assertEquals(10, deployment.getTokenMinimumTimeToLive());
}
@Test
@@ -0,0 +1,23 @@
package org.keycloak.adapters;
import static org.junit.Assert.*;
import org.junit.Test;
import org.keycloak.representations.oidc.TokenMetadataRepresentation;
/**
* @author github.com/tubbynl
*
*/
public class RefreshableKeycloakSecurityContextTest {
@Test
public void isActive() {
TokenMetadataRepresentation token = new TokenMetadataRepresentation();
token.setActive(true);
token.issuedNow();
RefreshableKeycloakSecurityContext sut = new RefreshableKeycloakSecurityContext(null,null,null,token,null, null, null);
// verify false if null deployment (KEYCLOAK-3050; yielded a npe)
assertFalse(sut.isActive());
}
}
@@ -28,5 +28,6 @@
"register-node-at-startup": true,
"register-node-period": 1000,
"token-store": "cookie",
"principal-attribute": "email"
"principal-attribute": "email",
"token-minimum-time-to-live": 10
}
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+2 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -60,7 +60,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty-adapter-spi</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Jetty Integration</name>
+20 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -58,6 +58,25 @@
<goal>minify</goal>
</goals>
</execution>
<execution>
<id>min-authz-js</id>
<phase>compile</phase>
<configuration>
<charset>utf-8</charset>
<webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
<jsSourceDir>.</jsSourceDir>
<jsSourceFiles>
<jsSourceFile>keycloak-authz.js</jsSourceFile>
</jsSourceFiles>
<webappTargetDir>${project.build.directory}/classes</webappTargetDir>
<jsTargetDir>.</jsTargetDir>
<jsFinalFile>keycloak-authz.js</jsFinalFile>
</configuration>
<goals>
<goal>minify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
@@ -0,0 +1,170 @@
/*
* 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.
*
*/
(function( window, undefined ) {
var KeycloakAuthorization = function (keycloak) {
var _instance = this;
this.rpt = null;
this.init = function () {
var request = new XMLHttpRequest();
request.open('GET', keycloak.authServerUrl + '/realms/' + keycloak.realm + '/.well-known/uma-configuration');
request.onreadystatechange = function () {
if (request.readyState == 4) {
if (request.status == 200) {
_instance.config = JSON.parse(request.responseText);
} else {
console.error('Could not obtain configuration from server.');
}
}
}
request.send(null);
};
/**
* This method enables client applications to better integrate with resource servers protected by a Keycloak
* policy enforcer.
*
* In this case, the resource server will respond with a 401 status code and a WWW-Authenticate header holding the
* necessary information to ask a Keycloak server for authorization data using both UMA and Entitlement protocol,
* depending on how the policy enforcer at the resource server was configured.
*/
this.authorize = function (wwwAuthenticateHeader) {
this.then = function (onGrant, onDeny, onError) {
if (wwwAuthenticateHeader.startsWith('UMA')) {
var params = wwwAuthenticateHeader.split(',');
for (i = 0; i < params.length; i++) {
var param = params[i].split('=');
if (param[0] == 'ticket') {
var request = new XMLHttpRequest();
request.open('POST', _instance.config.rpt_endpoint, true);
request.setRequestHeader('Content-Type', 'application/json')
request.setRequestHeader('Authorization', 'Bearer ' + keycloak.token)
request.onreadystatechange = function () {
if (request.readyState == 4) {
var status = request.status;
if (status >= 200 && status < 300) {
var rpt = JSON.parse(request.responseText).rpt;
_instance.rpt = rpt;
onGrant(rpt);
} else if (status == 403) {
if (onDeny) {
onDeny();
} else {
console.error('Authorization request was denied by the server.');
}
} else {
if (onError) {
onError();
} else {
console.error('Could not obtain authorization data from server.');
}
}
}
};
var ticket = param[1].substring(1, param[1].length - 1).trim();
request.send(JSON.stringify(
{
ticket: ticket,
rpt: _instance.rpt
}
));
}
}
} else if (wwwAuthenticateHeader.startsWith('KC_ETT')) {
var params = wwwAuthenticateHeader.substring('KC_ETT'.length).trim().split(',');
var clientId = null;
for (i = 0; i < params.length; i++) {
var param = params[i].split('=');
if (param[0] == 'realm') {
clientId = param[1].substring(1, param[1].length - 1).trim();
}
}
_instance.entitlement(clientId).then(onGrant, onDeny, onError);
}
};
/**
* Obtains all entitlements from a Keycloak Server based on a give resourceServerId.
*/
this.entitlement = function (resourceSeververId) {
this.then = function (onGrant, onDeny, onError) {
var request = new XMLHttpRequest();
request.open('GET', keycloak.authServerUrl + '/realms/' + keycloak.realm + '/authz/entitlement/' + resourceSeververId, true);
request.setRequestHeader('Authorization', 'Bearer ' + keycloak.token)
request.onreadystatechange = function () {
if (request.readyState == 4) {
var status = request.status;
if (status >= 200 && status < 300) {
var rpt = JSON.parse(request.responseText).rpt;
_instance.rpt = rpt;
onGrant(rpt);
} else if (status == 403) {
if (onDeny) {
onDeny();
} else {
console.error('Authorization request was denied by the server.');
}
} else {
if (onError) {
onError();
} else {
console.error('Could not obtain authorization data from server.');
}
}
}
};
request.send(null);
};
return this;
};
return this;
};
this.init(this);
};
if ( typeof module === "object" && module && typeof module.exports === "object" ) {
module.exports = KeycloakAuthorization;
} else {
window.KeycloakAuthorization = KeycloakAuthorization;
if ( typeof define === "function" && define.amd ) {
define( "keycloak-authorization", [], function () { return KeycloakAuthorization; } );
}
}
})( window );
@@ -38,10 +38,16 @@
storage = new PersistentStorage();
if (window.Cordova) {
adapter = loadAdapter('cordova');
} else {
if (initOptions && initOptions.adapter === 'cordova') {
adapter = loadAdapter('cordova');
} else if (initOptions && initOptions.adapter === 'default') {
adapter = loadAdapter();
} else {
if (window.Cordova) {
adapter = loadAdapter('cordova');
} else {
adapter = loadAdapter();
}
}
if (initOptions) {
+30 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -36,15 +36,32 @@
org.keycloak.adapters.osgi.*
</keycloak.osgi.export>
<keycloak.osgi.import>
org.ops4j.pax.web.*;version="[3.0,4)",
org.ops4j.pax.web.*;version="[3.0,5)",
javax.servlet.*;version="[2.5,4)";resolution:=optional,
org.eclipse.jetty.*;version="[8.1,10)";resolution:=optional,
org.keycloak.*;version="${project.version}",
org.apache.cxf.transport.http;resolution:=optional;version="[3,4)",
org.apache.cxf.transport.servlet;resolution:=optional;version="[3,4)",
*;resolution:=optional
</keycloak.osgi.import>
</properties>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-spi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
@@ -65,12 +82,23 @@
<artifactId>pax-web-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.web</groupId>
<artifactId>pax-web-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
@@ -0,0 +1,71 @@
/*
* 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.adapters.osgi;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.keycloak.adapters.KeycloakConfigResolver;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.KeycloakDeploymentBuilder;
import org.keycloak.adapters.OIDCHttpFacade;
public class PathBasedKeycloakConfigResolver implements KeycloakConfigResolver {
private final Map<String, KeycloakDeployment> cache = new ConcurrentHashMap<String, KeycloakDeployment>();
@Override
public KeycloakDeployment resolve(OIDCHttpFacade.Request request) {
String path = request.getURI();
String[] urlTokens = path.split("/");
if (urlTokens.length < 4) {
throw new IllegalStateException("Not able to determine the web-context to load the correspondent keycloak.json file");
}
String webContext = urlTokens[3];
KeycloakDeployment deployment = cache.get(webContext);
if (null == deployment) {
// not found on the simple cache, try to load it from the file system
String keycloakConfig = (String) System.getProperties().get("keycloak.config");
if(keycloakConfig == null || "".equals(keycloakConfig.trim())){
String karafEtc = (String) System.getProperties().get("karaf.etc");
if(karafEtc == null || "".equals(karafEtc.trim())){
throw new IllegalStateException("Neither \"keycloak.config\" nor \"karaf.etc\" java properties are set. Please set one of them.");
}
keycloakConfig = karafEtc;
}
String absolutePath = keycloakConfig + File.separator + webContext + "-keycloak.json";
InputStream is = null;
try {
is = new FileInputStream(absolutePath);
} catch (FileNotFoundException e){
throw new IllegalStateException("Not able to find the file " + absolutePath);
}
deployment = KeycloakDeploymentBuilder.build(is);
cache.put(webContext, deployment);
}
return deployment;
}
}
@@ -18,15 +18,22 @@
package org.keycloak.adapters.osgi;
import java.util.Arrays;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.Properties;
import javax.servlet.Servlet;
import org.apache.cxf.transport.http.DestinationRegistry;
import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
import org.jboss.logging.Logger;
import org.ops4j.pax.web.service.WebContainer;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
import org.osgi.service.http.HttpContext;
import org.osgi.util.tracker.ServiceTracker;
import org.osgi.util.tracker.ServiceTrackerCustomizer;
@@ -42,13 +49,15 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
*/
public class ServletReregistrationService {
private static final String CXF_SERVLET_PREFIX = "org.apache.cxf.servlet.";
protected static final Logger log = Logger.getLogger(ServletReregistrationService.class);
private static final List<String> FILTERED_PROPERTIES = Arrays.asList("objectClass", "service.id");
private BundleContext bundleContext;
private ServiceReference servletReference;
private ServiceReference managedServiceReference;
private ServiceTracker webContainerTracker;
private String alias;
public BundleContext getBundleContext() {
return bundleContext;
@@ -58,24 +67,18 @@ public class ServletReregistrationService {
this.bundleContext = bundleContext;
}
public ServiceReference getServletReference() {
return servletReference;
}
public void setServletReference(ServiceReference servletReference) {
this.servletReference = servletReference;
}
protected ServiceTracker getWebContainerTracker() {
return webContainerTracker;
}
public void start() {
if (servletReference == null) {
throw new IllegalStateException("No servlet reference provided");
if ( managedServiceReference == null) {
return;
}
Dictionary properties = obtainProperties();
alias = (String)getProp(properties, CXF_SERVLET_PREFIX + "context", "/cxf");
if(alias == null){
alias = "/cxf";
}
final Servlet servlet = (Servlet) bundleContext.getService(servletReference);
WebContainer externalWebContainer = findExternalWebContainer();
if (externalWebContainer == null) {
return;
@@ -83,18 +86,19 @@ public class ServletReregistrationService {
// Unregister servlet from external container now
try {
externalWebContainer.unregisterServlet(servlet);
externalWebContainer.unregister(alias);
log.debug("Original servlet with alias " + getAlias() + " unregistered successfully from external web container.");
} catch (IllegalStateException e) {
log.warn("Can't unregister servlet due to: " + e.getMessage());
}
final Dictionary finalProperties = properties;
ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() {
@Override
public Object addingService(ServiceReference webContainerServiceReference) {
WebContainer ourWebContainer = (WebContainer) bundleContext.getService(webContainerServiceReference);
registerServlet(ourWebContainer, servlet);
registerServlet(ourWebContainer, finalProperties);
log.debugv("Servlet with alias " + getAlias() + " registered to secured web container");
return ourWebContainer;
}
@@ -122,28 +126,82 @@ public class ServletReregistrationService {
// Re-register servlet back to original context
WebContainer externalWebContainer = findExternalWebContainer();
Servlet servlet = (Servlet) bundleContext.getService(servletReference);
registerServlet(externalWebContainer, servlet);
registerServlet(externalWebContainer, obtainProperties());
log.debug("Servlet with alias " + getAlias() + " registered back to external web container");
}
private String getAlias() {
return (String) servletReference.getProperty("alias");
return alias;
}
protected void registerServlet(WebContainer webContainer, Servlet servlet) {
/**
* Code comes from org.apache.cxf.transport.http.osgi.ServletExporter#updated(java.util.Dictionary)
* @param webContainer
* @param properties
*/
protected void registerServlet(WebContainer webContainer, Dictionary properties) {
HttpContext httpContext = webContainer.createDefaultHttpContext();
ServiceReference destinationServiceServiceReference = bundleContext.getServiceReference("org.apache.cxf.transport.http.DestinationRegistry");
DestinationRegistry destinationRegistry = (DestinationRegistry) bundleContext.getService(destinationServiceServiceReference);
Servlet servlet = new CXFNonSpringServlet(destinationRegistry, false);
try {
if (properties == null) {
properties = new Properties();
}
Properties sprops = new Properties();
sprops.put("init-prefix",
getProp(properties, CXF_SERVLET_PREFIX + "init-prefix", ""));
sprops.put("servlet-name",
getProp(properties, CXF_SERVLET_PREFIX + "name", "cxf-osgi-transport-servlet"));
sprops.put("hide-service-list-page",
getProp(properties, CXF_SERVLET_PREFIX + "hide-service-list-page", "false"));
sprops.put("disable-address-updates",
getProp(properties, CXF_SERVLET_PREFIX + "disable-address-updates", "true"));
sprops.put("base-address",
getProp(properties, CXF_SERVLET_PREFIX + "base-address", ""));
sprops.put("service-list-path",
getProp(properties, CXF_SERVLET_PREFIX + "service-list-path", ""));
sprops.put("static-resources-list",
getProp(properties, CXF_SERVLET_PREFIX + "static-resources-list", ""));
sprops.put("redirects-list",
getProp(properties, CXF_SERVLET_PREFIX + "redirects-list", ""));
sprops.put("redirect-servlet-name",
getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-name", ""));
sprops.put("redirect-servlet-path",
getProp(properties, CXF_SERVLET_PREFIX + "redirect-servlet-path", ""));
sprops.put("service-list-all-contexts",
getProp(properties, CXF_SERVLET_PREFIX + "service-list-all-contexts", ""));
sprops.put("service-list-page-authenticate",
getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate", "false"));
sprops.put("service-list-page-authenticate-realm",
getProp(properties, CXF_SERVLET_PREFIX + "service-list-page-authenticate-realm", "karaf"));
sprops.put("use-x-forwarded-headers",
getProp(properties, CXF_SERVLET_PREFIX + "use-x-forwarded-headers", "false"));
// Accept extra properties by default, can be disabled if it is really needed
if (Boolean.valueOf(getProp(properties, CXF_SERVLET_PREFIX + "support.extra.properties", "true").toString())) {
Enumeration keys = properties.keys();
while (keys.hasMoreElements()) {
String nextKey = keys.nextElement().toString();
if (!nextKey.startsWith(CXF_SERVLET_PREFIX)) {
sprops.put(nextKey, properties.get(nextKey));
}
}
}
Hashtable<String, Object> servletInitParams = new Hashtable<String, Object>();
String[] propNames = servletReference.getPropertyKeys();
for (String propName : propNames) {
Enumeration keys = sprops.keys();
while(keys.hasMoreElements()){
String propName = (String) keys.nextElement();
if (!FILTERED_PROPERTIES.contains(propName)) {
servletInitParams.put(propName, servletReference.getProperty(propName));
servletInitParams.put(propName, sprops.getProperty(propName));
}
}
// Try to register servlet in given web container now
HttpContext httpContext = webContainer.createDefaultHttpContext();
String alias = (String) servletReference.getProperty("alias");
webContainer.registerServlet(alias, servlet, servletInitParams, httpContext);
} catch (Exception e) {
log.error("Can't register servlet in web container", e);
@@ -156,7 +214,7 @@ public class ServletReregistrationService {
* @return web container or null
*/
protected WebContainer findExternalWebContainer() {
BundleContext servletBundleContext = servletReference.getBundle().getBundleContext();
BundleContext servletBundleContext = managedServiceReference.getBundle().getBundleContext();
ServiceReference webContainerReference = servletBundleContext.getServiceReference(WebContainer.class.getName());
if (webContainerReference == null) {
log.warn("Not found webContainer reference for bundle " + servletBundleContext);
@@ -166,4 +224,32 @@ public class ServletReregistrationService {
}
}
private Dictionary obtainProperties(){
Dictionary properties = null;
ServiceReference reference = bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
ConfigurationAdmin admin = (ConfigurationAdmin) bundleContext.getService(reference);
try {
Configuration configuration = admin.getConfiguration("org.apache.cxf.osgi");
properties = configuration.getProperties();
} catch (Exception e){
log.warn("Unable to obtain cxf osgi configadmin reference.", e);
}
return properties;
}
private Object getProp(Dictionary properties, String key, Object defaultValue) {
Object value = null;
if(properties != null){
value = properties.get(key);
}
return value == null ? defaultValue : value;
}
public ServiceReference getManagedServiceReference() {
return managedServiceReference;
}
public void setManagedServiceReference(ServiceReference managedServiceReference) {
this.managedServiceReference = managedServiceReference;
}
}
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -19,12 +19,12 @@ package org.keycloak.adapters.servlet;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.spi.KeycloakAccount;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.OidcKeycloakAccount;
import org.keycloak.adapters.RefreshableKeycloakSecurityContext;
import org.keycloak.adapters.RequestAuthenticator;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.spi.KeycloakAccount;
import org.keycloak.adapters.spi.SessionIdMapper;
import javax.servlet.http.HttpServletRequest;
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+2 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -43,7 +43,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
+2 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -44,7 +44,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
+2 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-tomcat-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -43,7 +43,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,16 +17,16 @@
package org.keycloak.adapters.undertow;
import io.undertow.server.HttpServerExchange;
import io.undertow.util.AttachmentKey;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.OIDCHttpFacade;
import static org.keycloak.adapters.undertow.OIDCUndertowHttpFacade.KEYCLOAK_SECURITY_CONTEXT_KEY;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class OIDCServletUndertowHttpFacade extends ServletHttpFacade implements OIDCHttpFacade {
public static final AttachmentKey<KeycloakSecurityContext> KEYCLOAK_SECURITY_CONTEXT_KEY = AttachmentKey.create(KeycloakSecurityContext.class);
public OIDCServletUndertowHttpFacade(HttpServerExchange exchange) {
super(exchange);
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -41,7 +41,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-spi</artifactId>
</dependency>
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -45,6 +45,7 @@ public class Constants {
static final String KEY_STORE = "KeyStore";
static final String SIGN_REQUEST = "signRequest";
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
static final String REQUEST_BINDING = "requestBinding";
static final String BINDING_URL = "bindingUrl";
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
@@ -97,6 +98,7 @@ public class Constants {
static final String CERTIFICATE_ALIAS = "alias";
static final String SIGN_REQUEST = "signRequest";
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
static final String REQUEST_BINDING = "requestBinding";
static final String BINDING_URL = "bindingUrl";
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
@@ -71,8 +71,8 @@ public abstract class KeycloakDependencyProcessor implements DeploymentUnitProce
private void addCommonModules(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
// ModuleDependency(ModuleLoader moduleLoader, ModuleIdentifier identifier, boolean optional, boolean export, boolean importServices, boolean userSpecified)
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_JBOSS_CORE_ADAPTER, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_API_ADAPTER, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_CORE_ADAPTER, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_API_ADAPTER, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, KEYCLOAK_COMMON, false, false, false, false));
}
@@ -37,6 +37,11 @@ abstract class SingleSignOnDefinition {
.setXmlName(Constants.XML.VALIDATE_RESPONSE_SIGNATURE)
.build();
static final SimpleAttributeDefinition VALIDATE_ASSERTION_SIGNATURE =
new SimpleAttributeDefinitionBuilder(Constants.Model.VALIDATE_ASSERTION_SIGNATURE, ModelType.BOOLEAN, true)
.setXmlName(Constants.XML.VALIDATE_ASSERTION_SIGNATURE)
.build();
static final SimpleAttributeDefinition REQUEST_BINDING =
new SimpleAttributeDefinitionBuilder(Constants.Model.REQUEST_BINDING, ModelType.STRING, true)
.setXmlName(Constants.XML.REQUEST_BINDING)
@@ -52,7 +57,7 @@ abstract class SingleSignOnDefinition {
.setXmlName(Constants.XML.BINDING_URL)
.build();
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
@@ -67,6 +67,7 @@ keycloak-saml.IDP.signatureCanonicalizationMethod=Signature canonicalization met
keycloak-saml.IDP.SingleSignOnService=Single sign-on configuration
keycloak-saml.IDP.SingleSignOnService.signRequest=Sign SSO requests
keycloak-saml.IDP.SingleSignOnService.validateResponseSignature=Validate an SSO response signature
keycloak-saml.IDP.SingleSignOnService.validateAssertionSignature=Validate an SSO assertion signature
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
@@ -132,6 +132,11 @@
<xs:documentation>Validate the SSO response signature</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validateAssertionSignature" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>Validate the SSO assertion signature</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requestBinding" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>HTTP method to use for requests</xs:documentation>
@@ -42,6 +42,7 @@
<IDP entityID="idp">
<SingleSignOnService signRequest="true"
validateResponseSignature="true"
validateAssertionSignature="true"
requestBinding="POST"
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"/>
<SingleLogoutService
+2 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -30,6 +30,7 @@
<name>Keycloak SAML Client Adapter Public API</name>
<description/>
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
+2 -2
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -55,7 +55,7 @@
<artifactId>keycloak-saml-adapter-api-public</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-common</artifactId>
<scope>provided</scope>
@@ -34,6 +34,7 @@ public class DefaultSamlDeployment implements SamlDeployment {
public static class DefaultSingleSignOnService implements IDP.SingleSignOnService {
private boolean signRequest;
private boolean validateResponseSignature;
private boolean validateAssertionSignature;
private Binding requestBinding;
private Binding responseBinding;
private String requestBindingUrl;
@@ -48,6 +49,11 @@ public class DefaultSamlDeployment implements SamlDeployment {
return validateResponseSignature;
}
@Override
public boolean validateAssertionSignature() {
return validateAssertionSignature;
}
@Override
public Binding getRequestBinding() {
return requestBinding;
@@ -71,6 +77,10 @@ public class DefaultSamlDeployment implements SamlDeployment {
this.validateResponseSignature = validateResponseSignature;
}
public void setValidateAssertionSignature(boolean validateAssertionSignature) {
this.validateAssertionSignature = validateAssertionSignature;
}
public void setRequestBinding(Binding requestBinding) {
this.requestBinding = requestBinding;
}
@@ -50,6 +50,7 @@ public interface SamlDeployment {
public interface SingleSignOnService {
boolean signRequest();
boolean validateResponseSignature();
boolean validateAssertionSignature();
Binding getRequestBinding();
Binding getResponseBinding();
String getRequestBindingUrl();
@@ -33,6 +33,7 @@ public class IDP implements Serializable {
private String requestBinding;
private String responseBinding;
private String bindingUrl;
private boolean validateAssertionSignature;
public boolean isSignRequest() {
return signRequest;
@@ -50,6 +51,14 @@ public class IDP implements Serializable {
this.validateResponseSignature = validateResponseSignature;
}
public boolean isValidateAssertionSignature() {
return validateAssertionSignature;
}
public void setValidateAssertionSignature(boolean validateAssertionSignature) {
this.validateAssertionSignature = validateAssertionSignature;
}
public String getRequestBinding() {
return requestBinding;
}
@@ -68,6 +68,7 @@ public class ConfigXmlConstants {
public static final String RESPONSE_BINDING_ATTR = "responseBinding";
public static final String BINDING_URL_ATTR = "bindingUrl";
public static final String VALIDATE_RESPONSE_SIGNATURE_ATTR = "validateResponseSignature";
public static final String VALIDATE_ASSERTION_SIGNATURE_ATTR = "validateAssertionSignature";
public static final String VALIDATE_REQUEST_SIGNATURE_ATTR = "validateRequestSignature";
public static final String POST_BINDING_URL_ATTR = "postBindingUrl";
public static final String REDIRECT_BINDING_URL_ATTR = "redirectBindingUrl";
@@ -149,6 +149,7 @@ public class DeploymentBuilder {
}
sso.setSignRequest(sp.getIdp().getSingleSignOnService().isSignRequest());
sso.setValidateResponseSignature(sp.getIdp().getSingleSignOnService().isValidateResponseSignature());
sso.setValidateAssertionSignature(sp.getIdp().getSingleSignOnService().isValidateAssertionSignature());
slo.setSignRequest(sp.getIdp().getSingleLogoutService().isSignRequest());
slo.setSignResponse(sp.getIdp().getSingleLogoutService().isSignResponse());
@@ -106,6 +106,7 @@ public class IDPXmlParser extends AbstractParser {
StartElement element = StaxParserUtil.getNextStartElement(xmlEventReader);
sso.setSignRequest(SPXmlParser.getBooleanAttributeValue(element, ConfigXmlConstants.SIGN_REQUEST_ATTR, signaturesRequired));
sso.setValidateResponseSignature(SPXmlParser.getBooleanAttributeValue(element, ConfigXmlConstants.VALIDATE_RESPONSE_SIGNATURE_ATTR, signaturesRequired));
sso.setValidateAssertionSignature(SPXmlParser.getBooleanAttributeValue(element, ConfigXmlConstants.VALIDATE_ASSERTION_SIGNATURE_ATTR));
sso.setRequestBinding(SPXmlParser.getAttributeValue(element, ConfigXmlConstants.REQUEST_BINDING_ATTR));
sso.setResponseBinding(SPXmlParser.getAttributeValue(element, ConfigXmlConstants.RESPONSE_BINDING_ATTR));
sso.setBindingUrl(SPXmlParser.getAttributeValue(element, ConfigXmlConstants.BINDING_URL_ATTR));
@@ -201,7 +201,7 @@ public abstract class AbstractSamlAuthenticationHandler implements SamlAuthentic
return AuthOutcome.FAILED;
}
}
return handleLoginResponse((ResponseType) statusResponse, onCreateSession);
return handleLoginResponse((ResponseType) statusResponse, postBinding, onCreateSession);
} finally {
sessionStore.setCurrentAction(SamlSessionStore.CurrentAction.NONE);
}
@@ -272,8 +272,7 @@ public abstract class AbstractSamlAuthenticationHandler implements SamlAuthentic
return false;
}
protected AuthOutcome handleLoginResponse(ResponseType responseType, OnSessionCreated onCreateSession) {
protected AuthOutcome handleLoginResponse(ResponseType responseType, boolean postBinding, OnSessionCreated onCreateSession) {
AssertionType assertion = null;
try {
assertion = AssertionUtil.getAssertion(responseType, deployment.getDecryptionKey());
@@ -298,6 +297,32 @@ public abstract class AbstractSamlAuthenticationHandler implements SamlAuthentic
};
}
if (deployment.getIDP().getSingleSignOnService().validateAssertionSignature()) {
try {
validateSamlSignature(new SAMLDocumentHolder(AssertionUtil.asDocument(assertion)), postBinding, GeneralConstants.SAML_RESPONSE_KEY);
} catch (VerificationException e) {
log.error("Failed to verify saml assertion signature", e);
challenge = new AuthChallenge() {
@Override
public boolean challenge(HttpFacade exchange) {
SamlAuthenticationError error = new SamlAuthenticationError(SamlAuthenticationError.Reason.INVALID_SIGNATURE);
exchange.getRequest().setError(error);
exchange.getResponse().sendError(403);
return true;
}
@Override
public int getResponseCode() {
return 403;
}
};
return AuthOutcome.FAILED;
} catch (ProcessingException e) {
e.printStackTrace();
}
}
SubjectType subject = assertion.getSubject();
SubjectType.STSubType subType = subject.getSubType();
NameIDType subjectNameID = (NameIDType) subType.getBaseID();
@@ -112,6 +112,7 @@
<xs:complexType name="sign-on-type">
<xs:attribute name="signRequest" type="xs:boolean" use="optional"/>
<xs:attribute name="validateResponseSignature" type="xs:boolean" use="optional"/>
<xs:attribute name="validateAssertionSignature" type="xs:boolean" use="optional"/>
<xs:attribute name="requestBinding" type="xs:string" use="optional"/>
<xs:attribute name="responseBinding" type="xs:string" use="optional"/>
<xs:attribute name="bindingUrl" type="xs:string" use="optional"/>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -48,6 +48,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-saml-adapter-api-public</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-parent</artifactId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -45,6 +45,7 @@ public class Constants {
static final String KEY_STORE = "KeyStore";
static final String SIGN_REQUEST = "signRequest";
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
static final String REQUEST_BINDING = "requestBinding";
static final String BINDING_URL = "bindingUrl";
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
@@ -97,6 +98,7 @@ public class Constants {
static final String CERTIFICATE_ALIAS = "alias";
static final String SIGN_REQUEST = "signRequest";
static final String VALIDATE_RESPONSE_SIGNATURE = "validateResponseSignature";
static final String VALIDATE_ASSERTION_SIGNATURE = "validateAssertionSignature";
static final String REQUEST_BINDING = "requestBinding";
static final String BINDING_URL = "bindingUrl";
static final String VALIDATE_REQUEST_SIGNATURE = "validateRequestSignature";
@@ -37,8 +37,8 @@ import org.jboss.modules.ModuleLoader;
public abstract class KeycloakDependencyProcessor implements DeploymentUnitProcessor {
private static final ModuleIdentifier KEYCLOAK_JBOSS_CORE_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-jboss-adapter-core");
private static final ModuleIdentifier KEYCLOAK_API_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-saml-adapter-api-public");
private static final ModuleIdentifier KEYCLOAK_CORE_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-saml-adapter-core");
private static final ModuleIdentifier KEYCLOAK_API_ADAPTER = ModuleIdentifier.create("org.keycloak.keycloak-saml-adapter-api-public");
private static final ModuleIdentifier KEYCLOAK_COMMON = ModuleIdentifier.create("org.keycloak.keycloak-common");
@Override
@@ -37,6 +37,11 @@ abstract class SingleSignOnDefinition {
.setXmlName(Constants.XML.VALIDATE_RESPONSE_SIGNATURE)
.build();
static final SimpleAttributeDefinition VALIDATE_ASSERTION_SIGNATURE =
new SimpleAttributeDefinitionBuilder(Constants.Model.VALIDATE_ASSERTION_SIGNATURE, ModelType.BOOLEAN, true)
.setXmlName(Constants.XML.VALIDATE_ASSERTION_SIGNATURE)
.build();
static final SimpleAttributeDefinition REQUEST_BINDING =
new SimpleAttributeDefinitionBuilder(Constants.Model.REQUEST_BINDING, ModelType.STRING, true)
.setXmlName(Constants.XML.REQUEST_BINDING)
@@ -52,7 +57,7 @@ abstract class SingleSignOnDefinition {
.setXmlName(Constants.XML.BINDING_URL)
.build();
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
static final SimpleAttributeDefinition[] ATTRIBUTES = {SIGN_REQUEST, VALIDATE_RESPONSE_SIGNATURE, VALIDATE_ASSERTION_SIGNATURE, REQUEST_BINDING, RESPONSE_BINDING, BINDING_URL};
static final HashMap<String, SimpleAttributeDefinition> ATTRIBUTE_MAP = new HashMap<>();
@@ -67,6 +67,7 @@ keycloak-saml.IDP.signatureCanonicalizationMethod=Signature canonicalization met
keycloak-saml.IDP.SingleSignOnService=Single sign-on configuration
keycloak-saml.IDP.SingleSignOnService.signRequest=Sign SSO requests
keycloak-saml.IDP.SingleSignOnService.validateResponseSignature=Validate an SSO response signature
keycloak-saml.IDP.SingleSignOnService.validateAssertionSignature=Validate an SSO assertion signature
keycloak-saml.IDP.SingleSignOnService.requestBinding=HTTP method to use for requests
keycloak-saml.IDP.SingleSignOnService.responseBinding=HTTP method to use for responses
keycloak-saml.IDP.SingleSignOnService.bindingUrl=SSO endpoint URL
@@ -132,6 +132,11 @@
<xs:documentation>Validate the SSO response signature</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="validateAssertionSignature" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>Validate the SSO assertion signature</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requestBinding" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>HTTP method to use for requests</xs:documentation>
@@ -42,6 +42,7 @@
<IDP entityID="idp" signaturesRequired="true" signatureAlgorithm="test" signatureCanonicalizationMethod="test" encryption="test">
<SingleSignOnService signRequest="true"
validateResponseSignature="true"
validateAssertionSignature="true"
requestBinding="POST"
responseBinding="POST"
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"/>
@@ -44,6 +44,7 @@
<IDP entityID="idp" signaturesRequired="true" signatureAlgorithm="test" signatureCanonicalizationMethod="test">
<SingleSignOnService signRequest="true"
validateResponseSignature="true"
validateAssertionSignature="true"
requestBinding="POST"
responseBinding="POST"
bindingUrl="http://localhost:8080/auth/realms/saml-demo/protocol/saml"/>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</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>1.9.3.Final</version>
<version>2.0.0.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Keycloak Client Adapter SPI Modules</name>
Loaded 100 of 1297 files, more files were not shown because too many files have changed in this diff. Show more