Compare commits

...
Author SHA1 Message Date
Lukas Kubik 88aef967fe Downgrade infinspan version 2016-01-15 16:45:16 +01:00
Lukas Kubik 9f5f3a924c Disable testsuite module 2016-01-15 15:21:31 +01:00
Lukas Kubik 94be25a203 Bump the eap6-server-dist version 2016-01-15 15:11:07 +01:00
Lukas Kubik 4291a2c9f0 Temporarily add back the keycloak theme. 2016-01-15 15:08:35 +01:00
Lukas Kubik e9beb83955 Apply branding 2016-01-15 14:50:33 +01:00
Lukas Kubik 971fc8798a Add EAP 6 server dist module
Add IAM module to eap6-server-dist

KPR-144
Localhost:8080 should show IAM/Keycloak product console, not EAP console
2016-01-15 14:50:32 +01:00
Lukas Kubik f39e6b45cc Remove unsported ldap servers 2016-01-15 14:50:32 +01:00
Lukas Kubik 4af907295a Remove mongo modules and related dependencies 2016-01-15 14:50:32 +01:00
Lukas Kubik 7190030e16 Exclude stax-api and replace relaxngDataType with redhat version 2016-01-15 14:50:32 +01:00
Lukas Kubik 8e6f7b558d Replace JSR250 with jboss-annotations-api_1.1_spec 2016-01-15 14:50:32 +01:00
Lukas Kubik fad8b2ab75 Prod changes
KPR-145
Remove keycloak-as7-adapter-dist zip from the distribution zip files

KPR-146
Remove keycloak-jetty81-adapter-dist zip from the distribution zip files
2016-01-15 14:50:32 +01:00
keycloak-bot 2c65361943 Set version to 1.8.0.CR1 2016-01-13 08:22:50 +00:00
Stian Thorgersen 75d715d8a7 Merge pull request #2015 from stianst/master
Remove reference to built-in admin account from docs
2016-01-13 09:03:15 +01:00
Stian Thorgersen 62b90ee4e3 Remove reference to built-in admin account from docs 2016-01-13 09:02:52 +01:00
Stian Thorgersen 2f88868e20 Merge pull request #2014 from ssilvert/KEYCLOAK-2294-pi-testrealm
KEYCLOAK-2294 Partial import can fail with 'Removing a detached insta…
2016-01-13 08:37:49 +01:00
Stan Silvert b0de77013c KEYCLOAK-2294 Partial import can fail with 'Removing a detached instance' 2016-01-12 15:46:48 -05:00
Stian Thorgersen 25cd3e3ba8 Merge pull request #2013 from stianst/master
KEYCLOAK-2298
2016-01-12 20:31:37 +01:00
Stian Thorgersen 1b0bf966b6 KEYCLOAK-2298
Demo doesn't have add-user-keycloak.bat
2016-01-12 19:46:34 +01:00
Marek Posolda d8e28ad96b Merge pull request #2012 from mposolda/master
KEYCLOAK-2290 Migration fixes. Bulk update of algorithm field during migration
2016-01-12 18:49:34 +01:00
mposolda 3336d4d7ac KEYCLOAK-2290 bulk update of algorithm field during migration from 1.7 2016-01-12 18:04:50 +01:00
Stian Thorgersen ee3a880a55 Merge pull request #1999 from pedroigor/KEYCLOAK-2266
[KEYCLOAK-2266] - OAuth2 Token Introspection.
2016-01-12 15:37:41 +01:00
Pedro Igor c9f9ee9799 [KEYCLOAK-2266] - OAuth2 Token Introspection. 2016-01-12 11:16:42 -02:00
Marek Posolda 0536f2c247 Merge pull request #2010 from mposolda/master
KEYCLOAK-2229 Fix NoClassDefFoundError when IdpEmailVerificationAuthe…
2016-01-12 11:31:16 +01:00
mposolda 6f262423f1 KEYCLOAK-2229 Fix NoClassDefFoundError when IdpEmailVerificationAuthenticator is used for link accounts during first broker login 2016-01-12 10:37:44 +01:00
Stian Thorgersen 3c5e7872a7 Merge pull request #2009 from stianst/master
KEYCLOAK-2290
2016-01-12 10:32:22 +01:00
Stian Thorgersen 421dc6043d KEYCLOAK-2290
Migration: empty algorithm field on user credentials of type 'password'
2016-01-12 09:46:35 +01:00
Stian Thorgersen 9402f89d8e Merge pull request #2008 from stianst/master
KEYCLOAK-2229
2016-01-12 09:18:57 +01:00
Stian Thorgersen 81a0135fa6 KEYCLOAK-2229
First broker login throws NoClassDefFoundError: org/keycloak/broker/provider/BrokeredIdentityContext
2016-01-12 09:18:03 +01:00
Bill Burke 43dc250bf2 Merge pull request #2006 from thomasdarimont/issue/KEYCLOAK-2040-Conditional-OTP-Authentication
KEYCLOAK-2040 - Add support for Conditional OTP auth.
2016-01-11 14:56:48 -05:00
Marek Posolda bc3222ab67 Merge pull request #2007 from mposolda/master
Fix DB tests. Cleanup after AddUserTest
2016-01-11 18:56:56 +01:00
mposolda e761d6ce10 Fix DB tests. Cleanup after AddUserTest 2016-01-11 18:00:56 +01:00
Thomas Darimont 46991764d4 KEYCLOAK-2040 - Add support for Conditional OTP auth.
Previously it was not possible to conditionally show a OTP authentication
form. This PR adds support to conditionally require OTP authentication
based on a custom user attribute, a role, a request header pattern
(with black- and whitelisting) as well as a configurable default in
case no condition matches.
2016-01-11 17:39:42 +01:00
Stian Thorgersen 747c0f9869 Merge pull request #2004 from stianst/master
KEYCLOAK-2288
2016-01-11 17:32:38 +01:00
Marek Posolda 5424cd80a8 Merge pull request #2005 from mposolda/master
Fix MySQL - fixing transactions during bootstrap
2016-01-11 17:02:08 +01:00
Stian Thorgersen 8d2becf681 Fix import of com.mongodb.util.MyAsserts.assertFalse 2016-01-11 15:47:09 +01:00
mposolda c3f69fdc54 Fix MySQL - fixing transactions during bootstrap 2016-01-11 15:31:45 +01:00
Stian Thorgersen 45215f361f KEYCLOAK-2288
Upgrade Mongo driver version to 3.2.0
2016-01-11 15:10:00 +01:00
Stian Thorgersen 802488cea0 Merge pull request #2003 from mposolda/master
Fix mongo model
2016-01-11 13:58:06 +01:00
Stian Thorgersen 3ac3d79e30 Merge pull request #2002 from stianst/master
KEYCLOAK-2284
2016-01-11 13:22:44 +01:00
mposolda fe8755d4a4 Fix mongo model 2016-01-11 13:00:56 +01:00
Stian Thorgersen e2b889d727 KEYCLOAK-2284
Setup of background tasks doesn't close KeycloakSession
2016-01-11 11:41:36 +01:00
Stian Thorgersen 2ec4cb82cc Merge pull request #2001 from stianst/master
KEYCLOAK-2278
2016-01-11 11:41:15 +01:00
Stian Thorgersen bc14cade62 KEYCLOAK-2278
NoSuchMethodError org.infinispan.Cache.entrySet() in EAP6 server overlay
2016-01-11 10:07:04 +01:00
Stian Thorgersen a6c852603e Merge pull request #2000 from mstruk/truststore
KEYCLOAK-1717 Truststore SPI and file provider
2016-01-11 09:24:53 +01:00
Stian Thorgersen f1602b3b8d Merge pull request #1998 from ssilvert/partial-import
KEYCLOAK-1979: Partial import
2016-01-11 09:22:09 +01:00
Stian Thorgersen 7c8bc5814e Merge pull request #1990 from raehalme/KEYCLOAK-2257
KEYCLOAK-2257: Store user attribute when accepting terms and conditions
2016-01-11 09:03:58 +01:00
Stian Thorgersen 33f83689d5 Merge pull request #1995 from stianst/master
Add test to create user, set password and login using admin endpoints
2016-01-11 09:01:44 +01:00
Marko Strukelj 80e2b8eb39 KEYCLOAK-1717 Truststore SPI and file provider 2016-01-10 12:39:30 +01:00
Stan Silvert fbff61bfba For overwrite, do all deletes, then all adds.
Minor UI enhancements.
Fix 2 JPA bugs.
General cleanup.
Documentation.
2016-01-08 13:45:22 -05:00
Bill Burke ba1a17e668 Merge pull request #1997 from patriot1burke/master
KEYCLOAK-2189
2016-01-08 12:05:50 -05:00
Bill Burke 7bc7510d1b KEYCLOAK-2189 2016-01-08 12:05:43 -05:00
Bill Burke dc337d684a improve client creation when template 2016-01-08 11:40:46 -05:00
Bill Burke 0f9d50924c Merge pull request #1996 from patriot1burke/master
improve client creation when template
2016-01-08 11:40:45 -05:00
Stian Thorgersen cf0eb1184a Add test to create user, set password and login using admin endpoints 2016-01-08 16:37:01 +01:00
Stian Thorgersen ecd31010fe Merge pull request #1994 from stianst/KEYCLOAK-2259
KEYCLOAK-2259
2016-01-08 16:36:12 +01:00
Stian Thorgersen 0985d3c88a Merge pull request #1993 from stianst/master
KEYCLOAK-2276
2016-01-08 16:35:56 +01:00
Stian Thorgersen ddd99c2411 KEYCLOAK-2259
Redirect URIs and token domains are matched case-sensitively
2016-01-08 15:38:00 +01:00
Stian Thorgersen 7834637749 KEYCLOAK-2276
Login page doesn't render properly when window height is less than 550px
2016-01-08 15:19:59 +01:00
Stian Thorgersen a90d7e54d4 Merge pull request #1992 from stianst/master
KEYCLOAK-2275
2016-01-08 15:19:38 +01:00
Stian Thorgersen bae2b62200 KEYCLOAK-2275
No Content-Security-Policy meta tag found on Cordova 5.x
2016-01-08 14:34:52 +01:00
Stian Thorgersen 71bcf697cc Merge pull request #1991 from stianst/master
KEYCLOAK-2272
2016-01-08 14:34:31 +01:00
Stian Thorgersen 9acb4b86aa Add note that JDK8 is required to build and to run the server 2016-01-08 13:56:07 +01:00
Stian Thorgersen dee0be4237 KEYCLOAK-2272
Update keycloak-datasources.xml and keycloak-infinispan.xml
2016-01-08 13:39:49 +01:00
Thomas Raehalme c4544e8caf Like other timestamps attribute value is now seconds since 1970. 2016-01-08 14:21:43 +02:00
Thomas Raehalme bca3893070 Required action TermsAndConditions now stores user attribute indicating acceptance of terms and conditions. 2016-01-08 13:14:04 +02:00
Bill Burke 280725a2ae Merge pull request #1985 from patriot1burke/master
KEYCLOAK-1990 KEYCLOAK-1991
2016-01-07 18:24:31 -05:00
Bill Burke 2892b093ab Merge remote-tracking branch 'upstream/master' 2016-01-07 17:25:58 -05:00
Bill Burke 78fe064cf0 2213 2016-01-07 17:25:47 -05:00
Stian Thorgersen 30aaea73e4 Merge pull request #1989 from stianst/master
KEYCLOAK-2127 Re-enable set admin user with welcome page
2016-01-07 16:20:28 +01:00
Stian Thorgersen 4b1b697aa3 KEYCLOAK-2127 Re-enable set admin user with welcome page 2016-01-07 16:19:59 +01:00
Stian Thorgersen 112a44676d Merge pull request #1988 from stianst/KEYCLOAK-2269
KEYCLOAK-2269
2016-01-07 14:08:01 +01:00
Stian Thorgersen f7282d71e5 Merge pull request #1987 from stianst/master
KEYCLOAK-2252
2016-01-07 14:07:49 +01:00
Stian Thorgersen 9840c47970 Merge pull request #1986 from mhajas/master
KEYCLOAK-2127 Use add-user script for admin user creating
2016-01-07 13:17:47 +01:00
Stian Thorgersen 8695e16971 KEYCLOAK-2269
add-user script adds identityFederationEnabled field to keycloak-add-user.json
2016-01-07 13:17:10 +01:00
Stian Thorgersen 65f5ce9f13 KEYCLOAK-2252
Cannot delete client mapper with delete icon
2016-01-07 13:10:01 +01:00
Stian Thorgersen 77962ec896 Merge pull request #1984 from mstruk/providers-init
Prevent ProviderFactories being loaded twice
2016-01-07 11:57:12 +01:00
mhajas 54712e29aa Use user script for admin user creating 2016-01-07 11:24:51 +01:00
Bill Burke 71b6ed80ae Merge remote-tracking branch 'upstream/master' 2016-01-06 16:51:24 -05:00
Bill Burke 4a4bbf26f4 installation provider 2016-01-06 16:51:02 -05:00
Bill Burke 64de96d34b installation provider 2016-01-06 16:49:58 -05:00
Stian Thorgersen 084873f7fb Merge pull request #1981 from stianst/master
KEYCLOAK-2247 Upgrade to WildFly 10.0.0.CR5
2016-01-06 19:19:35 +01:00
Stian Thorgersen c684dac625 Tweak mem for Travis 2016-01-06 16:15:00 +01:00
Stian Thorgersen a5c159eeff KEYCLOAK-2247
Upgrade to WildFly 10.0.0.CR5
2016-01-06 16:15:00 +01:00
Bill Burke 1cbe5c4c80 Merge remote-tracking branch 'upstream/master' 2016-01-06 10:03:27 -05:00
Bill Burke 4a472b8272 KEYCLOAK-1990 KEYCLOAK-1991 2016-01-06 10:02:56 -05:00
Stian Thorgersen ddf74c0d9c Merge pull request #1983 from mstruk/ispn-conf
Fix missing offlineSessions local-cache config for demo-dist
2016-01-06 14:49:04 +01:00
Stian Thorgersen b2a3918fc3 Merge pull request #1982 from abstractj/KEYCLOAK-1919
Make use of display name by default for TOTP
2016-01-06 14:26:05 +01:00
Marko Strukelj aca00dd42c Prevent ProviderFactories being loaded twice 2016-01-05 23:07:13 +01:00
Marko Strukelj 2a8e868bc1 Fix missing offlineSession local-cache config for demo-dist 2016-01-05 22:56:44 +01:00
Stan Silvert 979205c827 Cleanup 2016-01-05 15:33:45 -05:00
Stan Silvert 55e36acfc0 For overwrite, delete then create.
Do all prepares to check for errors, then call doImport on each type.
Combine Realm Role and Client Role processing (RolesPartialImport).
2016-01-05 15:33:45 -05:00
Stan Silvert 4b6825806a Bare bones pagination for partial import results. 2016-01-05 15:33:44 -05:00
Stan Silvert 2d878805c1 Fix resource path for partial import events. 2016-01-05 15:33:43 -05:00
Stan Silvert dd038ddbd5 Add id to partial import results. 2016-01-05 15:33:43 -05:00
Stan Silvert f6a02bd408 Clean commit for partial import with single page for all imports. 2016-01-05 15:33:42 -05:00
Bruno Oliveira 7ec0dad88f Make use of display name by default for TOTP
- use realm name just in case of display name is not available
2016-01-05 18:31:13 -02:00
Marek Posolda 1e3ec1983d Merge pull request #1980 from mposolda/master
LDAP testing: added activation
2016-01-05 20:54:56 +01:00
mposolda 7ec02761ef LDAP testing: added activation 2016-01-05 20:53:25 +01:00
Bill Burke 7b30a6c9c4 Merge pull request #1979 from mposolda/master
Docs for LDAP mappers. Fix testsuite to pass with MSAD
2016-01-05 14:19:50 -05:00
Bill Burke 0d56713871 Merge pull request #1978 from patriot1burke/master
KEYCLOAK-2221
2016-01-05 14:19:33 -05:00
mposolda 658f204d92 Documentation for new LDAP mappers 2016-01-05 18:50:54 +01:00
mposolda 04401af470 Fix testsuite to pass with MSAD 2016-01-05 17:25:42 +01:00
Bill Burke 39d5a07218 KEYCLOAK-2221 2016-01-05 10:59:13 -05:00
Bill Burke a65f619c9a Merge pull request #1977 from mposolda/master
KEYCLOAK-2258 Removing leftovers of file model from docs and testsuite
2016-01-05 10:06:07 -05:00
Bill Burke 01c408ba68 Merge pull request #1975 from thomasdarimont/issue/KEYCLOAK-2256
KEYCLOAK-2256 - Guarantee deterministic ordering for custom user attributes in admin console.
2016-01-05 10:05:36 -05:00
Bill Burke 63975886cb Merge pull request #1974 from patriot1burke/master
set frameork for template config
2016-01-05 10:03:48 -05:00
Bill Burke c3f2ae1cd1 Merge pull request #1973 from thomasdarimont/issue/KEYCLOAK-2253
KEYCLOAK-2253 - Add support for ConfiguredProvider based UserFederationProviderFactory.
2016-01-05 10:03:40 -05:00
mposolda 133e4c59e5 KEYCLOAK-2258 Removing leftovers of file model from docs and testsuite 2016-01-05 15:25:22 +01:00
Marek Posolda d3247bc66a Merge pull request #1976 from mposolda/master
KEYCLOAK-2178 KEYCLOAK-1744 Added MSADUserAccountControlMapper. Remov…
2016-01-05 13:16:32 +01:00
mposolda b6718b44a1 KEYCLOAK-2178 KEYCLOAK-1744 Added MSADUserAccountControlMapper. Removing enableUserAccountControlAfterPasswordUpdate option 2016-01-05 12:11:48 +01:00
Thomas Darimont 15506e3db3 KEYCLOAK-2256 - Guarantee deterministic ordering for custom user attributes in admin console.
We now iterate over custom-user attributes in a deterministic way such that new attributes don't lead
to a complete reordering of the properties in the custom user attributes listings.
Previously the order of custom attributes in the user attributes listings was not deterministic which lead
to cases where keys that shared a common prefix where not placed at arbitrary positions.
Introduced a custom angularjs flter "toOrderedMapSortedByKey" that helps to deterministically iterate
over object properites.
2016-01-05 00:04:40 +01:00
Bill Burke 977f4051b3 Merge remote-tracking branch 'upstream/master' 2016-01-04 17:23:15 -05:00
Bill Burke 49c15f200e Merge pull request #1972 from dbarentine/master
KEYCLOAK-2255 Location header should return IdP alias instead of prov…
2016-01-04 17:18:42 -05:00
Bill Burke 3e5874b2a1 Merge pull request #1971 from abstractj/tooltip-initial-access-token
Tooltips for initial access token fields
2016-01-04 17:15:45 -05:00
Bill Burke f7ac5fae2a Merge pull request #1945 from raehalme/KEYCLOAK-1579
KEYCLOAK-1579: Replaced AdapterDeploymentContextBean with AdapterDeploymentContextFactoryBean
2016-01-04 17:15:25 -05:00
Bill Burke 22ba4847f4 Merge pull request #1965 from jean-merelis/translate
translation of messages to pt_BR
2016-01-04 17:14:55 -05:00
Bill Burke 90822e5b34 Merge pull request #1970 from abstractj/minor-update
Minor change for client registration documentation
2016-01-04 17:14:43 -05:00
Bill Burke 3f62cee836 Merge remote-tracking branch 'upstream/master' 2016-01-04 17:14:19 -05:00
Bill Burke 3bacbdf6ff set framework for template config 2016-01-04 17:13:15 -05:00
Thomas Darimont edcc39d906 KEYCLOAK-2253 - Use string representation for boolean properties in GenericUserFederationCtrl.
Adapted due to code review.
2016-01-04 23:07:08 +01:00
Thomas Darimont 3ec516d14c KEYCLOAK-2253 - Add support for ConfiguredProvider based UserFederationProviderFactory.
UserFederationProvidersResource is now aware of ConfiguredProvider and allows sophisticated
configuration of configuration properties via ProviderConfigProperty definitions.
See DummyUserFederationProviderFactory. getConfigProperties() for example.

Previously  UserFederationProvidersResource did only support simple key-value pairs for expressing
configurable options.

Tested this by launching a standalone KeycloakServer and creating a new Dummy UserFederationProvider.
The default values, labels and help messages are correctly displayed and the values are stored correctly.
2016-01-04 22:23:14 +01:00
Dane Barentine d8d0298498 KEYCLOAK-2255 Location header should return IdP alias instead of provider ID. 2016-01-04 11:30:57 -08:00
Thomas Raehalme 8356409b44 Fixed some typos in the docs and added paragraph regarding GrantedAuthoritiesMapper. 2016-01-04 21:16:37 +02:00
Thomas Raehalme 57971ce0b2 Changed docs to match the new code. 2016-01-04 21:09:36 +02:00
Stian Thorgersen b708cd671e Merge pull request #1969 from vmuzikar/ui-stability
[KEYCLOAK-1865] Enable LdapUserFederationTest#invalidSettingsTest - already fixed
2016-01-04 20:07:52 +01:00
Bruno Oliveira 1b857387f2 Minor change for client registration documentation 2016-01-04 16:31:39 -02:00
Bruno Oliveira cea70337ef Tooltips for initial access token fields 2016-01-04 15:49:57 -02:00
Bill Burke 6d5de7b44e Merge remote-tracking branch 'upstream/master' 2016-01-04 11:26:15 -05:00
Bill Burke 10eba78036 Merge remote-tracking branch 'upstream/master'
Conflicts:
	saml/saml-protocol/src/main/java/org/keycloak/protocol/saml/profile/ecp/SamlEcpProfileProtocolFactory.java
2016-01-04 11:25:14 -05:00
Stian Thorgersen dd6b05224d Merge pull request #1968 from stianst/master
KEYCLOAK-2250
2016-01-04 14:33:39 +01:00
Stian Thorgersen e7009cac47 KEYCLOAK-2204 Add test to make sure disabled client can't refresh token 2016-01-04 13:15:58 +01:00
Stian Thorgersen eece3689f2 KEYCLOAK-2228
Deleting of realm when using JPA requires server restart
2016-01-04 13:04:33 +01:00
Vaclav Muzikar f48753f6e1 Enable LdapUserFederationTest#invalidSettingsTest - already fixed 2016-01-04 12:36:38 +01:00
Stian Thorgersen 392ce0b323 KEYCLOAK-2250
Infinispan offline sessions cache is missing from configuration files
2016-01-04 11:53:25 +01:00
Jean Merelis 2fce7f8498 fix doLogIn key (pt_BR) 2016-01-03 21:02:32 -02:00
Jean Merelis c5f19ff2b3 fix some missing translation (pt_BR) 2016-01-02 23:23:04 -02:00
Jean Merelis b24dfa0009 translation of messages to pt_BR 2016-01-02 00:37:47 -02:00
Stian Thorgersen a9b5d07263 Merge pull request #1964 from stianst/master
KEYCLOAK-2242
2015-12-23 14:39:41 +01:00
Stian Thorgersen eddf3eef17 KEYCLOAK-2242
Remove built-in admin account
2015-12-23 13:46:11 +01:00
Bill Burke dbac147419 client config refactor 2015-12-22 17:50:03 -05:00
Marek Posolda 6752a4f9b0 Merge pull request #1963 from mposolda/master
KEYCLOAK-1899 Added HardcodedLDAPRoleMapper
2015-12-22 20:43:09 +01:00
Pedro Igor 35804aa0df Merge pull request #1961 from pedroigor/KEYCLOAK-2202
[KEYCLOAK-2202] - Removing LoginProtocol in order to reuse SAML settings.
2015-12-22 13:48:54 -02:00
mposolda 41d22986d5 KEYCLOAK-1899 Added HardcodedLDAPRoleMapper 2015-12-22 16:22:02 +01:00
Pedro Igor 9172b5472e [KEYCLOAK-2202] - Removing LoginProtocol in order to reuse SAML settings. 2015-12-22 12:53:39 -02:00
Marek Posolda b27b0411a6 Merge pull request #1960 from mposolda/master
KEYCLOAK-2154 Group mapper fixes
2015-12-22 13:19:40 +01:00
mposolda 0c293089c3 KEYCLOAK-2154 Group mapper fixes 2015-12-22 12:32:37 +01:00
Marek Posolda 5403296ac6 Merge pull request #1959 from mposolda/master
KEYCLOAK-2154 Added Group mapper for LDAP. LDAP mappers improvements and fixes
2015-12-22 10:15:26 +01:00
mposolda 20548b402d Separate package for LDAP tests 2015-12-22 09:35:53 +01:00
mposolda 1747e0981f KEYCLOAK-2154 Added Group mapper for LDAP. LDAP mappers improvements and fixes 2015-12-22 08:54:09 +01:00
Bill Burke ea6374163d Merge pull request #1957 from stianst/master
KEYCLOAK-2043
2015-12-21 16:56:01 -05:00
Bill Burke 4782780857 Merge pull request #1958 from patriot1burke/master
refactor client create
2015-12-21 16:55:52 -05:00
Bill Burke b90409c5e4 refactor client create 2015-12-21 16:36:13 -05:00
Stian Thorgersen 9a921f66ff KEYCLOAK-2043
.well-known/openid-configuration doesn't set cache-control header
2015-12-21 15:35:23 +01:00
Stian Thorgersen 4a492ce13c Merge pull request #1956 from stianst/master
KEYCLOAK-2240
2015-12-21 14:29:17 +00:00
Stian Thorgersen 39904548eb KEYCLOAK-2240
Internationalize admin console title
2015-12-21 13:16:54 +01:00
Stian Thorgersen 18268f686c Merge pull request #1955 from stianst/master
Support for branding
2015-12-21 12:00:56 +00:00
Stian Thorgersen 1594e07628 KEYCLOAK-2239
Add link to keycloak.org to Keycloak logo
2015-12-21 12:15:36 +01:00
Stian Thorgersen 606e6fa479 KEYCLOAK-1934
Add display-name and display-name-html to realm
2015-12-21 12:15:13 +01:00
Stian Thorgersen 1afd3d422c Merge pull request #1952 from vmuzikar/ui-stability
KEYCLOAK-1865 Fix stability of some UI arquillian tests
2015-12-21 07:50:11 +00:00
Bill Burke 80fae7116b Merge pull request #1953 from patriot1burke/master
client template scope
2015-12-18 18:32:00 -05:00
Bill Burke 86a0995f29 fix test 2015-12-18 17:31:53 -05:00
Bill Burke a7c684b909 oops 2015-12-18 17:19:31 -05:00
Bill Burke 5caf3e0a2d Merge remote-tracking branch 'upstream/master' 2015-12-18 17:15:40 -05:00
Bill Burke d939b6a431 template scope 2015-12-18 17:15:27 -05:00
Vaclav Muzikar 42d17577d0 Upstream sync 2015-12-18 17:28:57 +01:00
Vaclav Muzikar eaf326dd37 Fix Client Mappers tests
(cherry picked from commit b9f9db0)
2015-12-18 17:18:59 +01:00
Vaclav Muzikar 53a542d1e2 Enable TokensTest (already fixed by previous commit bf70927)
(cherry picked from commit 6783bcb)
2015-12-18 17:15:20 +01:00
Vaclav Muzikar c51d5e9820 Fix PasswordPolicyTest
(cherry picked from commit 87b125e)
2015-12-18 17:15:18 +01:00
Vaclav Muzikar 817127a751 Fix + refactor SecurityDefensesTest
(cherry picked from commit a652173)
2015-12-18 17:15:16 +01:00
Vaclav Muzikar 0e6e3d10d8 Fix LoginSettingsTest
(cherry picked from commit bf70927)
2015-12-18 17:15:09 +01:00
Bill Burke 0197c69ac3 Merge pull request #1951 from pedroigor/KEYCLOAK-2202
[KEYCLOAK-2202] - Initial support for SAML ECP Profile.
2015-12-17 19:04:17 -05:00
Stian Thorgersen 83eea5036f Merge pull request #1948 from pdrozd/wf10
Arquillian xsl templates - changed namespaces to WF10.
2015-12-17 09:01:14 +00:00
Pedro Igor 1b614a379b [KEYCLOAK-2202] - Initial support for SAML ECP Profile. 2015-12-16 18:46:52 -02:00
Bill Burke 0527d441e3 better logging 2015-12-16 12:23:41 -05:00
Marek Posolda 6569b22c79 Merge pull request #1950 from mposolda/master
Mongo fix
2015-12-16 14:36:27 +01:00
mposolda d0ec1c3b02 Mongo fix 2015-12-16 14:35:59 +01:00
Marek Posolda 2fe7e2a952 Merge pull request #1949 from mposolda/master
LDAP mappers enhancements
2015-12-16 14:33:54 +01:00
mposolda 0d52e4e6c5 Added sync support to UserFederationMapper 2015-12-16 13:52:11 +01:00
mposolda 358c273d39 KEYCLOAK-2227 Added UserRolesRetrieveStrategy. Possibility to read user role mappings through 'memberOf' attribute 2015-12-16 13:52:11 +01:00
mposolda 215d59b1e5 KEYCLOAK-2053 Memberships based on memberUid like attribute 2015-12-16 13:52:11 +01:00
mposolda 2b409b3462 Minor test fix 2015-12-16 13:52:11 +01:00
Pavel Drozd b4e53b1677 Arquillian xsl templates - changed namespaces to WF10. 2015-12-16 10:26:10 +01:00
Marek Posolda 051f175f68 Merge pull request #1946 from dbarentine/master
KEYCLOAK-2229 Added depending on keycloak-broker-core module to resol…
2015-12-16 07:58:05 +01:00
Bill Burke fd447702e7 Merge pull request #1947 from patriot1burke/master
remove default client mappers when templated
2015-12-15 19:36:37 -05:00
Bill Burke ee79f5e69d remove default client mappers when templated 2015-12-15 17:37:53 -05:00
Dane Barentine de5baa9df7 KEYCLOAK-2229 Added depending on keycloak-broker-core module to resolve NoClassDefFoundError for BrokeredIdentityContext class 2015-12-15 11:15:55 -08:00
Thomas Raehalme 566a58b5d8 Replaced AdapterDeploymentContextBean with AdapterDeploymentContextFactoryBean and added support for KeycloakConfigResolver. 2015-12-15 11:53:10 +02:00
Marek Posolda f837cbfaa9 Merge pull request #1944 from mposolda/master
KEYCLOAK-1906 Customized LDAP filter. LDAP conditions improvements
2015-12-14 14:50:38 +01:00
mposolda 06a55419f1 KEYCLOAK-1906 Customized LDAP filter. LDAP conditions improvements 2015-12-14 13:55:11 +01:00
Marek Posolda 82a573a536 Merge pull request #1939 from mhajas/master
KEYCLOAK-1667 Added adapter tests of SAML to integration arquillian
2015-12-14 09:26:32 +01:00
Stian Thorgersen d46bad56ae Merge pull request #1942 from keycloak/wildfly-10
KEYCLOAK-2223 Upgrade to WildFly 10.0.0.CR4
2015-12-13 21:04:38 +00:00
Marko Strukelj 32af1bd3a5 KEYCLOAK-2223 Upgrade to WildFly 10.0.0.CR4 2015-12-13 21:26:07 +01:00
Bill Burke 38b9d05cd7 Merge pull request #1941 from patriot1burke/master
client templates
2015-12-11 21:02:40 -05:00
Bill Burke e26e31d8b4 client template ui 2015-12-11 17:56:45 -05:00
Bill Burke 2328e0a6f9 Merge remote-tracking branch 'upstream/master' 2015-12-11 10:31:55 -05:00
Bill Burke 96e1813b34 client templates backend 2015-12-11 10:31:42 -05:00
mhajas 97357d020b Merge remote-tracking branch 'upstream/master' 2015-12-11 15:43:03 +01:00
Pavel Drozd b466cec4e5 Merge pull request #1940 from vramik/master
arquillian-testsuite: updated screenshooter version
2015-12-11 15:32:51 +01:00
Pavel Drozd 9228c6a16b Merge pull request #1938 from mhajas/fixDataTable
Fix adapter tests errors caused by changed DataTable fragment
2015-12-11 15:29:28 +01:00
Pavel Drozd 35f8e3c19f Merge pull request #1937 from pdrozd/ssl-required
Support for testing ssl-required.
2015-12-11 15:28:38 +01:00
vramik 9956f425eb arquillian-testsuite: updated screenshooter version 2015-12-11 12:15:27 +01:00
mhajas 5464e600ea Set SAMLServlet test abstract 2015-12-10 17:23:33 +01:00
mhajas cbdba622a5 Merge remote-tracking branch 'upstream/master' 2015-12-10 15:27:55 +01:00
mhajas 49e9965125 Fix timeouts after logout from servlet 2015-12-10 15:26:33 +01:00
mhajas dcaf7ea9d5 Fix test errors caused by changed DataTable fragment 2015-12-10 11:46:40 +01:00
Pavel Drozd 3f51f620b7 Support for testing ssl-required. 2015-12-10 07:21:23 +01:00
Marek Posolda 06e44b185e Merge pull request #1936 from mposolda/master
KEYCLOAK-2124 Post-Broker login flow support
2015-12-09 17:35:00 +01:00
mposolda 17a2bd266b KEYCLOAK-2124 post-broker login flow docs 2015-12-09 17:34:44 +01:00
mposolda 081db0d353 KEYCLOAK-2124 Post-Broker login flow support 2015-12-09 16:36:26 +01:00
mhajas b82346761c Merge remote-tracking branch 'upstream/master' 2015-12-09 10:53:50 +01:00
mhajas 595e7a92e2 Added SAML servlets adapter tests to integration-arquillian 2015-12-09 10:50:25 +01:00
mhajas fee1dea3e6 Added SAML example adapter tests to integration-arqullian 2015-12-09 10:48:53 +01:00
mhajas 9a58e1276a Added integration-arqullian servlet used in SAML tests 2015-12-09 10:45:56 +01:00
mhajas 1d401767d6 Added integration-arqullian SAML example page objects 2015-12-09 10:42:02 +01:00
mhajas 68e3b6c504 Added integration-arqullian SAML servlets page objects 2015-12-09 10:41:17 +01:00
mhajas 813ddf365e Added integration-arqullian keycloak-saml resources 2015-12-09 10:39:34 +01:00
mhajas edf3499662 Added integration-arqullian configuration for SAML adapter tests 2015-12-09 10:36:42 +01:00
Marek Posolda df26caed07 Merge pull request #1933 from vramik/clients
KEYCLOAK-2203, KEYCLOAK-2205
2015-12-09 10:28:56 +01:00
Marek Posolda 9f9067663f Merge pull request #1932 from mhajas/fixDataTable
Fix xpath for rows in DataTable fragment
2015-12-09 10:28:48 +01:00
Marek Posolda 0f3d8b8513 Merge pull request #1935 from thomasdarimont/patch-1
Fixed missing ':' in the JSON example.
2015-12-09 08:52:32 +01:00
mhajas 4ca3bf530f Merge remote-tracking branch 'upstream/master' into fixDataTable 2015-12-09 07:41:45 +01:00
Thomas Darimont c8c0a45ce4 Fixed missing ':' in the JSON example. 2015-12-08 18:45:25 +01:00
Stian Thorgersen 7313b843b9 Merge pull request #1934 from stianst/KEYCLOAK-1900-PASS-HASH
KEYCLOAK-1900 Password Hash SPI
2015-12-08 16:17:32 +01:00
Stian Thorgersen 321cac2ab8 KEYCLOAK-1900 Refactoring 2015-12-08 14:06:40 +01:00
tsudot 162dd4051d KEYCLOAK-1900 Add password hash SPI and provider
- Default encoder set to Pbkdf2PasswordEncoder
2015-12-08 13:25:59 +01:00
vramik cd19c1acdf fix tests witch fails with phantomjs 2015-12-08 08:40:40 +01:00
vramik 44ed912154 Merge branch 'master' of https://github.com/keycloak/keycloak into clients
Conflicts:
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/FlashMessage.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/OnOffSwitch.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/WaitUtils.java
	testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java
	testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java
2015-12-07 15:45:02 +01:00
vramik 39856c32d1 Merge branch 'master' of https://github.com/keycloak/keycloak into clients
Conflicts:
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/FlashMessage.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/OnOffSwitch.java
	testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/WaitUtils.java
	testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractAuthTest.java
	testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java
2015-12-07 15:44:34 +01:00
vramik d3a893b171 KEYCLOAK-2203 - Add new cluster node form doesn't validate host input 2015-12-07 15:28:39 +01:00
vramik ba861f227e added UI tests for client's tabs: clustering, installation 2015-12-07 15:09:24 +01:00
Tomas Kyjovsky 4a57bcc0b4 Merge pull request #1903 from tkyjovsk/master
Increased pageload timeout. Increased other timeouts for travis. Better handling of closeable alert messages.
2015-12-07 11:09:37 +01:00
Tomas Kyjovsky 87a8e017fa Disabled crudRole test, unstable. Role tests need rewrite. 2015-12-07 09:10:32 +01:00
Tomas Kyjovsky b8fe608aaf Merge upstream-master 2015-12-07 05:59:51 +01:00
mhajas d3e6b38a8e Fix xpath for DataTable row and tests 2015-12-04 14:26:24 +01:00
Marek Posolda 8589327cdd Merge pull request #1931 from mposolda/master
KEYCLOAK-2197 Fix broker tests to work with sybase. Added LoggingRule
2015-12-04 12:24:33 +01:00
vramik 1b936a1230 added UI tests for client scope 2015-12-04 12:04:39 +01:00
mposolda 45c490b640 KEYCLOAK-2197 Fix broker tests to work with sybase. Added LoggingRule 2015-12-04 11:44:30 +01:00
vramik 1dd3fc537b added UI tests for client mappers saml 2015-12-03 14:47:13 +01:00
Stian Thorgersen 73cf2404ff Merge pull request #1928 from stianst/master
KEYCLOAK-2176 Add default roles and actions to users created with add…
2015-12-03 13:30:29 +01:00
vramik c16b6e6a43 update ClientSettingsTest due to KEYCLOAK-1129 2015-12-03 12:49:29 +01:00
Stian Thorgersen 8d23422605 KEYCLOAK-2176 Add default roles and actions to users created with add-user script 2015-12-03 11:45:56 +01:00
Stian Thorgersen 9cd8d1612e Merge pull request #1926 from ssilvert/mappers-tooltip
Fix typo for mappers.tooltip
2015-12-03 11:44:39 +01:00
Stian Thorgersen 277faea1d0 Merge pull request #1924 from ppalaga/151202-rename-w9-subsystem-dir
Rename keycloak-wf9-subsystem directory to keycloak-wildfly-subsystem to match t
2015-12-03 10:53:36 +01:00
Stian Thorgersen 58c7b6090b Merge pull request #1919 from stianst/master
Cache fixes
2015-12-03 10:53:18 +01:00
Stian Thorgersen f45bb62fcc KEYCLOAK-2192
Class serialization issues when Realm and User caches are in ASYNC mode
2015-12-03 08:24:30 +01:00
Stian Thorgersen 34c3ffaae1 Ported AdminApiTest to use admin client 2015-12-03 08:24:23 +01:00
Stian Thorgersen a218cc3034 KEYCLOAK-2179 Cache fixes 2015-12-03 08:24:16 +01:00
Stan Silvert c62b3822f4 Fix typo for mappers.tooltip 2015-12-02 11:54:02 -05:00
Tomas Kyjovsky b0e9720f88 Increased arquillian timeouts. 2015-12-02 16:46:15 +01:00
Tomas Kyjovsky 6507f58b49 Merge upstream-master 2015-12-02 16:11:45 +01:00
Tomas Kyjovsky 46e2440d30 Refactoring of arquillian waiting methods. 2015-12-02 15:58:23 +01:00
vramik 9b51b6e43b Merge upstream/master into clients 2015-12-02 15:18:15 +01:00
Peter Palaga 4772b8401a KEYCLOAK-2099 fixup: Rename keycloak-wf9-subsystem directory to
keycloak-wildfly-subsystem to match the WF module it contains
2015-12-02 14:51:48 +01:00
vramik 2b25c120d4 added UI tests for client mappers oidc 2015-12-02 13:12:05 +01:00
Marek Posolda c19e65f93c Merge pull request #1922 from mposolda/master
Minor fixes in kerberos example
2015-12-02 12:15:18 +01:00
mposolda 87994e032d Minor fixes in kerberos example 2015-12-02 11:31:12 +01:00
Stian Thorgersen ee6753d31b KEYCLOAK-1813 KEYCLOAK-2182 Fixes enable/disable cache 2015-12-02 11:24:04 +01:00
Stian Thorgersen 09c18306c2 KEYCLOAK-2179
Realm and user cache is invalidated when added to other nodes
2015-12-02 11:23:54 +01:00
Marek Posolda 6124fd64f3 Merge pull request #1918 from mposolda/master
Fix typos
2015-12-02 10:25:15 +01:00
mposolda 2a03d23098 Fix typos 2015-12-02 08:51:20 +01:00
Stian Thorgersen ff806eae08 Version bump 2015-12-01 19:54:28 +01:00
Tomas Kyjovsky e44d6f9888 Merge upstream-master 2015-12-01 17:30:02 +01:00
Tomas Kyjovsky 4e79dde17f Removed travis profile from arq. testsuite. 2015-12-01 17:29:28 +01:00
Tomas Kyjovsky 29e05ecf0d Fixed arquillian wait intervals config. 2015-12-01 17:28:28 +01:00
vramik c4f3bd3dda Merge upstream/master 2015-12-01 12:51:57 +01:00
Tomas Kyjovsky ed30c4454a Increased arquillian timeouts for travis. 2015-11-30 17:09:57 +01:00
Tomas Kyjovsky 0d4771a763 Merge upstream-master 2015-11-30 16:48:25 +01:00
Tomas Kyjovsky a8317e0cc2 1) Pageload timeout set to 60s. Other timeouts set by arq props in arquillian.xml 2) Refactoring: FlashMessage --> AdminConsoleAlert and AccountManagementAlert 2015-11-30 16:43:18 +01:00
vramik 6a7a823fb4 merge upstream/master 2015-11-30 14:59:44 +01:00
vramik 2e39221b98 added UI tests for clients 2015-11-25 09:27:23 +01:00
2050 changed files with 333671 additions and 6235 deletions

No files matched your search

+9 -1
View File
@@ -1,10 +1,18 @@
language: java
env:
global:
- MAVEN_SKIP_RC=true
- MAVEN_OPTS="-Xms512m -Xmx2048m"
jdk:
- oraclejdk8
before_script:
- export MAVEN_SKIP_RC=true
install:
- travis_wait mvn install -Pdistribution -DskipTests=true -B -V -q
- mvn install -Pdistribution -DskipTests=true -B -V -q
script:
- mvn test -B
+1 -1
View File
@@ -7,7 +7,7 @@ Keycloak is an SSO Service for web apps and REST services. For more information
Building
--------
Ensure you have JDK 7 (or newer), Maven 3.2.1 (or newer) and Git installed
Ensure you have JDK 8 (or newer), Maven 3.2.1 (or newer) and Git installed
java -version
mvn -version
+5 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -45,6 +45,10 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
</dependency>
</dependencies>
</project>
@@ -1,14 +1,11 @@
package org.keycloak.broker.provider;
import org.keycloak.broker.provider.AbstractIdentityProviderMapper;
import org.keycloak.broker.provider.BrokeredIdentityContext;
import org.keycloak.broker.provider.IdentityBrokerException;
import org.keycloak.models.ClientModel;
import org.keycloak.models.IdentityProviderMapperModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.provider.ProviderConfigProperty;
import java.util.ArrayList;
@@ -20,7 +17,7 @@ import java.util.List;
*/
public class HardcodedRoleMapper extends AbstractIdentityProviderMapper {
public static final String ROLE = "role";
protected static final List<ProviderConfigProperty> configProperties = new ArrayList<ProviderConfigProperty>();
protected static final List<ProviderConfigProperty> configProperties = new ArrayList<>();
static {
ProviderConfigProperty property;
@@ -32,34 +29,6 @@ public class HardcodedRoleMapper extends AbstractIdentityProviderMapper {
configProperties.add(property);
}
public static String[] parseRole(String role) {
int scopeIndex = role.lastIndexOf('.');
if (scopeIndex > -1) {
String appName = role.substring(0, scopeIndex);
role = role.substring(scopeIndex + 1);
String[] rtn = {appName, role};
return rtn;
} else {
String[] rtn = {null, role};
return rtn;
}
}
public static RoleModel getRoleFromString(RealmModel realm, String roleName) {
String[] parsedRole = parseRole(roleName);
RoleModel role = null;
if (parsedRole[0] == null) {
role = realm.getRole(parsedRole[1]);
} else {
ClientModel client = realm.getClientByClientId(parsedRole[0]);
role = client.getRole(parsedRole[1]);
}
return role;
}
@Override
public List<ProviderConfigProperty> getConfigProperties() {
return configProperties;
@@ -93,7 +62,7 @@ public class HardcodedRoleMapper extends AbstractIdentityProviderMapper {
@Override
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
String roleName = mapperModel.getConfig().get(ROLE);
RoleModel role = getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
user.grantRole(role);
}
@@ -1,5 +1,8 @@
package org.keycloak.broker.provider.util;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSocketFactory;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -24,6 +27,9 @@ public class SimpleHttp {
private Map<String, String> headers;
private Map<String, String> params;
private SSLSocketFactory sslFactory;
private HostnameVerifier hostnameVerifier;
protected SimpleHttp(String url, String method) {
this.url = url;
this.method = method;
@@ -53,6 +59,15 @@ public class SimpleHttp {
return this;
}
public SimpleHttp sslFactory(SSLSocketFactory factory) {
sslFactory = factory;
return this;
}
public SimpleHttp hostnameVerifier(HostnameVerifier verifier) {
hostnameVerifier = verifier;
return this;
}
public String asString() throws IOException {
boolean get = method.equals("GET");
@@ -85,6 +100,7 @@ public class SimpleHttp {
}
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
setupTruststoreIfApplicable(connection);
OutputStream os = null;
InputStream is = null;
@@ -171,6 +187,7 @@ public class SimpleHttp {
}
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
setupTruststoreIfApplicable(connection);
OutputStream os = null;
InputStream is = null;
@@ -235,4 +252,13 @@ public class SimpleHttp {
return writer.toString();
}
private void setupTruststoreIfApplicable(HttpURLConnection connection) {
if (connection instanceof HttpsURLConnection && sslFactory != null) {
HttpsURLConnection con = (HttpsURLConnection) connection;
con.setSSLSocketFactory(sslFactory);
if (hostnameVerifier != null) {
con.setHostnameVerifier(hostnameVerifier);
}
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -27,6 +27,7 @@ import org.keycloak.broker.provider.AbstractIdentityProvider;
import org.keycloak.broker.provider.AuthenticationRequest;
import org.keycloak.broker.provider.BrokeredIdentityContext;
import org.keycloak.broker.provider.IdentityBrokerException;
import org.keycloak.connections.truststore.JSSETruststoreConfigurator;
import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
@@ -247,12 +248,15 @@ public abstract class AbstractOAuth2IdentityProvider<C extends OAuth2IdentityPro
}
public SimpleHttp generateTokenRequest(String authorizationCode) {
JSSETruststoreConfigurator configurator = new JSSETruststoreConfigurator(session);
return SimpleHttp.doPost(getConfig().getTokenUrl())
.param(OAUTH2_PARAMETER_CODE, authorizationCode)
.param(OAUTH2_PARAMETER_CLIENT_ID, getConfig().getClientId())
.param(OAUTH2_PARAMETER_CLIENT_SECRET, getConfig().getClientSecret())
.param(OAUTH2_PARAMETER_REDIRECT_URI, uriInfo.getAbsolutePath().toString())
.param(OAUTH2_PARAMETER_GRANT_TYPE, OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE);
.param(OAUTH2_PARAMETER_GRANT_TYPE, OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE)
.sslFactory(configurator.getSSLSocketFactory())
.hostnameVerifier(configurator.getHostnameVerifier());
}
}
}
@@ -10,6 +10,7 @@ import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.provider.ProviderConfigProperty;
import java.util.ArrayList;
@@ -80,7 +81,7 @@ public class ClaimToRoleMapper extends AbstractClaimMapper {
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE);
if (hasClaimValue(mapperModel, context)) {
RoleModel role = HardcodedRoleMapper.getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
user.grantRole(role);
}
@@ -90,7 +91,7 @@ public class ClaimToRoleMapper extends AbstractClaimMapper {
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE);
if (!hasClaimValue(mapperModel, context)) {
RoleModel role = HardcodedRoleMapper.getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
user.deleteRoleMapping(role);
}
@@ -11,6 +11,7 @@ import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.provider.ProviderConfigProperty;
import org.keycloak.representations.JsonWebToken;
@@ -85,7 +86,7 @@ public class ExternalKeycloakRoleToRoleMapper extends AbstractClaimMapper {
JsonWebToken token = (JsonWebToken)context.getContextData().get(KeycloakOIDCIdentityProvider.VALIDATED_ACCESS_TOKEN);
//if (token == null) return;
String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE);
String[] parseRole = HardcodedRoleMapper.parseRole(mapperModel.getConfig().get(EXTERNAL_ROLE));
String[] parseRole = KeycloakModelUtils.parseRole(mapperModel.getConfig().get(EXTERNAL_ROLE));
String externalRoleName = parseRole[1];
String claimName = null;
if (parseRole[0] == null) {
@@ -95,7 +96,7 @@ public class ExternalKeycloakRoleToRoleMapper extends AbstractClaimMapper {
}
Object claim = getClaimValue(token, claimName);
if (valueEquals(externalRoleName, claim)) {
RoleModel role = HardcodedRoleMapper.getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
return role;
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,6 +1,7 @@
package org.keycloak.broker.saml;
import org.jboss.logging.Logger;
import org.jboss.resteasy.annotations.cache.NoCache;
import org.keycloak.common.ClientConnection;
import org.keycloak.common.VerificationException;
import org.keycloak.broker.provider.BrokeredIdentityContext;
@@ -45,6 +46,7 @@ import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
@@ -95,6 +97,13 @@ public class SAMLEndpoint {
this.provider = provider;
}
@GET
@NoCache
@Path("descriptor")
public Response getSPDescriptor() {
return provider.export(uriInfo, realm, null);
}
@GET
public Response redirectBinding(@QueryParam(GeneralConstants.SAML_REQUEST_KEY) String samlRequest,
@QueryParam(GeneralConstants.SAML_RESPONSE_KEY) String samlResponse,
@@ -15,6 +15,7 @@ import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.provider.ProviderConfigProperty;
import org.keycloak.representations.JsonWebToken;
@@ -95,7 +96,7 @@ public class AttributeToRoleMapper extends AbstractIdentityProviderMapper {
public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE);
if (isAttributePresent(mapperModel, context)) {
RoleModel role = HardcodedRoleMapper.getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
user.grantRole(role);
}
@@ -125,7 +126,7 @@ public class AttributeToRoleMapper extends AbstractIdentityProviderMapper {
public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) {
String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE);
if (!isAttributePresent(mapperModel, context)) {
RoleModel role = HardcodedRoleMapper.getRoleFromString(realm, roleName);
RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName);
if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName);
user.deleteRoleMapping(role);
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-client-registration-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
</parent>
<name>Keycloak Client Registration Parent</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -12,6 +12,8 @@ import java.util.Properties;
*/
public class Version {
public static final String UNKNOWN = "UNKNOWN";
public static String NAME;
public static String NAME_HTML;
public static String VERSION;
public static String RESOURCES_VERSION;
public static String BUILD_TIME;
@@ -21,6 +23,8 @@ public class Version {
InputStream is = Version.class.getResourceAsStream("/keycloak-version.properties");
try {
props.load(is);
Version.NAME = props.getProperty("name");
Version.NAME_HTML = props.getProperty("name-html");
Version.VERSION = props.getProperty("version");
Version.BUILD_TIME = props.getProperty("build-time");
Version.RESOURCES_VERSION = Version.VERSION.toLowerCase();
@@ -1,2 +1,4 @@
name=${product.name}
name-html=${product.name-html}
version=${product.version}
build-time=${product.build-time}
+5 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -22,6 +22,10 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-connections-truststore</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
@@ -10,6 +10,7 @@ import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.CloseableHttpClient;
import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.connections.truststore.TruststoreProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.common.util.EnvUtil;
@@ -28,9 +29,12 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
private static final Logger logger = Logger.getLogger(DefaultHttpClientFactory.class);
private volatile CloseableHttpClient httpClient;
private Config.Scope config;
@Override
public HttpClientProvider create(KeycloakSession session) {
lazyInit(session);
return new HttpClientProvider() {
@Override
public HttpClient getHttpClient() {
@@ -74,7 +78,9 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
@Override
public void close() {
try {
httpClient.close();
if (httpClient != null) {
httpClient.close();
}
} catch (IOException e) {
}
@@ -87,46 +93,62 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
@Override
public void init(Config.Scope config) {
long socketTimeout = config.getLong("socket-timeout-millis", -1L);
long establishConnectionTimeout = config.getLong("establish-connection-timeout-millis", -1L);
int maxPooledPerRoute = config.getInt("max-pooled-per-route", 0);
int connectionPoolSize = config.getInt("connection-pool-size", 200);
boolean disableTrustManager = config.getBoolean("disable-trust-manager", false);
boolean disableCookies = config.getBoolean("disable-cookies", true);
String hostnameVerificationPolicy = config.get("hostname-verification-policy", "WILDCARD");
HttpClientBuilder.HostnameVerificationPolicy hostnamePolicy = HttpClientBuilder.HostnameVerificationPolicy.valueOf(hostnameVerificationPolicy);
String truststore = config.get("truststore");
String truststorePassword = config.get("truststore-password");
String clientKeystore = config.get("client-keystore");
String clientKeystorePassword = config.get("client-keystore-password");
String clientPrivateKeyPassword = config.get("client-key-password");
this.config = config;
}
HttpClientBuilder builder = new HttpClientBuilder();
builder.socketTimeout(socketTimeout, TimeUnit.MILLISECONDS)
.establishConnectionTimeout(establishConnectionTimeout, TimeUnit.MILLISECONDS)
.maxPooledPerRoute(maxPooledPerRoute)
.connectionPoolSize(connectionPoolSize)
.hostnameVerification(hostnamePolicy)
.disableCookies(disableCookies);
if (disableTrustManager) builder.disableTrustManager();
if (truststore != null) {
truststore = EnvUtil.replace(truststore);
try {
builder.trustStore(KeystoreUtil.loadKeyStore(truststore, truststorePassword));
} catch (Exception e) {
throw new RuntimeException("Failed to load truststore", e);
private void lazyInit(KeycloakSession session) {
if (httpClient == null) {
synchronized(this) {
if (httpClient == null) {
long socketTimeout = config.getLong("socket-timeout-millis", -1L);
long establishConnectionTimeout = config.getLong("establish-connection-timeout-millis", -1L);
int maxPooledPerRoute = config.getInt("max-pooled-per-route", 0);
int connectionPoolSize = config.getInt("connection-pool-size", 200);
boolean disableCookies = config.getBoolean("disable-cookies", true);
String clientKeystore = config.get("client-keystore");
String clientKeystorePassword = config.get("client-keystore-password");
String clientPrivateKeyPassword = config.get("client-key-password");
TruststoreProvider truststoreProvider = session.getProvider(TruststoreProvider.class);
boolean disableTrustManager = truststoreProvider == null || truststoreProvider.getTruststore() == null;
if (disableTrustManager) {
logger.warn("Truststore is disabled");
}
HttpClientBuilder.HostnameVerificationPolicy hostnamePolicy = disableTrustManager ? null
: HttpClientBuilder.HostnameVerificationPolicy.valueOf(truststoreProvider.getPolicy().name());
HttpClientBuilder builder = new HttpClientBuilder();
builder.socketTimeout(socketTimeout, TimeUnit.MILLISECONDS)
.establishConnectionTimeout(establishConnectionTimeout, TimeUnit.MILLISECONDS)
.maxPooledPerRoute(maxPooledPerRoute)
.connectionPoolSize(connectionPoolSize)
.disableCookies(disableCookies);
if (disableTrustManager) {
// TODO: is it ok to do away with disabling trust manager?
//builder.disableTrustManager();
} else {
builder.hostnameVerification(hostnamePolicy);
try {
builder.trustStore(truststoreProvider.getTruststore());
} catch (Exception e) {
throw new RuntimeException("Failed to load truststore", e);
}
}
if (clientKeystore != null) {
clientKeystore = EnvUtil.replace(clientKeystore);
try {
KeyStore clientCertKeystore = KeystoreUtil.loadKeyStore(clientKeystore, clientKeystorePassword);
builder.keyStore(clientCertKeystore, clientPrivateKeyPassword);
} catch (Exception e) {
throw new RuntimeException("Failed to load keystore", e);
}
}
httpClient = builder.build();
}
}
}
if (clientKeystore != null) {
clientKeystore = EnvUtil.replace(clientKeystore);
try {
KeyStore clientCertKeystore = KeystoreUtil.loadKeyStore(clientKeystore, clientKeystorePassword);
builder.keyStore(clientCertKeystore, clientPrivateKeyPassword);
} catch (Exception e) {
throw new RuntimeException("Failed to load keystore", e);
}
}
httpClient = builder.build();
}
@Override
@@ -145,7 +145,7 @@ public class HttpClientBuilder {
* Disable cookie management.
*/
public HttpClientBuilder disableCookies(boolean disable) {
this.disableTrustManager = disable;
this.disableCookies = disable;
return this;
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -66,19 +66,6 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
} else {
initEmbedded();
}
// Backwards compatibility
if (cacheManager.getCacheConfiguration(InfinispanConnectionProvider.OFFLINE_SESSION_CACHE_NAME) == null) {
logger.debugf("No configuration provided for '%s' cache. Using '%s' configuration as template",
InfinispanConnectionProvider.OFFLINE_SESSION_CACHE_NAME, InfinispanConnectionProvider.SESSION_CACHE_NAME);
Configuration sessionCacheConfig = cacheManager.getCacheConfiguration(InfinispanConnectionProvider.SESSION_CACHE_NAME);
if (sessionCacheConfig != null) {
ConfigurationBuilder confBuilder = new ConfigurationBuilder().read(sessionCacheConfig);
Configuration offlineSessionConfig = confBuilder.build();
cacheManager.defineConfiguration(InfinispanConnectionProvider.OFFLINE_SESSION_CACHE_NAME, offlineSessionConfig);
}
}
}
}
}
@@ -139,6 +126,7 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
Configuration sessionCacheConfiguration = sessionConfigBuilder.build();
cacheManager.defineConfiguration(InfinispanConnectionProvider.SESSION_CACHE_NAME, sessionCacheConfiguration);
cacheManager.defineConfiguration(InfinispanConnectionProvider.OFFLINE_SESSION_CACHE_NAME, sessionCacheConfiguration);
cacheManager.defineConfiguration(InfinispanConnectionProvider.LOGIN_FAILURE_CACHE_NAME, sessionCacheConfiguration);
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet author="mposolda@redhat.com" id="1.8.0">
<addColumn tableName="IDENTITY_PROVIDER">
<column name="POST_BROKER_LOGIN_FLOW_ID" type="VARCHAR(36)">
<constraints nullable="true"/>
</column>
</addColumn>
<createTable tableName="CLIENT_TEMPLATE">
<column name="ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
<column name="NAME" type="VARCHAR(255)"/>
<column name="REALM_ID" type="VARCHAR(36)"/>
<column name="DESCRIPTION" type="VARCHAR(255)"/>
<column name="PROTOCOL" type="VARCHAR(255)"/>
<column name="FULL_SCOPE_ALLOWED" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="CONSENT_REQUIRED" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="STANDARD_FLOW_ENABLED" type="BOOLEAN" defaultValueBoolean="true">
<constraints nullable="false"/>
</column>
<column name="IMPLICIT_FLOW_ENABLED" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="DIRECT_ACCESS_GRANTS_ENABLED" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="SERVICE_ACCOUNTS_ENABLED" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="FRONTCHANNEL_LOGOUT" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="BEARER_ONLY" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="PUBLIC_CLIENT" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
</createTable>
<createTable tableName="CLIENT_TEMPLATE_ATTRIBUTES">
<column name="TEMPLATE_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
<column name="VALUE" type="VARCHAR(2048)"/>
<column name="NAME" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
</createTable>
<createTable tableName="TEMPLATE_SCOPE_MAPPING">
<column name="TEMPLATE_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
<column name="ROLE_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
</createTable>
<dropNotNullConstraint tableName="PROTOCOL_MAPPER" columnName="CLIENT_ID" columnDataType="VARCHAR(36)"/>
<addColumn tableName="CLIENT">
<column name="CLIENT_TEMPLATE_ID" type="VARCHAR(36)">
<constraints nullable="true"/>
</column>
<column name="USE_TEMPLATE_CONFIG" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="USE_TEMPLATE_SCOPE" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
<column name="USE_TEMPLATE_MAPPERS" type="BOOLEAN" defaultValueBoolean="false">
<constraints nullable="false"/>
</column>
</addColumn>
<addColumn tableName="PROTOCOL_MAPPER">
<column name="CLIENT_TEMPLATE_ID" type="VARCHAR(36)">
<constraints nullable="true"/>
</column>
</addColumn>
<createTable tableName="REALM_CLIENT_TEMPLATE">
<column name="CLIENT_TEMPLATE_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
<column name="REALM_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
</createTable>
<addPrimaryKey columnNames="ID" constraintName="PK_CLI_TEMPLATE" tableName="CLIENT_TEMPLATE"/>
<addUniqueConstraint columnNames="REALM_ID,NAME" constraintName="UK_CLI_TEMPLATE" tableName="CLIENT_TEMPLATE"/>
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="CLIENT_TEMPLATE" constraintName="FK_REALM_CLI_TMPLT" referencedColumnNames="ID" referencedTableName="REALM"/>
<addForeignKeyConstraint baseColumnNames="CLIENT_TEMPLATE_ID" baseTableName="PROTOCOL_MAPPER" constraintName="FK_CLI_TMPLT_MAPPER" referencedColumnNames="ID" referencedTableName="CLIENT_TEMPLATE"/>
<addForeignKeyConstraint baseColumnNames="CLIENT_TEMPLATE_ID" baseTableName="CLIENT" constraintName="FK_CLI_TMPLT_CLIENT" referencedColumnNames="ID" referencedTableName="CLIENT_TEMPLATE"/>
<addForeignKeyConstraint baseColumnNames="REALM_ID" baseTableName="REALM_CLIENT_TEMPLATE" constraintName="FK_RLM_CLI_TMPLT_RLM" referencedColumnNames="ID" referencedTableName="REALM"/>
<addForeignKeyConstraint baseColumnNames="CLIENT_TEMPLATE_ID" baseTableName="REALM_CLIENT_TEMPLATE" constraintName="FK_RLM_CLI_TMPLT_CLI" referencedColumnNames="ID" referencedTableName="CLIENT_TEMPLATE"/>
<addPrimaryKey columnNames="TEMPLATE_ID, ROLE_ID" constraintName="PK_TEMPLATE_SCOPE" tableName="TEMPLATE_SCOPE_MAPPING"/>
<addForeignKeyConstraint baseColumnNames="TEMPLATE_ID" baseTableName="TEMPLATE_SCOPE_MAPPING" constraintName="FK_TEMPL_SCOPE_TEMPL" referencedColumnNames="ID" referencedTableName="CLIENT_TEMPLATE"/>
<addForeignKeyConstraint baseColumnNames="ROLE_ID" baseTableName="TEMPLATE_SCOPE_MAPPING" constraintName="FK_TEMPL_SCOPE_ROLE" referencedColumnNames="ID" referencedTableName="KEYCLOAK_ROLE"/>
<addPrimaryKey columnNames="TEMPLATE_ID, NAME" constraintName="PK_CL_TMPL_ATTR" tableName="CLIENT_TEMPLATE_ATTRIBUTES"/>
<addForeignKeyConstraint baseColumnNames="TEMPLATE_ID" baseTableName="CLIENT_TEMPLATE_ATTRIBUTES" constraintName="FK_CL_TEMPL_ATTR_TEMPL" referencedColumnNames="ID" referencedTableName="CLIENT_TEMPLATE"/>
<update tableName="CREDENTIAL">
<column name="ALGORITHM" type="VARCHAR(36)" value="pbkdf2" />
<where>TYPE in ('password-history', 'password') AND ALGORITHM is NULL</where>
</update>
</changeSet>
</databaseChangeLog>
@@ -11,4 +11,5 @@
<include file="META-INF/jpa-changelog-1.5.0.xml"/>
<include file="META-INF/jpa-changelog-1.6.1.xml"/>
<include file="META-INF/jpa-changelog-1.7.0.xml"/>
<include file="META-INF/jpa-changelog-1.8.0.xml"/>
</databaseChangeLog>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -12,7 +12,7 @@ public interface JpaUpdaterProvider extends Provider {
public String FIRST_VERSION = "1.0.0.Final";
public String LAST_VERSION = "1.7.0";
public String LAST_VERSION = "1.8.0";
public String getCurrentVersionSql(String defaultSchema);
@@ -35,6 +35,8 @@
<class>org.keycloak.models.jpa.entities.GroupAttributeEntity</class>
<class>org.keycloak.models.jpa.entities.GroupRoleMappingEntity</class>
<class>org.keycloak.models.jpa.entities.UserGroupMembershipEntity</class>
<class>org.keycloak.models.jpa.entities.ClientTemplateEntity</class>
<class>org.keycloak.models.jpa.entities.TemplateScopeMappingEntity</class>
<!-- JpaAuditProviders -->
<class>org.keycloak.events.jpa.EventEntity</class>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -29,7 +29,8 @@ public class DefaultMongoUpdaterProvider implements MongoUpdaterProvider {
Update1_2_0_CR1.class,
Update1_3_0.class,
Update1_4_0.class,
Update1_7_0.class
Update1_7_0.class,
Update1_8_0.class
};
@Override
@@ -44,7 +44,7 @@ public abstract class Update {
o.append(f, 1);
}
col.ensureIndex(o, new BasicDBObject("unique", unique).append("sparse", sparse));
col.createIndex(o, new BasicDBObject("unique", unique).append("sparse", sparse));
log.debugv("Created index {0}, fields={1}, unique={2}, sparse={3}", name, Arrays.toString(fields), unique, sparse);
}
@@ -18,7 +18,7 @@ public class Update1_0_0_Final extends Update {
@Override
public void update(KeycloakSession session) throws ClassNotFoundException {
DBCollection realmsCollection = db.getCollection("realms");
realmsCollection.ensureIndex(new BasicDBObject("name", 1), new BasicDBObject("unique", true));
realmsCollection.createIndex(new BasicDBObject("name", 1), new BasicDBObject("unique", true));
DefaultMongoUpdaterProvider.log.debugv("Created collection {0}", "realms");
@@ -0,0 +1,44 @@
package org.keycloak.connections.mongo.updater.impl.updates;
import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.WriteResult;
import org.keycloak.hash.Pbkdf2PasswordHashProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.UserCredentialModel;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class Update1_8_0 extends Update {
@Override
public String getId() {
return "1.8.0";
}
@Override
public void update(KeycloakSession session) {
BasicDBList orArgs = new BasicDBList();
orArgs.add(new BasicDBObject("type", UserCredentialModel.PASSWORD));
orArgs.add(new BasicDBObject("type", UserCredentialModel.PASSWORD_HISTORY));
BasicDBObject elemMatch = new BasicDBObject("$or", orArgs);
elemMatch.put("algorithm", new BasicDBObject("$exists", false));
BasicDBObject query = new BasicDBObject("credentials", new BasicDBObject("$elemMatch", elemMatch));
BasicDBObject update = new BasicDBObject("$set", new BasicDBObject("credentials.$.algorithm", Pbkdf2PasswordHashProvider.ID));
DBCollection users = db.getCollection("users");
// Not sure how to do in single query
int countModified = 1;
while (countModified > 0) {
WriteResult wr = users.update(query, update, false, true);
countModified = wr.getN();
log.debugf("%d credentials modified in current iteration during upgrade to 1.8", countModified);
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -37,6 +37,7 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
"org.keycloak.models.mongo.keycloak.entities.MongoRoleEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoGroupEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoClientEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoClientTemplateEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoUserConsentEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoMigrationModelEntity",
"org.keycloak.models.mongo.keycloak.entities.MongoOnlineUserSessionEntity",
@@ -173,7 +174,6 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
operationalInfo.put("mongoHosts", hosts);
operationalInfo.put("mongoDatabaseName", dbName);
operationalInfo.put("mongoUser", uri.getUsername());
operationalInfo.put("mongoDriverVersion", client.getVersion());
logger.debugv("Initialized mongo model. host(s): %s, db: %s", uri.getHosts(), dbName);
return client;
@@ -197,7 +197,6 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
operationalInfo.put("mongoServerAddress", client.getAddress().toString());
operationalInfo.put("mongoDatabaseName", dbName);
operationalInfo.put("mongoUser", user);
operationalInfo.put("mongoDriverVersion", client.getVersion());
logger.debugv("Initialized mongo model. host: %s, port: %d, db: %s", host, port, dbName);
return client;
@@ -213,9 +212,6 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
checkIntOption("socketTimeout", builder);
checkBooleanOption("socketKeepAlive", builder);
checkBooleanOption("autoConnectRetry", builder);
if (config.getLong("maxAutoConnectRetryTime") != null) {
builder.maxAutoConnectRetryTime(config.getLong("maxAutoConnectRetryTime"));
}
if(config.getBoolean("ssl", false)) {
builder.socketFactory(SSLSocketFactory.getDefault());
}
@@ -1,13 +1,6 @@
package org.keycloak.connections.mongo.impl;
import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.mongodb.MongoException;
import com.mongodb.WriteResult;
import com.mongodb.*;
import org.jboss.logging.Logger;
import org.keycloak.connections.mongo.api.MongoCollection;
import org.keycloak.connections.mongo.api.MongoEntity;
@@ -133,7 +126,7 @@ public class MongoStoreImpl implements MongoStore {
}
public static ModelException convertException(MongoException e) {
if (e instanceof MongoException.DuplicateKey) {
if (e instanceof DuplicateKeyException) {
return new ModelDuplicateException(e);
} else {
return new ModelException(e);
+4 -3
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
</parent>
<name>Connections Parent</name>
<description/>
@@ -16,9 +16,10 @@
<module>jpa</module>
<module>jpa-liquibase</module>
<module>infinispan</module>
<module>mongo</module>
<module>mongo-update</module>
<!--<module>mongo</module>-->
<!--<module>mongo-update</module>-->
<module>http-client</module>
<module>truststore</module>
</modules>
<build>
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-connections-truststore</artifactId>
<name>Keycloak Truststore</name>
<description/>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,31 @@
package org.keycloak.connections.truststore;
import java.security.KeyStore;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class FileTruststoreProvider implements TruststoreProvider {
private final HostnameVerificationPolicy policy;
private final KeyStore truststore;
FileTruststoreProvider(KeyStore truststore, HostnameVerificationPolicy policy) {
this.policy = policy;
this.truststore = truststore;
}
@Override
public HostnameVerificationPolicy getPolicy() {
return policy;
}
@Override
public KeyStore getTruststore() {
return truststore;
}
@Override
public void close() {
}
}
@@ -0,0 +1,102 @@
package org.keycloak.connections.truststore;
import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyStore;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class FileTruststoreProviderFactory implements TruststoreProviderFactory {
private static final Logger log = Logger.getLogger(FileTruststoreProviderFactory.class);
private TruststoreProvider provider;
@Override
public TruststoreProvider create(KeycloakSession session) {
return provider;
}
@Override
public void init(Config.Scope config) {
String storepath = config.get("file");
String pass = config.get("password");
String policy = config.get("hostname-verification-policy");
Boolean disabled = config.getBoolean("disabled", null);
// if "truststore" . "file" is not configured then it is disabled
if (storepath == null && pass == null && policy == null && disabled == null) {
return;
}
// if explicitly disabled
if (disabled != null && disabled) {
return;
}
HostnameVerificationPolicy verificationPolicy = null;
KeyStore truststore = null;
if (storepath == null) {
throw new RuntimeException("Attribute 'file' missing in 'truststore':'file' configuration");
}
if (pass == null) {
throw new RuntimeException("Attribute 'password' missing in 'truststore':'file' configuration");
}
try {
truststore = loadStore(storepath, pass == null ? null :pass.toCharArray());
} catch (Exception e) {
throw new RuntimeException("Failed to initialize TruststoreProviderFactory: " + new File(storepath).getAbsolutePath(), e);
}
if (policy == null) {
verificationPolicy = HostnameVerificationPolicy.WILDCARD;
} else {
try {
verificationPolicy = HostnameVerificationPolicy.valueOf(policy);
} catch (Exception e) {
throw new RuntimeException("Invalid value for 'hostname-verification-policy': " + policy + " (must be one of: ANY, WILDCARD, STRICT)");
}
}
provider = new FileTruststoreProvider(truststore, verificationPolicy);
TruststoreProviderSingleton.set(provider);
log.debug("File trustore provider initialized: " + new File(storepath).getAbsolutePath());
}
private KeyStore loadStore(String path, char[] password) throws Exception {
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
InputStream is = new FileInputStream(path);
try {
ks.load(is, password);
return ks;
} finally {
try {
is.close();
} catch (IOException ignored) {
}
}
}
@Override
public void postInit(KeycloakSessionFactory factory) {
}
@Override
public void close() {
}
@Override
public String getId() {
return "file";
}
}
@@ -0,0 +1,19 @@
package org.keycloak.connections.truststore;
public enum HostnameVerificationPolicy {
/**
* Hostname verification is not done on the server's certificate
*/
ANY,
/**
* Allows wildcards in subdomain names i.e. *.foo.com
*/
WILDCARD,
/**
* CN must match hostname connecting to
*/
STRICT
}
@@ -0,0 +1,106 @@
package org.keycloak.connections.truststore;
import org.apache.http.conn.ssl.BrowserCompatHostnameVerifier;
import org.apache.http.conn.ssl.StrictHostnameVerifier;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class JSSETruststoreConfigurator {
private TruststoreProvider provider;
private volatile javax.net.ssl.SSLSocketFactory sslFactory;
private volatile TrustManager[] tm;
public JSSETruststoreConfigurator(KeycloakSession session) {
KeycloakSessionFactory factory = session.getKeycloakSessionFactory();
TruststoreProviderFactory truststoreFactory = (TruststoreProviderFactory) factory.getProviderFactory(TruststoreProvider.class, "file");
provider = truststoreFactory.create(session);
if (provider != null && provider.getTruststore() == null) {
provider = null;
}
}
public JSSETruststoreConfigurator(TruststoreProvider provider) {
this.provider = provider;
}
public javax.net.ssl.SSLSocketFactory getSSLSocketFactory() {
if (provider == null) {
return null;
}
if (sslFactory == null) {
synchronized(this) {
if (sslFactory == null) {
try {
SSLContext sslctx = SSLContext.getInstance("TLS");
sslctx.init(null, getTrustManagers(), null);
sslFactory = sslctx.getSocketFactory();
} catch (Exception e) {
throw new RuntimeException("Failed to initialize SSLContext: ", e);
}
}
}
}
return sslFactory;
}
public TrustManager[] getTrustManagers() {
if (provider == null) {
return null;
}
if (tm == null) {
synchronized (this) {
if (tm == null) {
TrustManagerFactory tmf = null;
try {
tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(provider.getTruststore());
tm = tmf.getTrustManagers();
} catch (Exception e) {
throw new RuntimeException("Failed to initialize TrustManager: ", e);
}
}
}
}
return tm;
}
public HostnameVerifier getHostnameVerifier() {
if (provider == null) {
return null;
}
HostnameVerificationPolicy policy = provider.getPolicy();
switch (policy) {
case ANY:
return new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
};
case WILDCARD:
return new BrowserCompatHostnameVerifier();
case STRICT:
return new StrictHostnameVerifier();
default:
throw new IllegalStateException("Unknown policy: " + policy.name());
}
}
public TruststoreProvider getProvider() {
return provider;
}
}
@@ -0,0 +1,87 @@
package org.keycloak.connections.truststore;
import org.jboss.logging.Logger;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
/**
* Using this class is ugly, but it is the only way to push our truststore to the default LDAP client implementation.
* <p>
* This SSLSocketFactory can only use truststore configured by TruststoreProvider after the ProviderFactory was
* initialized using standard Spi load / init mechanism. That will only happen if "truststore" provider is configured
* in keycloak-server.json.
* <p>
* If TruststoreProvider is not available this SSLSocketFactory will delegate all operations to javax.net.ssl.SSLSocketFactory.getDefault().
*
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class SSLSocketFactory extends javax.net.ssl.SSLSocketFactory {
private static final Logger log = Logger.getLogger(SSLSocketFactory.class);
private static SSLSocketFactory instance;
private final javax.net.ssl.SSLSocketFactory sslsf;
private SSLSocketFactory() {
TruststoreProvider provider = TruststoreProviderSingleton.get();
javax.net.ssl.SSLSocketFactory sf = null;
if (provider != null) {
sf = new JSSETruststoreConfigurator(provider).getSSLSocketFactory();
}
if (sf == null) {
log.info("No truststore provider found - using default SSLSocketFactory");
sf = (javax.net.ssl.SSLSocketFactory) javax.net.ssl.SSLSocketFactory.getDefault();
}
sslsf = sf;
}
public static synchronized SSLSocketFactory getDefault() {
if (instance == null) {
instance = new SSLSocketFactory();
}
return instance;
}
@Override
public String[] getDefaultCipherSuites() {
return sslsf.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites() {
return sslsf.getSupportedCipherSuites();
}
@Override
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException {
return sslsf.createSocket(socket, host, port, autoClose);
}
@Override
public Socket createSocket(String host, int port) throws IOException {
return sslsf.createSocket(host, port);
}
@Override
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
return sslsf.createSocket(host, port, localHost, localPort);
}
@Override
public Socket createSocket(InetAddress host, int port) throws IOException {
return sslsf.createSocket(host, port);
}
@Override
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
return sslsf.createSocket(address, port, localAddress, localPort);
}
}
@@ -0,0 +1,15 @@
package org.keycloak.connections.truststore;
import org.keycloak.provider.Provider;
import java.security.KeyStore;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public interface TruststoreProvider extends Provider {
HostnameVerificationPolicy getPolicy();
KeyStore getTruststore();
}
@@ -0,0 +1,9 @@
package org.keycloak.connections.truststore;
import org.keycloak.provider.ProviderFactory;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public interface TruststoreProviderFactory extends ProviderFactory<TruststoreProvider> {
}
@@ -0,0 +1,17 @@
package org.keycloak.connections.truststore;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
class TruststoreProviderSingleton {
static private TruststoreProvider provider;
static void set(TruststoreProvider tp) {
provider = tp;
}
static TruststoreProvider get() {
return provider;
}
}
@@ -0,0 +1,31 @@
package org.keycloak.connections.truststore;
import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.provider.Spi;
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
public class TruststoreSpi implements Spi {
@Override
public boolean isInternal() {
return true;
}
@Override
public String getName() {
return "truststore";
}
@Override
public Class<? extends Provider> getProviderClass() {
return TruststoreProvider.class;
}
@Override
public Class<? extends ProviderFactory> getProviderFactoryClass() {
return TruststoreProviderFactory.class;
}
}
@@ -0,0 +1 @@
org.keycloak.connections.truststore.FileTruststoreProviderFactory
@@ -0,0 +1 @@
org.keycloak.connections.truststore.TruststoreSpi
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -7,7 +7,6 @@ import org.keycloak.jose.jws.crypto.RSAProvider;
import org.keycloak.representations.AccessToken;
import org.keycloak.util.TokenUtil;
import java.io.IOException;
import java.security.PublicKey;
/**
@@ -20,20 +19,8 @@ public class RSATokenVerifier {
}
public static AccessToken verifyToken(String tokenString, PublicKey realmKey, String realmUrl, boolean checkActive, boolean checkTokenType) throws VerificationException {
JWSInput input = null;
try {
input = new JWSInput(tokenString);
} catch (JWSInputException e) {
throw new VerificationException("Couldn't parse token", e);
}
if (!isPublicKeyValid(input, realmKey)) throw new VerificationException("Invalid token signature.");
AccessToken token = toAccessToken(tokenString, realmKey);
AccessToken token;
try {
token = input.readJsonContent(AccessToken.class);
} catch (JWSInputException e) {
throw new VerificationException("Couldn't parse token signature", e);
}
String user = token.getSubject();
if (user == null) {
throw new VerificationException("Token user was null.");
@@ -59,6 +46,24 @@ public class RSATokenVerifier {
return token;
}
public static AccessToken toAccessToken(String tokenString, PublicKey realmKey) throws VerificationException {
JWSInput input;
try {
input = new JWSInput(tokenString);
} catch (JWSInputException e) {
throw new VerificationException("Couldn't parse token", e);
}
if (!isPublicKeyValid(input, realmKey)) throw new VerificationException("Invalid token signature.");
AccessToken token;
try {
token = input.readJsonContent(AccessToken.class);
} catch (JWSInputException e) {
throw new VerificationException("Couldn't parse token signature", e);
}
return token;
}
private static boolean isPublicKeyValid(JWSInput input, PublicKey realmKey) throws VerificationException {
try {
return RSAProvider.verify(input, realmKey);
@@ -40,6 +40,11 @@ public class ClientRepresentation {
protected Integer nodeReRegistrationTimeout;
protected Map<String, Integer> registeredNodes;
protected List<ProtocolMapperRepresentation> protocolMappers;
protected String clientTemplate;
private Boolean useTemplateConfig;
private Boolean useTemplateScope;
private Boolean useTemplateMappers;
public String getId() {
return id;
@@ -290,4 +295,36 @@ public class ClientRepresentation {
this.protocolMappers = protocolMappers;
}
public String getClientTemplate() {
return clientTemplate;
}
public void setClientTemplate(String clientTemplate) {
this.clientTemplate = clientTemplate;
}
public Boolean isUseTemplateConfig() {
return useTemplateConfig;
}
public void setUseTemplateConfig(Boolean useTemplateConfig) {
this.useTemplateConfig = useTemplateConfig;
}
public Boolean isUseTemplateScope() {
return useTemplateScope;
}
public void setUseTemplateScope(Boolean useTemplateScope) {
this.useTemplateScope = useTemplateScope;
}
public Boolean isUseTemplateMappers() {
return useTemplateMappers;
}
public void setUseTemplateMappers(Boolean useTemplateMappers) {
this.useTemplateMappers = useTemplateMappers;
}
}
@@ -0,0 +1,152 @@
package org.keycloak.representations.idm;
import java.util.List;
import java.util.Map;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class ClientTemplateRepresentation {
/**
* Use this value in ClientRepresentation.setClientTemplate when you want to clear this value
*/
public static final String NONE = "NONE";
protected String id;
protected String name;
protected String description;
protected String protocol;
protected Boolean fullScopeAllowed;
protected Boolean bearerOnly;
protected Boolean consentRequired;
protected Boolean standardFlowEnabled;
protected Boolean implicitFlowEnabled;
protected Boolean directAccessGrantsEnabled;
protected Boolean serviceAccountsEnabled;
protected Boolean publicClient;
protected Boolean frontchannelLogout;
protected Map<String, String> attributes;
protected List<ProtocolMapperRepresentation> protocolMappers;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<ProtocolMapperRepresentation> getProtocolMappers() {
return protocolMappers;
}
public void setProtocolMappers(List<ProtocolMapperRepresentation> protocolMappers) {
this.protocolMappers = protocolMappers;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public Boolean isFullScopeAllowed() {
return fullScopeAllowed;
}
public void setFullScopeAllowed(Boolean fullScopeAllowed) {
this.fullScopeAllowed = fullScopeAllowed;
}
public Boolean isBearerOnly() {
return bearerOnly;
}
public void setBearerOnly(Boolean bearerOnly) {
this.bearerOnly = bearerOnly;
}
public Boolean isConsentRequired() {
return consentRequired;
}
public void setConsentRequired(Boolean consentRequired) {
this.consentRequired = consentRequired;
}
public Boolean isStandardFlowEnabled() {
return standardFlowEnabled;
}
public void setStandardFlowEnabled(Boolean standardFlowEnabled) {
this.standardFlowEnabled = standardFlowEnabled;
}
public Boolean isImplicitFlowEnabled() {
return implicitFlowEnabled;
}
public void setImplicitFlowEnabled(Boolean implicitFlowEnabled) {
this.implicitFlowEnabled = implicitFlowEnabled;
}
public Boolean isDirectAccessGrantsEnabled() {
return directAccessGrantsEnabled;
}
public void setDirectAccessGrantsEnabled(Boolean directAccessGrantsEnabled) {
this.directAccessGrantsEnabled = directAccessGrantsEnabled;
}
public Boolean isServiceAccountsEnabled() {
return serviceAccountsEnabled;
}
public void setServiceAccountsEnabled(Boolean serviceAccountsEnabled) {
this.serviceAccountsEnabled = serviceAccountsEnabled;
}
public Boolean isPublicClient() {
return publicClient;
}
public void setPublicClient(Boolean publicClient) {
this.publicClient = publicClient;
}
public Boolean isFrontchannelLogout() {
return frontchannelLogout;
}
public void setFrontchannelLogout(Boolean frontchannelLogout) {
this.frontchannelLogout = frontchannelLogout;
}
public Map<String, String> getAttributes() {
return attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes = attributes;
}
}
@@ -54,6 +54,7 @@ public class IdentityProviderRepresentation {
protected boolean addReadTokenRoleOnCreate;
protected boolean authenticateByDefault;
protected String firstBrokerLoginFlowAlias;
protected String postBrokerLoginFlowAlias;
protected Map<String, String> config = new HashMap<String, String>();
public String getInternalId() {
@@ -139,6 +140,14 @@ public class IdentityProviderRepresentation {
this.firstBrokerLoginFlowAlias = firstBrokerLoginFlowAlias;
}
public String getPostBrokerLoginFlowAlias() {
return postBrokerLoginFlowAlias;
}
public void setPostBrokerLoginFlowAlias(String postBrokerLoginFlowAlias) {
this.postBrokerLoginFlowAlias = postBrokerLoginFlowAlias;
}
public boolean isStoreToken() {
return this.storeToken;
}
@@ -0,0 +1,103 @@
/*
* Copyright 2016 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @author tags. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.keycloak.representations.idm;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
/**
* Used for partial import of users, clients, roles, and identity providers.
*
* @author Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
*/
@JsonIgnoreProperties(ignoreUnknown=true)
public class PartialImportRepresentation {
public enum Policy { SKIP, OVERWRITE, FAIL };
protected Policy policy = Policy.FAIL;
protected String ifResourceExists = "";
protected List<UserRepresentation> users;
protected List<ClientRepresentation> clients;
protected List<IdentityProviderRepresentation> identityProviders;
protected RolesRepresentation roles;
public boolean hasUsers() {
return (users != null) && !users.isEmpty();
}
public boolean hasClients() {
return (clients != null) && !clients.isEmpty();
}
public boolean hasIdps() {
return (identityProviders != null) && !identityProviders.isEmpty();
}
public boolean hasRealmRoles() {
return (roles != null) && (roles.getRealm() != null) && (!roles.getRealm().isEmpty());
}
public boolean hasClientRoles() {
return (roles != null) && (roles.getClient() != null) && (!roles.getClient().isEmpty());
}
public String getIfResourceExists() {
return ifResourceExists;
}
public void setIfResourceExists(String ifResourceExists) {
this.ifResourceExists = ifResourceExists;
this.policy = Policy.valueOf(ifResourceExists);
}
public Policy getPolicy() {
return this.policy;
}
public List<UserRepresentation> getUsers() {
return users;
}
public void setUsers(List<UserRepresentation> users) {
this.users = users;
}
public List<ClientRepresentation> getClients() {
return clients;
}
public void setClients(List<ClientRepresentation> clients) {
this.clients = clients;
}
public List<IdentityProviderRepresentation> getIdentityProviders() {
return identityProviders;
}
public void setIdentityProviders(List<IdentityProviderRepresentation> identityProviders) {
this.identityProviders = identityProviders;
}
public RolesRepresentation getRoles() {
return roles;
}
public void setRoles(RolesRepresentation roles) {
this.roles = roles;
}
}
@@ -2,6 +2,8 @@ package org.keycloak.representations.idm;
import java.util.*;
import org.codehaus.jackson.annotate.JsonIgnore;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
@@ -9,6 +11,8 @@ import java.util.*;
public class RealmRepresentation {
protected String id;
protected String realm;
protected String displayName;
protected String displayNameHtml;
protected Integer notBefore;
protected Boolean revokeRefreshToken;
protected Integer accessTokenLifespan;
@@ -65,6 +69,7 @@ public class RealmRepresentation {
protected List<ScopeMappingRepresentation> scopeMappings;
protected Map<String, List<ScopeMappingRepresentation>> clientScopeMappings;
protected List<ClientRepresentation> clients;
protected List<ClientTemplateRepresentation> clientTemplates;
protected Map<String, String> browserSecurityHeaders;
protected Map<String, String> smtpServer;
protected List<UserFederationProviderRepresentation> userFederationProviders;
@@ -85,8 +90,6 @@ public class RealmRepresentation {
private List<IdentityProviderRepresentation> identityProviders;
private List<IdentityProviderMapperRepresentation> identityProviderMappers;
private List<ProtocolMapperRepresentation> protocolMappers;
@Deprecated
private Boolean identityFederationEnabled;
protected Boolean internationalizationEnabled;
protected Set<String> supportedLocales;
protected String defaultLocale;
@@ -128,6 +131,22 @@ public class RealmRepresentation {
this.realm = realm;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getDisplayNameHtml() {
return displayNameHtml;
}
public void setDisplayNameHtml(String displayNameHtml) {
this.displayNameHtml = displayNameHtml;
}
public List<UserRepresentation> getUsers() {
return users;
}
@@ -623,11 +642,6 @@ public class RealmRepresentation {
identityProviders.add(identityProviderRepresentation);
}
@Deprecated
public boolean isIdentityFederationEnabled() {
return identityProviders != null && !identityProviders.isEmpty();
}
public List<ProtocolMapperRepresentation> getProtocolMappers() {
return protocolMappers;
}
@@ -804,4 +818,18 @@ public class RealmRepresentation {
public void setGroups(List<GroupRepresentation> groups) {
this.groups = groups;
}
public List<ClientTemplateRepresentation> getClientTemplates() {
return clientTemplates;
}
public void setClientTemplates(List<ClientTemplateRepresentation> clientTemplates) {
this.clientTemplates = clientTemplates;
}
@JsonIgnore
public boolean isIdentityFederationEnabled() {
return identityProviders != null && !identityProviders.isEmpty();
}
}
@@ -0,0 +1,56 @@
package org.keycloak.representations.idm;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class UserFederationMapperSyncConfigRepresentation {
private Boolean fedToKeycloakSyncSupported;
private String fedToKeycloakSyncMessage; // applicable just if fedToKeycloakSyncSupported is true
private Boolean keycloakToFedSyncSupported;
private String keycloakToFedSyncMessage; // applicable just if keycloakToFedSyncSupported is true
public UserFederationMapperSyncConfigRepresentation() {
}
public UserFederationMapperSyncConfigRepresentation(boolean fedToKeycloakSyncSupported, String fedToKeycloakSyncMessage,
boolean keycloakToFedSyncSupported, String keycloakToFedSyncMessage) {
this.fedToKeycloakSyncSupported = fedToKeycloakSyncSupported;
this.fedToKeycloakSyncMessage = fedToKeycloakSyncMessage;
this.keycloakToFedSyncSupported = keycloakToFedSyncSupported;
this.keycloakToFedSyncMessage = keycloakToFedSyncMessage;
}
public Boolean isFedToKeycloakSyncSupported() {
return fedToKeycloakSyncSupported;
}
public void setFedToKeycloakSyncSupported(Boolean fedToKeycloakSyncSupported) {
this.fedToKeycloakSyncSupported = fedToKeycloakSyncSupported;
}
public String getFedToKeycloakSyncMessage() {
return fedToKeycloakSyncMessage;
}
public void setFedToKeycloakSyncMessage(String fedToKeycloakSyncMessage) {
this.fedToKeycloakSyncMessage = fedToKeycloakSyncMessage;
}
public Boolean isKeycloakToFedSyncSupported() {
return keycloakToFedSyncSupported;
}
public void setKeycloakToFedSyncSupported(Boolean keycloakToFedSyncSupported) {
this.keycloakToFedSyncSupported = keycloakToFedSyncSupported;
}
public String getKeycloakToFedSyncMessage() {
return keycloakToFedSyncMessage;
}
public void setKeycloakToFedSyncMessage(String keycloakToFedSyncMessage) {
this.keycloakToFedSyncMessage = keycloakToFedSyncMessage;
}
}
@@ -1,7 +1,9 @@
package org.keycloak.representations.idm;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
@@ -12,7 +14,10 @@ public class UserFederationMapperTypeRepresentation {
protected String category;
protected String helpText;
protected UserFederationMapperSyncConfigRepresentation syncConfig;
protected List<ConfigPropertyRepresentation> properties = new LinkedList<>();
protected Map<String, String> defaultConfig = new HashMap<>();
public String getId() {
return id;
@@ -46,6 +51,14 @@ public class UserFederationMapperTypeRepresentation {
this.helpText = helpText;
}
public UserFederationMapperSyncConfigRepresentation getSyncConfig() {
return syncConfig;
}
public void setSyncConfig(UserFederationMapperSyncConfigRepresentation syncConfig) {
this.syncConfig = syncConfig;
}
public List<ConfigPropertyRepresentation> getProperties() {
return properties;
}
@@ -53,4 +66,12 @@ public class UserFederationMapperTypeRepresentation {
public void setProperties(List<ConfigPropertyRepresentation> properties) {
this.properties = properties;
}
public Map<String, String> getDefaultConfig() {
return defaultConfig;
}
public void setDefaultConfig(Map<String, String> defaultConfig) {
this.defaultConfig = defaultConfig;
}
}
@@ -0,0 +1,71 @@
package org.keycloak.representations.info;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class ClientInstallationRepresentation {
protected String id;
protected String protocol;
protected boolean downloadOnly;
protected String displayType;
protected String helpText;
protected String filename;
protected String mediaType;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public boolean isDownloadOnly() {
return downloadOnly;
}
public void setDownloadOnly(boolean downloadOnly) {
this.downloadOnly = downloadOnly;
}
public String getDisplayType() {
return displayType;
}
public void setDisplayType(String displayType) {
this.displayType = displayType;
}
public String getHelpText() {
return helpText;
}
public void setHelpText(String helpText) {
this.helpText = helpText;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getMediaType() {
return mediaType;
}
public void setMediaType(String mediaType) {
this.mediaType = mediaType;
}
}
@@ -1,15 +1,25 @@
package org.keycloak.services.resources.admin.info;
package org.keycloak.representations.info;
public class MemoryInfoRepresentation {
protected long total;
protected String totalFormated;
protected long used;
protected String usedFormated;
protected long free;
protected long freePercentage;
protected String freeFormated;
public static MemoryInfoRepresentation create() {
MemoryInfoRepresentation rep = new MemoryInfoRepresentation();
Runtime runtime = Runtime.getRuntime();
rep.total = runtime.maxMemory();
rep.totalFormated = formatMemory(rep.total);
rep.used = runtime.totalMemory() - runtime.freeMemory();
rep.usedFormated = formatMemory(rep.used);
rep.free = rep.total - rep.used;
rep.freeFormated = formatMemory(rep.free);
rep.freePercentage = rep.free * 100 / rep.total;
return rep;
}
@@ -18,15 +28,15 @@ public class MemoryInfoRepresentation {
}
public String getTotalFormated() {
return formatMemory(getTotal());
return totalFormated;
}
public long getFree() {
return getTotal() - getUsed();
return free;
}
public String getFreeFormated() {
return formatMemory(getFree());
return freeFormated;
}
public long getUsed() {
@@ -34,14 +44,14 @@ public class MemoryInfoRepresentation {
}
public String getUsedFormated() {
return formatMemory(getUsed());
return usedFormated;
}
public long getFreePercentage() {
return getFree() * 100 / getTotal();
return freePercentage;
}
private String formatMemory(long bytes) {
private static String formatMemory(long bytes) {
if (bytes > 1024L * 1024L) {
return bytes / (1024L * 1024L) + " MB";
} else if (bytes > 1024L) {
@@ -1,4 +1,4 @@
package org.keycloak.services.resources.admin.info;
package org.keycloak.representations.info;
import java.util.Map;
@@ -1,4 +1,4 @@
package org.keycloak.services.resources.admin.info;
package org.keycloak.representations.info;
import org.keycloak.representations.idm.ProtocolMapperRepresentation;
import org.keycloak.representations.idm.ProtocolMapperTypeRepresentation;
@@ -24,6 +24,7 @@ public class ServerInfoRepresentation {
private Map<String, List<ProtocolMapperTypeRepresentation>> protocolMapperTypes;
private Map<String, List<ProtocolMapperRepresentation>> builtinProtocolMappers;
private Map<String, List<ClientInstallationRepresentation>> clientInstallations;
private Map<String, List<String>> enums;
@@ -105,4 +106,12 @@ public class ServerInfoRepresentation {
public void setEnums(Map<String, List<String>> enums) {
this.enums = enums;
}
public Map<String, List<ClientInstallationRepresentation>> getClientInstallations() {
return clientInstallations;
}
public void setClientInstallations(Map<String, List<ClientInstallationRepresentation>> clientInstallations) {
this.clientInstallations = clientInstallations;
}
}
@@ -1,4 +1,4 @@
package org.keycloak.services.resources.admin.info;
package org.keycloak.representations.info;
import java.util.Map;
@@ -1,7 +1,6 @@
package org.keycloak.services.resources.admin.info;
package org.keycloak.representations.info;
import org.keycloak.common.Version;
import org.keycloak.models.KeycloakSession;
import java.util.Date;
import java.util.Locale;
@@ -27,11 +26,11 @@ public class SystemInfoRepresentation {
private String userTimezone;
private String userLocale;
public static SystemInfoRepresentation create(KeycloakSession session) {
public static SystemInfoRepresentation create(long serverStartupTime) {
SystemInfoRepresentation rep = new SystemInfoRepresentation();
rep.version = Version.VERSION;
rep.serverTime = new Date().toString();
rep.uptimeMillis = System.currentTimeMillis() - session.getKeycloakSessionFactory().getServerStartupTimestamp();
rep.uptimeMillis = System.currentTimeMillis() - serverStartupTime;
rep.uptime = formatUptime(rep.uptimeMillis);
rep.javaVersion = System.getProperty("java.version");
rep.javaVendor = System.getProperty("java.vendor");
@@ -0,0 +1,60 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2016 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.oidc;
import org.codehaus.jackson.annotate.JsonProperty;
import org.keycloak.representations.AccessToken;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class TokenMetadataRepresentation extends AccessToken {
@JsonProperty("active")
private boolean active;
@JsonProperty("username")
private String userName;
@JsonProperty("client_id")
private String clientId;
public boolean isActive() {
return this.active;
}
public void setActive(boolean active) {
this.active = active;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getClientId() {
return this.clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
}
@@ -1,8 +1,11 @@
package org.keycloak.util;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.node.ObjectNode;
import org.codehaus.jackson.type.TypeReference;
import java.io.IOException;
@@ -69,6 +72,33 @@ public class JsonSerialization {
}
}
/**
* Creates an {@link ObjectNode} based on the given {@code pojo}, copying all its properties to the resulting {@link ObjectNode}.
*
* @param pojo a pojo which properties will be populates into the resulting a {@link ObjectNode}
* @return a {@link ObjectNode} with all the properties from the given pojo
* @throws IOException if the resulting a {@link ObjectNode} can not be created
*/
public static ObjectNode createObjectNode(Object pojo) throws IOException {
if (pojo == null) {
throw new IllegalArgumentException("Pojo can not be null.");
}
ObjectNode objectNode = createObjectNode();
JsonParser jsonParser = mapper.getJsonFactory().createJsonParser(writeValueAsBytes(pojo));
JsonNode jsonNode = jsonParser.readValueAsTree();
if (!jsonNode.isObject()) {
throw new RuntimeException("JsonNode [" + jsonNode + "] is not a object.");
}
objectNode.putAll((ObjectNode) jsonNode);
return objectNode;
}
public static ObjectNode createObjectNode() {
return mapper.createObjectNode();
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+3 -3
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -116,7 +116,7 @@
</dependency>
<!-- mongo -->
<dependency>
<!-- <dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-connections-mongo</artifactId>
</dependency>
@@ -135,7 +135,7 @@
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
</dependency>
</dependency> -->
<dependency>
<groupId>org.liquibase</groupId>
+5 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -131,7 +131,10 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-export-import-single-file</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-connections-truststore</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-connections-http-client</artifactId>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -8,7 +8,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak AS7 / JBoss EAP 6 Adapter Distros</name>
@@ -15,7 +15,7 @@
<modules>
<module>as7-modules</module>
<module>as7-adapter-zip</module>
<!--<module>as7-adapter-zip</module>-->
<module>eap6-adapter-zip</module>
</modules>
</project>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<name>Keycloak OSGI Features</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<name>Keycloak OSGI JAAS Realm Configuration</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak OSGI Integration</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
+9 -9
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -16,15 +16,15 @@
<modules>
<module>as7-eap6-adapter</module>
<module>jetty81-adapter-zip</module>
<module>jetty91-adapter-zip</module>
<module>jetty92-adapter-zip</module>
<!--<module>jetty81-adapter-zip</module>-->
<!--<module>jetty91-adapter-zip</module>-->
<!--<module>jetty92-adapter-zip</module>-->
<module>js-adapter-zip</module>
<module>osgi</module>
<module>tomcat6-adapter-zip</module>
<module>tomcat7-adapter-zip</module>
<module>tomcat8-adapter-zip</module>
<module>wf8-adapter</module>
<module>wildfly-adapter</module>
<!--<module>tomcat6-adapter-zip</module>-->
<!--<module>tomcat7-adapter-zip</module>-->
<!--<module>tomcat8-adapter-zip</module>-->
<!--<module>wf8-adapter</module>-->
<!--<module>wildfly-adapter</module>-->
</modules>
</project>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Wildfly 8 Adapter</name>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -8,7 +8,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Wildfly Adapter</name>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
@@ -8,7 +8,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -1,7 +1,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:j="urn:jboss:domain:3.0"
xmlns:ds="urn:jboss:domain:datasources:3.0"
xmlns:j="urn:jboss:domain:4.0"
xmlns:ds="urn:jboss:domain:datasources:4.0"
xmlns:k="urn:jboss:domain:keycloak:1.1"
xmlns:sec="urn:jboss:domain:security:1.2"
version="2.0"
@@ -25,7 +25,7 @@
<xsl:template match="//ds:datasources">
<xsl:copy>
<xsl:apply-templates select="node()[name(.)='datasource']"/>
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
<datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" use-java-context="true">
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
<driver>h2</driver>
<security>
@@ -70,6 +70,7 @@
<local-cache name="realms"/>
<local-cache name="users"/>
<local-cache name="sessions"/>
<local-cache name="offlineSessions"/>
<local-cache name="loginFailures"/>
</cache-container>
<xsl:apply-templates select="node()|@*"/>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>distribution-pom</artifactId>
<version>1.7.0.Final-SNAPSHOT</version>
<version>1.8.0.CR1</version>
</parent>
<artifactId>keycloak-dist-downloads</artifactId>
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*
~ * JBoss, Home of Professional Open Source.
~ * Copyright 2014, Red Hat, Inc., and individual contributors
~ * as indicated by the @author tags. See the copyright.txt file in the
~ * distribution for a full listing of individual contributors.
~ *
~ * This is free software; you can redistribute it and/or modify it
~ * under the terms of the GNU Lesser General Public License as
~ * published by the Free Software Foundation; either version 2.1 of
~ * the License, or (at your option) any later version.
~ *
~ * This software is distributed in the hope that it will be useful,
~ * but WITHOUT ANY WARRANTY; without even the implied warranty of
~ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ * Lesser General Public License for more details.
~ *
~ * You should have received a copy of the GNU Lesser General Public
~ * License along with this software; if not, write to the Free
~ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
~ */
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>eap6-server-dist</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}/unpacked/jboss-eap-6.4</directory>
<outputDirectory>${product.name}-${product.version}</outputDirectory>
<excludes>
<exclude>standalone/configuration/standalone.xml</exclude>
<exclude>modules/system/layers/base/org/jboss/as/product/**</exclude>
<exclude>bin/product.conf</exclude>
<exclude>welcome-content/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/unpacked/overlay</directory>
<outputDirectory>${product.name}-${product.version}</outputDirectory>
<excludes>
<exclude>standalone/configuration/standalone-keycloak.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>src/main/modules</directory>
<outputDirectory>${product.name}-${product.version}/modules</outputDirectory>
<filtered>true</filtered>
<includes>
<include>**/module.xml</include>
<include>**/MANIFEST.MF</include>
</includes>
</fileSet>
<fileSet>
<directory>src/main/content</directory>
<outputDirectory>${product.name}-${product.version}</outputDirectory>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>src/main/welcome-content</directory>
<outputDirectory>${product.name}-${product.version}/welcome-content</outputDirectory>
<filtered>false</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/unpacked/overlay/standalone/configuration/standalone-keycloak.xml</source>
<outputDirectory>${product.name}-${product.version}/standalone/configuration</outputDirectory>
<destName>standalone.xml</destName>
</file>
</files>
</assembly>
+89
View File
@@ -0,0 +1,89 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.8.0.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>keycloak-eap6-server-dist</artifactId>
<packaging>pom</packaging>
<name>Keycloak EAP 6 Server Distribution</name>
<description/>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-overlay-eap6</artifactId>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
<type>zip</type>
</dependency>
</dependencies>
<build>
<finalName>keycloak-eap6-server-dist-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-server-overlay</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-overlay-eap6</artifactId>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked/overlay</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
<type>zip</type>
<outputDirectory>${project.build.directory}/unpacked</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<recompressZippedFiles>true</recompressZippedFiles>
<finalName>${project.build.finalName}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${project.build.directory}</outputDirectory>
<workDirectory>${project.build.directory}/assembly/work</workDirectory>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1 @@
slot=iam
@@ -0,0 +1,3 @@
JBoss-Product-Release-Name: ${product.name}
JBoss-Product-Release-Version: ${product.version}
JBoss-Product-Console-Slot: eap
Loaded 100 of 2050 files, more files were not shown because too many files have changed in this diff. Show more