Compare commits

..
1817 Commits
Author SHA1 Message Date
keycloak-bot b069ba27f0 Set version to 3.4.1.CR1 2017-11-30 13:55:14 +00:00
stianst 4daf6aaec5 KEYCLOAK-5940 2017-11-30 13:43:15 +01:00
vramik 6bb04617a6 KEYCLOAK-5802 fix install-adapters.sh script for wildfly10 and below 2017-11-30 12:58:11 +01:00
mposolda 7b03eed9c8 KEYCLOAK-5797 Refactoring authenticationSessions to support login in multiple browser tabs with different clients 2017-11-30 12:56:45 +01:00
Hynek Mlnarik b466f4d0b6 KEYCLOAK-5910 Retry sending notification when remote cache is unavailable 2017-11-30 11:48:26 +01:00
Peter Nalyvayko b8e5fd2b99 KC-4335: working on adding a reverse proxy support to allow X.509 client certificate authentication when running keycloak behind a reverse proxy
KC-4335: reverse proxy => a swtich to change a type of reverse proxy when running the X509 integration tests; changes to the names of the reverse proxy providers

KC-4335: updated the migration scripts to add x509 spi to standalone and domain configurations; removed the HAproxy and apache x509 spi configuration
2017-11-30 11:00:32 +01:00
Domenico Briganti b72b01bb9d fix logger class 2017-11-30 10:52:26 +01:00
Martin Kanis 603052c594 KEYCLOAK-5883 Deploy testsuite during product build 2017-11-30 10:50:06 +01:00
Marko Strukelj 106599b52c KEYCLOAK-5742 [Admin CLI] Output filtering for nested attributes doesn't work 2017-11-30 10:47:40 +01:00
pedroigor 17748d5ba8 [KEYCLOAK-5660] - Adding UserQueryProvider.getUsersCount(realm, includeServiceAccount) method 2017-11-30 10:45:54 +01:00
pedroigor 4caa40fd0a [KEYCLOAK-5660] - Fixing test, it should not consider users count for service accounts 2017-11-30 10:45:54 +01:00
pedroigor 674fb31a2c [KEYCLOAK-5660] - Rest API User count returns wrong value 2017-11-30 10:45:54 +01:00
Marko Strukelj c5d9301951 KEYCLOAK-4920 NPE when exporting configuration without alias 2017-11-30 10:40:25 +01:00
pedroigor 5f43a6a342 [KEYCLOAK-3629] - Adding confidential-port attribute to wildfly adapter subsystem 2017-11-30 10:39:21 +01:00
pedroigor 6587cfa084 [KEYCLOAK-3629] - Some Adapters do not work with SSL Redirect 2017-11-30 10:39:21 +01:00
Bruno Oliveira 6a528a3ee6 [KEYCLOAK-2645] Reset password page says 'You need to change your password to activate your account.' 2017-11-30 10:37:21 +01:00
stianst 2be78a0239 KEYCLOAK-5924 Add error handler for uncaught errors 2017-11-30 10:33:13 +01:00
Pavel Drozd 4408cdb5c7 Merge pull request #4756 from tkyjovsk/KEYCLOAK-5922
KEYCLOAK-5922 Cluster tests don't work with non-undertow server
2017-11-30 09:24:39 +01:00
Marek Posolda a3288d5f8e Merge pull request #4767 from hmlnarik/KEYCLOAK-5908-ClassCastException-to-org-infinispan-xsite-XSiteReplicateCommand
KEYCLOAK-5908 Fix relay configuration
2017-11-30 07:04:48 +01:00
Hynek Mlnarik 9cae8b79e4 KEYCLOAK-5908 Fix relay configuration 2017-11-29 22:22:35 +01:00
stianst 0bd2e63162 KEYCLOAK-5939 Align dependencies with WildFly 11 2017-11-29 20:39:10 +01:00
pedroigor 9ffc11d04f [KEYCLOAK-4231] - Unable to import PEM certificate > 2048 2017-11-29 20:26:22 +01:00
Bruno Oliveira af66c5dbd2 [KEYCLOAK-5483] X.509 Auth - log in attempt is not sometimes logged in the Login Events 2017-11-29 20:08:22 +01:00
Tomas Kyjovsky 83136c1bd8 KEYCLOAK-5897 Support for multiple provisioning options in performance testsuite 2017-11-29 18:05:31 +01:00
Pedro Igor d22c58ee30 Merge pull request #4760 from pedroigor/KEYCLOAK-5900
[KEYCLOAK-5900] - Returning error response when resource does not exist
2017-11-29 10:38:44 -02:00
Pedro Igor de6301e65a Merge pull request #4759 from pedroigor/KEYCLOAK-5901
[KEYCLOAK-5901] - Changing response to return a 400 in case scope is invalid
2017-11-29 10:38:07 -02:00
Pavel Drozd c02c07d78e Merge pull request #4749 from wyvie/springboot-testing-fix
[KEYCLOAK-3837] added additional profile to springboot prod testing
2017-11-29 00:05:21 +01:00
Pedro Igor f48509c32c Merge pull request #4741 from pedroigor/KEYCLOAK-2517
[KEYCLOAK-2517] - Doesn't work always refresh token
2017-11-28 20:58:56 -02:00
pedroigor c5b06f23e9 [KEYCLOAK-5900] - Returning error response when resource does not exist 2017-11-28 19:46:18 -02:00
Stan Silvert fc8a8b1dd8 KEYCLOAK-5905: 'Disable Credentials' not displayed after reset password. 2017-11-28 16:40:41 -05:00
pedroigor bf73375a5c [KEYCLOAK-5901] - Changing response to return a 400 in case scope is invalid 2017-11-28 19:32:41 -02:00
Tomas Kyjovsky 4240295af9 KEYCLOAK-5922 Cluster tests don't work with non-undertow server 2017-11-28 17:35:13 +01:00
Bill Burke 3afb635110 Merge pull request #4754 from patriot1burke/master
KEYCLOAK-5904
2017-11-28 09:14:51 -05:00
Bill Burke c36b3cd296 KEYCLOAK-5904 2017-11-28 09:10:43 -05:00
Bill Burke 683fe6fa03 Merge pull request #4744 from mposolda/crossdc-rebase
KEYCLOAK-4188 CrossDataCenter docs in the README file
2017-11-28 08:58:03 -05:00
Bill Burke 0a8995efc7 Merge pull request #4747 from mstruk/KEYCLOAK-5741
KEYCLOAK-5741 [Admin CLI] Fix instructions in build-in help
2017-11-28 08:57:29 -05:00
Bill Burke c398f6619f Merge pull request #4748 from mstruk/KEYCLOAK-5762
KEYCLOAK-5762 [Client Registration CLI] Fix instructions in built-in help
2017-11-28 08:57:15 -05:00
Bill Burke 33c38ceb8b Merge pull request #4753 from pedroigor/KEYCLOAK-5925
[KEYCLOAK-5925] - Trace-level should log tokens without signatures
2017-11-28 08:56:14 -05:00
wyvie b0b28e6282 [KEYCLOAK-3837] added additional profile to springboot prod testing 2017-11-28 14:44:08 +01:00
pedroigor 792ffdf39b [KEYCLOAK-5925] - Trace-level should log tokens without their signatures 2017-11-28 09:54:57 -02:00
stianst 36314c51d6 KEYCLOAK-5856 Fix infinite loop 2017-11-28 07:54:49 +01:00
stianst 24b7e318ca KEYCLOAK-5913 Fix all locales showing in RH-SSO 2017-11-28 07:54:26 +01:00
Stian Thorgersen cf485c3fc9 KEYCLOAK-5308 Fix updating protocol mappers on Oracle 2017-11-27 19:46:12 +01:00
Stian Thorgersen 5666bfe88b KEYCLOAK-4962 Fix updating mappers for identity providers on Oracle 2017-11-27 19:46:12 +01:00
Stan Silvert 27268044ae KEYCLOAK-5906: Active page not highlighted in nav sidebar 2017-11-27 12:43:43 -05:00
Alex Szczuczko c860ca61c3 KEYCLOAK-5843 Add custom license processing plugin to avoid directory symlinks (#4723)
Symlinks are frequently unavailable on Windows (must be on NTFS and user must
have SeCreateSymbolicLinkPrivilege). Removing the symlinks for licenses/common/
should enable the build to function mostly normally on Windows. The individual
license files will be incorrect, but that shouldn't matter for local builds.
Release builds are done on *nix.

The plugin rolls several different plugin executions into one. The common files
are distributed using a resource jar, used by and unpacked by the plugin.
2017-11-27 12:31:31 -05:00
mposolda 1782d220c7 KEYCLOAK-4188 CrossDC documentation. Addressed some questions and comments based on feedback. 2017-11-27 18:04:07 +01:00
Marko Strukelj c35c6e6ab7 KEYCLOAK-5762 [Client Registration CLI] Fix instructions in built-in help 2017-11-27 17:00:48 +01:00
Marko Strukelj 0e2332196d KEYCLOAK-5741 [Admin CLI] Fix instructions in build-in help 2017-11-27 16:12:00 +01:00
Pavel Drozd a8bcdfb401 Merge pull request #4735 from vmuzikar/fix-ui
KEYCLOAK-5816, KEYCLOAK-5815 UI tests fixes
2017-11-27 15:12:35 +01:00
Pavel Drozd 96e481fe45 Merge pull request #4732 from vramik/KEYCLOAK-5705
KEYCLOAK-5705 add missing dependency to module.xml for mssql migration server
2017-11-27 15:10:26 +01:00
Pavel Drozd 87b17a6e6c Merge pull request #4743 from wyvie/springboot-testing-fix
[KEYCLOAK-3837] fix to spring boot test application for jenkins
2017-11-27 15:07:22 +01:00
wyvie 6035e5c831 [KEYCLOAK-3837] fix to spring boot test application for jenkins 2017-11-27 13:58:36 +01:00
Bruno Oliveira 9d35891e7d [KEYCLOAK-5467] X.509 Auth - missing internationalization support 2017-11-27 13:44:38 +01:00
Bruno Oliveira 00677a6b92 [KEYCLOAK-5898] X.509 Auth - add tests for CRL with direct grant 2017-11-27 13:43:37 +01:00
Bruno Oliveira 697caaa805 [KEYCLOAK-4683] Add key usage tests for X.509 Authentication
These tests cover the scenarios already available at our certificates:
* Key Usage with the flag critical
* Extended Key Usage without the flag critical
2017-11-27 13:42:57 +01:00
mposolda fda491a966 KEYCLOAK-4188 CrossDataCenter docs in the README file 2017-11-27 13:37:38 +01:00
Pedro Igor 92504e8ba3 Merge pull request #4653 from cadimmek/patch-1
KEYCLOAK-5134
2017-11-27 09:12:21 -02:00
Thomas Kuestermann bb900f9db8 KEYCLOAK-5753 fixed NPE thrown when using custom RequestMatcher 2017-11-27 09:55:32 +01:00
pedroigor 819a60932e [KEYCLOAK-2517] - Doesn't work always refresh token 2017-11-24 23:40:29 -02:00
Pedro Igor e4a6ee19d1 Merge pull request #4740 from pedroigor/KEYCLOAK-5909
[KEYCLOAK-5909] - Allow providing username as owner when creating resources
2017-11-24 17:57:50 -02:00
pedroigor aef682cd5b [KEYCLOAK-5909] - Allow providing username as owner when creating resources 2017-11-24 17:08:21 -02:00
Marek Posolda dd6502013e Merge pull request #4734 from rmartinc/ui_locales
KEYCLOAK-5896: Parameter "ui_locales" not redirected to login page in java adapters
2017-11-24 10:59:26 +01:00
rmartinc ecbf6e5386 KEYCLOAK-5896: adding a test for the ui_locales change. 2017-11-24 08:21:37 +01:00
pedroigor 2721e6a5e4 [KEYCLOAK-5770] - Logout event test 2017-11-23 21:08:07 +01:00
pedroigor e3c9fa25a3 [KEYCLOAK-5770] - Global Saml Logout doesn't create logout event 2017-11-23 21:08:07 +01:00
mposolda 6d91ab674b KEYCLOAK-5895 CrossDC: NotSerializableException when opening sessions tab in admin console 2017-11-23 20:03:12 +01:00
vmuzikar 6f4ab8870e KEYCLOAK-5816, KEYCLOAK-5815 UI tests fixes 2017-11-23 13:51:38 +01:00
rmartinc 0b3ae30473 Parameter "ui_locales" not redirected to login page in java adapters 2017-11-23 11:18:29 +01:00
Pavel Drozd 94ba85c210 Merge pull request #4720 from vramik/KEYCLOAK-5872
KEYCLOAK-5872 add preview assumption to InvalidationCrossDCTest.authz…
2017-11-23 07:42:31 +01:00
Bill Burke 2117db5e6d Merge pull request #4730 from patriot1burke/master
KEYCLOAK-4715
2017-11-22 12:45:23 -05:00
Bill Burke 116bfb05c2 fix 2017-11-22 11:55:10 -05:00
Bill Burke aee6d16f58 fix more stupidity 2017-11-22 10:22:47 -05:00
Bill Burke ae29e36e1f fix my stupidity 2017-11-22 08:19:30 -05:00
vramik 02220558e6 KEYCLOAK-5705 add missing dependency to module.xml for mssql migration server 2017-11-22 14:09:01 +01:00
Pavel Drozd 12bdf48ecc Merge pull request #4707 from abstractj/KEYCLOAK-5858
[KEYCLOAK-5858] Failing TokensTest in Console UI Tests
2017-11-22 13:22:28 +01:00
mposolda bd1072d2eb KEYCLOAK-5747 Ensure refreshToken doesn't need to send request to the other DC. Other fixes and polishing 2017-11-22 11:55:12 +01:00
mposolda 61c5a332b4 KEYCLOAK-5832 Fix the issue with RemoveExpiredCommand exception on JDG side 2017-11-22 11:55:12 +01:00
Bill Burke 75d517a1e8 cleanup test 2017-11-21 21:49:51 -05:00
Bill Burke 8993ca08ad KEYCLOAK-4715 2017-11-21 17:46:48 -05:00
vramik afd906b9a9 KEYCLOAK-5705 add missing dependency to module.xml for mssql in eap module 2017-11-21 21:51:19 +01:00
vramik c083c1c4cf KEYCLOAK-5873 set DB_CLOSE_ON_EXIT to false when crossdc tests are run on in memory H2 2017-11-21 21:46:59 +01:00
Bill Burke d78bc37253 Merge pull request #4724 from mstruk/KEYCLOAK-5842
KEYCLOAK-5842 Fix NPE in admin-cli ParseUtil.mergeAttributes
2017-11-21 12:36:38 -05:00
Bill Burke d0ee1e6ee5 Merge pull request #4725 from hmlnarik/KEYCLOAK-5183-Support-for-AssertionConsumerServiceUrl-in-Saml-Adapter-subsystem
KEYCLOAK-5183 Support for AssertionConsumerServiceUrl in Saml Adapter subsystem
2017-11-21 12:35:10 -05:00
Bill Burke c16c02b0cf Merge pull request #4727 from vmuzikar/fix-social
KEYCLOAK-5879 Fix SocialLoginTest with -Pauth-server-wildfly
2017-11-21 12:34:28 -05:00
vmuzikar 7fd237b40b KEYCLOAK-5879 Fix SocialLoginTest with -Pauth-server-wildfly 2017-11-21 11:12:21 +01:00
pskopek a993f6fb75 [KEYCLOAK-4979] make schema location map unmodifiable after initial setup + log message change 2017-11-21 09:28:15 +01:00
Thomas Skjølberg 5f20df00d0 [KEYCLOAK-4979] Move picketlink schema, fix resolver and some related tests 2017-11-21 09:28:15 +01:00
Bill Burke 186b10ab53 Merge pull request #4726 from patriot1burke/master
KEYCLOAK-5878
2017-11-20 17:39:58 -05:00
Bill Burke 06762ba13d KEYCLOAK-5878 2017-11-20 17:03:28 -05:00
Bill Burke 08ca03051c Merge pull request #4549 from pkadej/KEYCLOAK-5662
KEYCLOAK-5662
2017-11-20 14:37:07 -05:00
Marko Strukelj 8f82440103 KEYCLOAK-5842 Fix NPE in admin-cli ParseUtil.mergeAttributes 2017-11-20 16:06:27 +01:00
David De VreeseandHynek Mlnarik 9485a63157 KEYCLOAK-5183 Support for AssertionConsumerServiceUrl in Saml Adapter subsystem
Co-Authored-By: Hynek Mlnarik <hmlnarik@redhat.com>
2017-11-20 15:59:47 +01:00
vramik 37b625fd99 KEYCLOAK-5872 add preview assumption to InvalidationCrossDCTest.authzResourceInvalidationTest 2017-11-20 11:30:44 +01:00
Marek Posolda 8e53ccf5ab Merge pull request #4706 from stianst/KEYCLOAK-5383
KEYCLOAK-5383 Fix creating password in LDAP through admin create user…
2017-11-20 09:17:45 +01:00
Bill Burke 7c0c48da01 Merge pull request #4717 from patriot1burke/master
KEYCLOAK-5715
2017-11-17 12:59:36 -05:00
Bill Burke ff5010cdd0 Merge pull request #4663 from mstruk/KEYCLOAK-5702
KEYCLOAK-5702 kcadm delete realm fails with nullpointer
2017-11-17 11:57:58 -05:00
Bill Burke 0940c922ef Merge pull request #4711 from tkyjovsk/KEYCLOAK-5588
KEYCLOAK-5588 Cross-dc: docker setup
2017-11-17 11:55:13 -05:00
Bill Burke 83ff0eab10 remove irrelevant comments 2017-11-17 11:36:49 -05:00
Bill Burke c66ff60c58 KEYCLOAK-5715 2017-11-17 11:34:32 -05:00
Stian Thorgersen feaf834184 KEYCLOAK-5863 Fix error when updating mapper twice in a row 2017-11-17 12:20:43 +01:00
Tomas Kyjovsky 805e9288fa KEYCLOAK-5588 Cross-dc: docker setup 2017-11-16 21:25:58 +01:00
Bruno Oliveira 641069d4fd [KEYCLOAK-5866] MigrationTest fails for extracting realm keys 2017-11-16 19:44:09 +01:00
Pavel Drozd a06fd31412 Merge pull request #4688 from vramik/KEYCLOAK-5678
KEYCLOAK-5678 configs for rh-sso and keycloak are different, skip tes…
2017-11-16 08:38:12 +01:00
Bruno Oliveira 07aa718cb9 [KEYCLOAK-5379] MigrationTest fails for migration to 3.3.0 2017-11-16 07:22:57 +01:00
Shon T. Urbas f186ea12c6 Removal of duplicate cuff. 2017-11-16 07:18:49 +01:00
Stan Silvert dc05134e41 KEYCLOAK-5850: Del realm role broken on permissions & Users tabs. 2017-11-16 07:05:08 +01:00
Pedro Igor f96c3312e2 [KEYCLOAK-5841] - Test 2017-11-16 07:03:08 +01:00
Bruno Oliveira d1579f62a3 [KEYCLOAK-5858] Failing TokensTest in Console UI Tests 2017-11-16 00:24:12 -02:00
Stian Thorgersen 86fb18395e KEYCLOAK-5383 Fix creating password in LDAP through admin create user endpoint 2017-11-15 21:20:00 +01:00
Bruno Oliveira bc28223a77 KEYCLOAK-5859 2017-11-15 20:00:58 +01:00
Stan Silvert f923211e9f KEYCLOAK-5849: Multiple errors in acct page displays '<br/>' 2017-11-15 19:59:54 +01:00
Marek Posolda 6f2ba821a6 Merge pull request #4701 from mposolda/master
LDAP performance improvements
2017-11-15 16:34:45 +01:00
Bill Burke 8839278da7 Merge pull request #4702 from patriot1burke/master
KEYCLOAK-5676
2017-11-15 10:30:12 -05:00
Bill Burke 485ba4a3e4 KEYCLOAK-5676 2017-11-15 10:29:02 -05:00
mposolda bd25040e22 KEYCLOAK-5827 Retrieve member attribute from LDAP on group/role queries just when necessary 2017-11-15 15:29:19 +01:00
mposolda c4a1764801 KEYCLOAK-5836 More logging around LDAP performance. Added LdapManyObjectsInitializerCommand to easily add many users and groups to the LDAP 2017-11-15 15:29:19 +01:00
Hynek Mlnařík 3c48ee39d9 Merge pull request #4699 from hmlnarik/KEYCLOAK-5425-Manual-migration---cannot-apply-generated-sql-script
KEYCLOAK-5425 Have preconditions evaluated in manual mode
2017-11-15 14:51:59 +01:00
Hynek Mlnarik a787cfa33a KEYCLOAK-5425 Have preconditions evaluated in manual mode 2017-11-15 13:37:32 +01:00
Pedro Igor 1bd2f0e98f Merge pull request #4674 from thomasdarimont/issue/fix-npe-in-userpermissions
KEYCLOAK-5841 Fix NPE in deletePermissionSetup in UserPermissions
2017-11-15 10:22:44 -02:00
Hynek Mlnařík 393fae74b3 Merge pull request #4693 from hmlnarik/KEYCLOAK-5349-JS-client-breaks-login-session
KEYCLOAK-5349 User session count in IdP-initiated flow tests
2017-11-15 12:35:19 +01:00
Hynek Mlnarik a2f6c16764 KEYCLOAK-5349 User session count in IdP-initiated flow tests 2017-11-15 11:41:45 +01:00
Bill Burke a70461b726 Merge pull request #4695 from patriot1burke/master
KEYCLOAK-5459 KEYCLOAK-5855
2017-11-14 22:02:13 -05:00
Bill Burke 6b8ead6c4b KEYCLOAK-5459 2017-11-14 19:37:07 -05:00
Stan Silvert 8b023f57f9 KEYCLOAK-5474: Unexp behavior with "login w/ email" and "Dup emails" (#4683)
settings.
2017-11-14 16:12:56 -05:00
Pedro Igor eebf0b0499 Merge pull request #4690 from pedroigor/KEYCLOAK-5824
[KEYCLOAK-5824] - Keycloak throws "Error while evaluating permissions" exception often
2017-11-14 18:35:56 -02:00
Pedro Igor 63a01b1e1f Merge pull request #4689 from pedroigor/KEYCLOAK-5844
[KEYCLOAK-5844] - Refreshing PAT instead of obtaining a new one every time
2017-11-14 18:25:24 -02:00
Marek Posolda 913c94dbd1 Merge pull request #4691 from mposolda/master
KEYCLOAK-5848 Possibility to configure different attribute for GET_GR…
2017-11-14 16:09:26 +01:00
mposolda 0c414eee80 KEYCLOAK-5848 Possibility to configure different attribute for GET_GROUPS_FROM_USER_MEMBEROF_STRATEGY 2017-11-14 15:05:26 +01:00
Pedro Igor b0ccce397a [KEYCLOAK-5824] - Fixing logging of error mesages 2017-11-14 11:28:21 -02:00
Pedro Igor 6731c55429 [KEYCLOAK-5824] - Wrong usage of SimpleDateFormat 2017-11-14 11:27:57 -02:00
Pedro Igor fdb618219f [KEYCLOAK-5844] - Refreshing PAT instead of obtaining a new one every time 2017-11-14 11:24:45 -02:00
Stian Thorgersen 89f4b87038 KEYCLOAK-5567 Set correct status code on login error pages 2017-11-14 12:33:29 +01:00
vramik ea869a3008 KEYCLOAK-5678 configs for rh-sso and keycloak are different, skip test interfaces for now 2017-11-14 11:27:03 +01:00
Hynek Mlnařík 1412fed265 Merge pull request #4676 from abstractj/KEYCLOAK-2052
[KEYCLOAK-2052] Allows independently set timeouts for e-mail verification link and rest e.g. forgot password link
2017-11-14 09:19:57 +01:00
Stian Thorgersen de72542151 KEYCLOAK-5795 Strip ids of client export from admin console 2017-11-14 08:49:58 +01:00
Bruno OliveiraandHynek Mlnarik 03d0488335 [KEYCLOAK-2052] Allows independently set timeouts for e-mail verification link and rest e.g. forgot password link
Co-authored-by: Hynek Mlnarik <hmlnarik@redhat.com>
2017-11-13 19:57:04 -02:00
Stian Thorgersen 925d5e1dea KEYCLOAK-3173 enable logout offline refresh token using OIDC logout endpoint 2017-11-13 18:23:39 +01:00
Martin Kanis d8b3654011 KEYCLOAK-5187 Split jackson version property 2017-11-13 18:22:32 +01:00
Stian Thorgersen 51c7917853 KEYCLOAK-5772 Missing produces type on welcome resource post 2017-11-13 16:38:42 +01:00
Stian Thorgersen d30bf938ee KEYCLOAK-5821 Fix basic auth tests with embedded Undertow 2017-11-13 16:34:25 +01:00
Thomas Darimont 5d8f449ea0 KEYCLOAK-5840 Remove unused config map in AddUser command
The only value put into this config map is the
password hash iterations count.
But `iterations` is used directly with the
hashProvider.

See:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/73c82d296e70e09343f6f55eeea56a085075b289/files/wildfly/adduser/src/main/java/org/keycloak/wildfly/adduser/AddUser.java?sort=name&dir=ASC&mode=heatmap&excluded=false#x490b537b199a8415:1
2017-11-13 15:41:11 +01:00
Hynek Mlnařík 290f6ed2ad Merge pull request #4671 from thomasdarimont/issues/remove-duplicate-check-in-saml11requestwriter
KEYCLOAK-5837 Remove duplicate check in SAML11AuthenticationQueryType
2017-11-13 14:49:11 +01:00
Hynek Mlnařík 98a46c4497 Merge pull request #4672 from thomasdarimont/issues/fix-comparison-in-saml-11-request-response-parsers
KEYCLOAK-5838 Fix comparison in SAMLSloRequestParser and SAMLSloResponseParser
2017-11-13 14:46:56 +01:00
Stian Thorgersen d02ffd33b3 KEYCLOAK-5721 Moved state checker from separate cookie to claim on identity cookie 2017-11-13 14:11:28 +01:00
Thomas Darimont a5b73a365d KEYCLOAK-5841 Fix NPE in deletePermissionSetup in UserPermissions
Previously a call to `UserPermissions#deletePermissionSetup`
always resulted in a NPE if the usersResource was null.

We now only try to delete the resourceStore information if
the given usersResource is not null.
2017-11-13 13:35:40 +01:00
Thomas Darimont 71df504834 KEYCLOAK-5838 Fix comparison in SAMLSloRequestParser and SAMLSloResponseParser
The previous comparison was broken (always returned false)
since it compared the enum value with a string.
Calling `.get()` on the enum value to compare the string this the
given local-part fixes the comparison.

See:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/73c82d296e70e09343f6f55eeea56a085075b289/files/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/SAMLSloRequestParser.java?sort=name&dir=ASC&mode=heatmap&excluded=false#xe3bb353ac67565ed:1
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/73c82d296e70e09343f6f55eeea56a085075b289/files/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/SAMLSloResponseParser.java?sort=name&dir=ASC&mode=heatmap&excluded=false#xdd5c8cb1952defd:1
2017-11-13 13:30:01 +01:00
Thomas Darimont 8cfbb8d0b3 KEYCLOAK-5837 Remove duplicate check in SAML11AuthenticationQueryType
The same check is applied in line 83.
2017-11-13 13:26:15 +01:00
Pavel Drozd 0f4b8be2b0 Merge pull request #4643 from vramik/KEYCLOAK-5678
KEYCLOAK-5678 Extend server-config-migration tests to test also exten…
2017-11-13 12:02:46 +01:00
Pavel Drozd af97a84108 Merge pull request #4635 from vmuzikar/fix-x509
KEYCLOAK-5720 Fix X.509 tests
2017-11-13 11:56:16 +01:00
Przemysław Kadej e28f402b6b KEYCLOAK-5662 - CachePolicy.MAX_LIFESPAN - Cached LDAP users aren't being refreshed at all 2017-11-13 11:36:31 +01:00
Marek Posolda 0dfbe01c73 Merge pull request #4666 from mposolda/crossdc
KEYCLOAK-5828 Ensure sessions preloading works for remote distributed…
2017-11-10 14:13:31 +01:00
Stian Thorgersen 90900b1a1f KEYCLOAK-5825 Clear state checker for welcome on form submit 2017-11-10 13:40:29 +01:00
Stian Thorgersen 4295f4ec31 KEYCLOAK-1886 Added cors headers to errors in token endpoint 2017-11-10 12:01:21 +01:00
mposolda c530a061cc KEYCLOAK-5828 Ensure sessions preloading works for remote distributed caches as well 2017-11-10 11:27:24 +01:00
Thomas Recloux 04ad634986 Add configuration for KeycloakAuthenticatedActionsFilter
Fixes KEYCLOAK-5227
2017-11-10 10:44:12 +01:00
Bartłomiej Piech d4b9c3c014 KEYCLOAK-5679 2017-11-10 10:42:26 +01:00
Marek Posolda bc3515fd1b Merge pull request #4664 from mposolda/crossdc
KEYCLOAK-5371 SessionExpirationCrossDCTest - improve stability. Remov…
2017-11-09 23:15:48 +01:00
mposolda b033ce0669 KEYCLOAK-5371 SessionExpirationCrossDCTest - improve stability. Remove checks for counts of sent messages 2017-11-09 22:18:47 +01:00
Marko Strukelj 7035a4647d KEYCLOAK-5702 kcadm delete realm fails with nullpointer 2017-11-09 20:57:49 +01:00
Marek Posolda 39345b0b61 Merge pull request #4660 from mposolda/crossdc
KEYCLOAK-5618 Fix SessionsPreloadCrossDCTest. Update HOW-TO-RUN docs.…
2017-11-09 20:50:38 +01:00
emilienbondu 8b8e694c60 Fix https://issues.jboss.org/browse/KEYCLOAK-5636 NPE 2017-11-09 19:32:27 +01:00
mposolda a98f085be6 KEYCLOAK-5618 Fix SessionsPreloadCrossDCTest. Update HOW-TO-RUN docs. Ensure it's executed in travis. 2017-11-09 17:39:04 +01:00
Stian Thorgersen 128ff12f8f Bump versions 2017-11-09 15:37:21 +01:00
Stian Thorgersen e28652489e KEYCLOAK-5565 Change theme files to writable to permit patching 2017-11-09 15:37:01 +01:00
Marko Strukelj dae0fafc8a KEYCLOAK-5040 ProfileAssume needs to use server info endpoint 2017-11-09 14:19:06 +01:00
Xiaojian Liu 19eed51582 KEYCLOAK-5352 Basic Auth fails if password contains a ':' 2017-11-09 13:56:02 +01:00
Xiaojian Liu 9ff22f596d KEYCLOAK-5352 Basic Auth fails if password contains a ':' 2017-11-09 13:56:02 +01:00
Xiaojian Liu e1af9f133f KEYCLOAK-5352 Basic Auth fails if password contains a ':' 2017-11-09 13:56:02 +01:00
Bruno Oliveira 26e253f4a5 [KEYCLOAK-5284] 2017-11-09 13:45:06 +01:00
Marko Strukelj 2854a2006e KEYCLOAK-5810 ClientTokenExchangeTest failures with -Pproduct profile 2017-11-09 13:44:10 +01:00
cadimmek 518824e41b KEYCLOAK-5134
UnsupportedOperationException when using policy-enforcer-config with keycloak-spring-boot-adapter
2017-11-09 10:43:50 +01:00
vmuzikar 3bf1904269 KEYCLOAK-5786 Fix testsuite not working with auth-server-eap profile 2017-11-09 08:10:58 +01:00
vmuzikar 2c2a332f80 KEYCLOAK-5332 Fix GitLab social test 2017-11-09 07:19:01 +01:00
Stan Silvert 8759b42e6b KEYCLOAK-4461: Missing error msg when add idp mapper 2017-11-09 07:13:38 +01:00
Marko Strukelj bf937452c6 KEYCLOAK-5617 Intermittent ConcurrencyTest failures 2017-11-09 07:12:33 +01:00
liuzheng712 9243430b75 fix(Chinese language): add # encoding: utf-8 2017-11-09 07:10:59 +01:00
vmuzikar b21d5bbf04 KEYCLOAK-5805 Fix tests in the 'other' module 2017-11-09 07:01:27 +01:00
Pedro Igor 5119dc3ad5 Merge pull request #4650 from pedroigor/KEYCLOAK-4439
[KEYCLOAK-4439] - Fixing elytron adapter for standalone apps
2017-11-08 22:10:25 -02:00
Pedro Igor 476dd1cef5 [KEYCLOAK-4439] - Fixing saml adapter 2017-11-08 19:01:54 -02:00
Pedro Igor a8ba3eb7f9 [KEYCLOAK-4439] - Fixing elytron adapter for standalone apps 2017-11-08 14:09:34 -02:00
Stan Silvert d3b270d025 KEYCLOAK-5475: UI glitches when alias blank in auth config (#4645) 2017-11-08 08:21:28 -05:00
Albert-Jan Verhees b8f3c8a445 Fixed typo in Dutch translations 2017-11-08 12:59:55 +01:00
Alex Szczuczko eb46f403d6 Extract the license files with maven-dependency-plugin instead of wildfly-server-provisioning-maven-plugin
This works around WFBUILD-27 aka wildfly/wildfly-build-tools#39. Once that's merged and new version is released this commit can be reverted.
2017-11-08 12:58:38 +01:00
Alex Szczuczko 9c0ec8cb10 Enforce a standard sort order on deduplication in download-license-files.sh
This will avoid noise in the diffs (files switching between symlink and regular
status) when users on systems with a different default sort order run the
script. `LC_ALL=C sort` will sort by byte order.
2017-11-08 12:58:38 +01:00
Alex Szczuczko d268412738 Initial run of download-license-files.sh on license XMLs
Command line used:

find -path '*/src/main/resources/licenses' | while read -r r; do pushd "$r"; common/download-license-files.sh rh-sso/licenses.xml; common/download-license-files.sh keycloak/licenses.xml; popd; done
2017-11-08 12:58:38 +01:00
Alex Szczuczko e360aadcd4 Explicitly define the dependency for unpacking in js-adapter-zip.
This makes it visible to append-product-licenses.groovy and other plugins.
2017-11-08 12:58:38 +01:00
Alex Szczuczko f88b3cddb6 Port forward license data from maintenance, with improvements.
org.keycloak dependencies will be automatically added to the xml during the
build, removing the need for runs of download-license-files.sh every time the
keycloak version changes.

Documentation on "why and how" for the license data has also been added.

To reduce code duplication issues, plugin definitions are stored in
keycloak-parent, but only active in the projects that need them (not bound to
any phase by default). Also, the common files have been moved into
licenses/common/, so that a single symlink will suffice to replicate the
current and future files needed by the plugin executions. While the
assembly.xml definitions remain duplicated, they are fairly minimal and
shouldn't need to change often.

License data is available for all adapters shipped in the product, plus
server-feature-pack.

The keycloak slot is populated with data, in addition to the rh-sso slot. A
number of the adapters don't depend on any third-party artifacts, so they have
(mostly) blank license.xml files.
2017-11-08 12:58:38 +01:00
Stian Thorgersen 56548fcaf0 Upgrade to EAP 7.1 CR4 (#4649) 2017-11-08 11:40:06 +01:00
Marek Posolda fce9cc205c Merge pull request #4647 from mposolda/crossdc
KEYCLOAK-5371 More stable cross-dc tests
2017-11-08 11:14:37 +01:00
mposolda 701b7acd80 KEYCLOAK-5371 More stable cross-dc tests 2017-11-08 10:03:04 +01:00
vramik 819181007c KEYCLOAK-5678 Extend server-config-migration tests to test also extensions and management 2017-11-07 12:46:13 +01:00
Marek Posolda 7cf52044b2 Merge pull request #4640 from mposolda/crossdc
KEYCLOAK-5716 KEYCLOAK-5738 Avoid infinispan deadlock. Ensure code-to…
2017-11-07 11:04:10 +01:00
Paramvir-JIndal d1468eaa45 [KEYCLOAK-5767]IE9 sometimes using HTTP status code 1223 instead of 204 (#4628) 2017-11-07 10:46:13 +01:00
Hynek Mlnařík afb4a59b19 KEYCLOAK-5789 Update PR policy (#4634) 2017-11-07 10:32:26 +01:00
Stian Thorgersen b1a05dfce2 KEYCLOAK-5664 (#4604) 2017-11-07 10:09:34 +01:00
mposolda 62a1c187a2 KEYCLOAK-5716 KEYCLOAK-5738 Avoid infinispan deadlock. Ensure code-to-token works correctly in cross-dc 2017-11-07 09:01:59 +01:00
Stan Silvert 1db3134df8 KEYCLOAK-5506: Set empty fed config prop fails in admin console (#4625) 2017-11-06 12:44:13 -05:00
Hynek Mlnařík ffc0d7fc7c Merge pull request #4636 from hmlnarik/KEYCLOAK-5581-SAML2-Undeclared-name-space-prefix-ds-
KEYCLOAK-5581 Fix SAML identity broker context serialization
2017-11-03 22:05:13 +01:00
Hynek Mlnarik fe2f65daac KEYCLOAK-5581 Fix SAML identity broker context serialization 2017-11-03 21:09:18 +01:00
vmuzikar ef8adc15f4 KEYCLOAK-5720 Fix X.509 tests 2017-11-03 17:09:46 +01:00
Pedro Igor 1ac9bd510b Merge pull request #4623 from pedroigor/KEYCLOAK-5728
[KEYCLOAK-5728] - Permission Claims support
2017-11-03 05:42:06 -03:00
Hynek Mlnařík 4d0d28c222 Merge pull request #4621 from hmlnarik/KEYCLOAK-5230-Indexes-on-USER-ID-missing-from-the-federated-user-tables
KEYCLOAK-5230 Add indices to FED_* tables
2017-10-31 08:48:34 +01:00
Pedro Igor 6b0c58bab3 Merge pull request #4622 from pedroigor/KEYCLOAK-5763
[KEYCLOAK-5763] - Forward credentials when using Elytron Adapter
2017-10-27 14:45:13 -03:00
Pedro Igor 3716fa44ac [KEYCLOAK-5728] - Permission Claims support 2017-10-27 12:40:30 -02:00
Pedro Igor d3dee07956 [KEYCLOAK-5763] - Forward credentials when using Elytron Adapter 2017-10-27 12:34:31 -02:00
Stan Silvert 986540ab34 KEYCLOAK-4383: Dbl-click login button leads to "already logged in" page (#4614) 2017-10-27 10:29:37 -04:00
Hynek Mlnarik c9aa5e638e KEYCLOAK-5230 Add indices to FED_* tables 2017-10-27 12:43:22 +02:00
Hynek Mlnařík 8d879867b5 Merge pull request #4620 from hmlnarik/KEYCLOAK-5745-Extract-client-sessions-from-user-sessions-2
KEYCLOAK-5745 Fix ActionTokenCrossDCTest and improve logging
2017-10-27 09:55:03 +02:00
Hynek Mlnarik 92027e4c57 KEYCLOAK-5745 Fix ActionTokenCrossDCTest and improve logging 2017-10-27 08:45:05 +02:00
Pedro Igor 081ad09ed8 Merge pull request #4619 from pedroigor/KEYCLOAK-4901
[KEYCLOAK-4901] - Reviewing methods on provider spi
2017-10-26 15:33:09 -03:00
Hynek Mlnařík b0d88be420 Merge pull request #4572 from tkyjovsk/db-failover
KEYCLOAK-5691 Galera cluster, full testsuite
2017-10-26 20:22:47 +02:00
Pedro Igor 57d3c44bb7 [KEYCLOAK-4901] - New policy mgmt rest api should return specific representations for a policy type 2017-10-26 15:26:40 -02:00
Pedro Igor a70cab502c [KEYCLOAK-4901] - Reviewing methods on provider spis 2017-10-26 13:39:57 -02:00
Pavel Drozd 12b2e72162 Merge pull request #4618 from vramik/KEYCLOAK-5244
KEYCLOAK-5244 fix blacklists.path in tests
2017-10-26 15:30:14 +02:00
Tomas Kyjovsky a45a2acc4c KEYCLOAK-5691 Galera cluster, full testsuite 2017-10-26 15:27:57 +02:00
vramik 8cbdbb2fed KEYCLOAK-5244 add PasswordPolicyTest to travis-run-tests.sh 2017-10-26 14:38:57 +02:00
Marek Posolda 9e2ab2750a Merge pull request #4616 from vramik/KEYCLOAK-5749
KEYCLOAK-5749 Update migration scripts for WildFly 11 Final
2017-10-26 13:24:29 +02:00
Marek Posolda aabd47ecdf Merge pull request #4613 from tkyjovsk/KEYCLOAK-5751
KEYCLOAK-5751 Login/logout performance test scenario failing
2017-10-26 13:11:41 +02:00
Hynek Mlnařík 248da4687a Merge pull request #4610 from hmlnarik/KEYCLOAK-5745-Extract-client-sessions-from-user-sessions
KEYCLOAK-5745 Separate user and client sessions in infinispan
2017-10-26 13:09:06 +02:00
vramik 2b44cb70af KEYCLOAK-5244 fix blacklists.path in tests 2017-10-26 12:28:50 +02:00
vramik 906538e6aa KEYCLOAK-5749 Update migration scripts for WildFly 11 Final 2017-10-26 11:21:48 +02:00
Hynek Mlnarik 75c354fd94 KEYCLOAK-5745 Separate user and client sessions in infinispan 2017-10-26 10:39:41 +02:00
Tomas Kyjovsky 9bd5d31c1f Added "&amp; to &" rewrite for login form URI in the perf tests. 2017-10-25 22:28:46 +02:00
Bill Burke 903a4dd849 Merge pull request #4612 from patriot1burke/master
KEYCLOAK-5273
2017-10-25 13:54:32 -04:00
Bill Burke de6eab6d5d fix 2017-10-25 13:00:58 -04:00
Bill Burke 8c1a3253fb KEYCLOAK-5273 2017-10-25 10:31:11 -04:00
Bruno Oliveira da Silva 375e01a074 KEYCLOAK-5278 (#4606) 2017-10-25 15:27:24 +02:00
Marek Posolda 74f5c1c160 Merge pull request #4611 from mposolda/ldap-eviction-day
KEYCLOAK-5746 Bad label for evictionDay in admin console in EVICT_WEE…
2017-10-25 11:14:18 +02:00
mposolda 5f889dd3c6 KEYCLOAK-5746 Bad label for evictionDay in admin console in EVICT_WEEKLY cache policy 2017-10-25 09:08:33 +02:00
Bill Burke 50ccb5e5f6 Merge pull request #4591 from abstractj/KEYCLOAK-5717
KEYCLOAK-5717
2017-10-24 17:38:28 -04:00
Marek Posolda 9793e6aa25 Merge pull request #4608 from mposolda/wf-upgrade
KEYCLOAK-4936 Upgrade to WildFly 11.0.0.Final
2017-10-24 22:35:40 +02:00
mposolda 2dd6a2e655 KEYCLOAK-4936 Upgrade to WildFly 11.0.0.Final 2017-10-24 21:23:19 +02:00
Pedro Igor 1840cc54e4 Merge pull request #4601 from pedroigor/KEYCLOAK-5726
[KEYCLOAK-5726] - Support define enforcement mode for scopes on the adapter config
2017-10-24 12:51:52 -02:00
Hynek Mlnařík 7190820fc4 Merge pull request #4566 from vramik/KEYCLOAK-4928
KEYCLOAK-4928 Add primary key constraints
2017-10-24 15:40:37 +02:00
Pedro Igor 80e9b08bb6 [KEYCLOAK-5726] - Tests for scopes-enforcement-mode ALL and ANY 2017-10-24 11:37:41 -02:00
Bruno Oliveira 4d762159ef KEYCLOAK-5717 2017-10-24 10:55:02 -02:00
Marek Posolda a7bc294a08 Merge pull request #4594 from hmlnarik/KEYCLOAK-5688-Externalizer-for-entities-shared-across-DC-2
KEYCLOAK-5688 Externalizers for cluster messages and predicates
2017-10-24 14:41:16 +02:00
Hynek Mlnařík 8e0cc2a5ea Merge pull request #4605 from mposolda/master
KEYCLOAK-5710 Change cache-server to use backups based caches
2017-10-24 14:40:01 +02:00
Pedro Igor bc12193c3c [KEYCLOAK-5726] - Fixes the parameter value when making queries 2017-10-24 10:39:55 -02:00
Pedro Igor 7dd7b6b984 [KEYCLOAK-5726] - Defaults to true in case no required scopes are defined 2017-10-24 10:39:55 -02:00
Pedro Igor 711aa83d31 [KEYCLOAK-5726] - Fixing web origins on photoz quickstart 2017-10-24 10:39:55 -02:00
Pedro Igor a6e1413d58 [KEYCLOAK-5726] - Support define enforcement mode for scopes on the adapter configuration 2017-10-24 10:39:54 -02:00
Pavel Drozd a4ec32ba66 Merge pull request #4602 from vramik/KEYCLOAK-5244
KEYCLOAK-5244 fix PasswordPolicyTest.testBlacklistPasswordPolicyWithT…
2017-10-24 14:17:35 +02:00
mposolda 9a19e95b60 KEYCLOAK-5710 Change cache-server to use backups based caches 2017-10-24 11:52:08 +02:00
Stian Thorgersen f0bbcbf0fd KEYCLOAK-5487 (#4603) 2017-10-24 10:49:08 +02:00
vramik 223713bc53 KEYCLOAK-4928 Add primary key constraints 2017-10-24 10:46:46 +02:00
Stan Silvert 330f2acc29 KEYCLOAK-5732: Freemarker pages using ?html (#4607) 2017-10-23 16:35:45 -04:00
Pavel Drozd 4010e5e247 Merge pull request #4588 from tkyjovsk/KEYCLOAK-5711
KEYCLOAK-5711 Adapter test module for Wildfly has compilation error
2017-10-23 22:27:31 +02:00
Stan Silvert 574fd42534 KEYCLOAK-5681: Upgrade AngularJS for Admin Console (#4571) 2017-10-23 12:03:46 -04:00
Stan Silvert 9083e5fe5c KEYCLOAK-5298: Enable autoescaping in Freemarker (#4561)
* KEYCLOAK-5298: Enable autoescaping in Freemarker

* Fix several of the failing tests.

* Fix broken tests in integration-deprecated

* Fix last failing test.
2017-10-23 12:03:00 -04:00
Pavel Drozd 1eb2d894e5 Merge pull request #4593 from vmuzikar/ssl-fix
KEYCLOAK-5719 fix auth server ssl with base testsuite
2017-10-23 16:39:22 +02:00
Stian Thorgersen 9b75b603e3 KEYCLOAK-5234 (#4585) 2017-10-23 16:13:22 +02:00
Pavel Drozd 20d0fa1b4e Merge pull request #4528 from RaiSaurabh/test
KEYCLOAK-5623: Fix to support the URL handler for the file loading.
2017-10-23 12:52:10 +02:00
Hynek Mlnarik faf830dc77 KEYCLOAK-5688 Externalizers for cluster messages and predicates 2017-10-23 12:18:56 +02:00
vramik a3a1761eb7 KEYCLOAK-5244 fix PasswordPolicyTest.testBlacklistPasswordPolicyWithTestBlacklist on Wildfly 2017-10-23 12:11:36 +02:00
saurabhrai 6dd8592434 KEYCLOAK-5623: Updated to code to check the profile configuration to support Jboss Fuse adapter. Read from profile resource. 2017-10-23 14:17:18 +05:30
Pavel Drozd aaf25ad4f0 Merge pull request #4592 from vramik/KEYCLOAK-5705
KEYCLOAK-5705 add missing dependency to module.xml for mssql
2017-10-23 09:56:01 +02:00
Bill Burke 73ba06b26b Merge pull request #4590 from patriot1burke/master
KEYCLOAK-5698
2017-10-20 14:58:07 -04:00
Bill Burke 92245e3fc8 fixes 2017-10-20 09:55:37 -04:00
vmuzikar 1dd2a90e20 KEYCLOAK-5719 fix auth server ssl with base testsuite 2017-10-20 14:10:06 +02:00
vramik 25d785df02 KEYCLOAK-5705 add missing dependency to module.xml for mssql 2017-10-20 12:56:51 +02:00
Hynek Mlnařík 60d8236f05 Merge pull request #4584 from hmlnarik/KEYCLOAK-5707-Have-travis-run-cross-dc-tests-when-appropriate
KEYCLOAK-5707 Have travis run cross-dc tests when appropriate
2017-10-20 11:06:06 +02:00
Bill Burke 54ebc21880 KEYCLOAK-5698 2017-10-19 19:38:56 -04:00
Tomas Kyjovsky bd706418c9 KEYCLOAK-5711 Adapter test module for Wildfly has compilation error 2017-10-19 19:41:31 +02:00
Bill Burke 0371a562d9 Merge pull request #4574 from patriot1burke/master
KEYCLOAK-5701
2017-10-19 10:33:10 -04:00
Hynek Mlnarik 3248557897 KEYCLOAK-5707 Have travis run cross-dc tests when appropriate 2017-10-19 13:29:26 +02:00
Pedro Igor 00ea849cb9 Merge pull request #4575 from pedroigor/KEYCLOAK-5703
[KEYCLOAK-5703] - Improving exception handling and parsing server response
2017-10-19 09:20:35 -02:00
Hynek Mlnařík 0fbbe52ea7 Merge pull request #4581 from hmlnarik/KEYCLOAK-5700-Add-support-for-jarless-server-distribution
KEYCLOAK-5700 Documentation for jarless server distribution
2017-10-19 09:45:13 +02:00
Stian Thorgersen 5421c862e0 KEYCLOAK-5551 (#4579) 2017-10-19 09:23:31 +02:00
Stian Thorgersen d9ffc4fa21 KEYCLOAK-5225 (#4577)
KEYCLOAK-5225 fix test

Fix
2017-10-19 08:23:16 +02:00
Stian Thorgersen fea4c54adc KEYCLOAK-5280 (#4576) 2017-10-19 08:02:23 +02:00
Hynek Mlnarik 8e5a6f9bf2 KEYCLOAK-5700 Documentation for jarless server distribution 2017-10-19 07:47:15 +02:00
Wyvie 988d660083 [KEYCLOAK-3837] added session and account linking spring boot tests (#4564) 2017-10-19 06:29:59 +02:00
Pedro Igor 4071dd7734 [KEYCLOAK-5703] - Improving exception handling and parsing server response 2017-10-18 20:27:21 -02:00
Bill Burke 8faa6f1f4d KEYCLOAK-5701 2017-10-18 18:20:50 -04:00
Pedro Igor 19f54111ec Merge pull request #4573 from pedroigor/KEYCLOAK-4550
[KEYCLOAK-4550] - Test invalid configuration for user policy
2017-10-18 19:37:29 -02:00
Pedro Igor cedc095a9c [KEYCLOAK-4550] - Test invalid configuration for user policy 2017-10-18 18:42:55 -02:00
Hynek Mlnařík 4c2ddfdf54 Merge pull request #4568 from hmlnarik/KEYCLOAK-5688-Externalizer-for-entities-shared-across-DC
KEYCLOAK-5688 Externalizer for entities shared across dc
2017-10-18 22:19:27 +02:00
Bill Burke 0fb99a0098 Merge pull request #4569 from patriot1burke/master
KEYCLOAK-4328
2017-10-18 10:49:52 -04:00
Hynek Mlnarik 6d18ba4b32 KEYCLOAK-5688 Add externalizers for session entities
and remove unused events
2017-10-18 16:04:57 +02:00
Bill Burke 649bca7618 KEYCLOAK-4328 2017-10-18 09:37:17 -04:00
Hynek Mlnarik d01be82b35 KEYCLOAK-5700 Add option to build jarless Wildfly distro
Use via the following maven command:

mvn clean install -Pdistribution -Dkeycloak.provisioning.xml=server-provisioning-devel.xml
2017-10-18 15:14:58 +02:00
Thomas Darimont 3103e0fd0a KEYCLOAK-5244 Add BlacklistPasswordPolicyProvider (#4370)
* KEYCLOAK-5244 Add BlacklistPasswordPolicyProvider

This introduces a new PasswordPolicy which can refer to
a named predefined password-blacklist to avoid users
choosing too easy to guess passwords.

The BlacklistPasswordPolicyProvider supports built-in as
well as custom blacklists.
built-in blacklists use the form `default/filename`
and custom ones `custom/filename`, where filename
is the name of the found blacklist-filename.

I'd propose to use some of the freely available password blacklists
from the [SecLists](https://github.com/danielmiessler/SecLists/tree/master/Passwords) project.

For testing purposes one can download the password blacklist
```
wget -O 10_million_password_list_top_1000000.txt https://github.com/danielmiessler/SecLists/blob/master/Passwords/10_million_password_list_top_1000000.txt?raw=true
```
to /data/keycloak/blacklists/

Custom password policies can be configured with the SPI
configuration mechanism via jboss-cli:
```
/subsystem=keycloak-server/spi=password-policy:add()
/subsystem=keycloak-server/spi=password-policy/provider=passwordBlacklist:add(enabled=true)
/subsystem=keycloak-server/spi=password-policy/provider=passwordBlacklist:write-attribute(name=properties.blacklistsFolderUri, value=file:///data/keycloak/blacklists/)
```

Password blacklist is stored in a TreeSet.

* KEYCLOAK-5244 Encode PasswordBlacklist as a BloomFilter

We now use a dynamically sized BloomFilter with a
false positive probability of 1% as a backing store
for PasswordBlacklists.

BloomFilter implementation is provided by google-guava
which is available in wildfly.

Password blacklist files are now resolved against
the ${jboss.server.data.dir}/password-blacklists.

This can be overridden via system property, or SPI config.
See JavaDoc of BlacklistPasswordPolicyProviderFactory for details.

Revised implementation to be more extensible, e.g. it could be
possible to use other stores like databases etc.

Moved FileSystem specific methods to FileBasesPasswordBlacklistPolicy.

The PasswordBlacklistProvider uses the guava version 20.0
shipped with wildfly. Unfortunately the arquillian testsuite
transitively depends on guava 23.0 via the selenium-3.5.1
dependency. Hence we need to use version 23.0 for tests but 20.0
for the policy provider to avoid NoClassDefFoundErrors in the
server-dist.

Configure password blacklist folder for tests

* KEYCLOAK-5244 Configure jboss.server.data.dir for test servers

* KEYCLOAK-5244 Translate blacklisted message in base/login
2017-10-17 20:41:44 +02:00
Hynek Mlnařík fe76b2428b Merge pull request #4563 from hmlnarik/KEYCLOAK-5656-Transport-factory-should-not-limit-to-a-single-DC-3
KEYCLOAK-5656 Use standard infinispan remote-store
2017-10-17 09:39:01 +02:00
Pavel Drozd 2a818947c2 Merge pull request #4565 from vramik/KEYCLOAK-5674
KEYCLOAK-5674 updated migration scripts
2017-10-17 08:23:16 +02:00
Pavel Drozd 83b4279ce1 Merge pull request #4555 from vramik/KEYCLOAK-5673
KEYCLOAK-5673 add support for testing config from prod 2.5.x
2017-10-17 07:43:40 +02:00
Pavel Drozd 9c16a58d52 Merge pull request #4554 from vramik/KEYCLOAK-5672
KEYCLOAK-5672 rewrite server-config-migration module to use offline mode
2017-10-17 07:42:29 +02:00
vramik cb2bd0fe1a KEYCLOAK-5672 rewrite server-config-migration module to use offline mode 2017-10-16 22:51:59 +02:00
vramik a42e0d6a31 KEYCLOAK-5674 updated migration scripts 2017-10-16 22:36:40 +02:00
Hynek Mlnarik 056ba75a72 KEYCLOAK-5656 Use standard infinispan remote-store 2017-10-16 21:49:42 +02:00
Bruno Oliveira da Silva b6ab2852c2 Remove unused imports (#4558) 2017-10-16 14:23:42 +02:00
Bruno Oliveira da Silva 9cbc335b68 Update the readme with a reference on how to report vulnerabilities (#4541) 2017-10-16 12:27:11 +02:00
Gabriel Lavoie e2f5ac60cf KEYCLOAK-5499: Use authentication token type rather than token source detection to identify interactive and non-interactive authentications. (#4488)
- access_token URL parameter wasn't interpreted correctly as a non-interactive authentication.
2017-10-16 09:38:05 +02:00
Sjoerd Cranen cb43e3d763 KEYCLOAK-5191 Prevent exception in KeycloakAuthenticationFailureHandler (#4319)
* KEYCLOAK-5191 Don't attempt to send 401 when response is already committed

* KEYCLOAK-5191 Defend against configuration errors by preventing 2xx response after authentication failure
2017-10-16 09:34:58 +02:00
Bill Burke 31dccc9a5e Merge pull request #4509 from TeliaSoneraNorge/KEYCLOAK-5032
KEYCLOAK-5032 Forward request parameters to another IdP
2017-10-13 18:47:05 -04:00
Bill Burke c66ce3a209 Merge pull request #4559 from micedre/KEYCLOAK-4052bis
KEYCLOAK-4052 - add an option to validate Password Policy for ldap user storage
2017-10-13 18:44:57 -04:00
Bill Burke 7c99a8b641 Merge pull request #4562 from patriot1burke/master
KEYCLOAK-5683, KEYCLOAK-5684, KEYCLOAK-5682, KEYCLOAK-5612, KEYCLOAK-5611, KEYCLOAK-5331
2017-10-13 18:43:48 -04:00
Bill Burke 46d3ed7832 Merge remote-tracking branch 'upstream/master' 2017-10-13 17:00:57 -04:00
Bill Burke d9af93850c KEYCLOAK-5683, KEYCLOAK-5684, KEYCLOAK-5682, KEYCLOAK-5612, KEYCLOAK-5611 2017-10-13 16:51:56 -04:00
Cédric Couralet 656fc5d7c0 KEYCLOAK-4052 - add an option to validate Password Policy for ldap user storage 2017-10-13 13:54:50 +02:00
Marek Posolda 1e57f277b8 Merge pull request #4553 from mposolda/master
KEYCLOAK-5371 Fix ConcurrentLoginCrossDCTest.concurrentLoginWithRando…
2017-10-11 14:26:41 +02:00
vramik 4700b69158 KEYCLOAK-5673 add support for testing config from prod 2.5.x 2017-10-11 13:21:01 +02:00
mposolda 1874820008 KEYCLOAK-5371 Fix ConcurrentLoginCrossDCTest.concurrentLoginWithRandomDcFailures 2017-10-11 13:02:55 +02:00
Hynek Mlnařík 5b92b2bfb6 Merge pull request #4551 from mposolda/master
KEYCLOAK-5371 Fix SessionExpirationCrossDCTest, Added ExecutorsProvid…
2017-10-11 12:42:47 +02:00
mposolda 26f11078dc KEYCLOAK-5371 Use managed executors on Wildfly 2017-10-11 11:09:53 +02:00
mposolda f5ff24ccdb KEYCLOAK-5371 Fix SessionExpirationCrossDCTest, Added ExecutorsProvider. Debug support for cache-servers in tests 2017-10-10 22:30:44 +02:00
Stan Silvert a5c1bf1abf Merge pull request #4550 from gaetancollaud/KEYCLOAK-5505
KEYCLOAK-5505 put tabindex in login page
2017-10-10 14:39:09 -04:00
Stan Silvert 1ec2647b25 Merge pull request #4544 from ssilvert/kc4952-header-info-disclosure
KEYCLOAK-4952: Header information disclosure
2017-10-10 12:33:13 -04:00
Gaetan Collaud 06ad4caa1b KEYCLOAK-5505 put tabindex in login page 2017-10-10 16:56:03 +02:00
Bill Burke b0464f1751 Merge remote-tracking branch 'upstream/master' 2017-10-10 09:10:04 -04:00
Bill Burke 5bd4ea30ad rev 2017-10-10 09:09:51 -04:00
Marek Posolda d336667972 Merge pull request #4527 from Hitachi/master
OIDC Financial API Read Only Profile : scope MUST be returned in the response from Token Endpoint
2017-10-10 11:37:45 +02:00
Carl Kristian Eriksen 50dd07217d KEYCLOAK-5032 Forward request parameters to another IdP
Forwarding of prompt and acr_values, if provided in the authorization request.
If prompt is set in the configuration for the identity provider, the configuration overrules the request parameter.
2017-10-09 16:15:27 +02:00
Hynek Mlnařík ab8f4720d6 Merge pull request #4548 from hmlnarik/KEYCLOAK-5656-Transport-factory-should-not-limit-to-a-single-DC-2
KEYCLOAK-5656 Remove remoteServers configuration option
2017-10-09 12:41:21 +02:00
Hynek Mlnarik fe972ce12b KEYCLOAK-5656 Remove remoteServers configuration option 2017-10-09 11:58:28 +02:00
Marek Posolda c6483f8b1e Merge pull request #4523 from abustya/master
KEYCLOAK-5616 Processing of claims parameter
2017-10-09 11:14:23 +02:00
Marek Posolda 12ab553d76 Merge pull request #4540 from hmlnarik/KEYCLOAK-5656-Transport-factory-should-not-limit-to-a-single-DC
KEYCLOAK-5656 Remove KeycloakTcpTransportFactory
2017-10-09 11:02:20 +02:00
Bill Burke c8516c2349 support social external exchange 2017-10-06 16:44:26 -04:00
Stan Silvert 6082e49252 KEYCLOAK-4952: Header information disclosure 2017-10-06 16:04:39 -04:00
Stian Thorgersen 7774d5c6b8 Revert changes in KEYCLOAK-5621 (#4539) 2017-10-06 14:02:34 +02:00
Hynek Mlnarik 6cbfbeca0b KEYCLOAK-5656 Remove KeycloakTcpTransportFactory 2017-10-06 13:20:17 +02:00
Hynek Mlnařík 00ddf03ad3 Merge pull request #4538 from vramik/KEYCLOAK-5586
KEYCLOAK-5586 increase startup timeout for jboss containers
2017-10-06 10:46:49 +02:00
vramik 940715a975 KEYCLOAK-5586 increase startup timeout for jboss containers 2017-10-06 10:06:26 +02:00
Wojciech Trocki a6e852495d Remove bug with login redirect on IOS (#4514)
* Create wrapper for window.open

* Move function to variable
2017-10-06 06:24:07 +02:00
Hynek Mlnařík 34451d159b Merge pull request #4518 from hmlnarik/KEYCLOAK-5576-Performance-testsuite-should-allow-exporting-the-dump-directly-after-data-generation
KEYCLOAK-5576, KEYCLOAK-5577 Performance testsuite adjustments
2017-10-05 20:50:21 +02:00
Hynek Mlnarik 089a9e3321 KEYCLOAK-5577 Allow customization of cpu/memory docker limits 2017-10-05 20:25:28 +02:00
Vlastimil Eliáš c9da02912e KEYCLOAK-2671 - FreeMarker form providers refactored for better (#4533)
extensibility
2017-10-05 13:37:32 +02:00
Pavel Drozd 25dbf1cfac Merge pull request #4536 from vramik/KEYCLOAK-5371
KEYCLOAK-5371 increase default page load timeout to 20s for crossdc
2017-10-05 13:32:48 +02:00
Pavel Drozd 945404be24 Merge pull request #4532 from vmuzikar/fix-twitter-test
KEYCLOAK-5632 Fix Twitter social test
2017-10-05 13:30:02 +02:00
Stian Thorgersen 698483ee17 Missing test (#4537) 2017-10-05 13:27:15 +02:00
vramik a877759d13 KEYCLOAK-5371 increase default page load timeout to 20s for crossdc tests 2017-10-05 10:33:50 +02:00
Hynek Mlnarik c4adf6805a KEYCLOAK-5576 Add export dump flag to performance testsuite pom.xml 2017-10-04 21:04:29 +02:00
Hynek Mlnařík 730a2f7946 Merge pull request #4529 from hmlnarik/KEYCLOAK-5624-Rename-import-data-profile-to-generate-data
KEYCLOAK-5624 Rename import-data to generate-data in performance TS
2017-10-04 20:53:04 +02:00
Stan Silvert 5cde17b38f Merge pull request #4534 from ssilvert/kc4248-revocation-tab
KEYCLOAK-4248: Remove revocation tab for SAML clients.
2017-10-04 14:46:09 -04:00
Stan Silvert 9131e7e73c KEYCLOAK-4248: Remove revocation tab for SAML clients. 2017-10-04 14:03:39 -04:00
Marek Posolda 92941d0838 Merge pull request #4531 from mposolda/crossdc-fix-tests
KEYCLOAK-5371 Fix ActionTokenCrossDCTest and BruteForceCrossDCTest
2017-10-04 15:44:53 +02:00
Vaclav Muzikar eab047c130 KEYCLOAK-5632 Fix Twitter social test 2017-10-04 15:29:28 +02:00
mposolda bca4c35708 KEYCLOAK-5371 Fix ActionTokenCrossDCTest and BruteForceCrossDCTest 2017-10-04 13:25:45 +02:00
Hynek Mlnařík 9aa4c3cf22 Merge pull request #4530 from vramik/KEYCLOAK-5586
KEYCLOAK-5586 crossdc tests on Wildfly using real database
2017-10-04 13:10:08 +02:00
vramik b0a1550df5 KEYCLOAK-5586 crossdc tests on Wildfly using real database 2017-10-04 12:00:18 +02:00
Hynek Mlnarik 89fade7ae4 KEYCLOAK-5624 Rename import-data to generate-data in performance TS 2017-10-04 09:00:05 +02:00
Bartek Andrzejczak 8c7313f290 Renames realmKey to realmPublicKey for consistency (#4526) 2017-10-04 08:29:09 +02:00
Pavel Drozd 8e5db87b50 Merge pull request #4505 from mhajas/KEYCLOAK-5568
KEYCLOAK-5568 Run ConsoleProtection tests only with elytron
2017-10-04 08:02:31 +02:00
Pavel Drozd 98c63bc195 Merge pull request #4502 from mhajas/KEYCLOAK-5555
KEYCLOAK-5555 Use driver from function argument for URL Asserts
2017-10-04 08:00:45 +02:00
Takashi Norimatsu 6f6a467c7b OIDC Financial API Read Only Profile : scope MUST be returned in the
response from Token Endpoint
2017-10-04 12:59:49 +09:00
Herbert Mühlburger f0f7321c38 Fix spelling error in admin message properties (#4525)
* fix spelling error in admin message properties

* fix typo in admin messages
2017-10-03 20:58:17 +02:00
Václav Muzikář da146f13c1 KEYCLOAK-5566 Google IdP doesn't reliably fetch user's full name (#4503) 2017-10-03 20:56:25 +02:00
Marek Posolda 684c8dd0ce Merge pull request #4524 from vramik/KEYCLOAK-5586
KEYCLOAK-5586 Add support for testing cross dc tests on jboss-based c…
2017-10-03 16:49:00 +02:00
Áron Bustya c2ffaa0777 Merge remote-tracking branch 'keycloak/master' 2017-10-03 14:53:40 +02:00
Áron Bustya 632414cc92 process claims parameter
also support parsing from request object
2017-10-03 14:51:46 +02:00
ckEriksen f1593d3fb8 KEYCLOAK-5592 Build on OS-X no longer launches ForkedBooter UI (#4519) 2017-10-03 14:20:22 +02:00
vramik f806d4a5d6 KEYCLOAK-5586 Add support for testing cross dc tests on jboss-based containers 2017-10-03 14:01:45 +02:00
Bruno Oliveira da Silva da72968085 KEYCLOAK-4401: Wrong message when a temporarily disabled user requests password reset (#4506) 2017-10-03 06:28:34 +02:00
Marek Posolda faa5ec5125 Merge pull request #4520 from mposolda/master
KEYCLOAK-5440 RestartLoginCookie field 'cs' not marked ignorable
2017-10-02 20:03:34 +02:00
Bill Burke 00fb767ad1 Merge pull request #4522 from patriot1burke/master
minor change for exchange error message
2017-10-02 12:41:40 -04:00
Bill Burke ef60512e09 change exchange error message 2017-10-02 11:29:59 -04:00
Bill Burke ca6b82856e Merge pull request #4521 from patriot1burke/master
minor console tab fix
2017-10-02 11:03:07 -04:00
Bill Burke 817d6cc8c7 minor ui fix 2017-10-02 11:02:19 -04:00
filipelautert c4cc752e18 Fixing tests for Oracle (#4481) 2017-10-02 14:59:33 +02:00
mposolda 4a7013d550 KEYCLOAK-5440 RestartLoginCookie field 'cs' not marked ignorable 2017-10-02 14:19:27 +02:00
Bruno Oliveira da Silva bb0bccc3c0 [KEYCLOAK-5486] Test email connection feature does not work the second time (#4517) 2017-10-02 13:14:50 +02:00
Marek Posolda b17cbadaf3 Merge pull request #4516 from mposolda/jwe
KEYCLOAK-5570 Added InvalidationCrossDCTest
2017-09-29 20:54:27 +02:00
mposolda 7d641baf4e KEYCLOAK-5570 Added InvalidationCrossDCTest 2017-09-29 19:36:40 +02:00
Marek Posolda 13fe9e7cf8 Merge pull request #4510 from glavoie/KEYCLOAK-3303
KEYCLOAK-3303: Allow reuse of refresh tokens.
2017-09-29 17:07:45 +02:00
Marek Posolda 7fc94b8cad Merge pull request #4515 from mposolda/jwe
JWE,  KEYCLOAK-5007 Used single-use cache for tracke OAuth code.
2017-09-29 17:04:59 +02:00
mposolda 3b6e1f4e93 KEYCLOAK-5007 Used single-use cache for tracke OAuth code. OAuth code changed to be encrypted and signed JWT 2017-09-29 13:20:22 +02:00
mposolda 63673c4328 KEYCLOAK-5569 Added JWE 2017-09-29 13:01:42 +02:00
Gabriel Lavoie 134daeac7f KEYCLOAK-3303: Allow reuse of refresh tokens.
- Configurable max reuse count.
2017-09-28 15:30:40 -04:00
Pedro Igor 4c71e2ec17 [KEYCLOAK-4439] - Changes for Wildfly 11.0.0.CR1 (#4504)
* [KEYCLOAK-4439] - Changes for Wildfly 11.0.0.CR1

* [KEYCLOAK-5463] - Fixing servlet filter when using elytron adapters
2017-09-28 11:46:17 +02:00
Hynek Mlnařík d3c30c30d4 Merge pull request #4499 from pskopek/anyTypeAttribute
[KEYCLOAK-4374] Support SAML 2.0 AttributeValue of type anyType and nil in Assertions
2017-09-28 10:39:27 +02:00
mhajas efb43682a9 KEYCLOAK-5568 Run ConsoleProtection tests only with elytron 2017-09-27 17:45:20 +02:00
pskopek d478cdfda4 [KEYCLOAK-4374] Support SAML 2.0 AttributeValue of AnyType and nil 2017-09-27 17:12:51 +02:00
Marek Posolda d6f202e292 Merge pull request #4485 from tkyjovsk/performance-testing
Performance Testsuite
2017-09-27 15:04:33 +02:00
mhajas 01187901ea KEYCLOAK-5555 Use driver from function argument for URL Asserts 2017-09-27 10:09:46 +02:00
Tomas Kyjovsky f0ce4d4236 Performance Testsuite 2017-09-25 20:06:06 +02:00
Bill Burke fd025ae76b Merge pull request #4209 from guitaro/feature/group-search-and-pagination
[KEYCLOAK-2538] - groups pagination and group search
2017-09-23 20:52:19 -04:00
Bill Burke 9034708c99 Merge pull request #4474 from hmlnarik/KEYCLOAK-5254-NPE-in-SAMLIdentityProvider
KEYCLOAK-5254 Fix NPE - NameID format is optional
2017-09-23 20:39:50 -04:00
Bill Burke 9db6a5e0df Merge pull request #4497 from thomasdarimont/issue/KEYCLOAK-3599-add-script-based-protocol-mapper
KEYCLOAK-3599 Revise Script based OIDC ProtocolMapper
2017-09-23 20:38:51 -04:00
Bill Burke f4b4c75d15 Merge pull request #4496 from patriot1burke/master
KEYCLOAK-5518
2017-09-23 19:14:32 -04:00
Thomas Darimont 57c633967a KEYCLOAK-3599 Revise Script based OIDC ProtocolMapper
We now use the `ScriptingProvider` API instead of
using the `ScriptEngineManager` because dynamic
`ScriptEngineManager` lookups might fail in some
environments like JBoss EAP.

Refactored `AbstractOIDCProtocolMapper` to provide
a new version of the `setClaim(..)` method which takes a
`KeycloakSession` as additional argument.
The old `setClaim(..)` method is marked as deprecated and
should be scheduled for removal in a later release.
To ensure backwards compatibility we call the old `setClaim(..)`
from the new `setClaim(..,keycloakSession)` method in order
to not break user implementations of OIDC ProtocolMappers.

The existing OIDC ProtocolMappers which override the old
`setClaim(..)` method should be updated to use the new version
`setClaim(..,keycloakSession)`.

This was necessary to be able to lookup a `ScriptingProvider`.
2017-09-22 22:57:07 +02:00
Bill Burke 1599e6db6e KEYCLOAK-5518 2017-09-22 16:38:50 -04:00
Bill Burke 537081ec9d Merge pull request #4494 from patriot1burke/master
KEYCLOAK-5516
2017-09-22 16:38:13 -04:00
Bill Burke 3020a04a8b Merge pull request #4490 from Fiercely/master
Keycloak 2035
2017-09-22 16:13:22 -04:00
Bill Burke 7067ad1b07 Merge pull request #4495 from thomasdarimont/issue/KEYCLOAK-3599-add-script-based-protocol-mapper
KEYCLOAK-3599 Add Script based OIDC ProtocolMapper
2017-09-22 16:12:20 -04:00
Bill Burke 790e2dc69f fix compiler bug 2017-09-22 15:43:13 -04:00
Thomas Darimont 236b2b9273 KEYCLOAK-3599 Add Script based OIDC ProtocolMapper 2017-09-22 21:24:20 +02:00
Bill Burke 9d452b4bc3 Merge remote-tracking branch 'upstream/master' 2017-09-22 11:48:41 -04:00
Bill Burke eb4f7f3b21 KEYCLOAK-5516 2017-09-22 11:48:30 -04:00
Antonio Howcroft Ferreira a551195ddf KEYCLOAK-2035 update with feedback from PR by bburke 2017-09-22 15:05:49 +01:00
howcroft e78bf5f876 Keycloak 2035
This PR adds:
* an endpoint to Role that lists users with the Role
* a tab "Users in Role" in Admin console Role page
* it is applicable to Realm and Client Roles
* Extends UserQueryProvider with default methods (throwing Runtime Exception if not overriden)
* Testing in base testsuite and Console
2017-09-22 15:05:49 +01:00
Bill Burke 15ddb2009d Merge pull request #4475 from mstruk/KEYCLOAK-5328
KEYCLOAK-5328 Documentation issue for kcadm.sh set-password command
2017-09-21 21:50:16 -04:00
Bill Burke 8667f5ec02 Merge pull request #4492 from tisoft/KEYCLOAK-5510
KEYCLOAK-5510
2017-09-21 21:46:17 -04:00
Bill Burke 05b0189773 Merge pull request #4493 from patriot1burke/master
KEYCLOAK-910 KEYCLOAK-5455
2017-09-21 21:43:50 -04:00
Bill Burke 8ace0e68c3 KEYCLOAK-910 KEYCLOAK-5455 2017-09-21 17:15:18 -04:00
Markus Heberling 79c51a6a80 KEYCLOAK-5510
Allow import of groups with missing subgroups.
2017-09-21 13:11:49 +02:00
Bill Burke ab58052a4c Merge pull request #4482 from patriot1burke/master
KEYCLOAK-5491 KEYCLOAK-5492 KEYCLOAK-5490
2017-09-19 14:01:40 -04:00
Stan Silvert 7124d93a24 Merge pull request #4487 from ssilvert/kc1250-big-commit
KEYCLOAK-5502: Fix install of node and yarn for account2 profile.
2017-09-19 10:39:38 -04:00
Pavel Drozd c67a1d0469 Merge pull request #4483 from vmuzikar/KEYCLOAK-5495
KEYCLOAK-5495 Update Arquillian Drone to 2.4.2
2017-09-19 16:34:16 +02:00
Stan Silvert 9d66d55ac1 KEYCLOAK-5502: Fix install of node and yarn for account2 profile. 2017-09-19 09:53:22 -04:00
Stan Silvert 657c68475d Merge pull request #4486 from ssilvert/kc1250-big-commit
KEYCLOAK-1250: Initial commit for new account mgt.
2017-09-18 16:51:18 -04:00
Marek Posolda ad6e45bf22 Merge pull request #4484 from mposolda/master
KEYCLOAK-5480 Cross-DC setup: Remote cache stores are connecting to infinispan servers in both datacenters
2017-09-18 21:53:42 +02:00
Stan Silvert c8a4fc2c57 KEYCLOAK-1250: Initial commit for new account mgt. 2017-09-18 15:32:43 -04:00
Marko Strukelj 87cad0d84b KEYCLOAK-5328 Documentation issue for kcadm.sh set-password command 2017-09-18 20:01:31 +02:00
mposolda 18031e2ed3 KEYCLOAK-5498 Update infinispan version to 8.2.8.Final to align with version in Wildfly 2017-09-18 18:05:35 +02:00
mposolda ca92bcbf7f KEYCLOAK-5480 Cross-DC setup: Remote cache stores are connecting to Infinispan servers in both datacenters 2017-09-18 18:04:04 +02:00
Marek Posolda fa35249afd Merge pull request #4480 from TeliaSoneraNorge/KEYCLOAK-5494
Fix introspection error for pairwise access tokens
2017-09-18 16:44:24 +02:00
Pedro Igor e8ef050093 Merge pull request #4471 from pedroigor/KEYCLOAK-5095
[KEYCLOAK-5095] - RPT should contain the RS as audience
2017-09-18 09:32:47 -03:00
Martin Hardselius 6b687c4318 Fix offline validation errors
Refactored token validation method to run user checks only if the user
session is valid.
2017-09-18 11:26:57 +02:00
Vaclav Muzikar b4aae198fc KEYCLOAK-5495 Update Arquillian Drone to 2.4.2 2017-09-18 09:52:45 +02:00
Bill Burke 2276279434 fix 2017-09-15 17:46:42 -04:00
Bill Burke 5a22b360f1 resolve conflicts 2017-09-15 16:37:35 -04:00
Bill Burke f927ee7b4e KEYCLOAK-5491 KEYCLOAK-5492 2017-09-15 16:30:45 -04:00
Pavel Drozd 21238ec35c Merge pull request #4472 from mhajas/KEYCLOAK-5286
KEYCLOAK-5286 Add test for failing scenario
2017-09-15 13:38:28 +02:00
Pavel Drozd 42bb09fa31 Merge pull request #4463 from vmuzikar/fix-socialtests
KEYCLOAK-5437 Fix Facebook social login test
2017-09-15 13:37:16 +02:00
Pavel Drozd 34b8c58c0f Merge pull request #4459 from mhajas/KEYCLOAK-5320
KEYCLOAK-5320 Configure SSL using creaper
2017-09-15 13:35:14 +02:00
Bill Burke 3e6adbc904 KEYCLOAK-5490 (#4477) 2017-09-15 11:36:48 +02:00
Martin Hardselius a4315f4076 Fix introspection error for pairwise access tokens
When access tokens containing a pairwise sub are introspected, user
related checks are using that sub to fetch the UserModel instead of
fetching the user from the UserSession. No corresponding user is found
(or possibly even another user) and the token is reported inactive.

Resolves: KEYCLOAK-5494
2017-09-15 10:31:47 +02:00
Oguz Kilcan 6ec5264f20 KEYCLOAK-5416 Migration from 3.2.1 to 3.3.0 doesn't work on MSSQL due to constraint violation (#4461) 2017-09-15 09:56:22 +02:00
Stian Thorgersen a6b9e5604c Fix Tomcat 6 issues (#4478)
* Fix Tomcat test failures due to dependency conflicts

* Added proxy and tomcat6 to old tests to run on Travis
2017-09-15 09:55:42 +02:00
Bill Burke c999a0d8f9 Merge remote-tracking branch 'upstream/master' 2017-09-14 21:17:12 -04:00
Bill Burke affeadf4f3 KEYCLOAK-5490 2017-09-14 21:16:50 -04:00
Stan Silvert c597123d1a Merge pull request #4476 from stianst/ACCOUNT32
KEYCLOAK-1250 Profile and console loader for new account management c…
2017-09-14 15:55:27 -04:00
Stian Thorgersen ee35673615 KEYCLOAK-1250 Profile and console loader for new account management console 2017-09-14 19:53:02 +02:00
Hynek Mlnarik 9098105a64 KEYCLOAK-5254 Fix NPE - NameID format is optional 2017-09-14 14:59:05 +02:00
Marek Posolda 685acb786a Merge pull request #4470 from pkadej/KEYCLOAK-5453
KEYCLOAK-5453 - Empty RDNs makes Keycloak unstable
2017-09-13 22:54:05 +02:00
Levente NAGY d18aa44fb4 Merge branch 'feature/group-search-and-pagination' of https://github.com/guitaro/keycloak into feature/group-search-and-pagination 2017-09-13 16:48:24 +02:00
Levente NAGY e907da77d7 KEYCLOAK 2538 - UI group pagination - Remove junit mocked TUs, add arquillian Tests, delete mockito from poms, fix groups sorting when get result from cache 2017-09-13 16:45:45 +02:00
Stan Silvert 56e0a52197 Merge pull request #4436 from tuxetuxe/master
Do not show empty page size selectors in events lists
2017-09-13 10:22:56 -04:00
Pedro Igor 8b2d47dd71 [KEYCLOAK-5095] - Adding tests 2017-09-13 10:37:52 -03:00
Léventé NAGY 503ce3a47f Merge branch 'master' into feature/group-search-and-pagination 2017-09-13 10:27:38 +02:00
mhajas 867bb20339 KEYCLOAK-5286 Add test for failing scenario 2017-09-13 09:59:40 +02:00
Hisanobu Okuda b7af96aa4d KEYCLOAK-5315 Conditional OTP enforcement does not work (#4399) 2017-09-13 06:58:59 +02:00
Martin Kanis 550e5f752a KEYCLOAK-5146 TokenEndpoint returns wrong methods for preflight requests (#4455) 2017-09-13 06:23:11 +02:00
Pedro Igor cdb3c159c5 [KEYCLOAK-5095] - RPT should contain the RS as audience 2017-09-12 16:59:20 -03:00
Pedro Igor 90db6654d3 Merge pull request #4451 from glavoie/KEYCLOAK-4858-ResourceServer
KEYCLOAK-4858: Slow query performance for client with large data volume
2017-09-12 15:54:16 -03:00
Levente NAGY c8c88dd58c KEYCLOAK 2538 - UI group pagination - TU + some code improvement + add mockito dependency 2017-09-12 15:09:08 +02:00
Przemyslaw Kadej 5b1a761b0f KEYCLOAK-5453 - Empty RDNs makes Keycloak unstable 2017-09-12 13:28:35 +02:00
Petter Lysne 7f8b5e032a feat: added PayPal IDP (#4449) 2017-09-12 11:57:59 +02:00
Levente NAGY db56d82dbd KEYCLOAK 2538 - UI group pagination - fix duplicate result for search + sort result 2017-09-12 11:45:37 +02:00
Marek Posolda a485d7be53 Merge pull request #4447 from filipelautert/ldap-searchbyattributes
KEYCLOAK-5381 Implementation of method LDAPsearchForUSerByAttribute
2017-09-12 11:29:11 +02:00
Marek Posolda 2a1f40d487 Merge pull request #4408 from MarkSchmitt/master
KEYCLOAK-5322: Rewrote delete statement to scale better
2017-09-12 11:14:08 +02:00
Marek Posolda d636bc2616 Merge pull request #4468 from hmlnarik/KEYCLOAK-4899-Optimize-client-session-writes
KEYCLOAK-4899 Replace updates to user session with temporary auth ses…
2017-09-12 10:42:38 +02:00
jtyrrell-se-jboss 9673ce5541 Update OAuthRequestAuthenticator.java (#4427)
Removed a check for a 400 error, I was seeing a 403 error, and it wasn't until I rewrote the code to be like what is in line 334 I did not see enough meaningful information to figure out I had a /etc/hosts issue, where I had it locally on my machine, but the remote tomcat instance needed it also.
2017-09-12 08:24:36 +02:00
Bill Burke cea88bd67f Merge pull request #4462 from muehlburger/master
fix some typos
2017-09-11 18:52:40 -04:00
Bill Burke 2cadf0a260 Merge pull request #4454 from sebastienblanc/KEYCLOAK-3473
KEYCLOAK-3473 : add new flag to determine if error response must be sent or not
2017-09-11 18:52:07 -04:00
Bill Burke 9c48da2a78 Merge pull request #4417 from mgmeiner/master
KEYCLOAK-5329 async support for tomcat7 and tomcat8
2017-09-11 18:51:20 -04:00
Bill Burke 1a74288413 Merge pull request #4458 from vramik/KEYCLOAK-5405
KEYCLOAK-5405 add synchronization of the persistence context when cre…
2017-09-11 18:49:33 -04:00
Bill Burke feeac52621 Merge pull request #4467 from siepkes/master
KEYCLOAK-5446 Clarify request URI mismatch error message in SAML adapter.
2017-09-11 18:48:14 -04:00
Bill Burke 2637a9ccd4 Merge pull request #4464 from patriot1burke/master
KEYCLOAK-5439
2017-09-11 18:46:14 -04:00
Bill Burke e907a9aa6d put back elytron and resteasy providers 2017-09-11 17:21:30 -04:00
Hynek Mlnarik 24e9cbb292 KEYCLOAK-4899 Replace updates to user session with temporary auth session 2017-09-11 21:43:49 +02:00
Jasper Siepkes 458c2f2682 Clarify request URI mismatch error message in SAML adapter.
Show expected URI and received URI in error message. Also makes the logging behavior of 'handleSamlResponse' the same as 'handleSamlRequest' since that method already shows the expected and received URI.
2017-09-11 19:52:49 +02:00
Gabriel Lavoie bf184e8599 KEYCLOAK-4858: ResourceServer PK change to CLIENT_ID.
- MSSQL needs the index to be dropped before the column.
- Different UPDATE statement format to support MSSQL.
2017-09-11 13:50:58 -04:00
Bill Burke cf47d49fc6 add back multipart provider 2017-09-11 09:47:56 -04:00
Herbert Mühlburger 15949fcb02 correct typo in example SecretQuestionAuthenticator 2017-09-11 13:13:47 +02:00
Pavel Drozd 9032889c15 Merge pull request #4465 from vramik/KEYCLOAK-4793
KEYCLOAK-4793 add kie.maven.settings.custom property to tests
2017-09-11 11:55:13 +02:00
vramik a33007afb6 KEYCLOAK-4793 add kie.maven.settings.custom property to tests 2017-09-11 11:15:38 +02:00
Bill Burke 1ed5730769 add back multipart, remove elytron 2017-09-08 14:47:37 -04:00
Bill Burke 9f660b48c4 KEYCLOAK-5439 2017-09-08 11:28:12 -04:00
Vaclav Muzikar 473aefacec KEYCLOAK-5437 Fix Facebook social login test 2017-09-08 15:44:15 +02:00
mhajas 330cb022eb KEYCLOAK-5320 Configure SSL using creaper 2017-09-08 13:19:48 +02:00
Levente NAGY 2c24b39268 KEYCLOAK 2538 - UI group pagination 2017-09-07 19:39:06 +02:00
Herbert Mühlburger 352bc6b94b fix typo in name 2017-09-07 17:38:43 +02:00
fmugrau 998262177f KEYCLOAK-5422: Rewrote statement to scale better 2017-09-07 10:17:22 +02:00
vramik 0a5de1239f KEYCLOAK-5414 fix AccountRestServiceTest on undertow (#4460) 2017-09-07 09:30:20 +02:00
Pedro Igor f10891b662 [KEYCLOAK-4858] - Migration configuration for resource server pk changes 2017-09-06 11:28:58 -03:00
Gabriel Lavoie c1664478d9 KEYCLOAK-4858: Slow query performance for client with large data volume
- Changing RESOURCE_SERVER PK to the client ID.
- Changing FK on children of RESOURCE_SERVER.
- Use direct fetch of ResourceServer through ID/PK to avoid a lot of implicit Hibernate flush.
2017-09-06 09:55:53 -03:00
Stan Silvert 1fb8846a7a KEYCLOAK-5391: Add node_modules back to repository for commons theme (#4457) 2017-09-05 14:27:19 -04:00
Pedro Igor c8eeeffdeb Merge pull request #4456 from pedroigor/master
[KEYCLOAK-5389] - Invalidating ResourceStore.findByUri cache when creating new resources
2017-09-05 14:35:59 -03:00
Pedro Igor 9ed5fc5595 [KEYCLOAK-5389] - Invalidating ResourceStore.findByUri cache when creating new resources 2017-09-05 11:45:51 -03:00
sebastienblanc aaac85e541 add new flag to determine if error response must be sent or not 2017-09-05 15:08:17 +02:00
vramik 37479a9afe KEYCLOAK-5405 add synchronization of the persistence context when creating a group 2017-09-05 14:34:43 +02:00
Marek Posolda ff354f6edc Merge pull request #4453 from mposolda/master
KEYCLOAK-5248 auth_time is not updated when reauthentication is requested with login=prompt
2017-09-05 13:52:37 +02:00
mposolda fe43c26829 KEYCLOAK-5248 auth_time is not updated when reauthentication is requested with 'login=prompt' 2017-09-05 12:22:30 +02:00
mposolda 30d8a7503b KEYCLOAK-5326 Test that userSession is still the same after prompt=login 2017-09-05 12:22:30 +02:00
Pedro Igor bb9a1335ec Merge pull request #4450 from pedroigor/master
[KEYCLOAK-4653] - Identity.hasClientRole(String) and Identity.hasRole(String) break role namespaces and should be removed
2017-09-04 14:22:51 -03:00
Pedro Igor fa6d5f0ee2 [KEYCLOAK-4653] - Identity.hasClientRole(String) and Identity.hasRole(String) break role namespaces and should be removed 2017-09-01 16:08:34 -03:00
vramik d62164f6f0 KEYCLOAK-5385 add not null constraint for user_entity.not_before (#4446) 2017-09-01 08:57:50 +02:00
filipe lautert f1628ab903 KEYCLOAK-5381 Implementation of method LDAPStorageProvider.searchForUserByUserAttribute and tests for it. 2017-08-31 16:13:03 -03:00
Pavel Drozd d2d5329f15 Merge pull request #4438 from vramik/was
KEYCLOAK-5243 was - update link to repository in README.md
2017-08-31 08:04:44 +02:00
Pavel Drozd 8c69306f2b Merge pull request #4434 from mhajas/KEYCLOAK-5311
KEYCLOAK-5311 Distinguish between kie repo and local repo
2017-08-31 08:04:01 +02:00
filipelautert e055589448 [KEYCLOAK-4778] Fix for Oracle null value when having an empty String as attribute value (#4406)
* Add client.name as a second parameter to the title expressions in login template

* Fixing tooltip.

* pt_BR localization for admin screens.

* Reverting login.ftl

* Added all tooltip messages - even the ones not translated.
Translated around 150 messages todas.

* More translations.

* Fixing wrong edit.

* [KEYCLOAK-4778] Null check on Attribute value. This value can be null when retrieved from an Oracle database.

* [KEYCLOAK-4778] Create unit tests for empty and null values.

* [KEYCLOAK-4778] Move empty and null attributes tests to a separated test method; change tests to empty or null Strings.

* [KEYCLOAK-4778] Check if value is null and set it as empty array. In the former code if null was received it would generate an array with 1 string element ["null"]. Also if we set value as null instead of ArrayList, later when the rest call is executed it will generate the same incorrect array again.

* [KEYCLOAK-4778] Tests clean up.
2017-08-31 06:09:41 +02:00
Wim Vandenhaute 924b4f651a KEYCLOAK-5186 createUser: set federationLink (#4316) 2017-08-31 06:07:43 +02:00
Hynek Mlnařík e36b94d905 KEYCLOAK-5318 Verify signature on raw query parameters (#4445) 2017-08-31 05:46:26 +02:00
Pedro Igor 7191048f91 Merge pull request #4444 from pedroigor/master
Moving and renaming HAL integration test
2017-08-30 17:23:54 -03:00
Pedro Igor b6ba6efe48 Moving and renaming HAL integration test 2017-08-30 09:52:04 -03:00
vramik 0570e6e218 KEYCLOAK-5354 update READMEs (#4443) 2017-08-30 11:55:52 +02:00
vramik 8bfab22417 KEYCLOAK-5049 add explicit removal of groups (#4416) 2017-08-30 08:16:00 +02:00
Stian Thorgersen d3dc26181e KEYCLOAK-3481 (#4441) 2017-08-30 08:00:22 +02:00
Stian Thorgersen 433a8dd2e3 KEYCLOAK-5354 (#4440) 2017-08-30 07:59:47 +02:00
vramik 801205a5bc KEYCLOAK-5123 rename integration to integration-deprecated 2017-08-30 05:21:30 +02:00
Stian Thorgersen dcfa4aca8c KEYCLOAK-943 Started account rest service. Profile and sessions completed. (#4439) 2017-08-29 20:12:09 +02:00
vramik a1247f8f92 was - update link to repository in README.md 2017-08-29 12:25:54 +02:00
Luis Santos 944332a84a Do not show empty page size selectors in events lists 2017-08-29 11:30:53 +03:00
Stian Thorgersen 463661b051 Set version to 3.4.0.CR1-SNAPSHOT 2017-08-28 15:46:22 +02:00
Hynek Mlnařík 0caf93dfd9 KEYCLOAK-5336 Count on IPv6 address in tests (#4433) 2017-08-28 15:39:44 +02:00
Hynek Mlnařík 4baa838e3d KEYCLOAK-5343 Fix for guava version in adapters (#4432) 2017-08-28 15:39:20 +02:00
mhajas e38dfff213 KEYCLOAK-5311 Distinguish between kie repo and local repo 2017-08-28 14:53:48 +02:00
Stian Thorgersen 8cc1d02d46 KEYCLOAK-5342 (#4431) 2017-08-28 14:35:58 +02:00
Hynek Mlnarik 794c508b10 KEYCLOAK-4995 Support for distributed SAML logout in cross DC 2017-08-28 13:15:11 +02:00
Hynek Mlnarik 3f8083e34c KEYCLOAK-5302 Set infinispan version to the last compatible with WF 10 2017-08-28 13:15:11 +02:00
Hynek Mlnarik a2ccf4efa3 KEYCLOAK-5300 Fix Wildfly 10 SAML cluster tests 2017-08-28 13:15:11 +02:00
Stian Thorgersen 31be564fa3 KEYCLOAK-5339 Upgrade to WildFly 11 CR1 (#4429) 2017-08-28 12:06:37 +02:00
Pavel Drozd 53fe96db78 Merge pull request #4403 from mhajas/KEYCLOAK-5313
KEYCLOAK-5313 Assume preview profile for InstallationTests
2017-08-28 10:28:13 +02:00
Pavel Drozd 29df73df4c Merge pull request #4430 from pdrozd/KEYCLOAK-5340
KEYCLOAK-5340 - Testsuite compilation error - waitForPageToLoad witho…
2017-08-28 09:59:36 +02:00
Pavel Drozd a76e4434fa KEYCLOAK-5340 - Testsuite compilation error - waitForPageToLoad without driver param 2017-08-28 09:14:45 +02:00
Pavel Drozd e3a61c580e Merge pull request #4414 from vmuzikar/KEYCLOAK-5229-dep-update
KEYCLOAK-5229 Update testsuite dependencies
2017-08-28 08:07:25 +02:00
Hynek Mlnařík 9ee8f72be9 \KEYCLOAK-5335 Destination attr in SAML requests is optional (#4424) 2017-08-28 08:06:48 +02:00
Hynek Mlnařík 23560d9e41 KEYCLOAK-5235 Fix JPA update script for MariaDB (#4423) 2017-08-28 08:05:49 +02:00
Bruno Oliveira da Silva 859cd30c3a Include frame-ancestors for CSP 2 (#4413)
Signed-off-by: Bruno Oliveira <bruno@abstractj.org>
2017-08-28 06:46:03 +02:00
Pedro Igor 36c5490250 Merge pull request #4426 from pedroigor/master
[KEYCLOAK-5323] - Fixing filter when searching/selecting clients
2017-08-25 17:07:38 -03:00
Marek Posolda 34648c6f0c Merge pull request #4425 from mposolda/cross-dc-wildfly
KEYCLOAK-5294 Updated README for cross-dc setup on Wildfly
2017-08-25 21:27:51 +02:00
Pedro Igor 9a7d56097a [KEYCLOAK-5323] - Fixing filter when searching/selecting clients 2017-08-25 14:06:28 -03:00
mposolda 05c8c74c96 KEYCLOAK-5294 Updated README for cross-dc setup on Wildfly 2017-08-25 17:53:45 +02:00
Pavel Drozd 9b858907ec Merge pull request #4402 from mhajas/KEYCLOAK-5312
KEYCLOAK-5312 Add preview profile assumption to authz tests
2017-08-25 11:25:00 +02:00
Stian Thorgersen d58c6ad4e0 [KEYCLOAK-4900] Pass login_hint parameter to idp & review (#4421) 2017-08-25 10:14:38 +02:00
w9n e173bf33ba auth is already part of the serverBaseUri (#4418) 2017-08-25 08:16:01 +02:00
John Ament 30ea556a7a KEYCLOAK-5285: Adding protected access. (#4405)
Allows FreemarkerEmailTemplateProvider to be more extensible.
2017-08-25 07:30:26 +02:00
Bill Burke 5484e088aa Merge pull request #4420 from patriot1burke/master
token exchange for idp
2017-08-24 20:26:18 -04:00
Bill Burke 83bb2ce06b hopefully fix test 2017-08-24 19:38:07 -04:00
Bill Burke 155d7fddd7 Merge remote-tracking branch 'upstream/master' 2017-08-24 18:21:15 -04:00
Bill Burke 9d35806538 whoops 2017-08-24 16:13:45 -04:00
Marek Posolda 1103b1eb40 Merge pull request #4419 from mposolda/cross-dc-wildfly
KEYCLOAK-5294 Cross-dc working on Wildfly
2017-08-24 21:41:16 +02:00
Bill Burke 6696c44dc0 Merge remote-tracking branch 'upstream/master' 2017-08-24 15:19:48 -04:00
Bill Burke 7a57723c01 more token exchange 2017-08-24 15:19:38 -04:00
mposolda 43ce466aa6 KEYCLOAK-5294 Cross-dc working on Wildfly 2017-08-24 18:03:01 +02:00
WITT-AD\Micgme 0a82a6b434 KEYCLOAK-5329 abstracted AuthenticatedActionsValve to allow async support for Tomcat7 and Tomcat8 adapter 2017-08-24 15:54:43 +02:00
mhajas 8bb473147c KEYCLOAK-5312 Add preview profile assumption 2017-08-24 11:45:09 +02:00
mhajas 543f61048f KEYCLOAK-5313 Assume preview profile for Authz test 2017-08-24 10:20:27 +02:00
Pavel Drozd b7c9c397d6 Merge pull request #4412 from mhajas/KEYCLOAK-4393
KEYCLOAK-4393 Remove forgotten class
2017-08-24 09:07:02 +02:00
Pedro Igor a58aca1a80 Merge pull request #4415 from pedroigor/master
[KEYCLOAK-4639][KEYCLOAK-4915] - Fixes to AuthZ Services
2017-08-23 16:56:54 -03:00
Pedro Igor 16305418f0 [KEYCLOAK-4915] - Unable to update resource permission without changing applied policies 2017-08-23 15:13:24 -03:00
Pedro Igor 3ff38e22cf [KEYCLOAK-4639] - Invalidating resource query by owner cache 2017-08-23 15:11:48 -03:00
Pedro Igor b4530cfbe9 fixing policy enforcer /* 2017-08-23 13:30:24 -03:00
Stan Silvert 245f6c0c84 KEYCLOAK-5232: 'undefined' in allowed protocol mappers field (#4398) 2017-08-23 09:56:28 -04:00
Stan Silvert 010dd5709c KEYCLOAK-5286: js error on save in client/mappers/details screen (#4409) 2017-08-23 09:55:49 -04:00
Stan Silvert eb5a5023c6 KEYCLOAK-5266: Component numberOfPages in clients view is missing (#4411) 2017-08-23 09:55:19 -04:00
Vaclav Muzikar da9a88c45c KEYCLOAK-5229 Update testsuite dependencies 2017-08-23 15:36:29 +02:00
Pedro Igor 8e5752c9db Merge pull request #4388 from pedroigor/KEYCLOAK-5015-elytron-adapter
[KEYCLOAK-5015] - Updating Elytron Adapters
2017-08-23 08:55:25 -03:00
mhajas 44efe24bf0 KEYCLOAK-4393 Remove forgotten class 2017-08-23 12:34:19 +02:00
Marek Posolda 5ec178acfc Merge pull request #4410 from mposolda/user-not-before
KEYCLOAK-5293 Add notBefore to user
2017-08-23 09:49:10 +02:00
mposolda fe5891fbdb KEYCLOAK-5293 Add notBefore to user 2017-08-23 08:58:26 +02:00
Pedro Igor 287a86938e [KEYCLOAK-5015] - HAL integration tests 2017-08-22 18:01:19 -03:00
Pedro Igor d5ae6bf77a [KEYCLOAK-5015] - Updating arquillian-wildfly to 2.1.0.Beta1 2017-08-22 18:01:19 -03:00
Pedro Igor a6dfb4ccdd [KEYCLOAK-5015] - Support for Elytron capabilities in subsystem 2017-08-22 18:01:19 -03:00
Pedro Igor d3e559453b [KEYCLOAK-5015] - Updating Elytron Adapters 2017-08-22 18:01:19 -03:00
mark.schmitt 6a28971218 KEYCLOAK-5322: Rewrote delete statement to scale better 2017-08-22 13:15:09 +00:00
Pavel Drozd 8d3384666a Merge pull request #4401 from mhajas/KEYCLOAK-5265
KEYCLOAK-5265 Set localization tests to community profile only
2017-08-22 09:01:33 +02:00
Pavel Drozd 2ae812420d Merge pull request #4396 from mhajas/KEYCLOAK-5311
KEYCLOAK-5311 Fix authorization tests
2017-08-22 09:00:23 +02:00
Pavel Drozd bb10dc8c02 Merge pull request #4395 from mhajas/KEYCLOAK-4393
KEYCLOAK-4393 Remove example tests
2017-08-22 08:59:20 +02:00
Markus Heberling ef32585f57 create JS source maps (#4365)
updated minify plugin to 1.7.6
switch minify plugin to use CLOSURE compiler
enable source map generation https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k
include source maps in distribution files
2017-08-22 08:10:09 +02:00
Stian Thorgersen 20ac70d3fd KEYCLOAK-5119 (#4400) 2017-08-22 08:07:36 +02:00
Stian Thorgersen b5ed8961f7 Add title attribute for iframe to suppress accessibility errors (#4407) 2017-08-22 08:07:04 +02:00
John Ament 5b179420fd KEYCLOAK-5274: Check that authenticator config id is null before attempting to fetch it. (#4404) 2017-08-22 06:57:49 +02:00
mhajas 7f7c0bac1e KEYCLOAK-5265 Set localization tests to community profile only 2017-08-21 13:10:45 +02:00
Marek Posolda 83d3dfbc54 Merge pull request #4397 from mposolda/master
KEYCLOAK-5260 kc_idp_hint was only working first time
2017-08-18 11:40:19 +02:00
mposolda a6a6a62dc0 KEYCLOAK-5260 kc_idp_hint was only working first time 2017-08-18 11:09:17 +02:00
mhajas d58499acfb KEYCLOAK-5311 Fix authorization tests 2017-08-18 09:22:50 +02:00
mhajas 0c21b8c3a6 KEYCLOAK-4393 Remove example tests 2017-08-18 09:11:53 +02:00
Stian Thorgersen efd44d86c5 KEYCLOAK-5263 (#4393) 2017-08-17 14:40:29 +02:00
Stian Thorgersen ae54dd848d KEYCLOAK-5185 (#4392) 2017-08-17 13:15:41 +02:00
Edwin de Jong 5f97f23c12 KEYCLOAK-5307 Dutch locale (#4340)
- Thanks to Jacob van Lingen to provide the initial translation for
login messages
2017-08-17 11:26:41 +02:00
Marek Posolda 1084170b52 Merge pull request #4391 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4634 Cross-dc support for UserLoginFailures
2017-08-17 11:01:02 +02:00
mposolda 089514d8a6 KEYCLOAK-4634 Cross-dc support for UserLoginFailures 2017-08-17 10:22:12 +02:00
Stian Thorgersen 6119572934 KEYCLOAK-5282 (#4389) 2017-08-17 09:22:23 +02:00
Stian Thorgersen 31f82243fc KEYCLOAK-5281 (#4390) 2017-08-17 08:47:25 +02:00
Stian Thorgersen 672dd295f5 KEYCLOAK-5297 Update to WildFLy 11 Beta1 (#4387) 2017-08-15 11:55:01 +02:00
Marek Posolda f97ca7c531 Merge pull request #4385 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-3298 Bit more perf improvement for bulk removal of sessions
2017-08-14 16:46:30 +02:00
mposolda fc777e166c KEYCLOAK-3298 Bit more perf improvement for bulk removal of sessions 2017-08-14 16:17:59 +02:00
Marek Posolda a80808c5c9 Merge pull request #4384 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4187 SessionExpirationCrossDCTest - added tests for user log…
2017-08-14 11:45:09 +02:00
mposolda c4bb29b4bb KEYCLOAK-4187 SessionExpirationCrossDCTest - added tests for user logout and removal 2017-08-14 11:19:07 +02:00
Marek Posolda 1e4958774f Merge pull request #4383 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4630 Testing that refresh with offline token works
2017-08-14 08:27:31 +02:00
Bill Burke 61ab6d5b8b Merge pull request #4303 from jmcshane/master
KEYCLOAK-5173 Spring Boot KeycloakRestTemplate support
2017-08-13 12:22:45 -04:00
mposolda 3aae4d22f6 KEYCLOAK-4630 Testing that refresh with offline token works 2017-08-11 19:37:25 +02:00
Marek Posolda 6ff118e95c Merge pull request #4382 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4630 Improve preloading sessions at startup. Added SessionsPreloadCrossDCTest
2017-08-11 19:17:29 +02:00
Bill Burke 28af722a85 Merge pull request #4381 from patriot1burke/master
deleteGroupPermissions still broken
2017-08-11 12:50:45 -04:00
mposolda 868e76fcf3 KEYCLOAK-4630 Added SessionsPreloadCrossDCTest for test preloading sessions and offline sessions. Support for manual.mode to control manually lifecycle of all servers. 2017-08-11 17:44:00 +02:00
mposolda 1289e84cdb KEYCLOAK-4630 Refactor RemoteCacheSessionsLoader to use JS script for preload sessions through more pages 2017-08-11 17:44:00 +02:00
Bill Burke 16954fc370 fix 2017-08-10 14:58:09 -04:00
Levente NAGY c8aa708cff Merge remote-tracking branch 'upstream/master' 2017-08-10 18:14:49 +02:00
Bill Burke 4df7fd644d Merge pull request #4380 from patriot1burke/master
KEYCLOAK-5268
2017-08-10 10:45:13 -04:00
Bill Burke 41cdd9db70 KEYCLOAK-5268 2017-08-10 09:36:45 -04:00
Bill Burke fbeef3e75f manageMembership not deleted 2017-08-10 09:25:44 -04:00
Marek Posolda b36f0d89bc Merge pull request #4378 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4187 Fixes and tests related to sessions expiration and bulk…
2017-08-10 14:43:33 +02:00
Pavel Drozd 29386f7976 Merge pull request #4336 from wyvie/springboot
[KEYCLOAK-4290] Integration testsuite update to support springboot testing
2017-08-10 13:00:03 +02:00
wyvie b928de0a10 [KEYCLOAK-4290] removed .gitignore from spring boot test application 2017-08-10 11:52:06 +02:00
mposolda 0f7440d344 KEYCLOAK-4187 Fixes and tests related to sessions expiration and bulk removal in cross-dc environment 2017-08-10 08:29:59 +02:00
Pavel Drozd 9f6d9f7403 Merge pull request #4376 from pdrozd/KEYCLOAK-5267
KEYCLOAK-5267 Fuse tests - added timeouts for closing ssh channel
2017-08-09 21:48:36 +02:00
Bill Burke cc9fb4c12e Merge pull request #4377 from patriot1burke/master
token exchange permissions
2017-08-09 12:31:03 -04:00
wyvie 12db976e53 [KEYCLOAK-4290] Added other offline token tests 2017-08-09 17:45:02 +02:00
Bill Burke 45eac1093d show permissions 2017-08-09 10:39:59 -04:00
Bill Burke 3470b1839d Merge remote-tracking branch 'upstream/master' 2017-08-09 10:25:25 -04:00
wyvie 2876317f08 Added offline tokens test class, with first tokens test 2017-08-09 16:11:31 +02:00
Bill Burke 2fa55550f3 token exchange permissions 2017-08-09 10:04:14 -04:00
Pavel Drozd 6bdc49048a KEYCLOAK-5267 Fuse tests - added timeouts for closing ssh channel 2017-08-09 13:39:04 +02:00
Marek Posolda 07044eeeaa Merge pull request #4375 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4187 Fix LoginCrossDCTest
2017-08-08 15:56:51 +02:00
mposolda a72c297d5d KEYCLOAK-4187 Fix LoginCrossDCTest 2017-08-08 14:02:48 +02:00
Marek Posolda 6d003555ea Merge pull request #4373 from hmlnarik/KEYCLOAK-4189-Update-ConcurrencyTest-null
KEYCLOAK-4187, KEYCLOAK-4189 - Cross DC stuff
2017-08-08 10:54:13 +02:00
Hynek Mlnarik 52de3fff06 KEYCLOAK-4189 Fix tests 2017-08-08 10:11:51 +02:00
Hynek Mlnarik afc972278c KEYCLOAK-4694 2017-08-08 10:11:51 +02:00
Hynek Mlnarik 9ca72dc5c6 KEYCLOAK-4189 Improve logging and concurrency/cross-DC testing 2017-08-08 10:11:51 +02:00
Hynek Mlnarik 80177e8712 KEYCLOAK-4187 Include version when marshalling UserSessionEntity 2017-08-08 10:11:51 +02:00
Hynek Mlnarik 125b178297 KEYCLOAK-4187 Fix warnings 2017-08-08 10:11:51 +02:00
Bill Burke 430fe60533 Merge pull request #4374 from patriot1burke/master
KEYCLOAK-5190
2017-08-07 14:19:23 -04:00
Bill Burke ed5e880931 Merge remote-tracking branch 'upstream/master' 2017-08-07 12:02:50 -04:00
Bill Burke adf5da0b2c KEYCLOAK-5190 2017-08-07 12:02:37 -04:00
Bill Burke c9b7504e3f KEYCLOAK-5190 2017-08-07 12:02:18 -04:00
Marek Posolda d82acacd96 Merge pull request #4372 from mposolda/ispn-clientListeners-bugs
KEYCLOAK-4187 Fix LastSessionRefreshCrossDCTest and ConcurrentLoginCr…
2017-08-07 13:21:56 +02:00
mposolda 251b41a7ac KEYCLOAK-4187 Fix LastSessionRefreshCrossDCTest and ConcurrentLoginCrossDCTest 2017-08-07 11:55:49 +02:00
Bill Burke 3fce14d9ce Merge pull request #4369 from patriot1burke/master
KEYCLOAK-5249
2017-08-03 09:57:55 -04:00
Bill Burke 5423e0534b Merge pull request #4330 from stoffus/master
Swedish translation fixes
2017-08-02 19:49:03 -04:00
Bill Burke 2365445a3e Merge pull request #4360 from hmlnarik/KEYCLOAK-4189-Update-ConcurrencyTest-null
KEYCLOAK-4189 Update ConcurrencyTest
2017-08-02 19:47:55 -04:00
Bill Burke 3b5ca2bac0 Merge pull request #4366 from hmlnarik/KEYCLOAK-4694-null
KEYCLOAK-4694
2017-08-02 19:47:34 -04:00
Bill Burke cf0ee31bc5 KEYCLOAK-5249 2017-08-02 19:42:35 -04:00
Bill Burke 77cc3db1c5 Merge pull request #4362 from patriot1burke/master
token exchange and generic cli
2017-08-01 13:08:50 -04:00
Bill Burke 9f761a224d Merge remote-tracking branch 'upstream/master' 2017-08-01 12:23:25 -04:00
Pedro Igor 82affa3fb7 Merge pull request #4363 from pedroigor/KEYCLOAK-5240
[KEYCLOAK-5240] - Escaping values in templates
2017-08-01 10:20:16 -03:00
Hynek Mlnarik 4583a45e78 KEYCLOAK-4694 2017-08-01 09:57:12 +02:00
Bill Burke 8c93fdfb62 fix test 2017-07-31 13:01:23 -04:00
Bill Burke 56bb37a9cf Merge remote-tracking branch 'upstream/master' 2017-07-31 10:53:24 -04:00
Bill Burke 8f542618f7 KEYCLOAK-4748 2017-07-31 10:36:04 -04:00
Pavel Drozd d761085318 Merge pull request #4353 from vramik/was
KEYCLOAK-5243 was-wls support
2017-07-31 13:26:04 +02:00
Pavel Drozd 070bb9bf6a Merge pull request #4318 from mhajas/KEYCLOAK-3297
KEYCLOAK-3297 Add test for Access-Control-Expose-Headers
2017-07-31 12:59:32 +02:00
Pedro Igor d105aa92e2 [KEYCLOAK-5240] - Escaping values in templates 2017-07-28 17:46:52 -03:00
Bill Burke 486a0c9528 remove restriction 2017-07-28 16:25:32 -04:00
Bill Burke 02f043d9a6 fix readme file 2017-07-28 16:21:33 -04:00
Bill Burke 6b991b850e change role name 2017-07-28 16:20:23 -04:00
Bill Burke 852e9274d4 Merge remote-tracking branch 'upstream/master' 2017-07-28 16:15:53 -04:00
Bill Burke db9b1bcb21 token exchange 2017-07-28 16:15:39 -04:00
Hynek Mlnarik a955364f0e KEYCLOAK-4189 Update ConcurrencyTest 2017-07-28 13:00:14 +02:00
Marek Posolda ca9956c36b Merge pull request #4357 from mposolda/KEYCLOAK-4898-crossdc-userSessions-rebased3
KEYCLOAK-4187 Added UserSession support for cross-dc
2017-07-28 10:58:58 +02:00
mposolda 07e2136b3b KEYCLOAK-4187 Added UserSession support for cross-dc 2017-07-27 22:32:58 +02:00
Marek Posolda 1b83928652 Merge pull request #4354 from hmlnarik/KEYCLOAK-5241-Tomcat-Adapter-8-x-does-not-work-with-Tomcat-8-5-8
KEYCLOAK-5241 Tomcat SAML Adapter (Fix for Tomcat 8.5.8)
2017-07-27 14:27:19 +02:00
Marek Posolda 0406d6738f Merge pull request #4352 from hmlnarik/KEYCLOAK-4788-FormattingXMLStreamWriter-java-reversed-arguments
KEYCLOAK-4788 Fix reversed arguments and String comparison
2017-07-27 14:26:55 +02:00
Marek Posolda 121ec2603b Merge pull request #4351 from hmlnarik/KEYCLOAK-4446-Failed-to-process-response-when-reject-consent-with-turned-on-encryption
KEYCLOAK-4775 Added encryption certificate to SAML metadata
2017-07-27 14:26:41 +02:00
vramik 9fa50bded5 was-wls changes 2017-07-27 10:24:34 +02:00
Hynek Mlnarik 96bdd32bd0 KEYCLOAK-5241 Tomcat SAML Adapter Tomcat 8.5.8 2017-07-27 10:20:49 +02:00
Hynek Mlnarik d8b77895db KEYCLOAK-4788 Fix reversed arguments and String comparison 2017-07-27 08:25:22 +02:00
Hynek Mlnarik ab05216730 KEYCLOAK-4775 Added encryption certificate to SAML metadata 2017-07-27 08:18:10 +02:00
Hynek Mlnarik 36080b9833 KEYCLOAK-5242 Added means to run KeycloakServer with https 2017-07-27 07:32:51 +02:00
Marek Posolda dd6a7b23c3 Merge pull request #4350 from hmlnarik/KEYCLOAK-4446-Failed-to-process-response-when-reject-consent-with-turned-on-encryption
KEYCLOAK-4446 Do not encrypt SAML status messages
2017-07-26 15:31:54 +02:00
Marek Posolda f8a60d5e27 Merge pull request #4349 from hmlnarik/KEYCLOAK-5236-null
KEYCLOAK-5236
2017-07-26 15:31:31 +02:00
Hynek Mlnarik 3c537f5f28 KEYCLOAK-4446 Do not encrypt SAML status messages
SAML status messages are not encryptable per Chapter 6 of
saml-core-2.0-os.pdf. Only assertions, attributes, base ID and name ID
can be encrypted.
2017-07-26 11:22:56 +02:00
Hynek Mlnarik 8d81a4a2e4 KEYCLOAK-5236 2017-07-26 11:22:05 +02:00
Marek Posolda 527c61b287 Merge pull request #4348 from hmlnarik/KEYCLOAK-4189-SAML-client
KEYCLOAK-4189 Preparation for cross-DC SAML testing
2017-07-26 11:20:59 +02:00
Hynek Mlnarik c7046b6325 KEYCLOAK-4189 Preparation for cross-DC SAML testing 2017-07-25 09:44:36 +02:00
c5403 ec89aab8fb Refactoring the spring-boot adapter to use the rest template customizer 2017-07-24 11:15:01 -05:00
Marek Posolda bed3040f5d Merge pull request #4335 from hmlnarik/KEYCLOAK-5216-ClassNotFoundException-when-using-SAML-ECP-with-EAP-7-SAML-adapter
KEYCLOAK-5216 ClassNotFoundException when using SAML ECP
2017-07-24 16:42:03 +02:00
Stan Silvert 4b9ea5cbe0 KEYCLOAK-5127: Fix packaging of node_modules (#4347) 2017-07-24 09:12:43 -04:00
Marek Posolda f938856230 Merge pull request #4343 from trecloux/3471-classcastexception-master
Fix KEYCLOAK-3471 ClassCastExceptio branch master
2017-07-24 11:54:21 +02:00
Christopher Svensson 81d0ae1160 Merge remote-tracking branch 'upstream/master' 2017-07-24 07:28:21 +02:00
Thomas Recloux 69fa9de4d8 Fix KEYCLOAK-3471 ClassCastException 2017-07-23 21:49:16 +02:00
Stan Silvert c8068b688d KEYCLOAK-5127: Exclude node_modules from git (#4334)
* KEYCLOAK-5127: Exclude node_modules from git

* Add readme file.
2017-07-21 15:12:34 -04:00
Hynek Mlnarik f5d7f9b09b KEYCLOAK-5216 ClassNotFoundException when using SAML ECP 2017-07-21 15:57:14 +02:00
Marek Posolda 79a64657f7 Merge pull request #4331 from hmlnarik/KEYCLOAK-5209-IdpEmailVerificationAuthenticator-should-use-user-action-timeout
KEYCLOAK-5209 Make IdpEmailVerificationAuthenticator use user action …
2017-07-21 15:32:40 +02:00
Marek Posolda 4e1eab99a2 Merge pull request #4332 from hmlnarik/KEYCLOAK-4818-Undeclared-namespace-prefix-ds-
KEYCLOAK-4818 Fix undeclared namespace error in context serialization
2017-07-21 15:32:20 +02:00
Pedro Igor 9482a2b997 Merge pull request #4333 from pedroigor/master
[KEYCLOAK-5015] - Pushing keycloak context to exchange scope
2017-07-21 10:30:56 -03:00
Marek Posolda 18ddb58f72 Merge pull request #4342 from hmlnarik/Fix-testsuite-errors
Fix test failures on Travis
2017-07-21 15:29:45 +02:00
Hynek Mlnarik 657b4cbeb2 Fix Travis testsuite errors - dist=precise 2017-07-21 14:53:13 +02:00
wyvie 4825a857d9 [KEYCLOAK-4290] Integratino testsuite update to support springboot testing 2017-07-20 10:23:10 +02:00
Pedro Igor 5456514499 [KEYCLOAK-5015] - Pushing keycloak context to exchange scope 2017-07-19 16:39:38 -03:00
Hynek Mlnarik a192b6f50a KEYCLOAK-5209 Make IdpEmailVerificationAuthenticator use user action timeout 2017-07-19 15:25:20 +02:00
Hynek Mlnarik d52d685161 KEYCLOAK-4818 Fix undeclared namespace error in context serialization 2017-07-19 15:18:53 +02:00
Christopher Svensson c6f922412f Corrected Swedish translation 2017-07-19 14:44:39 +02:00
Christopher Svensson 9d1ccaeefa Added locale_sv translation to fix language dropdown 2017-07-19 14:02:33 +02:00
Marek Posolda c5b01ca9cb Merge pull request #4327 from hmlnarik/KEYCLOAK-4187-Minor-updates
KEYCLOAK-4187 Minor updates (abstraction)
2017-07-19 10:05:29 +02:00
Bill Burke 91ba048c2a Merge pull request #4328 from patriot1burke/master
KEYCLOAK-5205
2017-07-18 15:21:07 -04:00
Bill Burke 11ff5a05e9 KEYCLOAK-5205 2017-07-18 11:03:01 -04:00
Hynek Mlnarik c36074c7f3 KEYCLOAK-4187 Minor updates (abstraction) 2017-07-18 15:08:06 +02:00
Bill Burke 7406a095b9 Merge remote-tracking branch 'upstream/master' 2017-07-17 17:56:09 -04:00
Bill Burke 876edc0186 ... 2017-07-17 17:55:59 -04:00
Bill Burke 27b4f0e25d Merge pull request #4324 from patriot1burke/master
KEYCLOAK-5194
2017-07-15 09:26:51 -04:00
Bill Burke a7940c6ffa KEYCLOAK-5194 2017-07-14 18:29:48 -04:00
Bill Burke 1e059e3fa3 Merge pull request #4282 from cargosoft/KEYCLOAK-5131
KEYCLOAK-5131 ProviderFactory::postInit not called with hot deployment
2017-07-14 15:53:34 -04:00
Bill Burke 01152144bb Merge pull request #4321 from hmlnarik/KEYCLOAK-4187-Minor-updates
KEYCLOAK-4187 Minor updates in API
2017-07-14 15:48:53 -04:00
Bill Burke b10e7b8c31 Merge pull request #4323 from patriot1burke/master
KEYCLOAK-5152
2017-07-14 15:35:48 -04:00
Bill Burke f68754290f KEYCLOAK-5152 2017-07-14 14:14:38 -04:00
Hynek Mlnarik ddcbee2bff KEYCLOAK-4187 Minor updates in API 2017-07-14 15:40:43 +02:00
Stian Thorgersen badba7adaf KEYCLOAK-5143 Run auth-server-wildfly profile on Travis (#4317) 2017-07-14 07:01:54 +02:00
Bill Burke 286fb688eb Merge pull request #4320 from patriot1burke/master
KEYCLOAK-5155
2017-07-13 17:23:53 -04:00
Bill Burke b0a33c9765 KEYCLOAK-5155 2017-07-13 14:51:27 -04:00
mhajas b86079c589 KEYCLOAK-3297 Add test for Access-Control-Expose-Headers 2017-07-13 14:40:43 +02:00
Marek Posolda 3a13981d3f Merge pull request #4314 from mposolda/KEYCLOAK-5136-browserRefreshImprove
KEYCLOAK-5136 Improve browser refresh button after switch to differen…
2017-07-11 14:36:03 +02:00
mposolda 3fca731395 KEYCLOAK-5136 Improve browser refresh button after switch to different flow 2017-07-11 13:03:18 +02:00
Marek Posolda d2274fa49f Merge pull request #4311 from mposolda/master
KEYCLOAK-5061 Process correct initial flow when action expired
2017-07-11 07:23:07 +02:00
Pedro Igor 7e7d67464e Merge pull request #4308 from pedroigor/KEYCLOAK-5140
[KEYCLOAK-5140] - GroupPolicyManagementTest fails with mssql and oracle
2017-07-10 18:04:19 -03:00
mposolda 936efe872a KEYCLOAK-5061 Process correct initial flow when action expired 2017-07-10 22:52:54 +02:00
Marek Posolda 2b427dfcd2 Merge pull request #4309 from mposolda/master
KEYCLOAK-5061 Better error messages when action expired
2017-07-10 21:29:03 +02:00
Stan Silvert 2f5d11087e Merge pull request #4310 from ssilvert/kc5075-allow-origin-missing
KEYCLOAK-5075: Allow Origin Missing in Direct Access Grants
2017-07-10 15:28:37 -04:00
mposolda 7be2c55f61 KEYCLOAK-5061 Better error messages when action expired 2017-07-10 19:50:28 +02:00
Stan Silvert 7dbb439cf3 KEYCLOAK-5075: Allow Origin Missing in Direct Access Grants 2017-07-10 13:45:02 -04:00
Pedro Igor dac381058c [KEYCLOAK-5140] - GroupPolicyManagementTest fails with mssql and oracle 2017-07-10 11:54:58 -03:00
Marek Posolda 48eaebf1c3 Merge pull request #4293 from TeliaSoneraNorge/KEYCLOAK-5139
KEYCLOAK-5139 refresh token does not work with pairwise subject ident…
2017-07-10 11:21:34 +02:00
Martin Hardselius 5b2e390f57 Update refresh token test for deleted user
Instead of disabling the user under test, the test will now correctly
delete the user under test.
2017-07-10 10:20:41 +02:00
Pavel Drozd 86b915d862 Merge pull request #4278 from mbaluch/polarionCleanUp
Removed obsolete Polarion related code
2017-07-10 08:22:42 +02:00
Pavel Drozd 50424b2ad3 Merge pull request #4284 from vramik/KEYCLOAK-5133
KEYCLOAK-5133 Fix FineGrainAdminUnitTest when impersonation is disabled
2017-07-10 08:04:23 +02:00
Stan Silvert 1721ccc85e KEYCLOAK-5144: Supported locales undefined (#4304)
* KEYCLOAK-5144: Supported locales are undefined

* KEYCLOAK-5144: Supported locales are undefined.

* KEYCLOAK-5144: Supported locales are undefined

* KEYCLOAK-5144: Supported locales are undefined
2017-07-09 20:48:49 -04:00
jmcshane e99b08c6da Adding a instance of HttpComponentsClientHttpRequestFactory that supports the embedded servlet container auth pattern 2017-07-07 23:48:43 -05:00
Pedro Igor cff8a1ecc6 Merge pull request #4298 from pedroigor/3.2.final-fixes
Some fixes for AuthZ UI
2017-07-07 09:06:00 -03:00
Pedro Igor 9531b9e4ea Merge pull request #4299 from ASzc/KEYCLOAK-5160
KEYCLOAK-5160 Use setParameter in photoz-restful-api example services
2017-07-06 22:03:21 -03:00
Pedro Igor 0aeba74185 [KEYCLOAK-5158] - Revert changes that made delete on lists and scope permission stop working 2017-07-06 18:22:13 -03:00
Pedro Igor 6865b4bbb1 [KEYCLOAK-4808] - Import large authz settings a bit faster 2017-07-06 18:22:13 -03:00
Alex Szczuczko 81c0e62d79 KEYCLOAK-5160 Use setParameter in photoz-restful-api example services 2017-07-06 10:22:10 -06:00
Pedro Igor db269e28d6 Merge pull request #4295 from pedroigor/master
[KEYCLOAK-5148] - Create authorization settings when creating a new client using a config file
2017-07-06 08:02:26 -03:00
Martin@qingcloud d84ab4f90b KEYCLOAK-5086:add Chinese translation into messages. (#4251)
* add Chinese translation into messages.

* convert messages from unicode to utf-8
2017-07-06 08:13:49 +02:00
Pedro Igor 65251748c7 [KEYCLOAK-5148] - Create authorization settings when creating a new client using a config file 2017-07-05 18:19:00 -03:00
Stian Thorgersen 5fbb362710 KEYCLOAK-5119 Set encoding for TestingResourceProvider.runOnServer (#4292) 2017-07-05 13:39:16 +02:00
Pedro Igor 4b7c61111c Merge pull request #4288 from pedroigor/KEYCLOAK-5135
[KEYCLOAK-5135] - Wrong comparison when checking for duplicate resources during creation
2017-07-05 08:22:23 -03:00
Martin Hardselius 8cb8678525 KEYCLOAK-5139 refresh token does not work with pairwise subject identifiers 2017-07-05 12:32:43 +02:00
Stian Thorgersen c95aace6e0 KEYCLOAK-5141 Return '*' in Cors requests when '*' is in list of permitted origins. Stop caching well-known information as it can change. (#4290) 2017-07-05 09:25:21 +02:00
Stian Thorgersen eba8dac47d KEYCLOAK-4536 Add test to check behavior with file redirect URI (#4291) 2017-07-05 09:08:13 +02:00
Pedro Igor e1622006c3 [KEYCLOAK-5135] - More tests for resource mgmt 2017-07-04 16:45:06 -03:00
Stian Thorgersen 9a9f4137e5 KEYCLOAK-4556 KEYCLOAK-5022 Only cache keycloak.js and iframe if specific version is requested (#4289) 2017-07-04 21:18:34 +02:00
Pedro Igor adffe16cb8 [KEYCLOAK-5135] - Wrong comparison when checking for duplicate resources during creation 2017-07-04 10:16:55 -03:00
Stian Thorgersen 1e6f099eb0 KEYCLOAK-5138 Replace snapshot in resource version with build time (#4287) 2017-07-04 10:52:29 +02:00
Stan Silvert 32b16717a7 KEYCLOAK-4234: Link to app in acct mgt doesn't use root url (#4285)
* KEYCLOAK-4234: Link to app in acct mgt not use root url

* Add tests.
2017-07-04 07:01:58 +02:00
Marek Posolda 09ec642543 Merge pull request #4232 from wvdhaute/token-store
[KEYCLOAK-5067] Allow refreshable context to have an optional adapter token store
2017-07-03 20:55:26 +02:00
vramik 41011a95e1 KEYCLOAK-5133 Fix FineGrainAdminUnitTest when impersonation is disabled 2017-07-03 11:49:46 +02:00
Dmitry Telegin fba264433a KEYCLOAK-5131 ProviderFactory::postInit not called with hot deployment 2017-07-03 12:20:29 +03:00
Marek Baluch a228c9b32b Removed obsolete Polarion related code 2017-06-30 12:24:47 +02:00
Stian Thorgersen 454c5f4d83 Set version to 3.3.0.CR1-SNAPSHOT 2017-06-30 09:47:11 +02:00
Stian Thorgersen fdb80d4319 Fix console tests (#4277) 2017-06-30 08:49:18 +02:00
Stian Thorgersen f0f1b85582 KEYCLOAK-5116 (#4276)
Authz tab not showing
2017-06-30 08:48:28 +02:00
Stan Silvert 6874cdc3b2 KEYCLOAK-4997 KEYCLOAK-4866 KEYCLOAK-4895 Upgrade to latest AngularJS, (#4275)
jquery, and others.
2017-06-30 05:55:47 +02:00
Bill Burke 19bdf09e3d Merge pull request #4274 from patriot1burke/master
bad logic will result in NPE
2017-06-29 21:36:12 -04:00
Bill Burke 999dff353c Merge remote-tracking branch 'upstream/master' 2017-06-29 17:37:45 -04:00
Bill Burke f5389b0e17 don't clean up properly 2017-06-29 17:36:45 -04:00
hmlnarik b4ad69b841 KEYCLOAK-5115 (#4272) 2017-06-29 15:50:50 +02:00
vramik 6ba3687b76 KEYCLOAK-5114 Fix UsersTest on auth-server-wildfly (#4271) 2017-06-29 14:39:59 +02:00
Sebastien Blanc 500a21685f KEYCLOAK-5082 : Add new redirect-rewrite-rule parameters for the adapters (#4255)
* add rewrite rule config property

* add subsystem support for redirect rewrite

* update deployment unit test

* add license headers

* Optimize rewrite method
2017-06-29 12:50:42 +02:00
Stian Thorgersen 620bea3553 Merge pull request #4270 from stianst/KEYCLOAK-5107
KEYCLOAK-5107 Fix FineGrainAdminUnitTest and IllegalAdminUpgradeTest …
2017-06-29 08:54:59 +02:00
Stian Thorgersen 5e225c2bd5 Merge pull request #4266 from CoreFiling/FullNameMapper
Fallback to using username in FullNameMapper
2017-06-29 07:28:42 +02:00
Stian Thorgersen c9bc321d2a Merge pull request #4269 from stianst/dockerdockerdocker
KEYCLOAK-3592 Docker auth implementation
2017-06-29 07:23:47 +02:00
Stian Thorgersen 74fe9249d5 Merge pull request #4216 from machielg/master
KEYCLOAK-5026 Store credentials
2017-06-29 06:52:16 +02:00
Stian Thorgersen 9f814c6cf1 KEYCLOAK-5107 Fix FineGrainAdminUnitTest and IllegalAdminUpgradeTest on auth-server-wildfly 2017-06-29 06:46:21 +02:00
Josh Cain 89fcddd605 KEYCLOAK-3592 Docker auth implementation 2017-06-29 06:37:34 +02:00
Stian Thorgersen 0b108d83af Merge pull request #4268 from hmlnarik/KEYCLOAK-5106-BasicSamlTest-testNoPortInDestination-fails-on-auth-server-wildfly
KEYCLOAK-5106 Fix BasicSamlTest on auth-server-wildfly
2017-06-29 05:13:21 +02:00
Hynek Mlnarik 5e16a32f86 KEYCLOAK-5106 Fix BasicSamlTest on auth-server-wildfly 2017-06-28 20:47:43 +02:00
Pavel Drozd 6b846b53e4 Merge pull request #4263 from mhajas/KEYCLOAK-5097
KEYCLOAK-5097 fix property name
2017-06-28 13:23:36 +02:00
Stian Thorgersen e964b156cc Merge pull request #4264 from stianst/KEYCLOAK-5074
KEYCLOAK-5074 Allow updating client secret through client registratio…
2017-06-28 11:40:04 +02:00
Jay Anslow bdc9e8d2c3 Omit empty name claim in FullNameMapper
If a user has no first or last name, don't add the `name` claim.
2017-06-28 09:40:57 +01:00
Stian Thorgersen ce4506f367 Merge pull request #4261 from hmlnarik/KEYCLOAK-4377-null
KEYCLOAK-4377
2017-06-28 08:21:20 +02:00
Stian Thorgersen 55d0ad3a50 Merge pull request #4234 from samuelMangot/master
Email - I18n - added missing german text
2017-06-28 08:20:50 +02:00
Stian Thorgersen d90235d1bd Merge pull request #4245 from hokuda/email-messages-japanese
fix email messages in Japanese
2017-06-28 08:20:21 +02:00
Stian Thorgersen 1220d7f898 KEYCLOAK-5074 Allow updating client secret through client registration service 2017-06-28 08:11:51 +02:00
Samuel Mangot f5545eabdc Email - I18n - fixed another grammar error 2017-06-27 20:30:30 +02:00
Samuel Mangot 3db8f97248 Email - I18n - removed remaining " and fixe grammar error 2017-06-27 18:04:41 +02:00
Samuel Mangot 48421cbc43 Email - I18n - removed "" around text placeholder 2017-06-27 16:55:10 +02:00
Stian Thorgersen 7010c39544 Merge pull request #4265 from stianst/master
Fix dependency exclusions in server-dist to make sure dependency vers…
2017-06-27 15:56:21 +02:00
Hynek Mlnarik a3ccac2012 KEYCLOAK-4377 2017-06-27 14:34:47 +02:00
Stian Thorgersen 6bbdc13544 Upgrade EAP 2017-06-27 14:26:05 +02:00
Stian Thorgersen 073f1eda54 Fix dependency exclusions in server-dist to make sure dependency versions are inherited from WF 2017-06-27 14:24:22 +02:00
mhajas 29c2ef4c60 KEYCLOAK-5097 fix property name 2017-06-27 12:28:32 +02:00
Pavel Drozd 947254e14f Merge pull request #4222 from vmuzikar/KEYCLOAK-5055
KEYCLOAK-4787, KEYCLOAK-5055 Stabilize UI tests
2017-06-27 11:42:21 +02:00
Pavel Drozd b02d48f772 Merge pull request #4249 from vramik/KEYCLOAK-5048
KEYCLOAK-5048 missing keycloak version in logs when staring auth-serv…
2017-06-27 11:40:26 +02:00
Stian Thorgersen 4be0e36306 Merge pull request #4208 from ASzc/KEYCLOAK-4758
KEYCLOAK-4758
2017-06-27 11:35:43 +02:00
Stian Thorgersen b041146a3f Merge pull request #4200 from guigarage/servlet-config
KeycloakConfigResolver config for servlet filter
2017-06-27 10:45:29 +02:00
Stian Thorgersen 56c5996aff Merge pull request #4259 from stianst/abstractj-KEYCLOAK-4444
KEYCLOAK-4444
2017-06-27 10:44:30 +02:00
Stian Thorgersen fa165806f9 Merge pull request #4258 from stianst/KEYCLOAK-4984
KEYCLOAK-4984 Don't update client registration access token on read
2017-06-27 10:44:06 +02:00
Machiel Groeneveld 7849191ec7 Merge branch 'master' into master 2017-06-27 10:27:07 +02:00
Stian Thorgersen 06a318d7d5 KEYCLOAK-4444 Update for fine grained permissions 2017-06-27 08:38:51 +02:00
Bruno Oliveira 361ab1c988 [KEYCLOAK-4444] Allow sending test email 2017-06-27 08:38:36 +02:00
Stian Thorgersen c1c1a81a4e Merge pull request #4138 from ASzc/KEYCLOAK-4752
KEYCLOAK-4752
2017-06-27 08:34:00 +02:00
Stian Thorgersen b4d39ca061 KEYCLOAK-4984 Don't update client registration access token on read 2017-06-27 08:29:03 +02:00
Stian Thorgersen b4470165c7 Merge pull request #4257 from stianst/KEYCLOAK-4891
KEYCLOAK-4891 Add keycloak-api-docs-dist to mvn repo in prod profile
2017-06-27 07:39:54 +02:00
Léventé NAGY 1a50e77a4d Merge branch 'master' into feature/group-search-and-pagination 2017-06-26 20:36:36 +02:00
Stian Thorgersen af63fcbc4d KEYCLOAK-4891 Add keycloak-api-docs-dist to mvn repo in prod profile 2017-06-26 19:54:33 +02:00
Bill Burke d77824ff98 Merge pull request #4256 from patriot1burke/master
KEYCLOAK-3444 KEYCLOAK-528
2017-06-26 13:27:08 -04:00
Bill Burke b771960e21 fix log file 2017-06-26 12:36:43 -04:00
Bill Burke bc05560d4d Merge remote-tracking branch 'upstream/master' 2017-06-26 11:41:12 -04:00
Bill Burke 3855b5c0a3 admin console work 2017-06-26 11:40:56 -04:00
Bill Burke 28b3ef9aa9 admin console work 2017-06-26 11:40:32 -04:00
Bill Burke 22987bb90b Merge pull request #4250 from mposolda/RHSSO-1027
KEYCLOAK-5085 Easy fix to just handle the exception
2017-06-26 10:04:02 -04:00
Stian Thorgersen 1c10199698 Merge pull request #4252 from hmlnarik/KEYCLOAK-5078-ConcurrencyTest-fails-intermittently
KEYCLOAK-5078 ConcurrencyTest fails intermittently
2017-06-26 12:48:37 +02:00
Stian Thorgersen 4367f03304 Merge pull request #4254 from hmlnarik/KEYCLOAK-5030-Action-Tokens-do-not-initialize-invalidation-cache-on-start
KEYCLOAK-5030 Change action tokens cache type to distributed
2017-06-26 12:41:02 +02:00
Hynek Mlnarik 955cbc76d7 KEYCLOAK-5030 Change action tokens cache type to distributed 2017-06-26 10:11:53 +02:00
Bill Burke f1807aead4 impersonate 2017-06-25 11:28:37 -04:00
mposolda 756d996a4a KEYCLOAK-5085 RHSSO-1027 Fix to handle the exception thrown from alternative flow 2017-06-23 19:13:43 +02:00
Bill Burke 3ee86fedc7 Merge remote-tracking branch 'upstream/master' 2017-06-23 09:57:35 -04:00
Bill Burke e7f781df5a fix 2017-06-23 09:57:25 -04:00
Hynek Mlnarik 8f9ed32a66 KEYCLOAK-5078 ConcurrencyTest fails intermittently
This commit fixes 401 Unauthorized issues
2017-06-23 15:16:23 +02:00
Bill Burke 39dea4b078 restricting admin role mapping 2017-06-22 16:51:46 -04:00
Léventé NAGY 41d8d17062 Merge branch 'master' into feature/group-search-and-pagination 2017-06-22 17:41:30 +02:00
Levente NAGY 124bf43a27 [KEYCLOAK-2538] - groups count for pagination 2017-06-22 17:32:38 +02:00
Levente NAGY 6929dddacf Merge branch 'feature/group-count-for-pagination' into feature/group-search-and-pagination 2017-06-22 15:44:52 +02:00
Pavel Drozd 58e5f41415 Merge pull request #4210 from vramik/KEYCLOAK-4983
KEYCLOAK-4983 export authorization test with multiple roles
2017-06-22 09:36:26 +02:00
Pavel Drozd a7fbcaaef4 Merge pull request #4211 from vramik/KEYCLOAK-5027
KEYCLOAK-5027 Add possibility to attach debugger to jboss based servers
2017-06-22 09:34:58 +02:00
vramik e75f47d523 KEYCLOAK-5048 missing keycloak version in logs when staring auth-server-wildfly container. 2017-06-22 09:20:11 +02:00
Stian Thorgersen cc14c5db23 Merge pull request #4239 from frelibert/KEYCLOAK-4897
KEYCLOAK-4897 SAML Adapter fails to validate signature on assertion
2017-06-22 08:45:04 +02:00
Stian Thorgersen 6f731dfee9 Merge pull request #4118 from skjolber/feature/KEYCLOAK-3056-verify-signature-2
Some adjustments for KEYCLOAK-3056 / PR #3893
2017-06-22 08:44:32 +02:00
Marek Posolda ab7a0c2252 Merge pull request #4248 from mposolda/client-initial-access-db
KEYCLOAK-4631 Move ClientInitialAccessModel from userSession model to…
2017-06-22 06:27:25 +02:00
Bill Burke d08ddade2e merge 2017-06-21 17:43:54 -04:00
Bill Burke 52e40922bc removal 2017-06-21 17:42:57 -04:00
Bill Burke 2b1613d36b Merge pull request #4064 from frelibert/KEYCLOAK-4781
KEYCLOAK-4781 Support for an AttributeStatement Mapper
2017-06-21 17:06:16 -04:00
Bill Burke f1132ffabe Merge pull request #4175 from mrezai/fix-pkce-s256-code-challenge
KEYCLOAK-4956: Fix incorrect PKCE S256 code challenge generation
2017-06-21 17:04:31 -04:00
Bill Burke 8c82201add Merge pull request #4224 from pedroigor/KEYCLOAK-3168
[KEYCLOAK-3168] - Group-Based Access Control
2017-06-21 17:03:34 -04:00
mposolda fc61a4e89f KEYCLOAK-4631 Move ClientInitialAccessModel from userSession model to realm model 2017-06-21 22:14:20 +02:00
Marek Posolda f289771fd3 Merge pull request #4246 from hmlnarik/KEYCLOAK-4993-Intermittent-failures-in-ComponentsTest-testConcurrencyWithChildren
KEYCLOAK-4993 Fix intermittent failures in ComponentsTest testConcurrencyWithChildren
2017-06-21 22:14:00 +02:00
Pedro Igor 8676148f20 Merge pull request #4244 from pedroigor/master
[KEYCLOAK-5702] - Caching scripts and removing when updating
2017-06-21 16:19:36 -03:00
Hynek Mlnarik bf43ccf6c1 KEYCLOAK-4993 Fix intermittent failures in ComponentsTest testConcurrencyWithChildren
... and seems that the KEYCLOAK-5020 as well
2017-06-21 15:19:23 +02:00
Hisanobu Okuda eebd3feb28 fix email messages in Japanese 2017-06-21 21:42:14 +09:00
Marek Posolda be5291f710 Merge pull request #4242 from mposolda/master
KEYCLOAK-4438 Disable kerberos flow when provider removed
2017-06-21 11:54:50 +02:00
Marek Posolda 3fd6fc250d Merge pull request #4240 from hmlnarik/KEYCLOAK-4189-Cross-DC-testing
KEYCLOAK-4189 Infinispan cache and channel statistics for Cross-DC testing
2017-06-21 10:22:43 +02:00
mposolda e91dd011c5 KEYCLOAK-4438 Disable kerberos flow when provider removed 2017-06-21 09:38:20 +02:00
Stian Thorgersen 8e36a52f1e Merge pull request #4227 from sebastienblanc/KEYCLOAK-3492-rebased
KEYCLOAK-3492 : Changing request matcher to attempt auth on /sso/login or Auhtorizati…
2017-06-21 08:51:09 +02:00
Stian Thorgersen 9edb5b53c0 Merge pull request #4199 from guigarage/spring-security-annotation
Easy Spring security annotation
2017-06-21 08:47:17 +02:00
Marek Posolda eae0360eb1 Merge pull request #4243 from mposolda/KEYCLOAK-3316
KEYCLOAK-3316 Fixes for OAuth2 requests without 'scope=openid'
2017-06-20 22:05:23 +02:00
Pedro Igor c7a20d7620 [KEYCLOAK-5702] - Caching scripts and removing when updating 2017-06-20 15:26:18 -03:00
Pedro Igor 93d57c7d00 Merge pull request #4236 from CoreFiling/js-policy-performance
[KEYCLOAK-5072] - Improve performance of JSPolicyProvider
2017-06-20 15:11:40 -03:00
mposolda 32cf8b7cad KEYCLOAK-3316 Fixes for OAuth2 requests without 'scope=openid' 2017-06-20 17:17:43 +02:00
Marek Posolda 88d9411f4d Merge pull request #4241 from mposolda/master
KEYCLOAK-4327 Switching language on User consent gives error
2017-06-20 14:01:09 +02:00
Hynek Mlnarik 2e2d15be9f KEYCLOAK-4189 Infinispan cache and channel statistics for Cross-DC-testing 2017-06-20 12:48:08 +02:00
mposolda f363dbcad0 KEYCLOAK-4327 Switching language on User consent gives error 2017-06-20 09:21:41 +02:00
Frederik Libert 63d2d0f7ed KEYCLOAK-4897 SAML Adapter fails to validate signature on assertion 2017-06-19 18:26:17 +02:00
Jay Anslow a04d79c576 Cache compiled scripts in JSPolicyProviderFactory 2017-06-19 16:53:07 +01:00
Bill Burke 57cb46148f tests 2017-06-19 11:21:59 -04:00
Jay Anslow 7614ff8c6f Extract EvaluatebleScriptAdapter
Precursor for InvocableScriptAdapter, which compiles/evaluates a script without affecting the engine's bindings. This allows the same script to be compiled once and then evaluated multiple times (with the same ScriptEngine).
2017-06-19 15:32:14 +01:00
Marek Posolda edc6d99c9c Merge pull request #4230 from vramik/KEYCLOAK-4189
KEYCLOAK-4189 add possibility to use JDG as a cache server
2017-06-19 11:06:42 +02:00
Bill Burke a994af9010 remove scope 2017-06-16 11:26:43 -04:00
Pedro Igor 0b5e6b0d49 JS policy should use ScriptingSPI 2017-06-16 11:49:32 -03:00
Pedro Igor 222541ab5c Merge pull request #4228 from pedroigor/KEYCLOAK-5054
[KEYCLOAK-5054] - Checking name availability only in cases name is filled
2017-06-16 10:30:44 -03:00
vramik dfed148921 KEYCLOAK-4189 fixed issue with exlude cross DC tests by default 2017-06-16 11:32:02 +02:00
Samuel Mangot a785f9fd11 Email - I18n - added missing german text 2017-06-16 09:55:54 +02:00
Wim Vandenhaute 0e0140d88b Allow refreshable context to have an optional adapter token store 2017-06-15 15:24:07 +02:00
Pedro Igor 93105a2182 [KEYCLOAK-5056] - @NoCache to scope admin api 2017-06-15 09:49:20 -03:00
Hendrik Ebbers 0ac92c4bfa new line in doc 2017-06-15 13:01:05 +02:00
Hendrik Ebbers 98a5c57e65 Author added 2017-06-15 13:00:24 +02:00
vramik 5d72def1bc KEYCLOAK-4189 add possibility to use jdg as cache server 2017-06-15 12:57:25 +02:00
Stian Thorgersen f0d1149311 Merge pull request #4217 from stianst/KEYCLOAK-5044
KEYCLOAK-5044 Remove Angular2 example2
2017-06-15 12:05:11 +02:00
Pedro Igor d4a85d6abc [KEYCLOAK-5054] - Checking name availability only in cases name is filled 2017-06-14 18:10:51 -03:00
Marek Posolda a34f890453 Merge pull request #4223 from hmlnarik/KEYCLOAK-4189-Cross-DC-testing
KEYCLOAK-4189 Fix in instructions for running Cross-DC tests
2017-06-14 21:11:18 +02:00
Marek Posolda f8999128dc Merge pull request #4226 from TeliaSoneraNorge/KEYCLOAK-4924
KEYCLOAK-4924 pairwise clients get duplicate subs in tokens
2017-06-14 15:01:09 +02:00
emilienbondu 91585f8563 Changing request matcher to attempt auth on /sso/login or Auhtorization header
Add default login URL.

Throwing exception if login fails to enable auth entry point

Adding a test for invalid token and bearer-only

handle redirect correctly
2017-06-14 14:41:35 +02:00
Hynek Mlnarik bdadef1282 KEYCLOAK-4189 Fix in instructions for running Cross-DC tests 2017-06-14 14:36:10 +02:00
Pedro Igor 5028c05cc2 [KEYCLOAK-3168] - Export and import tests 2017-06-14 09:33:59 -03:00
Pedro Igor 6202222da4 Merge pull request #4221 from pedroigor/KEYCLOAK-5051
[KEYCLOAK-5051] - Invalidate authz cache when realm cache is cleared
2017-06-14 07:53:46 -03:00
Martin Hardselius 60942346f3 KEYCLOAK-4924: pairwise clients get duplicate subs in tokens 2017-06-14 10:47:40 +02:00
vramik 97509ebf89 KEYCLOAK-4983 export authorization test with multiple roles 2017-06-14 10:38:47 +02:00
Pedro Igor 169280b6a1 [KEYCLOAK-3168] - Group-Based Access Control 2017-06-13 19:05:44 -03:00
Vaclav Muzikar 35857bf649 KEYCLOAK-5055 Stabilize UI tests 2017-06-13 11:24:45 +02:00
Marek Posolda bc407a7968 Merge pull request #4212 from hmlnarik/KEYCLOAK-4189-Cross-DC-testing
KEYCLOAK-4189 - Cross DC testing
2017-06-12 18:09:44 +02:00
Pedro Igor 473065fd31 [KEYCLOAK-5051] - Invalidate authz cache when realm cache is cleared 2017-06-12 12:29:21 -03:00
Hynek Mlnarik a0f3a6469f KEYCLOAK-4189 - Cross DC testing 2017-06-12 11:14:28 +02:00
Pedro Igor fd8a3dccaf Merge pull request #4214 from pedroigor/KEYCLOAK-4904
[KEYCLOAK-4904] - Authorization Audit - Part 1
2017-06-09 17:17:30 -03:00
Pedro Igor f12cef2c86 [KEYCLOAK-4904] - Authorization Audit - Part 1 2017-06-09 13:31:06 -03:00
Pedro Igor 2b55cd7902 Merge pull request #4213 from pedroigor/cache-fixes
Missing invalidation for some queries cache
2017-06-09 09:13:13 -03:00
Stian Thorgersen a9b9d16500 KEYCLOAK-5044 Remove Angular2 example2 2017-06-09 13:43:32 +02:00
Machiel Keizer-Groeneveld 80f8815b9a KEYCLOAK-5026 Store credentials
Credentials are stored with user creation if they are present in the UserRepresentation.
2017-06-09 09:32:33 +02:00
Stian Thorgersen 6cccd66162 Merge pull request #4192 from hokuda/KEYCLOAK-4980
KEYCLOAK-4980 SAML adapter should return 403 when unauthenticated Aja…
2017-06-09 04:40:26 +02:00
Pedro Igor 84d2d7b431 Missing invalidation for some queries cache 2017-06-08 18:09:44 -03:00
Hisanobu Okuda 9135ba7c40 KEYCLOAK-4980 SAML adapter should return 401 when unauthenticated Ajax client accesses 2017-06-08 23:36:25 +09:00
Bill Burke 94528976d4 console work 2017-06-07 16:29:43 -04:00
Levente NAGY f377a45c4e [KEYCLOAK-2538] - groups count for pagination limits 2017-06-07 20:52:22 +02:00
vramik 7381ec456a KEYCLOAK-5027 Add possibility to attach debugger to jboss based servers 2017-06-07 14:35:33 +02:00
Levente NAGY c4da7637d6 [KEYCLOAK-2538] - groups pagination and group search 2017-06-06 18:32:48 +02:00
Bill Burke 536a57a514 ui for permission reference 2017-06-05 19:52:51 -04:00
Alex Szczuczko 5d88c2b8be KEYCLOAK-4758 Update Encode class using latest resteasy. Use encodeQueryParamAsIs instead of encodeQueryParam when encoding key=value pairs for URI query sections. Also fix a few callers who were relying on the bad behaviour of queryParam. 2017-06-05 16:24:38 -06:00
Pedro Igor 9be9e30ad6 Merge pull request #4206 from pedroigor/KEYCLOAK-4983
[KEYCLOAK-4983] - Authz settings export of role base policy generates json where are just role-names
2017-06-05 16:19:58 -03:00
Pedro Igor 40c4140021 Merge pull request #4198 from pedroigor/KEYCLOAK-4992
RFEs based on Openshift.io authz requirements
2017-06-05 16:03:50 -03:00
Pedro Igor 23887f4031 Fixing tests and more client policy tests 2017-06-05 11:26:33 -03:00
Pedro Igor 3760f2753b [KEYCLOAK-4983] - Authz settings export of role base policy generates json where are just role-names 2017-06-02 20:09:33 -03:00
Pedro Igor d0f505455d [KEYCLOAK-4991] - Allow clients to limit the number of permission in a RPT when using entitlements 2017-06-02 19:06:40 -03:00
Bill Burke a41d282e92 client permission tests 2017-06-02 15:49:20 -04:00
Pedro Igor 813af5d757 [KEYCLOAK-4992] - Using query parameter metadata for GET requests 2017-06-02 16:13:04 -03:00
Thomas Skjølberg 241c58dd61 Add unit tests related to signatures, check that a signature is present when want assertion signing. 2017-06-02 15:36:52 +02:00
Pedro Igor 1cddaeb707 Merge pull request #4203 from pedroigor/master
[KEYCLOAK-4932] - Improvements to policy enforcer and better spring boot support
2017-06-02 10:31:10 -03:00
Pedro Igor d69d00082f [KEYCLOAK-4932] - Improvements to policy enforcer and better spring boot support 2017-06-01 22:55:58 -03:00
Bill Burke b9f7a43a72 group permissions 2017-06-01 20:16:35 -04:00
Alex Szczuczko bed6f96fc6 KEYCLOAK-4752 Change required actions UI to uncheck and disable the default checkbox when the enable checkbox is not checked. The API will continue to silently drop actions that are not enabled for the realm. 2017-06-01 08:25:51 -06:00
Hendrik Ebbers 4d5e03049e provide a custom KeycloakConfigResolver instance for servlet filter. 2017-06-01 14:35:12 +02:00
Hendrik Ebbers 7d017b4edf Easy Spring security annotation 2017-06-01 12:05:02 +02:00
Pedro Igor dcd1a68d95 [KEYCLOAK-4992] - Allow clients to exclude resource_set_name from RPT 2017-05-31 19:33:34 -03:00
Pedro Igor b71bb96540 Merge pull request #4197 from pedroigor/KEYCLOAK-4987
[KEYCLOAK-4987] - Remove async support from AuthZ Token Endpoints
2017-05-30 12:49:19 -03:00
Pedro Igor c4a0470a37 [KEYCLOAK-4987] - Remove async support from AuthZ Token Endpoints 2017-05-30 12:48:18 -03:00
Pavel Drozd a52a1f4618 Merge pull request #4196 from vramik/KEYCLOAK-4481
KEYCLOAK-4481 some authz export tests
2017-05-30 16:56:54 +02:00
Pavel Drozd a2e35bf711 Merge pull request #4186 from tkyjovsk/KEYCLOAK-4970
KEYCLOAK-4970 Arquillian testsuite doesn't work with -Pauth-server-wildfly after upgrade to WF11
2017-05-30 16:55:21 +02:00
Stian Thorgersen a6e4245185 Merge pull request #4194 from stianst/KEYCLOAK-4888
KEYCLOAK-4888
2017-05-30 14:49:22 +02:00
Tomas Kyjovsky 67bee0dfc2 Upgraded wildfly-arquillian-container-* artifacts to 2.1.0.Alpha2 and added wildfly10 modules in app servers and adapter tests 2017-05-30 14:25:51 +02:00
vramik 8f1938c28d KEYCLOAK-4481 Role based permission test 2017-05-30 13:10:09 +02:00
Stian Thorgersen a15517c5ce Merge pull request #4195 from mstruk/KEYCLOAK-4974
KEYCLOAK-4974 Can not run tests against PNC build
2017-05-30 12:57:09 +02:00
Marko Strukelj af6f617e0e KEYCLOAK-4974 Can not run tests against PNC build 2017-05-30 11:54:42 +02:00
Stian Thorgersen 8c53c5a90e KEYCLOAK-4888
Change default hashing provider for realm
2017-05-30 09:54:05 +02:00
Marek Posolda ca4488a845 Merge pull request #4193 from thomasdarimont/issue/KEYCLOAK-4975-fix-session-binding-in-scriptbasedauthenticator
KEYCLOAK-4975 Use authenticationSession binding name in ScriptBasedAuthenticator
2017-05-30 07:53:24 +02:00
Thomas Darimont 7d0b461683 KEYCLOAK-4975 Use authenticationSession binding name in ScriptBasedAuthenticator
We now use authenticationSession instead of clientSession to reflect
the renaming of ClientSessionModel to AuthenticationSessionModel.

Note that this is a breaking change which needs to be mentioned in
the upgrade notes!
2017-05-29 18:14:02 +02:00
Bill Burke c3ea847b3e auth changes 2017-05-29 09:53:17 -04:00
Stian Thorgersen 684689d40d Merge pull request #3561 from glavoie/KEYCLOAK-3990
KEYCLOAK-3990: Very slow use of NamedQueries.
2017-05-29 09:39:39 +02:00
Marek Posolda c47952250d Merge pull request #4189 from mposolda/master
KEYCLOAK-4977 Upgrade infinispan and undertow version to align with W…
2017-05-26 15:22:14 +02:00
mposolda c4f172afe7 KEYCLOAK-4977 Upgrade infinispan and undertow version to align with Wildfly 11.0.0.Alpha1 2017-05-26 14:29:30 +02:00
Marek Posolda c43329d033 Merge pull request #4188 from mposolda/master
KEYCLOAK-4626 Changed javadoc. Remove unused ClientSessionModel class
2017-05-25 21:52:01 +02:00
mposolda 5560175888 KEYCLOAK-4626 Changed javadoc. Remove unused ClientSessionModel class 2017-05-25 18:51:05 +02:00
Pavel Drozd bb1096c511 Merge pull request #4182 from mhajas/KEYCLOAK-4959
KEYCLOAK-4959 Use desired version of adapter
2017-05-25 13:16:41 +02:00
mhajas 88473ce3c1 KEYCLOAK-4959 Use desired version of adapter 2017-05-25 12:02:16 +02:00
Pedro Igor 81f1a5b145 Merge pull request #4183 from pedroigor/stan-ui-fixes
[KEYCLOAK-4915] - Fixes to evaluation tool UI
2017-05-24 09:32:42 -03:00
Hynek Mlnarik e4fc8f083e KEYCLOAK-3990 Tests 2017-05-24 07:50:48 -04:00
Marek Posolda 79af4dfd18 Merge pull request #4127 from sbryzak/KEYCLOAK-4886
KEYCLOAK-4886
2017-05-24 10:47:09 +02:00
Marek Posolda 9e509d71d2 Merge pull request #4184 from mposolda/master
KEYCLOAK-3316 Remove the IDToken if scope=openid is not used
2017-05-24 10:45:43 +02:00
mposolda 2b59db71a8 KEYCLOAK-3316 Remove the IDToken if scope=openid is not used 2017-05-24 09:23:14 +02:00
Stian Thorgersen 63c237423d Merge pull request #4098 from ahus1/KEYCLOAK-4814-disable-keycloak-spring-boot-by-configuration
KEYCLOAK-4814 disable keycloak spring boot by configuration
2017-05-24 07:12:05 +02:00
Stian Thorgersen b870e81648 Merge pull request #4176 from abstractj/KEYCLOAK-4869
[KEYCLOAK-4869] Integration tests for app-html5 are failing after upgrade to 3.1.0.Final
2017-05-24 06:59:37 +02:00
Stian Thorgersen 03308d8b20 Merge pull request #4179 from hmlnarik/KEYCLOAK-4790-Empty-attribute-value-problem-in-KC-SAML-parser
KEYCLOAK-4790 Fix empty attribute value issue in SAML parser
2017-05-24 06:48:12 +02:00
Pavel Drozd 73c328d5e3 Merge pull request #4178 from pdrozd/ldap-import-test
KEYCLOAK-4958 Fix condition for skipping test
2017-05-24 00:32:22 +02:00
Pedro Igor 829bcf5eaf Fix to evaluation tool 2017-05-23 17:50:06 -03:00
Pedro Igor 554e692d8f Merge pull request #4171 from pedroigor/KEYCLOAK-4913
[KEYCLOAK-4913] - Caching more query methods
2017-05-23 17:40:51 -03:00
Pedro Igor 366cb78a36 Merge pull request #4156 from pedroigor/master
Keycloak Authz Client dependency to adapter BOM
2017-05-23 16:19:08 -03:00
Pedro Igor 1d5bd2567e [KEYCLOAK-4913] - Caching more query methods 2017-05-23 16:13:20 -03:00
Hynek Mlnarik 67a05ee227 KEYCLOAK-4790 Fix empty attribute value issue in SAML parser 2017-05-23 15:14:25 +02:00
Pavel Drozd a9c98a577b KEYCLOAK-4958 Fix condition for skipping test 2017-05-23 14:47:14 +02:00
Stian Thorgersen c442bcd8d3 Merge pull request #4174 from stianst/KEYCLOAK-4889
KEYCLOAK-4889
2017-05-23 14:26:15 +02:00
Stian Thorgersen c00a64208a Merge pull request #4136 from frelibert/KEYCLOAK-4897
KEYCLOAK-4897
2017-05-23 14:10:34 +02:00
Gabriel Lavoie e59aeb56cc KEYCLOAK-3990: Very slow use of NamedQueries.
- Generates too many auto-flush checks by Hibernate.
- Moved to collections mapping to allow batching and the use of Hibernate L2 cache.
2017-05-23 08:09:39 -04:00
Stian Thorgersen e3a04ebd90 Merge pull request #3557 from glavoie/KEYCLOAK-3988
KEYCLOAK-3988: Multiple missing indexes on FKs.
2017-05-23 14:07:51 +02:00
Pavel Drozd 06152d9883 Merge pull request #4165 from vmuzikar/google-fix
KEYCLOAK-4944 Fix SocialLoginTest to reflect new Google Login screen
2017-05-23 14:03:08 +02:00
Pavel Drozd c230edbf72 Merge pull request #4151 from pdrozd/KEYCLOAK-4931
KEYCLOAK-4931 - install patch available from http
2017-05-23 14:01:44 +02:00
Stian Thorgersen 1b6405a28f Merge pull request #4173 from hmlnarik/KEYCLOAK-4941
KEYCLOAK-4941
2017-05-23 14:00:43 +02:00
Pavel Drozd 12fec09410 Merge pull request #4150 from pdrozd/KEYCLOAK-4930
KEYCLOAK-4930 - Updated install-keycloak script for overlay installat…
2017-05-23 14:00:35 +02:00
Stian Thorgersen ef29097679 Merge pull request #4172 from hmlnarik/KEYCLOAK-4813-Destination-Validation-should-ignore-whether-default-port-is-explicitly-specified
KEYCLOAK-4813 Destination validation counts on port being not specified
2017-05-23 13:59:36 +02:00
Pavel Drozd 0a869f56a7 Merge pull request #4146 from vramik/KEYCLOAK-4926
KEYCLOAK-4926 exclude WelcomePageTest from migration scenario
2017-05-23 13:59:26 +02:00
Stian Thorgersen cd53486566 Merge pull request #4167 from sebastienblanc/bug-KEYCLOAK-3492
Fix https://issues.jboss.org/browse/KEYCLOAK-3492
2017-05-23 13:58:19 +02:00
Stian Thorgersen ff2d6941d0 Merge pull request #4140 from mstruk/RHSSO-978
RHSSO-978 Cannot migrate event types using export/import
2017-05-23 13:55:17 +02:00
Mohammad Rezai acd78ee407 KEYCLOAK-4956: Fix incorrect PKCE S256 code challenge generation 2017-05-23 16:15:44 +04:30
Stian Thorgersen 130452f6c3 Merge pull request #4085 from mstruk/RHSSO-402
RHSSO-402 need a way to dump configuration (including ldap provider config) to a file
2017-05-23 13:29:32 +02:00
Stian Thorgersen 178fd08d9a Merge pull request #4066 from johnament/KEYCLOAK-4765
KEYCLOAK-4765 - Add ability to disable Query Parameter parsing.
2017-05-23 13:24:08 +02:00
Stian Thorgersen 097a2267f5 KEYCLOAK-4889
Improve error messages for password policies
2017-05-23 13:18:06 +02:00
Bruno Oliveira 7afdd98499 [KEYCLOAK-4869] Integration tests for app-html5 are failing after upgrade to 3.1.0.Final 2017-05-23 08:02:29 -03:00
Hynek Mlnarik f47283f61a KEYCLOAK-4813 Destination validation counts on port being not specified 2017-05-23 12:52:48 +02:00
Hynek Mlnarik 03b1dff1bd KEYCLOAK-4941 2017-05-23 11:15:51 +02:00
Marek Posolda 804766827c Merge pull request #4170 from mposolda/KEYCLOAK-4016_backToAppLink
KEYCLOAK-4016 Provide a Link to go Back to The Application on a Timeout
2017-05-23 09:53:16 +02:00
mposolda 8adde64e2c KEYCLOAK-4016 Provide a Link to go Back to The Application on a Timeout 2017-05-23 09:08:58 +02:00
Stian Thorgersen ca8577fb4a Merge pull request #4169 from NetForce1/KEYCLOAK-4911
KEYCLOAK-4911 charset not specified by Java client registration API
2017-05-23 08:20:38 +02:00
Pedro Igor 37a98fba20 [KEYCLOAK-4913] - Caching more query methods 2017-05-22 19:08:24 -03:00
Daan de Wit ef6b303bfe KEYCLOAK-4911 charset not specified by Java client registration API 2017-05-22 15:22:39 +02:00
Pedro Igor 8d40ee17f1 Merge pull request #4166 from pedroigor/stan-ui-fixes
[EYCLOAK-4915] - Review AuthZ UIs
2017-05-22 10:10:09 -03:00
Stian Thorgersen 29c5d683d0 Merge pull request #4164 from abacusresearch/KEYCLOAK-4940_typo_in_German_email_verification_body
KEYCLOAK-4940 Fix typo in German email verification body
2017-05-22 10:33:05 +02:00
emilienbondu 3580dea399 Fix https://issues.jboss.org/browse/KEYCLOAK-3492 2017-05-22 10:18:22 +02:00
Pedro Igor 7ae117707b Fixing validation of required fields 2017-05-19 19:45:47 -03:00
Pedro Igor d1d590b45c Delete action on lists 2017-05-19 19:45:47 -03:00
Pedro Igor 62ffab7239 Exporting a client is updating policy config 2017-05-19 19:45:47 -03:00
Pedro Igor 7681c76ee1 Keycloak AuthZ Client as spring-boot-starter dependency 2017-05-19 17:15:22 -03:00
Bill Burke ab763e7c5b fixes after merge 2017-05-19 15:54:36 -04:00
Vaclav Muzikar c2379dbe49 KEYCLOAK-4944 Fix SocialLoginTest to reflect new Google Login screen 2017-05-19 18:07:05 +02:00
Bill Burke f114895cd2 for merge 2017-05-19 11:29:26 -04:00
Marek Posolda ce9320755d Merge pull request #4163 from mposolda/master
KEYCLOAK-4939 ConcurrentLoginTest broken in latest master
2017-05-19 17:26:39 +02:00
Dominik Langenegger dce4353e0d KEYCLOAK-4940 Fix typo in German email verification body 2017-05-19 14:26:40 +02:00
Marek Posolda 4d5ca2b8fa Merge pull request #4159 from hmlnarik/KEYCLOAK-4627-Nicer-text-in-html-email
KEYCLOAK-4627 Nicer link texts in HTML variant of emails
2017-05-19 14:03:39 +02:00
Marek Posolda 8e4899f874 Merge pull request #4158 from hmlnarik/KEYCLOAK-4627-Change-wording
KEYCLOAK-4627 Change wording of the configuration in UI
2017-05-19 14:03:24 +02:00
mposolda e2a7b71cf3 KEYCLOAK-4939 ConcurrentLoginTest broken in latest master 2017-05-19 14:00:52 +02:00
vramik f0386d9374 KEYCLOAK-4926 exclude WelcomePageTest from migration scenario 2017-05-19 13:30:01 +02:00
Stian Thorgersen 336d05dd34 Merge pull request #4157 from stianst/DIST-UPDATES
Dist updates
2017-05-19 12:22:11 +02:00
Marek Posolda d80381ec0d Merge pull request #4139 from vramik/KEYCLOAK-4827
KEYCLOAK-4827 Add tests for concurrent use of user session in cache
2017-05-19 11:14:57 +02:00
Hynek Mlnarik d4f870fbb4 KEYCLOAK-4627 Nicer link texts in HTML variant of emails 2017-05-19 10:08:02 +02:00
Stian Thorgersen 0b6c9aa927 KEYCLOAK-4723
Refactor service dependencies for caches in KeycloakServerDeploymentProcessor
2017-05-19 09:43:15 +02:00
Hynek Mlnarik ca8d756c05 KEYCLOAK-4627 Change wording of the configuration in UI 2017-05-19 09:39:58 +02:00
Stian Thorgersen a2af516df7 KEYCLOAK-4855
[RHSSO] Compilation issues with Bouncycastle 1.56
2017-05-19 09:37:32 +02:00
Stian Thorgersen 43a625db28 KEYCLOAK-4477 Fix update to WF 11 2017-05-19 08:31:29 +02:00
Stian Thorgersen cc42ea9332 KEYCLOAK-4773 Remove 'providers' directory 2017-05-19 06:24:58 +02:00
Stian Thorgersen 9ec3a8c3d9 KEYCLOAK-4933 Fixes 2017-05-19 06:24:58 +02:00
Stian Thorgersen 2e83eda172 KEYCLOAK-4477 Update to WildFly 11 2017-05-19 06:24:58 +02:00
Stian Thorgersen 6d8a3f7a8b KEYCLOAK-4933 Fixes 2017-05-19 06:24:58 +02:00
Bob McWhirter 56d68c17f5 KEYCLOAK-4933
Use a newer version of the server-provisioning-plugin.

By using a newer version of the plugin, we can reduce
the amount of build code that replicates the provisioning
logic when building overlays.

This applies to both:

* Server distribution overlay
* Adapter distribution overlay

Both overlays are created purely by using the provisioning
plugin and the feature-packs produced elsewhere in the build,
along with the admin-cli artifact when appropriate.
2017-05-19 06:24:58 +02:00
Stian Thorgersen dac848e164 Merge pull request #4142 from stianst/master
KEYCLOAK-4921
2017-05-19 06:15:23 +02:00
Pedro Igor badabf8385 Keycloak Authz Client dependency to adapter BOM 2017-05-18 20:36:16 -03:00
Bill Burke d22a284df1 Merge pull request #4149 from patriot1burke/master
KEYCLOAK-4929
2017-05-18 18:56:03 -04:00
Pavel Drozd 60ef910b5b KEYCLOAK-4931 - install patch available from http 2017-05-18 23:47:12 +02:00
Pavel Drozd 53ab314eb9 KEYCLOAK-4930 - Updated install-keycloak script for overlay installation - added ha installation. 2017-05-18 23:35:04 +02:00
Bill Burke 2cac8b1bb7 KEYCLOAK-4929 2017-05-18 16:53:31 -04:00
Bill Burke c291748f43 KEYCLOAK-4929 2017-05-18 16:48:04 -04:00
Pedro Igor c6ff1037dc Merge pull request #4148 from pedroigor/KEYCLOAK-4927
[KEYCLOAK-4927] - Authz client incompatible with client definition
2017-05-18 14:55:10 -03:00
Pedro Igor b68494b3f0 [KEYCLOAK-4927] - Authz client incompatible with client definition 2017-05-18 09:57:12 -03:00
Marek Posolda 39afd4a020 Merge pull request #4147 from hmlnarik/KEYCLOAK-4627-Action-tokens-theme-typo
KEYCLOAK-4627 Action tokens theme typo
2017-05-18 14:30:41 +02:00
Hynek Mlnarik 355af6d1cf KEYCLOAK-4627 Action tokens theme typo 2017-05-18 14:27:53 +02:00
Marek Posolda 69ada965d8 Merge pull request #4144 from hmlnarik/KEYCLOAK-4187-Action-tokens-additional-tests
KEYCLOAK-4627 Additional tests for action tokens
2017-05-18 14:04:43 +02:00
Hynek Mlnarik f9767ad6cd KEYCLOAK-4627 Additional tests for action tokens 2017-05-18 12:04:32 +02:00
Stian Thorgersen 28acf489a1 KEYCLOAK-4921
add-user-keycloak broken
2017-05-18 09:33:33 +02:00
Marek Posolda 86f95d3f87 Merge pull request #4141 from mposolda/master
KEYCLOAK-4907 Fix postgresql and mssql. Fix migration
2017-05-18 08:41:07 +02:00
mposolda c178a2392d KEYCLOAK-4907 Fix postgresql and mssql. Fix migration 2017-05-17 22:44:44 +02:00
Hynek Mlnarik 10c9e0f00f KEYCLOAK-4897 Tests for assertion-only signatures with encrypted assertions 2017-05-17 15:56:49 +02:00
Frederik Libert 71f0db0837 KEYCLOAK-4897
SAML Adapter fails to validate signature on encrypted assertion.
2017-05-17 15:47:04 +02:00
Marko Strukelj 27b291c345 RHSSO-978 Cannot migrate event types using export/import 2017-05-16 18:52:58 +02:00
Gabriel Lavoie 4581272dcd KEYCLOAK-3988: Multiple missing indexes on FKs. 2017-05-15 08:15:58 -04:00
Marek Posolda 70d7e07526 Merge pull request #4132 from mposolda/cross-dc4-squash
KEYCLOAK-4626 KEYCLOAK-4627 Authentication sessions & Action tokens
2017-05-15 12:46:43 +02:00
Marko Strukelj 7d0ca42c6c RHSSO-402 need a way to dump configuration (including ldap provider config) to a file 2017-05-15 12:13:58 +02:00
Marek Posolda 9804aaf796 Merge pull request #4125 from mtrue01/mtrue01branch
Fixes for ApacheDS
2017-05-15 11:03:24 +02:00
Bill Burke 954ef99f22 Merge remote-tracking branch 'upstream/master' 2017-05-12 10:10:29 -04:00
Bill Burke 789722ec6a Merge pull request #4137 from pedroigor/master
Caching improvements and checking attachments in Elytron adapter
2017-05-12 10:09:44 -04:00
Pedro Igor d824b4d93c Changing cache key for findByResource 2017-05-12 10:25:06 -03:00
Pedro Igor 7569493b17 Invalidating cache for findByowner 2017-05-12 10:23:54 -03:00
Pedro Igor aaddb035a8 Checking if attachments are supported by the underlying container 2017-05-12 10:23:37 -03:00
vramik cc6a5419de KEYCLOAK-4827 Add tests for concurrent use of user session in cache 2017-05-12 14:14:14 +02:00
mposolda 7d8796e614 KEYCLOAK-4626 Support for sticky sessions with AUTH_SESSION_ID cookie. Clustering tests with embedded undertow. Last fixes. 2017-05-11 22:24:07 +02:00
Hynek Mlnarik b8262a9f02 KEYCLOAK-4628 Single-use cache + its functionality incorporated into reset password token. Utilize single-use cache for relevant actions in execute-actions token 2017-05-11 22:16:26 +02:00
mposolda db8b733610 KEYCLOAK-4626 Fix TrustStoreEmailTest and PolicyEvaluationCompositeRoleTest. Distribution update 2017-05-11 22:16:26 +02:00
Hynek Mlnarik c431cc1b01 KEYCLOAK-4627 IdP email account verification + code cleanup. Fix for concurrent access to auth session notes 2017-05-11 22:16:26 +02:00
mposolda 168153c6e7 KEYCLOAK-4626 Authentication sessions - SAML, offline tokens, broker logout and other fixes 2017-05-11 22:16:26 +02:00
Hynek Mlnarik 47aaa5a636 KEYCLOAK-4627 reset credentials and admin e-mails use action tokens. E-mail verification via action tokens. 2017-05-11 22:16:26 +02:00
mposolda e7272dc05a KEYCLOAK-4626 AuthenticationSessions - brokering works. Few other fixes and tests added 2017-05-11 22:16:26 +02:00
Hynek Mlnarik b55b089355 KEYCLOAK-4627 Changes in TokenVerifier to include token in exceptions. Reset credentials uses checks to validate individual token aspects 2017-05-11 22:16:26 +02:00
mposolda a9ec69e424 KEYCLOAK-4626: AuthenticationSessions - working login, registration, resetPassword flows 2017-05-11 22:16:26 +02:00
Hynek Mlnarik 19a41c8704 KEYCLOAK-4627 Refactor TokenVerifier to support more than just access token checks. Action tokens implementation with reset e-mail action converted to AT 2017-05-11 22:16:26 +02:00
mposolda 83b29c5080 KEYCLOAK-4626 AuthenticationSessions: start 2017-05-11 22:16:26 +02:00
Marek Posolda f392e79ad7 Merge pull request #4130 from mposolda/master
KEYCLOAK-4829 Access token from offline token falsely reported as ina…
2017-05-11 21:55:53 +02:00
mposolda e4aba9e471 KEYCLOAK-4829 Access token from offline token falsely reported as inactive by token introspection 2017-05-11 21:17:04 +02:00
Mark True c19d6f36ed KEYCLOAK-4350 fixes test for embedded LDAP for ApacheDS 2017-05-11 09:10:26 -04:00
Stian Thorgersen 14908d9038 Merge pull request #4128 from stianst/KEYCLOAK-4523
KEYCLOAK-4523 PBKDF2WithHmacSHA256 and PBKDF2WithHmacSHA512 providers
2017-05-11 13:35:15 +02:00
Stian Thorgersen c3a2b3a6b6 KEYCLOAK-4523 PBKDF2WithHmacSHA256 and PBKDF2WithHmacSHA512 providers 2017-05-11 11:58:22 +02:00
Stan Silvert 9378ede362 Merge pull request #4126 from ssilvert/def-typed
KEYCLOAK-4822: Update types to be ES6 compatible
2017-05-10 20:43:00 -04:00
Shane Bryzak 349a59cf35 KEYCLOAK-4886 update Openshift view template to allow setting an alias and display name
Signed-off-by: Shane Bryzak <sbryzak@redhat.com>
2017-05-11 09:27:49 +10:00
Stan Silvert 64cd689e38 KEYCLOAK-4822: Change copyright to reflect correct author. 2017-05-10 16:32:05 -04:00
Bill Burke bfb4395b28 role and Users finished UI work 2017-05-10 15:25:04 -04:00
Bill Burke 46ec12c41c fixes 2017-05-10 14:19:10 -04:00
Pedro Igor 0d9ffd4e64 Merge pull request #4122 from pedroigor/master
Test for role policy evaluation
2017-05-10 10:03:29 -03:00
Stian Thorgersen d39d39a8eb Merge pull request #4123 from knutz3n/KEYCLOAK-4875
KEYCLOAK-4875 Use realm name to generate configuration url
2017-05-10 06:44:05 +02:00
Johannes Knutsen b64817761a KEYCLOAK-4875 Use realm name instead of realm id to generate OpenID Endpoint Configuration URL in admin's Realm Settings page 2017-05-09 22:05:10 +02:00
Stian Thorgersen f3febd1067 Merge pull request #4121 from stianst/KEYCLOAK-4873
Keycloak 4873
2017-05-09 20:46:21 +02:00
Pedro Igor ec53af29c5 Merge pull request #4117 from pedroigor/KEYCLOAK-4867
[KEYCLOAK-4867] - Cluster events and invalidations
2017-05-09 15:27:46 -03:00
Pedro Igor c0b08a27a2 Test for role policy evaluation 2017-05-09 15:27:19 -03:00
Stian Thorgersen 18295497ae Bump RH-SSO version to 7.2.0.DR3 2017-05-09 19:44:37 +02:00
Pedro Igor 978619ead0 [KEYCLOAK-4867] - Missing cache config in server overlay 2017-05-09 14:21:06 -03:00
Stian Thorgersen 12e56086d5 KEYCLOAK-4873
product.version property should refer to product version
2017-05-09 19:17:42 +02:00
Bill Burke a8a8ea4bcd Merge remote-tracking branch 'upstream/master' 2017-05-08 13:49:03 -04:00
Bill Burke f760427c5c fine grain tests 2017-05-08 13:48:51 -04:00
Stian Thorgersen 126830cd8b Merge pull request #4120 from stianst/KEYCLOAK-4870
Fix readme
2017-05-08 15:40:43 +02:00
Stian Thorgersen e738b84fd5 Fix readme 2017-05-08 15:39:23 +02:00
Stian Thorgersen 59d5604699 Merge pull request #4119 from stianst/KEYCLOAK-4870
KEYCLOAK-4870
2017-05-08 15:37:51 +02:00
Stian Thorgersen 68c7da141b Fix 2017-05-08 15:14:55 +02:00
Stian Thorgersen f63c60855e Fix compilation error in SAMLParserTest.java 2017-05-08 14:45:45 +02:00
Stian Thorgersen f0a0b553e5 KEYCLOAK-4870
Travis doesn't run unit tests
2017-05-08 14:35:17 +02:00
Pedro Igor e14be4460b [KEYCLOAK-4867] - Cluster events and invalidations 2017-05-05 22:48:51 -03:00
Stan Silvert 2d825dd366 KEYCLOAK-4822: Update to ES6-compatible typings 2017-05-05 15:08:23 -04:00
Stian Thorgersen f4f9a98e70 Merge pull request #4114 from knutz3n/KEYCLOAK-4862
KEYCLOAK-4862: Expose client description in ClientBean
2017-05-05 15:43:38 +02:00
Johannes Knutsen 47a8077426 KEYCLOAK-4862: Expose client description in ClientBean 2017-05-05 15:06:21 +02:00
Bill Burke e1b6ba13cc Merge pull request #3893 from anderius/feature/KEYCLOAK-3056-verify-signature
[WIP] Saml broker: Added wantAssertionsSigned and wantAssertionsEncrypted
2017-05-05 09:04:41 -04:00
Stian Thorgersen 8da766e02e Merge pull request #4104 from sjvs/master
Fix three lgtm.com alerts: two possible NPEs, one possible int overflow
2017-05-05 13:13:02 +02:00
Pavel Drozd a8071356bb Merge pull request #4109 from mhajas/KEYCLOAK-4503
KEYCLOAK-4503 Add test
2017-05-05 13:06:50 +02:00
Pavel Drozd ec5860d7f5 Merge pull request #4102 from mhajas/KEYCLOAK-4650
KEYCLOAK-4650 Add cancel warning test
2017-05-05 13:06:03 +02:00
Stian Thorgersen 7c2fcaf141 Merge pull request #4113 from stianst/master
Fixes for product build
2017-05-05 12:55:33 +02:00
Stian Thorgersen e0da7ed6b4 Merge pull request #4074 from sebastienblanc/allow_headers
Keycloak-3297 : adding cors-exposed-headers to conf
2017-05-05 12:54:47 +02:00
Marek Posolda 5e1654658f Merge pull request #4112 from r0nin/master
KEYCLOAK-4521: consider offline sessions if no active user session exists
2017-05-05 12:13:09 +02:00
Stian Thorgersen e6477ed261 KEYCLOAK-4856
[RHSSO] Adapter feature pack requires org.jboss.eap:wildfly-feature-pack in product
2017-05-05 12:08:22 +02:00
Stian Thorgersen 43f64e51c6 KEYCLOAK-4857
[RHSSO] async-http-servlet-3.0 missing in newest resteasy
2017-05-05 12:08:22 +02:00
Stian Thorgersen b00651391b KEYCLOAK-4859 [RHSSO] Upgrade to EAP 7.1.0 Alpha17 2017-05-05 12:08:22 +02:00
Stan Silvert 2e66cd1070 Merge pull request #4108 from ssilvert/error_description
KEYCLOAK-4462: Unexpected error when creat client w/ existing ClientID
2017-05-04 16:29:43 -04:00
Stan Silvert 55f3d8c1d0 KEYCLOAK-4462: Use errorInterceptor instead of handling errors locally 2017-05-04 15:21:05 -04:00
Marc Heide d5c643eaf9 KEYCLOAK-4521: consider offline sessions if no active user session was found for user info endpoint 2017-05-04 15:25:09 +02:00
Stian Thorgersen ee327b7eec Merge pull request #4111 from mstruk/KEYCLOAK-4854
KEYCLOAK-4854 Cordova example fails on iOS 10
2017-05-04 10:43:49 +02:00
Stian Thorgersen 5fd704af58 Merge pull request #4110 from mstruk/KEYCLOAK-4037
KEYCLOAK-4037 JS Adapter fails in Cordova mode for iOS apps
2017-05-04 10:43:14 +02:00
Marko Strukelj aa1eb334e0 KEYCLOAK-4854 Cordova example fails on iOS 10 2017-05-03 17:20:01 +02:00
Marko Strukelj 47ea1ade8a KEYCLOAK-4037 JS Adapter fails in Cordova mode for iOS apps 2017-05-03 17:05:54 +02:00
mhajas b33f7414da KEYCLOAK-4503 Add test 2017-05-03 08:51:26 +02:00
Stian Thorgersen 16aaa3bf01 Merge pull request #4103 from vramik/KEYCLOAK-4819
KEYCLOAK-4819 update product.filename.version
2017-05-02 09:32:50 +02:00
Stan Silvert b8fecca0ba KEYCLOAK-4462: Unexpected error when creating client with existing
ClientID
2017-05-01 18:13:27 -04:00
Stan Silvert b824c4195a Merge pull request #4107 from ssilvert/idp-table-header
KEYCLOAK-4720: Wrongly positioned IdPs table header
2017-05-01 17:10:54 -04:00
Stan Silvert 1438982104 KEYCLOAK-4720: Wrongly positioned IdPs table header 2017-05-01 15:19:44 -04:00
Bill Burke c3b44e61d4 Merge remote-tracking branch 'upstream/master' 2017-05-01 14:51:07 -04:00
Bill Burke 93ef2ec9bf Merge pull request #4105 from patriot1burke/master
KEYCLOAK-4821
2017-04-29 18:01:43 -04:00
Bill Burke af792b8abe fix 2017-04-29 17:03:36 -04:00
Bill Burke 1f4311a02c KEYCLOAK-4821 2017-04-29 10:41:32 -04:00
Bas van Schaik ff6dbd6bde Fix lgtm.com alert: cast int to long before multiplication
The integer multiplication has the potential to overflow before the
result is being cast to the 'long' result.

Details:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/dist-7900299-1490802114895/files/saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/util/XMLTimeUtil.java#V133
2017-04-28 14:54:47 +01:00
Bas van Schaik 2df1175315 Fix lgtm.com alert: potential NPE due to non-short circuit logic
The logical-AND operator '&&' evaluates its operands in order, which is
what is required here. The bitwise-AND operator '&' always evaluates all
operands, which will in some cases result in a NPE in the second
operand.

Details:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/dist-7900299-1490802114895/files/services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java#V543
2017-04-28 14:51:51 +01:00
Bas van Schaik eb93eef874 Fix lgtm.com alert: variable 'config' is always null (likely false logic)
Details:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/dist-7900299-1490802114895/files/model/jpa/src/main/java/org/keycloak/models/jpa/JpaUserCredentialStore.java#V122
2017-04-28 14:50:30 +01:00
vramik 5b926a3da6 KEYCLOAK-4819 update product.filename.version 2017-04-28 14:40:37 +02:00
mhajas 618a8e7f90 KEYCLOAK-4650 Add cancel warning test 2017-04-28 14:18:01 +02:00
Alexander Schwartz 5a8634e359 KEYCLOAK-4814 disable keycloak spring boot by configuration 2017-04-28 09:48:42 +02:00
Stian Thorgersen bbed1ffca7 Merge pull request #4097 from stianst/KEYCLOAK-4717
KEYCLOAK-4717 Add test
2017-04-28 09:42:21 +02:00
Stian Thorgersen 09ecc37ccb Merge pull request #3779 from Pirayya/KEYCLOAK-4204-brute-force-extension-for-permanent-lockout
KEYCLOAK-4204 Extend brute force protection with permanent lockout on…
2017-04-28 09:35:55 +02:00
Stian Thorgersen ab8658333f KEYCLOAK-4717 Add test 2017-04-28 09:05:10 +02:00
Eriksson Fabian ca1152c3e5 KEYCLOAK-4204 Extend brute force protection with permanent lockout on failed attempts
- Can still use temporary brute force protection.
- After X-1 failed login attempt, if the user successfully logs in his/her fail login count is reset.
2017-04-28 09:02:10 +02:00
Pavel Drozd 7bcbc9a6af Merge pull request #4042 from daklassen/KEYCLOAK-2976
KEYCLOAK-2976 Merge two "ClientTest" classes in integration-arquillian
2017-04-27 17:16:58 +02:00
Stian Thorgersen 6073f4c159 Merge pull request #4093 from sebastienblanc/update_starter
rename the starter and spring-boot-starter
2017-04-27 16:25:51 +02:00
sebastienblanc dee4548798 rename the starter and spring-boot-starter 2017-04-27 15:54:44 +02:00
Stian Thorgersen 8f9b6a5e44 Merge pull request #4092 from stianst/master
Set version to 3.2.0.CR1-SNAPSHOT
2017-04-27 14:59:29 +02:00
Stian Thorgersen 87dedb56e5 Set version to 3.2.0.CR1-SNAPSHOT 2017-04-27 14:23:03 +02:00
Stian Thorgersen 6e9b9bedbb Merge pull request #4091 from stianst/master
Fix downloads dist
2017-04-27 14:14:31 +02:00
Stian Thorgersen 57bf9254e1 Fix downloads dist 2017-04-27 14:14:12 +02:00
Stian Thorgersen f0ac725984 Merge pull request #4089 from stianst/master
Fix spring boot starter pom
2017-04-27 12:40:45 +02:00
Stian Thorgersen c0e03c05c7 Fix spring boot starter pom 2017-04-27 12:40:23 +02:00
Stian Thorgersen 14cf2c9aba Merge pull request #4088 from sebastienblanc/KEYCLOAK-4804
KEYCLOAK-4804 : Added a new container bundle module for Spring Boot
2017-04-27 10:16:49 +02:00
sebastienblanc 0781f3b33d add shading
add new module containing adapters

remove conditional bean

move bundle module
2017-04-27 09:15:36 +02:00
Pavel Drozd b683e43ea7 Merge pull request #4059 from vramik/KEYCLOAK-4776
KEYCLOAK-4776 include newly created tests to travis
2017-04-27 08:08:17 +02:00
Pavel Drozd 51e4beccf4 Merge pull request #4076 from vramik/KEYCLOAK-4732
KEYCLOAK-4732 fix for wildfly
2017-04-27 08:06:55 +02:00
Bill Burke c7bdb489ee Merge remote-tracking branch 'upstream/master' 2017-04-26 18:57:56 -04:00
Bill Burke 2b84b8255e Update host-slave.xml 2017-04-26 18:57:31 -04:00
Pedro Igor 0cad34abbe Merge pull request #4087 from pedroigor/master
Checking realm role directly
2017-04-26 16:51:14 -03:00
Pedro Igor 389e2b42f1 Test for uma_authorization scope 2017-04-26 16:04:37 -03:00
Bill Burke 2276f99d54 Merge remote-tracking branch 'upstream/master' 2017-04-26 14:39:45 -04:00
Bill Burke f67013bcb6 fix 2017-04-26 14:39:41 -04:00
Pedro Igor 4e43518b2a Checking realm role directly 2017-04-26 15:39:37 -03:00
Stian Thorgersen cc27dd485b Merge pull request #4083 from knutz3n/KEYCLOAK-4780
KEYCLOAK-4780 Ensure Base64 encoded HMAC secret key is decoded before use
2017-04-26 20:19:33 +02:00
Pedro Igor b78cc63f0d Merge pull request #4084 from pedroigor/KEYCLOAK-4755
[KEYCLOAK-4755] - Client UI Tests
2017-04-26 13:29:00 -03:00
Pedro Igor b84507507d Merge pull request #4079 from mhajas/KEYCLOAK-4769
KEYCLOAK-4769 Add test for URI priority
2017-04-26 12:20:53 -03:00
Pedro Igor fbcfcfa088 [KEYCLOAK-4755] - Client UI Tests 2017-04-26 12:11:53 -03:00
Johannes Knutsen 0809033924 KEYCLOAK-4780 Ensure Base64 encoded HMAC secret key is decoded before use 2017-04-26 16:04:44 +02:00
Stian Thorgersen d6a0c9e186 Merge pull request #4082 from stianst/KEYCLOAK-4713
KEYCLOAK-4713 Update domain mode config for EAP 7.1
2017-04-26 15:59:02 +02:00
John Ament b37ed7145c KEYCLOAK-4765 - Adding support for wildfly subsystem disable query parameter parsing. 2017-04-26 09:42:00 -04:00
Stian Thorgersen 7c2ea4db98 Merge pull request #4080 from hmlnarik/KEYCLOAK-2122-Config-of-AssertionConsumerServiceUrl-in-Saml-Adapter
KEYCLOAK-2122 Configuration of AssertionConsumerServiceUrl in SAML adapter
2017-04-26 15:26:50 +02:00
Stian Thorgersen 4b417c5ae8 KEYCLOAK-4713 Update domain mode config for EAP 7.1 2017-04-26 15:17:43 +02:00
Stian Thorgersen 2913ee8e23 Merge pull request #4081 from stianst/KEYCLOAK-4785
KEYCLOAK-4785 Use realm name when creating admin console base url
2017-04-26 13:12:31 +02:00
Stian Thorgersen eedb40bbe0 Merge pull request #4071 from stianst/KEYCLOAK-4784
KEYCLOAK-4784 Cannot build project with -Dproduct
2017-04-26 12:51:20 +02:00
Stian Thorgersen f68b28db20 KEYCLOAK-4785 Use realm name when creating admin console base url 2017-04-26 12:39:56 +02:00
Stian Thorgersen c83e192a6f KEYCLOAK-4784 Add Jetty 9.3 to product profile 2017-04-26 12:07:47 +02:00
Hynek Mlnarik d7615d6a68 KEYCLOAK-2122 Configuration of AssertionConsumerServiceUrl in SAML adapter 2017-04-26 11:59:37 +02:00
mhajas 9c0e7cb4a5 KEYCLOAK-4769 Add test for URI priority 2017-04-26 08:32:40 +02:00
Pavel Drozd f1f2040910 Merge pull request #4000 from mhajas/KEYCLOAK-4703
KEYCLOAK-4703 Use phantomJS in adapter tests
2017-04-26 08:04:41 +02:00
John Ament 1f98dc5527 KEYCLOAK-4765 - Simplified unit tests. 2017-04-25 20:38:07 -04:00
John Ament 754b0fd123 KEYCLOAK-4765 - Adding integration tests for adapter module. 2017-04-25 20:29:35 -04:00
Pedro Igor 0ccb98a81f Merge pull request #4078 from pedroigor/KEYCLOAK-3135
[KEYCLOAK-3135] - Rules UI Tests
2017-04-25 18:04:09 -03:00
Pedro Igor 5b5cfb01b9 Merge pull request #4077 from pedroigor/KEYCLOAK-4792
[KEYCLOAK-4792] - Client credentials provider support and making easier to obtain authz client
2017-04-25 18:03:32 -03:00
Pedro Igor b3131bf679 [KEYCLOAK-3135] - Rules UI Tests 2017-04-25 16:52:14 -03:00
Pedro Igor 79c9078caa [KEYCLOAK-4792] - Client credentials provider support and making easier to obtain authz client 2017-04-25 14:51:45 -03:00
Pedro Igor 4b01c8e4dc Merge pull request #4075 from pedroigor/KEYCLOAK-4732
[KEYCLOAK-4732] - Need to run the test using the target testing realm
2017-04-25 13:38:50 -03:00
vramik a3c57f4326 KEYCLOAK-4732 fix for wildfly 2017-04-25 13:57:14 +02:00
Pedro Igor ab58779d22 [KEYCLOAK-4732] - Need to run the test using the target testing realm 2017-04-25 08:34:39 -03:00
Pedro Igor 38ae6c981b Merge pull request #4068 from pedroigor/KEYCLOAK-3135
[KEYCLOAK-3135] - Scope permission UI tests and reusable ui-select2 component
2017-04-25 08:19:32 -03:00
Marek Posolda e678a0362b Merge pull request #4073 from mposolda/master
KEYCLOAK-4789 Can't remove userStorage when linked users have consent
2017-04-25 12:23:03 +02:00
emilienbondu 46bc102799 adding cors-exposed-headers to conf
add missing field in the BaseAdapterConfig

cleaning for PR & adding unit test

Adding property to subsystem, removing formatting changes
2017-04-25 12:02:17 +02:00
mposolda 8000baeb1f KEYCLOAK-4789 Can't remove userStorage when linked users have consent 2017-04-25 11:32:26 +02:00
Stian Thorgersen cf7f28d97e Merge pull request #4031 from abacusresearch/KEYCLOAK-4736_http_header_x-xss-protection
KEYCLOAK-4736 Extend security defenses with X-XSS-Protection header
2017-04-25 10:38:21 +02:00
Stian Thorgersen 84f5df4814 Merge pull request #4070 from stianst/KEYCLOAK-4671
KEYCLOAK-4671 Add server-private-spi to dependency deployer
2017-04-25 10:36:22 +02:00
Stian Thorgersen d081f967ea Merge pull request #4067 from hmlnarik/KEYCLOAK-4779
KEYCLOAK-4779 Fix NPE
2017-04-25 10:31:00 +02:00
Stian Thorgersen 54ee055bd8 KEYCLOAK-4671 Add server-private-spi to dependency deployer 2017-04-25 10:16:24 +02:00
Marek Posolda e48340121b Merge pull request #4069 from mposolda/master
KEYCLOAK-4271 Migration test for offline tokens - manual mode
2017-04-25 10:10:19 +02:00
mposolda b81891f89b KEYCLOAK-4271 Migration test for offline tokens - manual mode 2017-04-25 09:18:33 +02:00
Stian Thorgersen 1385d3c219 Merge pull request #4062 from ssilvert/dbl-click
KEYCLOAK-4121: Prevent double form submission
2017-04-25 08:57:15 +02:00
Pedro Igor 49547ccfbc [KEYCLOAK-3135] - Scope permission UI tests and reusable ui-select2 component 2017-04-24 23:12:46 -03:00
Hynek Mlnarik e8a65017fa KEYCLOAK-4779 Fix NPE 2017-04-24 23:09:27 +02:00
Pedro Igor 5e57e84384 Merge pull request #4054 from pedroigor/KEYCLOAK-3135
[KEYCLOAK-3135] - More changes to Policy Management API
2017-04-24 17:44:07 -03:00
Pedro Igor 5972c94dc8 [KEYCLOAK-3135] - More UI tests 2017-04-24 16:50:23 -03:00
John Ament cb7cef8858 KEYCLOAK-4765 - Add ability to disable Query Parameter parsing. 2017-04-24 14:42:03 -04:00
Marek Posolda c40d79afb0 Merge pull request #4065 from mposolda/master
KEYCLOAK-4326 KEYCLOAK-4588 Can't get granted consents if client temp…
2017-04-24 16:38:20 +02:00
Bill Burke 12cb295a35 Merge remote-tracking branch 'upstream/master' 2017-04-24 10:05:46 -04:00
Bill Burke 58868ca99f prototype 2017-04-24 10:05:39 -04:00
mposolda d05a894831 KEYCLOAK-4326 KEYCLOAK-4588 Can't get granted consents if client template mappers were consented to 2017-04-24 15:44:38 +02:00
Pedro Igor dfec691de0 [KEYCLOAK-3135] - Fixing cancel button 2017-04-24 08:39:08 -03:00
Marek Posolda 03e6c0884a Merge pull request #4063 from mposolda/master
KEYCLOAK-4525 Deleting a client with existing sessions/offline_tokens…
2017-04-24 13:37:36 +02:00
Pedro Igor e0f753bcf5 [KEYCLOAK-3135] - More changes to Policy Management API 2017-04-24 07:34:08 -03:00
Frederik Libert b84f6d306d KEYCLOAK-4781 Support for an AttributeStatement Mapper 2017-04-24 11:29:55 +02:00
mposolda 1fd5af840b KEYCLOAK-4525 Deleting a client with existing sessions/offline_tokens leads to Internal Server Errors 2017-04-24 11:24:09 +02:00
Stan Silvert 8dc65cff0a KEYCLOAK-4121: Prevent double form submission 2017-04-21 14:11:44 -04:00
Stian Thorgersen 3dbd0d5063 Merge pull request #3838 from ahus1/KEYCLOAK-4208-spring-boot-adapter-roles
KEYCLOAK-4208 restructure spring auth config to match servlet spec
2017-04-21 15:34:09 +02:00
Stian Thorgersen 6c09df0cae Merge pull request #4058 from stianst/KEYCLOAK-4503
KEYCLOAK-4503 Require init with token and refreshToken
2017-04-21 15:19:09 +02:00
Stian Thorgersen 09bc16e6c5 Merge pull request #4060 from stianst/KEYCLOAK-4774
KEYCLOAK-4774 redirect_fragment doesn't work in Admin Console
2017-04-21 15:18:40 +02:00
Stian Thorgersen f92ad70ff0 KEYCLOAK-4774 redirect_fragment doesn't work in Admin Console 2017-04-21 14:03:05 +02:00
vramik 15f1b948bf KEYCLOAK-4776 include newly created tests to travis 2017-04-21 14:00:42 +02:00
Pavel Drozd 95fc8f79dd Merge pull request #4051 from mhajas/KEYCLOAK-4505
KEYCLOAK-4505 Add test of clientSession for script based authenticator
2017-04-21 13:50:29 +02:00
Pavel Drozd f50e08d111 Merge pull request #4044 from vmuzikar/adapter-compat-upstream
KEYCLOAK-4761 Support for Java adapter backward compatibility testing
2017-04-21 13:49:17 +02:00
Stian Thorgersen 257a973995 KEYCLOAK-4503 Require init with token and refreshToken 2017-04-21 13:39:53 +02:00
Stian Thorgersen 606c385f26 Merge pull request #4057 from stianst/KEYCLOAK-4480
KEYCLOAK-4480 Fix re-encoding of query params in keycloak.js after re…
2017-04-21 13:37:44 +02:00
Stian Thorgersen e6486ab1c1 KEYCLOAK-4480 Fix re-encoding of query params in keycloak.js after redirect 2017-04-21 13:29:46 +02:00
Stian Thorgersen b45089f5f0 Merge pull request #4033 from sebastienblanc/KEYCLOAK-3818
KEYCLOAK-3818 : safer method to retrieve the webcontext for jetty
2017-04-21 11:20:59 +02:00
Stian Thorgersen e85d8774da Merge pull request #4055 from ssilvert/regex-trunc
KEYCLOAK-4402: Fix regexp password policy.
2017-04-21 09:46:00 +02:00
Stan Silvert 62000e042d KEYCLOAK-4402: Fix regexp password policy. 2017-04-20 18:09:20 -04:00
Pedro Igor fa1b998802 Merge pull request #4050 from pedroigor/KEYCLOAK-4769
[KEYCLOAK-4769] - Policy enforcer path matching tests
2017-04-20 14:02:59 -03:00
Pedro Igor df163d86e8 Merge pull request #4052 from pedroigor/KEYCLOAK-4754
[KEYCLOAK-4754] - Unable to delete realm when using aggregated policies
2017-04-20 13:23:09 -03:00
Pedro Igor 70a3dd1e4a [KEYCLOAK-4769] - Better error message when resource has no or invalid uri 2017-04-20 13:21:01 -03:00
Pedro Igor 80a80512ea [KEYCLOAK-4769] - Policy enforcer path matching tests 2017-04-20 13:21:01 -03:00
mhajas 4f66919474 KEYCLOAK-4505 Add tests of clientSession for script based authenticator 2017-04-20 17:10:56 +02:00
Pedro Igor bf69bc94bb [KEYCLOAK-4754] - Unable to delete realm when using aggregated policies 2017-04-20 12:10:52 -03:00
Pavel Drozd 585653b88e Merge pull request #4038 from vmuzikar/social-fix
KEYCLOAK-4624 Fix, stabilize and revamp SocialLoginTest
2017-04-20 13:13:29 +02:00
Alexander Schwartz 4d5fd0b75e KEYCLOAK-4208 restructure spring config to match servlet spec. updating jetty, tomcat and undertow 2017-04-20 12:52:13 +02:00
Stian Thorgersen 2a8b2aabb9 Merge pull request #4049 from stianst/KEYCLOAK-4738
KEYCLOAK-4738 Make sure script engine always uses correct classloader
2017-04-20 10:02:23 +02:00
Stian Thorgersen 1d03eb5f2b Merge pull request #4045 from stianst/KEYCLOAK-4737
KEYCLOAK-4737 Admin Console redirect loop when hostname contains console
2017-04-20 09:29:41 +02:00
Stian Thorgersen 4da07474fa KEYCLOAK-4738 Make sure script engine always uses correct classloader 2017-04-20 09:28:46 +02:00
Stian Thorgersen 14b109da18 Merge pull request #4047 from stianst/KEYCLOAK-4287
KEYCLOAK-4287 Remove deprecated session iframe endpoint
2017-04-19 15:49:40 +02:00
Stian Thorgersen 7de0b329a2 Merge pull request #4046 from stianst/KEYCLOAK-4637
KEYCLOAK-4637 Fix FreeOTP url in Swedish translation
2017-04-19 15:48:12 +02:00
Stian Thorgersen 81123e0eea Merge pull request #4041 from mlindstr/KEYCLOAK-4762
KEYCLOAK-4762 Improve French translations
2017-04-19 15:46:52 +02:00
Stian Thorgersen 8919015f74 KEYCLOAK-4287 Remove deprecated session iframe endpoint 2017-04-19 15:01:15 +02:00
Stian Thorgersen b72166ebf1 Merge pull request #4043 from stianst/KEYCLOAK-4764
KEYCLOAK-4764 Fixes for distribution
2017-04-19 14:55:26 +02:00
Stian Thorgersen 10009868a3 KEYCLOAK-4637 Fix FreeOTP url in Swedish translation 2017-04-19 14:54:44 +02:00
Stian Thorgersen 0a0d2174e4 KEYCLOAK-4737 Admin Console redirect loop when hostname contains console 2017-04-19 14:43:56 +02:00
Stian Thorgersen 038c4765a3 KEYCLOAK-4764 Fixes for distribution 2017-04-19 13:58:39 +02:00
Vaclav Muzikar c7a97cfd21 KEYCLOAK-4761 Prepare the testsuite for Java adapter backward compatibility testing 2017-04-19 13:51:24 +02:00
David Klassen 19a59429ae KEYCLOAK-2976 Merge two "ClientTest" classes in integration-arquillian 2017-04-19 13:25:30 +02:00
Markus Lindström 0b21ed3e0e KEYCLOAK-4762 Improve French translations 2017-04-19 10:23:52 +02:00
Stian Thorgersen 906739f8f3 Merge pull request #4034 from sebastienblanc/KEYCLOAK-3108
KEYCLOAK-3108: Make the credentials map case insensitive
2017-04-19 09:49:07 +02:00
Stian Thorgersen c9630157e8 Merge pull request #4035 from sebastienblanc/KEYCLOAK-4486
KEYCLOAK-4486: add autodetect-bearer-only attribute in subsystem
2017-04-19 09:47:42 +02:00
Stian Thorgersen 51eef9b8b3 Merge pull request #4037 from Nicologies/master
Remove the deprecated from readString(InputStream, Charset)
2017-04-19 09:46:44 +02:00
Stian Thorgersen 330663dfd3 Merge pull request #3898 from chameleon82/KEYCLOAK-4502_Update_Russian_Translation
KEYCLOAK-4502 Update Russian translation
2017-04-19 09:41:49 +02:00
Stian Thorgersen e54c1d7de1 Merge pull request #4026 from mhajas/KEYCLOAK-4733
KEYCLOAK-4733 Replace character 160 with character 32
2017-04-18 15:21:23 +02:00
Stian Thorgersen da6781dd91 Merge pull request #4029 from abacusresearch/KEYCLOAK-4734_update_italian_translation
KEYCLOAK-4734 Update Italian translations
2017-04-18 15:14:33 +02:00
Stian Thorgersen 4f771ac51a Merge pull request #4027 from abacusresearch/KEYCLOAK-4729_update_german_translation
KEYCLOAK-4729 Update German translations
2017-04-18 15:13:39 +02:00
Pedro Igor 5ccf412fe2 Merge pull request #4039 from pedroigor/master
[KEYCLOAK-4755] - AuthZ UI Tests
2017-04-13 18:31:02 -03:00
Pedro Igor ac6eb79b53 [KEYCLOAK-4755] - Changing javadoc and license 2017-04-13 15:59:02 -03:00
Pedro Igor a415ea3670 [KEYCLOAK-4755] - AuthZ UI Tests 2017-04-13 15:54:52 -03:00
Vaclav Muzikar 32b62b2a70 KEYCLOAK-4624 Fix, stabilize and revamp SocialLoginTest 2017-04-13 13:41:30 +02:00
Pedro Igor 4344ceefc2 Merge pull request #4036 from pedroigor/master
[KEYCLOAK-4751] - Send default access denied page when requests don't match any path config
2017-04-13 08:16:32 -03:00
EbenZhang fa97c2419e Remove the deprecated from readString(InputStream, Charset)
I believe it was copied from the previous overload.
2017-04-13 15:42:23 +08:00
Pedro Igor 964693077a [KEYCLOAK-4751] - More tests 2017-04-12 18:25:38 -03:00
Pedro Igor 2a1a19f290 [KEYCLOAK-4751] - Send default access denied page when requests don't match any path config 2017-04-12 18:25:13 -03:00
Pedro Igor 2336e97bf0 Merge pull request #4030 from pedroigor/KEYCLOAK-3135
[KEYCLOAK-3135] - Part 1: Permission Management API
2017-04-12 16:02:58 -03:00
Pedro Igor b6978a424f [KEYCLOAK-3135] - Reverting change to support import unordered policies 2017-04-12 15:15:46 -03:00
Pedro Igor 8e877a7f6c [KEYCLOAK-3135] - More tests 2017-04-12 14:34:27 -03:00
sebastienblanc 886528dab8 add autodetect-bearer-only in subsystem 2017-04-12 16:40:19 +02:00
sebastienblanc 9a2d36aa9d KEYCLOAK-3108: Make the credentials map case insensitive 2017-04-12 10:58:54 +02:00
sebastienblanc ea9c663ae1 try the registered beans , then the handler 2017-04-12 10:41:46 +02:00
Pedro Igor eec712a259 [KEYCLOAK-3135] - Role and user policies apis 2017-04-12 00:52:14 -03:00
Pedro Igor 54ebc1918c [KEYCLOAK-3135] - Using abstract policy representation when creating policies and updating tests 2017-04-12 00:52:13 -03:00
Pedro Igor d60dcb4c62 [KEYCLOAK-3135] - Some more tests and making policy type rest api more generic 2017-04-12 00:52:13 -03:00
Pedro Igor 8e64bc3e4d Tests for new permission management rest api 2017-04-12 00:52:13 -03:00
Pedro Igor cf1e8d1dd8 [KEYCLOAK-3135] - Tests and typos 2017-04-12 00:52:13 -03:00
Pedro Igor 0b8fc3d6e1 [KEYCLOAK-3135] - Fixing permission test 2017-04-12 00:52:13 -03:00
Pedro Igor 55f747ecd0 [KEYCLOAK-3135] - Part 1: Permission Management API 2017-04-12 00:52:13 -03:00
sebastienblanc a011f44d39 safer method to retrieve the webcontext for jetty 2017-04-11 18:53:58 +02:00
Marek Posolda 00b832b1cd Merge pull request #4003 from abstractj/refactor-test-helper
Inclusion of support for credentials
2017-04-10 21:00:41 +02:00
Dominik Langenegger 8840bc073f KEYCLOAK-4736 Extend security defenses with additional option to set the X-XSS-Protection header, block by default 2017-04-10 11:20:07 +02:00
Pavel Drozd bfd76d7813 Merge pull request #3962 from mhajas/KEYCLOAK-4366
KEYCLOAK-4366
2017-04-10 08:44:52 +02:00
Nekrasov Aleksander 2066259518 KEYCLOAK-4502 Update Russian translation 2017-04-08 11:42:33 +07:00
Nekrasov Aleksander 9bca7fb7c5 KEYCLOAK-4502 Update russian translation 2017-04-08 11:27:34 +07:00
Bill Burke cf095766c7 Merge pull request #4028 from mtrue01/pullmyothercodefinger
[KEYCLOAK-3964] NoImport Add coverage for basic test behavior
2017-04-07 12:26:10 -04:00
Dominik Langenegger c73de4f2b9 KEYCLOAK-4734 Update Italian translations 2017-04-07 16:46:43 +02:00
Mark True 4daafa56fc [KEYCLOAK-3964] NoImport Add coverage for basic test behavior 2017-04-07 10:37:02 -04:00
Dominik Langenegger 16430791bb KEYCLOAK-4729 Update German translations 2017-04-07 16:03:34 +02:00
Pavel Drozd 5e2446f838 Merge pull request #4025 from mtrue01/pullmycodefinger
KEYCLOAK-4533 Add test for remove user from ldap
2017-04-07 16:00:37 +02:00
Pavel Drozd b18c8c92c5 Merge pull request #4007 from mhajas/KEYCLOAK-4288
KEYCLOAK-4288 Run tests on EAP7
2017-04-07 15:35:12 +02:00
mhajas e8bbfd9012 KEYCLOAK-4733 Replace character 160 with character 32 2017-04-07 15:30:54 +02:00
Mark True 94d375886f Keycloak 4533 commit 2017-04-07 09:26:22 -04:00
Bruno Oliveira f9c017efaf Inclusion of support for credentials
- Added support for credentials
- Less verbose methods
2017-04-07 06:05:24 -03:00
Stian Thorgersen 0db2640076 Merge pull request #4023 from abacusresearch/KEYCLOAK-4728_update_french_translation
KEYCLOAK-4728 Fix typo
2017-04-07 09:45:18 +02:00
Stian Thorgersen ebabc6fd8a Merge pull request #3936 from glavoie/KEYCLOAK-4563
KEYCLOAK-4563: Large user account ID and group ID may break distribut…
2017-04-07 09:37:29 +02:00
Stian Thorgersen 56320cc023 Merge branch 'master' into KEYCLOAK-4563 2017-04-07 09:36:40 +02:00
Dominik Langenegger e9d22f3506 KEYCLOAK-4728 Fix typo 2017-04-07 09:31:05 +02:00
Stian Thorgersen 83d0f313ce Merge pull request #4011 from mstruk/KEYCLOAK-4719
KEYCLOAK-4719 CLI tests fail when run from within the IDE
2017-04-07 09:17:19 +02:00
Bill Burke cac19c8a8f Merge pull request #4021 from patriot1burke/master
fix protocol mappers
2017-04-06 18:34:33 -04:00
Bill Burke 9452d37926 Merge remote-tracking branch 'upstream/master' 2017-04-06 18:33:50 -04:00
Bill Burke 2e284bdd9b fix protocol mappers 2017-04-06 18:33:06 -04:00
Bill Burke 22dc6ffcf3 Merge pull request #4020 from keycloak/revert-4019-master
Revert "KEYCLOAK-4727 KEYCLOAK-4652 - Fixing protocol mappers when evaluating policies using the tool"
2017-04-06 18:25:02 -04:00
Bill Burke 54cd41c955 Revert "KEYCLOAK-4727 KEYCLOAK-4652 - Fixing protocol mappers when evaluating policies using the tool" 2017-04-06 18:24:31 -04:00
Pedro Igor 7cf8bd2dcf Merge pull request #4019 from pedroigor/master
KEYCLOAK-4727 KEYCLOAK-4652 - Fixing protocol mappers when evaluating policies using the tool
2017-04-06 19:20:14 -03:00
Pedro Igor 6a959b32fc KEYCLOAK-4727 KEYCLOAK-4652 - Fixing protocol mappers when evaluating policies using the tool 2017-04-06 18:43:54 -03:00
Bill Burke 3ce0c57e17 Merge pull request #3831 from Hitachi/master
KEYCLOAK-2604 Proof Key for Code Exchange by OAuth Public Clients
2017-04-06 15:36:08 -04:00
Bill Burke 0fd11d16ee Merge pull request #3983 from bartoszmajsak/oso_typo_fix
Fixes misspelled config class in Openshift provider
2017-04-06 15:29:44 -04:00
Bill Burke 6ca5b7de03 Merge pull request #3998 from cainj13/fixNullProtocols
Fix null protocols for default clients
2017-04-06 15:29:21 -04:00
Bill Burke c198f4ffa7 Merge pull request #4015 from patriot1burke/master
KEYCLOAK-4727 KEYCLOAK-4652
2017-04-06 15:27:49 -04:00
Bill Burke 665bcab7b7 Merge remote-tracking branch 'upstream/master' 2017-04-06 15:10:31 -04:00
Bill Burke 13afc0147e close user/client session later 2017-04-06 15:07:40 -04:00
Bill Burke 26db0dd1fc Merge pull request #4016 from pedroigor/KEYCLOAK-4726
[KEYCLOAK-4726] - Multiple role policies crash realm delete
2017-04-06 13:21:53 -04:00
Pedro Igor 1f50421a54 [KEYCLOAK-4726] - Multiple role policies crash realm delete 2017-04-06 12:36:03 -03:00
Bill Burke 1b3549f828 oops 2017-04-06 10:49:48 -04:00
Bill Burke d635e7aadd oops 2017-04-06 10:48:23 -04:00
Bill Burke 201d2c6aac Merge remote-tracking branch 'upstream/master' 2017-04-06 10:44:43 -04:00
Bill Burke 31074c3c8d KEYCLOAK-4727 KEYCLOAK-4652 2017-04-06 10:44:33 -04:00
Stian Thorgersen 2876a98a97 Merge pull request #4013 from stianst/KEYCLOAK-4702
KEYCLOAK-4702 Use service dependency on jndi entry for caches
2017-04-06 15:44:21 +02:00
Stian Thorgersen af4c74f1d9 Merge pull request #3718 from thomasdarimont/issue/KEYCLOAK-4163-improve-support-for-email-addresses
KEYCLOAK-4163 Improve support for e-mail addresses
2017-04-06 15:34:30 +02:00
Stian Thorgersen e622ea1eba KEYCLOAK-4702 Use service dependency on jndi entry for caches 2017-04-06 15:06:45 +02:00
Marko Strukelj 0269db0e85 KEYCLOAK-4719 CLI tests fail when run from within the IDE 2017-04-06 12:46:05 +02:00
Stian Thorgersen 859b575a12 Merge pull request #4009 from stianst/master
KEYCLOAK-4717 Added extra check for data content in receive message f…
2017-04-06 10:42:37 +02:00
Stian Thorgersen f0b44ea93b KEYCLOAK-4717 Added extra check for data content in receive message for session iframe 2017-04-06 08:49:32 +02:00
Stian Thorgersen 802f648757 Merge pull request #4006 from diego0020/patch-1
Verify message comes from loginIframe
2017-04-06 08:34:38 +02:00
Stian Thorgersen b834f6ebf9 Merge pull request #4008 from stianst/KEYCLOAK-4697
KEYCLOAK-4549 [RH-SSO] EAP 7.1.0 Alpha16
2017-04-05 14:55:44 +02:00
Stian Thorgersen 6201257f76 KEYCLOAK-4549 [RH-SSO] EAP 7.1.0 Alpha16 2017-04-05 11:55:21 +02:00
mhajas 670103356f KEYCLOAK-4288 Run tests on EAP7 2017-04-05 10:28:04 +02:00
diego0020 a82278dcbf Verify message comes from loginIframe
In the current implementation a message coming from any window on the same origin may cause the refresh token to be cleared.
In my case, messages generated by a chrome extension were causing the application to logout unexpectedly. With additional condition only messages coming from the login iFrame will be processed. Another suggestion would be changing the condition `event.data != "unchanged"` to something more specific.
2017-04-04 16:32:21 -05:00
Stian Thorgersen 4845286e04 Merge pull request #4001 from stianst/KEYCLOAK-4693
KEYCLOAK-4693
2017-04-04 15:48:08 +02:00
Marek Posolda ad1ca78034 Merge pull request #4002 from mposolda/master
KEYCLOAK-4705 Running test from IDE should log INFO to the console
2017-04-04 11:52:10 +02:00
Pavel Drozd 30b785c60d Merge pull request #3999 from vmuzikar/ie-fix
KEYCLOAK-4351 Stabilize TermsAndConditions test in IE
2017-04-04 10:48:22 +02:00
Pavel Drozd b4c5eb8354 Merge pull request #3994 from vramik/KEYCLOAK-4534
KEYCLOAK-4534 ClientInitiatedAccountLinkTest fails with auth-server-w…
2017-04-04 10:47:36 +02:00
Pavel Drozd 91c3977d71 Merge pull request #3988 from mhajas/KEYCLOAK-3955
KEYCLOAK-3955
2017-04-04 10:46:12 +02:00
Pavel Drozd bb0b3c6470 Merge pull request #3987 from mhajas/KEYCLOAK-3696
KEYCLOAK-3696 Fix SPFacade servlet
2017-04-04 10:45:47 +02:00
Pavel Drozd 8036f12114 Merge pull request #3986 from mhajas/KEYCLOAK-4677
KEYCLOAK-4677 Fix javascript adapter tests
2017-04-04 10:45:07 +02:00
mposolda 457f183d46 KEYCLOAK-4705 Running test from IDE should log INFO to the console 2017-04-04 10:15:22 +02:00
Stian Thorgersen eaf386f1d2 KEYCLOAK-4693
Improve blocking search indexing
2017-04-04 09:56:48 +02:00
mhajas 04182d1d44 KEYCLOAK-4703 Use phantomJS in adapter tests 2017-04-04 09:17:00 +02:00
Vaclav Muzikar 5e360cf919 KEYCLOAK-4351 Stabilize TermsAndConditions test in IE 2017-04-04 07:40:16 +02:00
Pedro Igor f371a00e98 Merge pull request #3997 from pedroigor/KEYCLOAK-3573
[KEYCLOAK-3573] - Elytron adapter CLI scripts and tests
2017-04-03 09:22:29 -03:00
Stian Thorgersen e9f9f90b35 Merge pull request #3996 from abstractj/refactor-test-helper
Removal of duplicated code for testhelper
2017-04-03 08:30:11 +02:00
Josh Cain 971f053f13 flip null switch for conditionally adding login protocol to default clients 2017-03-31 16:20:21 -05:00
Josh Cain 0482ec40fd Fix null protocols in default realm applications 2017-03-31 16:13:38 -05:00
Pedro Igor f857625d07 [KEYCLOAK-3573] - Elytron adapter CLI scripts and tests. 2017-03-31 11:31:33 -03:00
Bruno Oliveira 01e7d79b1f Removal of duplicated code for testhelper
Effectively make use of username and password
Refactoring packages
Including ClientBuilder
2017-03-31 10:34:59 -03:00
Stian Thorgersen d264a823d9 Merge pull request #3993 from sebastienblanc/extract_initialtoken_generator
KEYCLOAK-4691: Extract iat generator to method
2017-03-31 13:13:26 +02:00
Pedro Igor bfaaf2b8fa Merge pull request #3992 from pedroigor/KEYCLOAK-4650
[KEYCLOAK-4650] - Confirmation dialog when disabling authorization settings
2017-03-31 07:44:10 -03:00
vramik ca6d8c9dbe KEYCLOAK-4534 ClientInitiatedAccountLinkTest fails with auth-server-wildlfy 2017-03-30 12:47:51 +02:00
sebastienblanc 0e8337ba8e KEYCLOAK-4691: Extract iat generator to method 2017-03-30 10:51:28 +02:00
Pedro Igor 838a045239 [KEYCLOAK-4650] - Adding scope filter and fixing cancel buttons 2017-03-29 12:59:41 -03:00
Pedro Igor 33a0dc880f [KEYCLOAK-4650] - Confirmation dialog when disabling authorization settings 2017-03-29 11:17:10 -03:00
Stian Thorgersen 2d40c8d8c2 Merge pull request #3991 from stianst/KEYCLOAK-4615
KEYCLOAK-4615 Build demo-dist, example-dist and proxy-dist only in jb…
2017-03-29 13:38:06 +02:00
Pedro Igor 5d573b1b3e [KEYCLOAK-3573] - Removing unnecessary elytron directory 2017-03-29 08:36:05 -03:00
Stian Thorgersen 642aeeb937 KEYCLOAK-4615 Build demo-dist, example-dist and proxy-dist only in jboss-release profile 2017-03-29 11:39:40 +02:00
Stian Thorgersen e8e1cce14a Merge pull request #3985 from stianst/KEYCLOAK-3250-PROD-PROFILE
KEYCLOAK-4668 Exclude modules in product profile
2017-03-29 09:57:35 +02:00
Stian Thorgersen 6c8b207bf5 Merge pull request #3989 from mstruk/KEYCLOAK-4496
KEYCLOAK-4496 Strange truncation of Client information when creating a new client
2017-03-29 08:25:00 +02:00
Takashi Norimatsu a183d50ad2 delete erroneous characters inserted by mistake 2017-03-29 09:53:24 +09:00
Marko Strukelj d26f2b44bd KEYCLOAK-4496 Strange truncation of Client information when creating a new client
- Added polyfill from https://github.com/tbosch/autofill-event
2017-03-28 18:06:17 +02:00
mhajas 3bb587530b KEYCLOAK-3955 2017-03-28 16:05:44 +02:00
mhajas 438ec8d245 Fix SPFacade servlet 2017-03-28 15:12:33 +02:00
mhajas bc05010ece Fix javascript adapter tests 2017-03-28 15:02:44 +02:00
Stian Thorgersen 0180d54dd9 KEYCLOAK-4668 Exclude modules in product profile 2017-03-28 10:04:20 +02:00
Pavel Drozd 45ea3c8b47 Merge pull request #3977 from vmuzikar/KEYCLOAK-4613
KEYCLOAK-4613 Fix Console UI and Social Login tests
2017-03-28 09:34:23 +02:00
Takashi Norimatsu ef3aef9381 Merge branch 'master' into master 2017-03-28 16:21:40 +09:00
Stian Thorgersen 93c51c5aad Merge pull request #3984 from stianst/KEYCLOAK-3250-PROD-PROFILE
KEYCLOAK-3258 Add server dist changes to product profile
2017-03-28 08:55:57 +02:00
Stian Thorgersen 6b21b4d87b KEYCLOAK-4657 Sort out REST API for prod profile 2017-03-27 20:50:13 +02:00
Stian Thorgersen 9303a9c7d0 KEYCLOAK-3258 Add server dist changes to product profile 2017-03-27 20:50:13 +02:00
Vaclav Muzikar 66c13b4a72 KEYCLOAK-4613 Fix Console UI and Social Login tests 2017-03-27 15:25:24 +02:00
mhajas 36fc643bfb KEYCLOAK-4366 2017-03-27 11:22:01 +02:00
Bartosz Majsak 0197600565 Fixes misspelled config class 2017-03-27 09:38:47 +02:00
Pavel Drozd ed67dcc712 Merge pull request #3975 from vmuzikar/KEYCLOAK-4660
KEYCLOAK-4660 Add support for Chrome CLI switches to Arquillian Tests…
2017-03-27 09:38:33 +02:00
Pavel Drozd 4b813ea1d1 Merge pull request #3960 from mhajas/KEYCLOAK-3961
KEYCLOAK-3961 Fix wrong conflict merge
2017-03-27 09:37:18 +02:00
Pavel Drozd 4aa996c2db Merge pull request #3959 from mhajas/KEYCLOAK-4141
KEYCLOAK-4141 Added saml tests
2017-03-27 09:36:41 +02:00
Pavel Drozd b1535d4751 Merge pull request #3951 from vramik/KEYCLOAK-4571
KEYCLOAK-4571 Adapt server-config-migration module for testing both p…
2017-03-27 09:34:33 +02:00
Bill Burke 71f0c01d4f Merge pull request #3980 from patriot1burke/master
KEYCLOAK-4664 KEYCLOAK-4665
2017-03-25 20:12:22 -04:00
Bill Burke f554fd90db Merge pull request #3911 from almighty/oso_provider
[KEYCLOAK-4528] Adds Openshift Identity Provider as part of social brokers
2017-03-25 19:25:44 -04:00
Bill Burke e5a2642e62 Merge pull request #3978 from pedroigor/KEYCLOAK-3573
[KEYCLOAK-3573] - Elytron SAML and OIDC Adapters
2017-03-25 19:24:42 -04:00
Bill Burke 8c2e756732 fix 2017-03-25 19:21:50 -04:00
Bill Burke d8e98d1de6 KEYCLOAK-4665 2017-03-25 12:47:32 -04:00
Bill Burke dd8a64f30c KEYCLOAK-4664 2017-03-25 11:21:11 -04:00
Stian Thorgersen 3ce8da0126 Merge pull request #3976 from stianst/KEYCLOAK-3250-PROD-PROFILE
KEYCLOAK-4659 Changes to adapters for product profile
2017-03-24 15:34:35 +01:00
Pedro Igor 30d7a5b01f [KEYCLOAK-3573] - Elytron SAML and OIDC Adapters 2017-03-24 11:32:08 -03:00
Stian Thorgersen 7968394537 KEYCLOAK-4654 Disable unsupported LDAP vendors in product profile 2017-03-24 13:44:33 +01:00
Vaclav Muzikar 6a093abfdb KEYCLOAK-4660 Add support for Chrome CLI switches to Arquillian Testsuite 2017-03-24 12:25:49 +01:00
Nekrasov Aleksander d0b3cb32f0 KEYCLOAK-4502 Update Russian translation 2017-03-24 18:22:25 +07:00
Stian Thorgersen 5d028205bf KEYCLOAK-4659 Changes to adapters for product profile 2017-03-24 12:07:21 +01:00
Stian Thorgersen 0b2896458a Merge pull request #3974 from stianst/KEYCLOAK-3250-PROD-PROFILE
KEYCLOAK-4658 Updates client-cli
2017-03-24 11:19:56 +01:00
Stian Thorgersen e74f037732 KEYCLOAK-4658 Updates client-cli 2017-03-24 09:41:56 +01:00
Stian Thorgersen ef7cb1e0cb Merge pull request #3973 from stianst/KEYCLOAK-3250-PROD-PROFILE
KEYCLOAK-3251 Add product Maven profile
2017-03-24 09:36:28 +01:00
vramik 49e43e59c4 patch MigrationServerConfigTest 2017-03-24 09:31:53 +01:00
Pavel Drozd 996f60ff57 Merge pull request #3963 from Pepo48/KEYCLOAK-4488
KEYCLOAK-4488 Fix Auth Flows Console UI tests
2017-03-24 08:45:48 +01:00
Stian Thorgersen 90c4de27e5 KEYCLOAK-3251 Add product Maven profile
KEYCLOAK-3254 Product profile should include RH-SSO theme and change default theme
2017-03-24 07:10:11 +01:00
Bill Burke 815e9e8e02 Merge pull request #3968 from vramik/KEYCLOAK-4229
KEYCLOAK-4229 Add migration test from 2.5.5
2017-03-23 14:48:39 -04:00
Bill Burke d1e71acf10 Merge pull request #3961 from jblashka/maxLifespanInvalidationFixes
KEYCLOAK-4612 Fix CachePolicy.MAX_LIFESPAN invalidation
2017-03-23 14:25:21 -04:00
Stian Thorgersen fc009969c9 Merge pull request #3971 from ssilvert/KEYCLOAK-4396-ng2-wrapper
KEYCLOAK-4396: Add keycloak.d.ts for TypeScript
2017-03-23 14:12:03 +01:00
Bartosz Majsak 63e8e7f842 Alings SimpleHttp API with new version 2017-03-23 13:51:14 +01:00
Bartosz Majsak 210143738e Merge branch 'master' into oso_provider 2017-03-23 13:45:07 +01:00
Pedro Igor deae380941 Merge pull request #3964 from pedroigor/KEYCLOAK-4587
[KEYCLOAK-4587] - Missing breadcrumb
2017-03-22 13:55:50 -03:00
vramik 1fccff7e7c KEYCLOAK-4229 Add migration test from 2.5.5 2017-03-22 14:19:35 +01:00
Stian Thorgersen 275e871618 Merge pull request #3966 from vramik/KEYCLOAK-4638
KEYCLOAK-4638 Migrator to 3.0.0 contains code coppied from 2.5.0
2017-03-22 13:43:23 +01:00
vramik c41bc65bf8 KEYCLOAK-4638 Migrator to 3.0.0 contains code coppied from 2.5.0 2017-03-22 13:08:12 +01:00
Marek Posolda 975dfe9489 Merge pull request #3167 from brat000012001/master
X509 Certificate user authentication
2017-03-22 08:26:26 +01:00
Stian Thorgersen 5cf6438a45 Merge pull request #3965 from thomasdarimont/issue/KEYCLOAK-4614-fix-linkonly-tooltip-reference
KEYCLOAK-4614 Fix linkOnly tooltip reference
2017-03-22 08:18:29 +01:00
Thomas Darimont 05a8fffdbf KEYCLOAK-4614 Fix linkOnly tooltip reference 2017-03-22 00:07:40 +01:00
Pedro Igor c517565cc5 [KEYCLOAK-4587] - Missing breadcrumb 2017-03-21 16:55:21 -03:00
Peter Zaoral 0a8ca19944 KEYCLOAK-4488 Fix Auth Flows Console UI tests
Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2017-03-21 11:16:08 +01:00
mhajas 7c1eb5582a KEYCLOAK-4141 Added saml tests 2017-03-21 10:41:06 +01:00
Jared Blashka 61bd9bb58c Fix CachePolicy.MAX_LIFESPAN invalidation 2017-03-20 22:56:35 -04:00
Stan Silvert e2970fcf8a KEYCLOAK-4396: Add keycloak.d.ts for TypeScript 2017-03-20 12:42:26 -04:00
mhajas 8b8b5174eb KEYCLOAK-3961 Fix wrong conflict merge 2017-03-20 15:04:32 +01:00
Pedro Igor b30b96b9a1 Merge pull request #3956 from pedroigor/KEYCLOAK-4602
Improve path matcher when using handling patterns and caching
2017-03-17 16:15:56 -03:00
Stian Thorgersen dce2b1dfde Merge pull request #3955 from vramik/KEYCLOAK-4601
KEYCLOAK-4601 Add nexus-staging-maven-plugin fo keycloak-bom-parent
2017-03-17 13:49:31 +01:00
Pedro Igor 258af94889 Delegating caching of resource instances to to path matcher 2017-03-17 09:35:19 -03:00
Pedro Igor dabd7c0b27 [KEYCLOAK-4602] - Improving pattern matching algorithm 2017-03-17 09:34:52 -03:00
Pedro Igor f6786e29c6 [KEYCLOAK-4602] - A runtime cache for path configurations 2017-03-17 09:34:16 -03:00
vramik eb852265ef KEYCLOAK-4601 Add nexus-staging-maven-plugin fo keycloak-bom-parent 2017-03-17 13:11:59 +01:00
Peter Nalyvayko b2f10359c8 KEYCLOAK-4335: x509 client certificate authentication
Started on implementing cert thumbprint validation as a part of x509 auth flow. Added a prompt screen to give users a choice to either log in based on the identity extracted from X509 cert or to continue with normal browser login flow authentication; clean up some of the comments

x509 authentication for browser and direct grant flows. Implemented certificate to user mapping based on user attribute

Implemented CRL and OCSP certificate revocation checking and added corresponding configuration settings to set up responderURI (OCSP), a location of a file containing X509CRL entries and switiches to enable/disable revocation checking; reworked the certificate validation; removed superflous logging; changed the certificate authentication prompt page to automatically log in the user after 10 seconds if no response from user is received

Support for loading CRL from LDAP directory; finished the CRL checking using the distribution points in the certificate; updated the instructions how to add X509 authentication to keycloak authentication flows; minor styling changes

Stashing x509 unit test related changes; added the steps to configure mutual SSL in WildFly to the summary document

A minor fix to throw a security exception when unable to check cert revocation status using OCSP; continue working on README

Changes to the formating of the readme

Added a list of features to readme

Fixed a potential bug in X509 cert user authenticator that may cause NPE if the client certificate does not define keyusage or extended key usage extensions

Fixed compile time errors in X509 validators caused by the changes to the user credentials model in upstream master

Removed a superfluous file created when merging x509 and main branches

X509 authentication: removed the PKIX path validation as superflous

Reverted changes to the AbstractAttributeMapper introduced during merging of x509 branch into main

Merge the unit tests from x509 branch

added mockito dependency to services project; changes to the x509 authenticators to expose methods in order to support unit tests; added a default ctor to CertificateValidator class to support unit testing; updated the direct grant and browser x509 authenticators to report consistent status messages; unit tests to validate X509 direct grant and browser authenticators; fixed OCSP validation to throw an exception if the certificate chain contains a single certificate; fixed the CRL revocation validation to only use CRL distribution point validation only if configured

CRL and OSCP mock tests using mock netty server. Changed the certificate validator to better support unit testing.

changes to the mockserver dependency to explicitly exclude xercesImpl that was causing SAMLParsingTest to fail

Added a utility class to build v3 certificates with optional extensions to facilitate X509 unit testing; removed supoerfluous certificate date validity check (undertow should be checking the certificate dates during PKIX path validation anyway)

X509: changes to make configuring the user identity extraction simplier for users - new identity sources to map certificate CN and email (E) attributes from X500 subject and issuer names directly rather than using regular expressions to parse them

X509 fixed a compile error caused by the changes to the user model in master

Integration tests to validate X509 client certificate authentication

Minor tweaks to X509 client auth related integration tests

CRLs to support x509 client cert auth integration tests

X509: reverted the changes to testrealm.json and updated the test to configure the realm at runtime

X509 - changes to the testsuite project configuration to specify a path to a trust store used to test x509 direct grant flow; integration tests to validate x509 authentication in browser and direct grant flows; updated the client certificate to extend its validatity dates; x509 integration tests and authenticators have been refactored to use a common configuration class

X509 separated the browser and direct grant x509 authenction integration tests

x509 updated the authenticator provider test to remove no longer supported cert thumbprint authenticator

x509 removed the dependency on mockito

x509 re-implemented OCSP certificate revocation client used to check revocation status when logging in with x509 certificate to work around the dependency on Sun OCSP implementation; integration tests to verify OCSP revocation requests

index.txt.attr is needed by openssl to run a simple OCSP server

x509: minor grammar fixes

Add OCSP stub responder to integration tests

This commit adds OCSP stub responder needed for the integration tests,
and eliminates the need to run external OCSP responder in order to run
the OCSP in X509OCSPResponderTest.

Replace printStackTrece with logging

This commit replaces call to printStackTrace that will end up going to
the stderr with logging statement of WARN severity.

Remove unused imports

Removed unused imports in
org.keycloak.authentication.authenticators.x509 package.

Parameterized Hashtable variable

Removed unused CertificateFactory variable

Declared serialVersionUID for Serializable class

Removed unused CertificateBuilder class

The CertificateBuilder was not used anywhere in the code, removing it to
prevent technical debt.

Removing unused variable declaration

`response` variable is not used in the test, removed it.

Made sure InputStreams are closed

Even though the InputStreams are memory based, added try-with-resources
to make sure that they are closed.

Removed deprecated usage of URLEncoder

Replaced invocation of deprecated method from URLEncoder with Encode
from Keycloak util package.

Made it more clear how to control OCSP stub responder in the tests

X509 Certificate user authentication: moved the integration unit tests into their own directory to fix a failing travis test job

KEYCLOAK-4335: reduced the logging level; added the instructions how to run X.509 related tests to HOW-TO-RUN.md doc; removed README.md from x509 folder; removed no longer used ocsp profile and fixed the exclusion filter; refactored the x509 base test class that was broken by the recent changes to the integration tests

KEYCLOAK-4335: fixed a few issues after rebasing
2017-03-17 05:24:57 -04:00
Stian Thorgersen 3551912506 Merge pull request #3954 from stianst/master
Bump to 3.1.0.CR1-SNAPSHOT
2017-03-16 15:01:35 +01:00
Stian Thorgersen a87ee04024 Bump to 3.1.0.CR1-SNAPSHOT 2017-03-16 14:21:40 +01:00
Stian Thorgersen cda563e672 Merge pull request #3952 from stianst/master
Added jboss parent to boms parent
2017-03-16 12:44:52 +01:00
Stian Thorgersen a434e0540b Added jboss parent to boms parent 2017-03-16 12:44:31 +01:00
vramik d0992ef9bd KEYCLOAK-4571 Adapt server-config-migration module for testing both project and product 2017-03-16 10:53:14 +01:00
Pavel Drozd c30cdb5411 Merge pull request #3932 from vmuzikar/KEYCLOAK-4169
KEYCLOAK-4169 Instructions on how to run UI and Welcome Page tests
2017-03-15 23:53:49 +01:00
Pavel Drozd b2d677256d Merge pull request #3877 from mhajas/KEYCLOAK-3955
KEYCLOAK-3955 Add CORS tests to integration arquillian testsuite
2017-03-15 23:52:03 +01:00
Bartosz Majsak a250f08b6c Removes trailing slash from the base url 2017-03-15 22:27:24 +01:00
Stian Thorgersen f44405207b Merge pull request #3828 from wildloop/master
verifySSL() - debug info
2017-03-15 09:55:42 +01:00
Stian Thorgersen feeac69197 Merge pull request #3888 from daklassen/KEYCLOAK-4421
KEYCLOAK-4421 Change any http maven urls to https to reduce build-time MITM vulnerability
2017-03-15 09:54:21 +01:00
Stian Thorgersen 2aa93d7d55 Merge pull request #3924 from daklassen/KEYCLOAK-2486
KEYCLOAK-2486: Update SimpleHTTP to use Apache HTTP Client
2017-03-15 09:50:06 +01:00
wildloop 80c9e23282 Update RequestAuthenticator.java 2017-03-15 09:14:48 +01:00
wildloop 366dee6575 Update RequestAuthenticator.java 2017-03-15 09:13:41 +01:00
Stian Thorgersen 44907503a4 Merge pull request #3935 from knutz3n/KEYCLOAK-4559
KEYCLOAK-4559 Filter users by realm id when search for user by attribute
2017-03-15 08:44:43 +01:00
Thomas Darimont b782892769 KEYCLOAK-4163 Improve support for e-mail addresses
Added support for user friendly email addresses as well as dedicated
reply-to addresses for emails being sent by Keycloak.
Both can be customized via the email settings per realm in
the admin-console.
User friendly email addresses use the format:
"Friendly Name"<email@example.org> and provide way to add a meaning
full name to an e-mail address.

We also allow to specify an optional envelope from bounce address.
If a mail sent to a user could not be delivered the email-provider
will sent a notification to that address.

See: https://en.wikipedia.org/wiki/Bounce_address

Add test for proper email headers in sent messages
2017-03-14 18:22:54 +01:00
Bill Burke 1974b34c29 Merge pull request #3928 from sebastienblanc/test-utilities
KEYCLOAK-4322 : adding a helper class
2017-03-14 11:32:49 -04:00
Bill Burke 6d51862057 Merge pull request #3897 from anderius/feature/KEYCLOAK-4504-redirect-logout
[WIP] Saml broker: Option to specify logout request binding
2017-03-14 11:32:26 -04:00
wildloop d723c608d6 Update RequestAuthenticator.java 2017-03-14 11:36:57 +01:00
Johannes Knutsen 9a0de676c4 KEYCLOAK-4559 Filter users by realm id when searching for user by user attribute 2017-03-14 11:05:12 +01:00
Stian Thorgersen a555f99b1a Merge pull request #3937 from sebastienblanc/document_sb_properties
KEYCLOAK-4565 : javadoc for adapter properties and add metada generator
2017-03-14 10:19:34 +01:00
David Klassen 32d3f760ec KEYCLOAK-4421: Change http url to https
Change any http maven urls to https to reduce build-time MITM vulnerability
2017-03-14 10:18:40 +01:00
Stian Thorgersen 99581748e0 Merge pull request #3921 from gmarziou/fix-french-plural
KEYCLOAK-4561 Fix plural error in French translation
2017-03-14 09:32:37 +01:00
Stian Thorgersen f0ae34d1ad Merge pull request #3885 from sk8ter/master
add Swedish translation for account, email, login
2017-03-14 09:31:36 +01:00
Stian Thorgersen 4f39cf8abd Merge pull request #3947 from ssilvert/master
KEYCLOAK-4535: Needless heading while adding or editing a Role
2017-03-14 08:56:21 +01:00
Stan Silvert e6df617cfc KEYCLOAK-4535: Needless heading while adding or editing a Role 2017-03-13 21:03:05 -04:00
Pedro Igor 9d1d22565c Merge pull request #3938 from pedroigor/authz-fixes
AuthZ Services Fixes
2017-03-13 15:20:41 -03:00
Gabriel Lavoie fb507048f5 KEYCLOAK-4563: Large user account ID and group ID may break distribution builds.
- Maven documentation recommends using POSIX tar format.
2017-03-13 13:28:51 -04:00
Pedro Igor e7e6314146 [KEYCLOAK-4555] - Fixes and improvements to evaluation code 2017-03-13 14:08:54 -03:00
Marek Posolda 649ca36ece Merge pull request #3945 from mposolda/master
KEYCLOAK-4572 AccountTest.changeProfileNoAccess unstable
2017-03-13 15:57:43 +01:00
Pavel Drozd 253c8a342b Merge pull request #3941 from pdrozd/KEYCLOAK-4569
KEYCLOAK-4569 SSSDTest rewrited to be usable in different enviroments
2017-03-13 15:50:06 +01:00
Pavel Drozd 71a9d51c56 Merge pull request #3940 from pdrozd/KEYCLOAK-4304
KEYCLOAK-4304 Updated Kerberos tests to be able to run them on differ…
2017-03-13 15:49:01 +01:00
Stian Thorgersen ef164f5e69 Merge pull request #3943 from stianst/TRAVIS
Add --no-snapshot-updates to Travis builds
2017-03-13 15:41:05 +01:00
Stian Thorgersen b0484409d4 Remove adapter tests from Travis as no tests where being ran 2017-03-13 14:42:39 +01:00
mposolda aa84709087 KEYCLOAK-4572 AccountTest.changeProfileNoAccess unstable 2017-03-13 13:58:46 +01:00
Stian Thorgersen adf3eaf8fe Merge pull request #3942 from stianst/KEYCLOAK-4570
KEYCLOAK-4570
2017-03-13 12:32:08 +01:00
Stian Thorgersen 4dcb8d2c2a Merge pull request #3931 from hmlnarik/KEYCLOAK-4552
KEYCLOAK-4552
2017-03-13 12:31:33 +01:00
Stian Thorgersen 2cf4518ffd Disable snapshot for repositories 2017-03-13 09:03:46 +01:00
Stian Thorgersen 3f29c68e92 Add --no-snapshot-updates to Travis builds 2017-03-13 08:53:03 +01:00
Stian Thorgersen a56dd1651b KEYCLOAK-4570
Boms should not use keycloak-parent
2017-03-13 08:34:52 +01:00
Pavel Drozd f32fc99e80 KEYCLOAK-4569 SSSDTest rewrited to be usable in different enviroments 2017-03-13 08:05:30 +01:00
Pavel Drozd b5433720c1 KEYCLOAK-4304 Updated Kerberos tests to be able to run them on different environment 2017-03-13 08:00:41 +01:00
Bill Burke 613f4bb4c6 Merge pull request #3939 from alexeykazakov/patch-1
KEYCLOAK-4568 Identity broker service may fail to validate client ses…
2017-03-11 19:39:39 -05:00
Alexey Kazakov 063f5303dd KEYCLOAK-4568 Identity broker service may fail to validate client session if there is more then one active session 2017-03-11 12:59:25 -08:00
Pedro Igor 45caea4dbd [KEYCLOAK-4549] - Scope Permission Form is not showing saved resource 2017-03-10 17:32:55 -03:00
sebastienblanc 68da8c23ad KEYCLOAK-4565 : javadoc for adapter properties and add metada generator 2017-03-10 18:13:19 +01:00
Pavel Drozd 282896b653 Merge pull request #3930 from vmuzikar/KEYCLOAK-4554-2
KEYCLOAK-4554 Fix WelcomePage test
2017-03-10 15:57:47 +01:00
Pavel Drozd 3884dd974a Merge pull request #3925 from vmuzikar/KEYCLOAK-4553
KEYCLOAK-4553 Truststore not found in Arquillian tests in "other" module
2017-03-10 15:56:40 +01:00
sebastienblanc 64f20b580a adding a helper class 2017-03-10 14:43:16 +01:00
Stian Thorgersen e7cd8d41c6 Merge pull request #3558 from glavoie/KEYCLOAK-3989
KEYCLOAK-3989: Replacing COMPOSITE_ROLE Collection with Set.
2017-03-10 12:00:59 +01:00
Vaclav Muzikar f3e842fdd9 KEYCLOAK-4169 Instructions on how to run UI and Welcome Page tests 2017-03-10 11:26:21 +01:00
Hynek Mlnarik 42954e84d9 KEYCLOAK-4552 2017-03-10 10:59:50 +01:00
Bill Burke 0ff4223184 Merge pull request #3922 from hmlnarik/KEYCLOAK-4288-SAML-logouts-are-not-invalidating-the-sessions-for-all-the-logged-in-applications
KEYCLOAK-4288 Invalidate sessions in cluster for SAML logouts
2017-03-09 19:13:37 -05:00
Bill Burke b618dbd97f Merge pull request #3926 from mrpardijs/KEYCLOAK-4360-Add-SAML-OneTimeUse-Condition
KEYCLOAK-4360: Add OneTimeUse condition to SAMLResponse
2017-03-09 19:09:02 -05:00
Bill Burke 213cffa9c5 Merge pull request #3929 from gmarziou/update-freeotp-url
Update URL for FreeOTP
2017-03-09 19:00:13 -05:00
Vaclav Muzikar dc2d2cdbde Merge branch 'master' of https://github.com/keycloak/keycloak into KEYCLOAK-4553 2017-03-09 16:54:08 +01:00
Vaclav Muzikar 8b888fdf0c KEYCLOAK-4554 Fix WelcomePage test 2017-03-09 16:41:54 +01:00
Gaël MARZIOU 46c6db1739 Update URL for FreeOTP
It was poniting to obsolete location: https://fedorahosted.org/freeotp/

Now pointing to: https://freeotp.github.io/
2017-03-09 16:20:28 +01:00
Pavel Drozd 11d93994c2 Merge pull request #3919 from vramik/KEYCLOAK-4210
KEYCLOAK-4210 remove redundant dependency
2017-03-09 15:49:55 +01:00
Mark Pardijs c78c0b73d3 KEYCLOAK-4360: Add OneTimeUse condition to SAMLResponse
Add OneTimeUse Condition to SAMLResponse when configured in client settings
2017-03-09 13:01:05 +01:00
Vaclav Muzikar 2175f66a30 KEYCLOAK-4553 Truststore not found in Arquillian tests in "other" module 2017-03-09 11:17:42 +01:00
David Klassen 7029ef80f8 KEYCLOAK-2486: Update SimpleHTTP to use Apache HTTP Client
Update SimpleHTTP to use Apache HTTP client under the covers.
2017-03-09 09:23:09 +01:00
Marek Posolda 16d5ca3378 Merge pull request #3859 from thomasdarimont/issue/KEYCLOAK-4205-role-mapper-value-as-array
KEYCLOAK-4205 Allow to return json arrays in Client and Realm Role Mappers
2017-03-09 08:47:29 +01:00
Stian Thorgersen 5b4e3434bb Merge pull request #3886 from anderius/feature/newlines-in-saml
KEYCLOAK-4489 SAML encrypted assertion with newlines fails during parsing
2017-03-09 08:29:55 +01:00
Thomas Darimont 1dea38bdbb KEYCLOAK-4205 Allow to return json arrays in Client and Realm Role Mappers
Previously the ClientRoleMapper and RealmRoleMapper returned
roles as a comma delimited String in OIDC tokens which
needed to be parsed by client applications.
We now support to generate the role information as JSON
arrays by setting "multi valued" to "true" in the
client role mapper or realm role mappers respectively
which makes it easier for clients to consume.

The default setting for "multi valued" is "false" to
remain backwards compatible.

An example AccessToken that shows the two modes can be found here:
https://gist.github.com/thomasdarimont/dff0cd691cd6e0b5e33c2eb4c76ae5e8
2017-03-08 20:56:56 +01:00
Gael MARZIOU 0fc4cd134f Fix plural error in French translation 2017-03-08 18:47:06 +01:00
Bill Burke efffcc5f41 Merge pull request #3915 from TeliaSoneraNorge/KEYCLOAK-4524
KEYCLOAK-4524
2017-03-08 10:08:04 -05:00
Bill Burke 6f2ace538f Merge pull request #3917 from reneploetz/master
KEYCLOAK-4537 Jetty 9.4 implementation (OIDC/SAML)
2017-03-08 09:44:33 -05:00
Stian Thorgersen 50af3212f1 Merge pull request #3920 from stianst/master
KEYCLOAK-4536 Added troubleshooting section to Cordova example
2017-03-08 12:25:01 +01:00
Stian Thorgersen e2e91ef098 KEYCLOAK-4536 Added troubleshooting section to Cordova example 2017-03-08 12:23:57 +01:00
vramik 0c4a1b1489 KEYCLOAK-4210 remove redundant dependency 2017-03-08 10:51:18 +01:00
Stian Thorgersen 61c3d6eb74 Merge pull request #3913 from sebastienblanc/adapter_dist
add adapters dist artifact
2017-03-08 09:10:56 +01:00
Pavel Drozd 62876b9694 Merge pull request #3912 from vmuzikar/KEYCLOAK-4526
KEYCLOAK-4526 Fix Node.js Arquillian tests
2017-03-07 21:53:30 +01:00
Pavel Drozd 739dae0846 Merge pull request #3908 from vramik/KEYCLOAK-4348
KEYCLOAK-4348 upgrade maven-surefire-plugin version
2017-03-07 21:52:24 +01:00
Pavel Drozd 7ab67d205b Merge pull request #3903 from tkyjovsk/KEYCLOAK-4515
KEYCLOAK-4515 Make it possible to clean-up other DB types than mysql or postgres
2017-03-07 21:50:48 +01:00
Anders Båtstrand 224c9c5395 KEYCLOAK-4489 Use event reader from AbstractParser, which handles newlines and whitespace. 2017-03-07 19:05:07 +01:00
wildloop 7904ce5a37 one-line debug log 2017-03-07 16:01:13 +01:00
Rene Ploetz e770a05db0 KEYCLOAK-4537 Jetty 9.4 implementation (OIDC/SAML) 2017-03-06 23:01:24 +01:00
Pavel Drozd 89c89b4867 Merge pull request #3873 from mhajas/KEYCLOAK-3961
KEYCLOAK-3961
2017-03-06 13:01:16 +01:00
mhajas 213ed6fa4b KEYCLOAK-3955 2017-03-06 10:22:06 +01:00
mhajas 280689055f KEYCLOAK-3961 2017-03-06 10:17:59 +01:00
Bill Burke 1d11cb468c Merge pull request #3914 from patriot1burke/master
KEYCLOAK-4501 KEYCLOAK-4511 KEYCLOAK-4513
2017-03-03 14:13:59 -05:00
Bill Burke 05e080624b import after each test 2017-03-03 11:32:48 -05:00
Bill Burke c6dc59f63e Merge remote-tracking branch 'upstream/master' 2017-03-03 11:00:32 -05:00
Martin Hardselius a0a85f62c6 KEYCLOAK-4524 possible to add identity prover mappers with same name into single identity provider
- unique name enforcement working
- test added
2017-03-03 16:40:49 +01:00
Bill Burke 3bb29e033b KEYCLOAK-4501, KEYCLOAK-4511, KEYCLOAK-4513 2017-03-03 09:48:52 -05:00
Bartosz Majsak beee0c1e67 Implements social login test for OpenShift 2017-03-03 14:55:40 +01:00
sebastienblanc 87c9c99259 add adapters dist artifact 2017-03-03 11:45:13 +01:00
Vaclav Muzikar b0b0bfdf76 KEYCLOAK-4526 Fix Node.js Arquillian tests 2017-03-03 11:08:13 +01:00
Bartosz Majsak 669b0143af Adds tooltip for URL and en translation 2017-03-02 20:24:52 +01:00
Bartosz Majsak 1a6bb2fedb Adds Openshift Identity Provider as part of social brokers 2017-03-02 15:14:57 +01:00
Marek Posolda b8767d13d5 Merge pull request #3907 from mposolda/cross-dc
KEYCLOAK-4520 Enable testsuite logging when running test from IDE
2017-03-02 12:23:36 +01:00
Marek Posolda 686f82342b Merge pull request #3905 from Dichotomia/patch-3
administrator Spelling mistake
2017-03-02 12:23:20 +01:00
Marek Posolda cfb8d25ff2 Merge pull request #3900 from KillerDiller/wellknownprovider-four-oh-four
KEYCLOAK-4519: Avoid NPE for unknown paths under .../.well-known/.
2017-03-02 12:22:35 +01:00
vramik a24070c2b0 KEYCLOAK-4348 upgrade maven-surefire-plugin version 2017-03-02 12:09:15 +01:00
mposolda 69e61398a6 KEYCLOAK-4520 Enable testsuite logging when running test from IDE 2017-03-02 10:50:50 +01:00
Stan Silvert 89768ef003 Merge pull request #3906 from ssilvert/update-migration-scripts
KEYCLOAK-4514: Update migration scripts according to changes to the
2017-03-01 15:54:57 -05:00
Stan Silvert 794defe6fc KEYCLOAK-4514: Update migration scripts according to changes to the
subsystem
2017-03-01 13:53:40 -05:00
Hynek Mlnarik 27ba4eb978 KEYCLOAK-4288 Tests for EAP6 and Wildfly 2017-03-01 15:17:39 +01:00
Hynek Mlnarik 3a0c2be885 KEYCLOAK-4288 AS 7 / EAP 6 2017-03-01 15:17:39 +01:00
Hynek Mlnarik 04da679628 KEYCLOAK-4288 Wildfly 2017-03-01 15:17:39 +01:00
Hynek Mlnarik 43be3fc409 KEYCLOAK-4288 Use SessionListener to keep track of local HTTP-SSO session mappings 2017-03-01 15:17:39 +01:00
Hynek Mlnarik 567393a102 KEYCLOAK-4288 Fix SAML logout session for Tomcat/EAP6
When logging out via application (via ?GLO=true query parameter),
CatalineSamlSessionStore does not expire session, while it does that
in logging by SAML session index.

This causes distributed sessions being invalidated only on node hanling
the request, but remains active in other nodes of the cluster. Then the
session can be resurrected on next cache replication back even to the
node where the logout was performed. This behaviour is fixed here.
2017-03-01 15:17:39 +01:00
Quentin Caillard 75851ee0b3 administrator Spelling mistake 2017-03-01 12:32:55 +01:00
Marek Posolda b54d7c37b6 Merge pull request #3890 from daklassen/KEYCLOAK-2994
KEYCLOAK-2994: Revise german translations
2017-03-01 12:22:44 +01:00
Marek Posolda 69cf7b4d0d Merge pull request #3891 from mikaoelitiana/KEYCLOAK-4497
Update french translation in admin console
2017-03-01 12:21:42 +01:00
Marek Posolda 4f4ae44a16 Merge pull request #3896 from thomasdarimont/issue/KEYCLOAK-4505-expose-clientSession-binding-to-ScriptBasedAuthenticator
KEYCLOAK-4505 Expose current clientSession binding to ScriptBasedAuthenticator
2017-03-01 12:17:29 +01:00
Marek Posolda 31191bdfc8 Merge pull request #3904 from mposolda/testsuite-import
KEYCLOAK-1590 Realm import per test class
2017-03-01 11:49:15 +01:00
mposolda 091b376624 KEYCLOAK-1590 Realm import per test class 2017-03-01 09:38:44 +01:00
Pavel Drozd 52fbe00c04 Merge pull request #3874 from vramik/KEYCLOAK-4258
KEYCLOAK-4258 add server-config-migration module to parent pom
2017-03-01 08:27:59 +01:00
Tomas Kyjovsky c94b7922aa Added profile jdbc-driver-depencency to arq. testsuite; changed jdbc module path from layers/base/com/${db} to layers/base/test/jdbc/${db} 2017-03-01 01:37:53 +01:00
Anders Båtstrand 8d82390843 KEYCLOAK-4504 New configuration option for SAML Broker:
* postBindingLogout: Indicates if POST or redirect should be used for the logout requests.

This applies to both IdP-initiated logout, and Keycloak-initiated logout. If unset (for example when upgrading Keycloak), the setting is initially set to the same as postBindingResponse.

The flag is also set when importing IdP metadata.
2017-02-28 12:08:22 +01:00
Bill Burke 0765b01189 Merge remote-tracking branch 'upstream/master' 2017-02-27 18:46:09 -05:00
Bill Burke b4f625e1ce KEYCLOAK-4501 2017-02-27 18:46:00 -05:00
Marek Posolda b5b0f433ac Merge pull request #3899 from hmlnarik/KEYCLOAK-4368-htmlUnit-for-adapter-tests-without-examples
KEYCLOAK-4368 Enable htmlUnit for adapter tests (not examples though)
2017-02-27 08:32:18 +01:00
Stefan Paletta bcbde3fdf0 Avoid NPE for unknown paths under .../.well-known/. 2017-02-27 02:42:02 +01:00
Hynek Mlnarik 1970e03361 KEYCLOAK-4368 Enable htmlUnit for adapter tests (not examples though) 2017-02-26 16:56:26 +01:00
Stian Thorgersen 07f99a946d Merge pull request #3895 from stianst/KEYCLOAK-943
KEYCLOAK-943 Added initial implementation for update profile
2017-02-24 15:17:46 +01:00
Anders Båtstrand 89c6cda2ac Two new configuration options for the Saml broker:
* wantAssertionsSigned: This will toggle the flag in the SP Metadata Descriptor, and validate the signature if and only if "Validate signature" is selected.
 * wantAssertionsEncrypted: This will simply require that the assertion is encrypted.

 Default behavior is unchanged. The signature validation uses the original XML, and supports therefore an IdP that adds whitespace and line breaks between tags (for example OpenAM).
2017-02-24 15:08:57 +01:00
Stan Silvert 6ea9581c6c Merge pull request #3855 from tsabirgaliev/master
angular2-product-app: simplify KeycloakHttp
2017-02-24 08:09:31 -05:00
Thomas Darimont 18a8ed3e95 KEYCLOAK-4505 Expose current clientSession binding to ScriptBasedAuthenticator.
Previously the ScriptBasedAuthenticator did not expose the current
clientSession from the AuthenticationFlowContext.
In order to implement client specific authentications with javascript
one needs information about the current client.
2017-02-24 14:01:10 +01:00
Stian Thorgersen e2b1c97e26 KEYCLOAK-943 Added initial implementation for update profile 2017-02-24 13:19:29 +01:00
Tair Sabirgaliev 6a809a2009 update readme 2017-02-24 15:16:06 +06:00
Tair Sabirgaliev 6b808d78e6 refactor and implement unit and e2e tests 2017-02-24 14:13:09 +06:00
Tair Sabirgaliev 26edcdf6bc proper license and ng test 2017-02-24 06:38:09 +06:00
vramik f77670c4dd KEYCLOAK-4262 disable server-config-migration for distribution and add possibility to run it with profile 2017-02-23 14:46:05 +01:00
Tair Sabirgaliev 5a64d67404 Angular 2 PoC based on angular-cli generated project
- use `frontend-maven-plugin` to pull node/npm automatically
- tie `npm install` to relevant lifecycle (`mvn wildfly:deploy` automatically builds and includes build products into WAR)
- extern keycloak and product database base url, use `--env=war` to build a war colocated with keycloak and database app

Issues/Todos:
- when testing with `ng serve` will have to disable browser web security (product-database doesn’t allow cross-origin requests)
- no unit / e2e / arquillian tests for now
- `src/main/frontend/node_modules` is included in distribution build, this is a portability debt
2017-02-23 14:45:00 +06:00
Mika Andrianarijaona ceb5a3a04b Update french translation in admin console 2017-02-23 11:04:55 +03:00
David Klassen 999a3f62ac KEYCLOAK-2994: Revise german translations
Corrected a huge amount of typos. Improved some translations.
2017-02-23 08:45:51 +01:00
Stian Thorgersen ca64b90cbf Merge pull request #3889 from stianst/master
KEYCLOAK-4483
2017-02-23 04:26:36 +01:00
Stian Thorgersen 2a7f595d1c KEYCLOAK-4483
Overlay standalone differs from dist standalone
2017-02-22 19:44:01 +01:00
Pavel Drozd 089bde3571 Merge pull request #3852 from tkyjovsk/user-storage-tests
UserStorageTest migrated to Arquillian testsuite
2017-02-22 16:09:57 +01:00
Pavel Drozd 2f45183ee5 Merge pull request #3884 from vramik/KEYCLOAK-4262
KEYCLOAK-4262 make AbstractSamlTest class abstract
2017-02-22 16:08:51 +01:00
Tomas Kyjovsky a5677e87db UserStorageTest migrated to Arquillian testsuite 2017-02-22 13:54:11 +01:00
Stan Silvert 0d7b4bab11 Merge pull request #3883 from ssilvert/ace-warning
KEYCLOAK-4463: JS warnings caused by ui-ace while manipulating with
2017-02-22 07:33:57 -05:00
Viktor Kostov 2cf25b6c57 add Swedish translation for account, email, login 2017-02-22 11:51:30 +01:00
vramik 4fbb8ed994 KEYCLOAK-4262 make AbstractSamlTest class abstract 2017-02-22 10:20:34 +01:00
Stan Silvert 4f78312a98 KEYCLOAK-4463: JS warnings caused by ui-ace while manipulating with
mappers
2017-02-21 19:31:25 -05:00
Marek Posolda 48832f8ff4 Merge pull request #3880 from mposolda/hardcoded-ldap-mapper
KEYCLOAK-4433 Added HardcodedLDAPAttributeMapper
2017-02-21 11:20:02 +01:00
mposolda 098d8e915d KEYCLOAK-4433 Added HardcodedLDAPAttributeMapper 2017-02-21 08:29:57 +01:00
Marek Posolda 49e8918462 Merge pull request #3876 from mposolda/perf-htmlunit
KEYCLOAK-4368 Switch default WebDriver impl to htmlUnit
2017-02-20 22:49:36 +01:00
Stan Silvert 0f1e73facc Merge pull request #3878 from ssilvert/funny-realm-names
KEYCLOAK-4467: Realm name collides with sidebar navigation
2017-02-20 16:35:14 -05:00
mposolda f6bc0806d5 KEYCLOAK-4368 Switch default WebDriver impl to htmlUnit 2017-02-20 21:52:15 +01:00
Stan Silvert 3bf9428cc0 KEYCLOAK-4467: Realm name collides with sidebar navigation 2017-02-20 15:43:46 -05:00
Pavel Drozd ec32acec27 Merge pull request #3872 from mhajas/KEYCLOAK-4179
KEYCLOAK-4179
2017-02-20 15:44:29 +01:00
Pavel Drozd 152b4f13e7 Merge pull request #3871 from mhajas/KEYCLOAK-4626
KEYCLOAK-4626 KEYCLOAK-4261 KEYCLOAK-4181 KEYCLOAK-4160 Add tests for SAML issues
2017-02-20 15:43:38 +01:00
Pavel Drozd 284ef5992d Merge pull request #3868 from zschwarz/12-16-failing-ssl-tests-z
KEYCLOAK-4084 Fix ssl adapter tests
2017-02-20 15:42:19 +01:00
Stian Thorgersen faf0e98665 Merge pull request #3736 from guusdk/api-documentation
Improving the generated REST API documentation
2017-02-20 15:30:32 +01:00
Pedro Igor 4d614ed635 Merge pull request #3834 from ramunask/HttpMethod-null-pointer-fix
NPE fix for HttpMethod
2017-02-20 11:28:18 -03:00
Stian Thorgersen 3653d7ed9a Merge pull request #3762 from sldab/hide-providers
KEYCLOAK-4224 Allow hiding identity providers on login page
2017-02-17 12:04:35 +01:00
Stian Thorgersen eb5e30579d Merge pull request #3875 from stianst/master
Fix server dist broken due to userSessionPersister removed
2017-02-16 16:18:01 +01:00
Stian Thorgersen 1625e6c977 Fix server dist broken due to userSessionPersister removed 2017-02-16 16:15:40 +01:00
Pavel Drozd 6af06348bd Merge pull request #3806 from hmlnarik/KEYCLOAK-4191-OIDCProtocolMappersTest-sometimes-fails-on-mariadb
KEYCLOAK-4191 Fix for OIDCProtocolMappersTest on mariadb
2017-02-16 13:36:25 +01:00
vramik e960e45671 Enable server-config-migration for distribution 2017-02-16 13:00:27 +01:00
mhajas 5bce87d6e7 KEYCLOAK-4179 2017-02-16 10:50:10 +01:00
Stian Thorgersen 7db6d51a39 Merge pull request #3870 from stianst/MONGO-REMOVAL
KEYCLOAK-4384 Remove Mongo support
2017-02-16 10:50:04 +01:00
mhajas b1510c43ff KEYCLOAK-4160 2017-02-16 08:09:11 +01:00
mhajas 44c81910bf KEYCLOAK-4181 2017-02-16 08:04:42 +01:00
mhajas 27e390965e KEYCLOAK-4261 2017-02-16 08:04:23 +01:00
mhajas 119435ac76 KEYCLOAK-4262 Test for rejected consent 2017-02-16 08:04:06 +01:00
Pavel Drozd b31c38a158 Merge pull request #3862 from mhajas/KEYCLOAK-4329
KEYCLOAK-4329 Add test for empty KeyInfo
2017-02-16 07:52:13 +01:00
Stian Thorgersen 49ac3587b6 KEYCLOAK-4384 Remove Mongo support 2017-02-15 15:20:58 +01:00
Stian Thorgersen 06da1d164d Merge pull request #3866 from stianst/master
KEYCLOAK-4394 Use JBoss logging
2017-02-15 12:37:02 +01:00
mhajas f2a4fd029d KEYCLOAK-4084 Fix ssl adapter tests 2017-02-15 09:35:15 +01:00
Stian Thorgersen aa59c2f95f KEYCLOAK-4394 Use JBoss logging 2017-02-15 09:05:42 +01:00
Stian Thorgersen 8d5a8085a4 Merge pull request #3864 from sebastienblanc/springboot-starter
KEYCLOAK-4423 : Adding Spring Boot Starter
2017-02-15 08:54:10 +01:00
sebastienblanc 083f27f19d KEYCLOAK-4423 : Adding Spring Boot Adapter 2017-02-14 14:33:15 +01:00
Stian Thorgersen fe0b9e9893 Merge pull request #3850 from sebastienblanc/bom_update
added all the adapters in BOM
2017-02-14 13:09:41 +01:00
mhajas 91bcc24977 KEYCLOAK-4329 Add test for empty KeyInfo 2017-02-14 12:36:17 +01:00
Stian Thorgersen d72b67c460 Merge pull request #3857 from anderius/feature/KEYCLOAK-4392-component-id
KEYCLOAK-4392 Copy component id from representation to model
2017-02-14 09:43:38 +01:00
Bill Burke 68b5afed06 Merge pull request #3858 from patriot1burke/master
KEYCLOAK-4382
2017-02-13 13:34:41 -05:00
Bill Burke c3e72b11db KEYCLOAK-4382 2017-02-13 10:51:10 -05:00
Stan Silvert 224f93f25d Merge pull request #3782 from cargosoft/master
KEYCLOAK-4270 Custom login protocol doesn't show when creating a client
2017-02-13 07:58:21 -05:00
Anders Båtstrand 3af9f2f989 KEYCLOAK-4392 Copy component id from representation to model 2017-02-13 13:03:57 +01:00
Pavel Drozd 8668eff1b6 Merge pull request #3856 from mhajas/KEYCLOAK-3987
KEYCLOAK-3987 Add test for grant role from token
2017-02-13 10:43:32 +01:00
Pavel Drozd 3cec57da6a Merge pull request #3827 from mhajas/KEYCLOAK-4346
KEYCLOAK-4346 Validation tests are failing because of ban on server w…
2017-02-13 10:42:08 +01:00
Pavel Drozd 6602123b55 Merge pull request #3824 from mhajas/KEYCLOAK-4020
KEYCLOAK-4020 add test for boolean attribute
2017-02-13 10:41:04 +01:00
Pavel Drozd 767b4a2e2a Merge pull request #3811 from mhajas/KEYCLOAK-4286
KEYCLOAK-4286 Use desired version of JS-adapter
2017-02-13 10:39:56 +01:00
Pavel Drozd beb96b7f01 Merge pull request #3810 from vramik/KEYCLOAK-4337
KEYCLOAK-4337 Few fixes for testsuite
2017-02-13 10:38:31 +01:00
Pavel Drozd 4ede1174b7 Merge pull request #3805 from mhajas/KEYCLOAK-3841
KEYCLOAK-3841 Fix tests on windows
2017-02-13 10:37:32 +01:00
Stian Thorgersen e3a8bed5b2 Merge pull request #3853 from pedroigor/RHSSO-767
[RHSSO-767] - Wrong implementation of Request.getRelativePath causing failures on Tomcat-like adapters
2017-02-13 10:26:34 +01:00
Stian Thorgersen 4f214921e3 Merge pull request #3841 from mposolda/KEYCLOAK-4385
KEYCLOAK-4385 Added BundleBasedKeycloakConfigResolver
2017-02-13 10:25:44 +01:00
mhajas 00932f4eb3 KEYCLOAK-3987 Add test for grant role from token 2017-02-10 10:27:38 +01:00
Tair Sabirgaliev dbe87d6592 angular2-product-app: simplify KeycloakHttp 2017-02-10 05:41:49 +06:00
Pedro Igor 9416ee7224 [RHSSO-767] - Wrong implementation of Request.getRelativePath causing failures on Tomcat-like adapters 2017-02-09 21:27:28 -02:00
Bill Burke 75909a0add Merge pull request #3851 from patriot1burke/master
LDAP No-Import
2017-02-09 10:29:55 -05:00
Bill Burke d9633dc20c Merge remote-tracking branch 'upstream/master' 2017-02-09 09:13:00 -05:00
Bill Burke 75bee51ac1 console remote imported/unlink users 2017-02-09 09:11:48 -05:00
mhajas 7d203ed448 KEYCLOAK-4346 Validation tests are failing because of ban on server which provides some imports to SAML xsd 2017-02-09 14:15:45 +01:00
sebastienblanc bb9da83e52 added all the adapters in BOM 2017-02-09 11:15:07 +01:00
Stian Thorgersen 8e16e5d953 Merge pull request #3839 from stianst/SOCIAL_LOGIN_TEST
KEYCLOAK-4265 Social login tests
2017-02-09 10:15:17 +01:00
Stian Thorgersen 44180a68e6 Merge pull request #3845 from frelibert/KEYCLOAK-4378
KEYCLOAK-4378 New user attribute is not added after first login from …
2017-02-09 10:02:09 +01:00
Bill Burke cf5e2a1d20 unlink/remoteimported 2017-02-08 19:48:22 -05:00
Stian Thorgersen ceece3dce4 Merge pull request #3847 from stianst/KEYCLOAK-4008-CHECKSUMS
KEYCLOAK-4008 Include checksums in download files
2017-02-08 20:05:39 +01:00
Stian Thorgersen 520839a29b Merge pull request #3835 from mposolda/KEYCLOAK-4371
KEYCLOAK-4371 Offline Tokens still useless When SSO Session Max is Re…
2017-02-08 15:42:31 +01:00
Stian Thorgersen a6b1e4f5f7 Merge pull request #3829 from mposolda/master
KEYCLOAK-4364 Fix OpenLDAP issue with renaming DN
2017-02-08 15:40:42 +01:00
Stian Thorgersen c4df0d2690 Merge pull request #3843 from pedroigor/KEYCLOAK-4373
[KEYCLOAK-4373] - Adapter Feature Pack is missing keycloak-authz-client
2017-02-08 14:58:33 +01:00
Stian Thorgersen 3de77b7be9 KEYCLOAK-4008 Include checksums in download files 2017-02-08 14:51:36 +01:00
Frederik Libert f3a552ac9d KEYCLOAK-4378 New user attribute is not added after first login from broker 2017-02-07 15:37:16 +01:00
Pedro Igor 27c0f783bc [KEYCLOAK-4373] - Adapter Feature Pack is missing keycloak-authz-client 2017-02-07 08:43:53 -02:00
mposolda 72a5d03f34 KEYCLOAK-4385 Added BundleBasedKeycloakConfigResolver 2017-02-06 21:24:20 +01:00
Stian Thorgersen 5b5dc3e442 KEYCLOAK-4265 Social login tests 2017-02-06 13:50:10 +01:00
Stian Thorgersen 1c7de24084 Merge pull request #3832 from stianst/KEYCLOAK-4370
KEYCLOAK-4370 Prevent LDAP provider from being migrated twice
2017-02-06 08:21:30 +01:00
Bill Burke f157e2e637 LDAP No-Import: more tests 2017-02-05 09:41:52 -05:00
Bill Burke f128be9b31 LDAP No-Import 2017-02-04 10:29:34 -05:00
mposolda 8a16ab52a9 KEYCLOAK-4371 Offline Tokens still useless When SSO Session Max is Reached and normal userSession expired 2017-02-03 11:55:58 +01:00
Ramūnas Kraujutis b693a3ee47 In case of PKI validation exception HttpMethod throws NPE, because bytes value is null. 2017-02-03 11:24:30 +02:00
Stian Thorgersen f73aaef67a KEYCLOAK-4370 Prevent LDAP provider from being migrated twice 2017-02-03 10:05:57 +01:00
Stian Thorgersen 652152f167 Merge pull request #3825 from stianst/KEYCLOAK-4338
Various fixes to JS adapter
2017-02-03 08:58:44 +01:00
Takashi Norimatsu 6bab704bba KEYCLOAK-2604 Proof Key for Code Exchange by OAuth Public Clients - RFC
7636 - Arquillian Test Cases
2017-02-03 14:41:36 +09:00
Takashi Norimatsu fe5fe4c968 KEYCLOAK-2604 Proof Key for Code Exchange by OAuth Public Clients - RFC
7636 - Client Side Implementation
2017-02-03 12:02:54 +09:00
Takashi Norimatsu 88bfa563df KEYCLOAK-2604 Proof Key for Code Exchange by OAuth Public Clients - RFC
7636 - Server Side Implementation
2017-02-03 10:38:54 +09:00
Agile Developer d60c3b7c0c missing import 2017-02-03 00:47:41 +01:00
mposolda 73cad40fb7 KEYCLOAK-4364 Fix OpenLDAP issue with renaming DN 2017-02-02 22:21:29 +01:00
Agile Developer cde3e87ad9 verifySSL() - debug info
DEBUG report like this:

SSL Verification: 
		passed: true, request is secure: true, 
		SSL is required for: EXTERNAL, 
		SSL is required for remote addr 192.168.100.123: false
2017-02-02 21:18:14 +01:00
Stian Thorgersen 68a171f36c Merge pull request #3823 from ssilvert/split-domain-script
KEYCLOAK-4362: Split domain script into two separate scripts
2017-02-02 21:08:18 +01:00
Stian Thorgersen be2378a424 Merge pull request #3820 from patriot1burke/master
KEYCLOAK-4363
2017-02-02 11:32:30 +01:00
Stian Thorgersen 9aa2dacec9 KEYCLOAK-4366 Issues when keycloak.js is initialized with token 2017-02-02 10:57:03 +01:00
mhajas ddf9301ceb KEYCLOAK-4020 add test for boolean attribute 2017-02-02 09:47:52 +01:00
vramik 7abe140621 resolve 'There is no context available for qualifier' message 2017-02-02 09:20:03 +01:00
Stian Thorgersen ee62c52543 KEYCLOAK-4338 KEYCLOAK-4331 Fixes to session iframe 2017-02-02 08:12:29 +01:00
Stan Silvert b4e4cbcbaa KEYCLOAK-4262: Update pom version 2017-02-01 14:38:52 -05:00
Stan Silvert a7c3d1b8df KEYCLOAK-4262 Split migration-domain script into two separate scripts 2017-02-01 14:23:20 -05:00
Bill Burke 79dede8e78 KEYCLOAK-4363 2017-02-01 10:19:15 -05:00
Bill Burke 1d04d56bdb Merge pull request #3816 from patriot1burke/master
KEYCLOAK-4218
2017-02-01 08:55:10 -05:00
Bill Burke 0d308e2b69 KEYCLOAK-4218 2017-01-31 15:15:49 -05:00
Pedro Igor 0c16a15b7d Merge pull request #3814 from pedroigor/authz-export-fixes
Authz export fixes
2017-01-31 15:57:40 -02:00
Marek Posolda beebeaa265 Merge pull request #3813 from mposolda/master
KEYCLOAK-4339 MigrationTest fails to run
2017-01-31 16:51:11 +01:00
Pedro Igor c705a8ffc8 [KEYCLOAK-4340] - Exporting authorization settings is updating policies with wrong data 2017-01-31 13:11:14 -02:00
Pedro Igor 57c74e3f39 [KEYCLOAK-4341] - Resources are not properly exported when exporting authorization settings 2017-01-31 13:10:25 -02:00
mposolda f92dd6bd16 KEYCLOAK-4339 MigrationTest fails to run 2017-01-31 16:00:16 +01:00
mhajas 99e1482e06 KEYCLOAK-4286 Use desired version of JS-adapter 2017-01-31 14:04:14 +01:00
vramik aec59a7e91 refactor asserts in ExportImportTest to be more verbose 2017-01-31 13:24:06 +01:00
vramik 9a16805f17 assumeCommunity for AccountPageTest.testLocalizedReferrerLinkContent 2017-01-31 13:22:16 +01:00
vramik 2fd0c38ad1 Removed unused import from LDAPBinaryAttributesTest 2017-01-31 13:18:22 +01:00
Marek Posolda 2990703aeb Merge pull request #3809 from mposolda/master
KEYCLOAK-4169 Add how-to-run.md to testsuite
2017-01-31 09:11:06 +01:00
mposolda acf2e30c2f Fix MigrationTest 2017-01-30 22:23:19 +01:00
mposolda 5c5b7a33d3 KEYCLOAK-4169 Add initial testsuite how-to 2017-01-30 22:23:08 +01:00
Stian Thorgersen e28ca0ae61 Merge pull request #3807 from hmlnarik/KEYCLOAK-4329-NPE-when-not-providing-KeyInfo-element-in-IdP-initiated-SSO-SAML-
KEYCLOAK-4329 Fix NPE when not providing KeyInfo element in IdP initiated SSO SAML
2017-01-30 15:28:38 +01:00
Hynek Mlnarik ad0630d04f KEYCLOAK-4329 Fix NPE when not providing KeyInfo element in IdP initiated SSO SAML 2017-01-30 11:40:48 +01:00
Hynek Mlnarik 4d362fe9ca KEYCLOAK-4191 Fix for OIDCProtocolMappersTest on mariadb 2017-01-30 10:52:17 +01:00
Bill Burke bb77ab4a81 account link tests 2017-01-27 17:37:08 -05:00
Marek Posolda b42af99866 Merge pull request #3804 from mposolda/master
KEYCLOAK-4285 Adapter tests for examples fail in Wildfly/EAP6
2017-01-27 21:26:53 +01:00
mhajas 1a073629ec KEYCLOAK-3841 2017-01-27 14:43:46 +01:00
mposolda 265522a2e3 KEYCLOAK-4285 Adapter tests for examples fail in Wildfly/EAP6 2017-01-27 14:26:21 +01:00
Stian Thorgersen c10be4b1cf Merge pull request #3802 from stianst/RUN-TEST-ON-KC
KEYCLOAK-3729 Ability to run tests within Keycloak server
2017-01-27 13:45:51 +01:00
Stian Thorgersen 065c931a83 Merge pull request #3803 from stianst/BOMS
KEYCLOAK-4195 Keycloak adapter and SPI bom
2017-01-27 13:44:53 +01:00
Stian Thorgersen 7210ea36d2 KEYCLOAK-4195 Keycloak adapter and SPI bom 2017-01-27 12:19:40 +01:00
Stian Thorgersen 5fd3eb2990 KEYCLOAK-3729 Ability to run tests within Keycloak server 2017-01-27 12:14:19 +01:00
Stian Thorgersen 3a366dd0a6 Merge pull request #3800 from mstruk/KEYCLOAK-4324
KEYCLOAK-4324 Upgrade and unify Aesh version to 0.66.12
2017-01-27 09:23:29 +01:00
Marek Posolda 1674bf1643 Merge pull request #3799 from mposolda/master
KEYCLOAK-4271 Migration test for offline tokens
2017-01-26 18:50:30 +01:00
Marko Strukelj 3e13ffda65 KEYCLOAK-4324 Upgrade and unify Aesh version to 0.66.12 2017-01-26 18:08:48 +01:00
mposolda 42ad8aec64 KEYCLOAK-4271 Migration test for offline tokens 2017-01-26 17:19:03 +01:00
Marek Posolda 835d4c0aad Merge pull request #3798 from mposolda/master
KEYCLOAK-2813 Remove LegacyImportTest as the legacy JSON export/impor…
2017-01-26 12:13:51 +01:00
Stian Thorgersen ef9006e1a3 Merge pull request #3797 from stianst/master
Bump version to 3.0.0.CR1
2017-01-26 10:17:15 +01:00
mposolda a8e2c8ef31 KEYCLOAK-2813 Remove LegacyImportTest as the legacy JSON export/import tested with MigrationTest 2017-01-26 09:48:29 +01:00
Stian Thorgersen 6f22f88d85 Bump version to 3.0.0.CR1 2017-01-26 06:18:11 +01:00
Bill Burke 88a37067ad Merge pull request #3796 from patriot1burke/master
KEYCLOAK-4289
2017-01-25 17:27:53 -05:00
Bill Burke c6dab26769 KEYCLOAK-4289 2017-01-25 16:30:30 -05:00
Stian Thorgersen 9bceec9ef5 Merge pull request #3795 from stianst/KEYCLOAK-4286
KEYCLOAK-4286 Add deprecated support for old keycloak.js
2017-01-25 19:44:32 +01:00
Stian Thorgersen d1e491d57d KEYCLOAK-4286 Add deprecated support for old keycloak.js 2017-01-25 15:59:43 +01:00
Stian Thorgersen 7cfa1cc368 Merge pull request #3792 from hmlnarik/KEYCLOAK-4281-Some-adapter-tests-fail-for-Wildfly
KEYCLOAK-4281 Fix tests for SAML adapters in Arquillian TS
2017-01-25 12:29:17 +01:00
Stian Thorgersen b79ee3c7f3 Merge pull request #3794 from hmlnarik/KEYCLOAK-4258-null
KEYCLOAK-4258 Disable server-config-migration for auth-server-wildfly
2017-01-25 12:27:32 +01:00
Hynek Mlnarik 6085b21c36 KEYCLOAK-4258 Disable server-config-migration for auth-server-wildfly 2017-01-25 12:22:47 +01:00
Marek Posolda b24d2e064a Merge pull request #3791 from mposolda/master
KEYCLOAK-4282 Import authorization after users are imported
2017-01-25 12:21:21 +01:00
Stian Thorgersen 4fcb22c540 Merge pull request #3793 from stianst/KEYCLOAK-4259
KEYCLOAK-4259 Tweak login screen
2017-01-25 08:22:18 +01:00
Stian Thorgersen 07689c9537 KEYCLOAK-4259 Tweak login screen 2017-01-25 08:21:58 +01:00
Hynek Mlnarik e329c7801d KEYCLOAK-4281 Fix tests for SAML adapters in Arquillian TS 2017-01-24 22:36:03 +01:00
mposolda 2de2df3a41 KEYCLOAK-4282 Fix authorization import in DirImportProvider 2017-01-24 21:57:35 +01:00
mposolda 194a63cc71 KEYCLOAK-4282 Import authorization after users are imported 2017-01-24 17:32:34 +01:00
Bill Burke 6392405413 Merge remote-tracking branch 'upstream/master' 2017-01-24 07:13:52 -05:00
Stian Thorgersen a18a4477e0 Merge pull request #3784 from hmlnarik/KEYCLOAK-4236-Error-importing-SAML-Metadata-with-AttributeProfile-element-
KEYCLOAK-4236 Fix AttributeProfile element handler in SAML metadata
2017-01-24 10:34:39 +01:00
Stian Thorgersen 94ffeda62a Merge pull request #3773 from hmlnarik/KEYCLOAK-4181-SAML-Response-without-any-assertion-leads-to-an-exception
KEYCLOAK-4181 Fix handling of SAML error code in broker
2017-01-24 10:33:05 +01:00
Stian Thorgersen 264e81efb2 Merge pull request #3790 from stianst/KEYCLOAK-4259
KEYCLOAK-4259 Add top-margin to container to prevent overlay with logo
2017-01-24 09:36:11 +01:00
Stian Thorgersen cea52a6db9 KEYCLOAK-4259 Add top-margin to container to prevent overlay with logo 2017-01-24 09:35:57 +01:00
Stian Thorgersen b8c7fcf587 Merge pull request #3789 from stianst/KEYCLOAK-4259
KEYCLOAK-4259 Reverted original padding around logo
2017-01-24 09:27:46 +01:00
Stian Thorgersen 04228791f3 KEYCLOAK-4259 Reverted original padding around logo 2017-01-24 09:27:28 +01:00
Stian Thorgersen 04c4110f76 Merge pull request #3787 from pedroigor/KEYCLOAK-3261
[KEYCLOAK-3261] - Properly handle apps deployed at the ROOT context
2017-01-24 08:37:40 +01:00
Pedro Igor 13e92cdb35 [KEYCLOAK-3261] - Properly handle apps deployed at the ROOT context 2017-01-23 21:27:43 -02:00
Marek Posolda bd271b2367 Merge pull request #3786 from mposolda/master
KEYCLOAK-4273 Fix failing MSAD tests
2017-01-23 23:09:41 +01:00
mposolda 9fea9f6fe0 KEYCLOAK-4273 Fix failing MSAD tests 2017-01-23 22:29:13 +01:00
Marek Posolda 8717cd0090 Merge pull request #3785 from mposolda/master
KEYCLOAK-4274 Fix recursive composite role mappings
2017-01-23 19:01:25 +01:00
mposolda e487db349c KEYCLOAK-4274 Fix recursive composite role mappings 2017-01-23 17:55:45 +01:00
Marek Posolda 29c0fe564c Merge pull request #3752 from mposolda/master
KEYCLOAK-4024 Migration of old offline tokens
2017-01-23 16:25:35 +01:00
Marek Posolda b2d1a1a17f Merge pull request #3783 from mposolda/msad-ldap
KEYCLOAK-4269
2017-01-23 15:07:19 +01:00
Pavel Drozd 4868918f94 Merge pull request #3774 from vramik/KEYCLOAK-4263
KEYCLOAK-4263 disable authorization tests in integration testsuite for product profile
2017-01-23 14:05:14 +01:00
Stian Thorgersen 15d0a116ac Merge pull request #3769 from hmlnarik/KEYCLOAK-4167-Unable-to-validate-access-token-for-OIDC-External-IDP-using-configured-public-key
KEYCLOAK-4167 Always use preset key for verification if key ID not set
2017-01-23 13:59:35 +01:00
Hynek Mlnarik b5212d58ec KEYCLOAK-4236 Fix AttributeProfile element handler in SAML metadata 2017-01-23 13:46:01 +01:00
mposolda cf1c577840 Rename some tests 2017-01-23 13:42:12 +01:00
mposolda 57127f39d0 KEYCLOAK-4269 2017-01-23 13:36:54 +01:00
Stian Thorgersen 052534de82 Merge pull request #3764 from vramik/KEYCLOAK-4098
KEYCLOAK-4098 simplify + fix migration test
2017-01-23 13:04:32 +01:00
Stian Thorgersen 99e1eac094 Merge pull request #3775 from hmlnarik/KEYCLOAK-2847-Unexpected-error-when-trying-to-update-clientTemplate-to-already-existing-name
KEYCLOAK-2847 Fix exception convertor for Wildfly
2017-01-23 13:00:58 +01:00
Stian Thorgersen 7410bdb31c Merge pull request #3756 from mstruk/KEYCLOAK-3657
KEYCLOAK-3657 Role id is not preserved during import-export operation
2017-01-23 09:59:02 +01:00
Stan Silvert cc9c8d8ca1 Merge pull request #3781 from ssilvert/logo-padding
KEYCLOAK-4259: Login page rendering broken
2017-01-20 18:02:16 -05:00
Dmitry Telegin 5bacd2919d KEYCLOAK-4270 Custom login protocol doesn't show when creating a client 2017-01-21 01:46:34 +03:00
Stan Silvert f55d18189c KEYCLOAK-4259: Login page rendering broken 2017-01-20 16:07:36 -05:00
Marek Posolda 6097a0c9e1 Merge pull request #3780 from mposolda/msad-ldap
KEYCLOAK-2403 Cannot create user in LDAP/AD from Keycloak using Full …
2017-01-20 21:57:30 +01:00
mposolda 39f8311484 KEYCLOAK-2403 Cannot create user in LDAP/AD from Keycloak using Full Name User Federation Mapper 2017-01-20 21:08:26 +01:00
Stan Silvert fe8e437e74 Merge pull request #3768 from ssilvert/otp-scrollbar
KEYCLOAK-3884: Another small tweak.
2017-01-20 14:22:27 -05:00
Stian Thorgersen 1373708dea Merge pull request #3760 from sldab/state-param-no-slash
KEYCLOAK-4222 Remove slash from state parameter
2017-01-20 09:33:20 +01:00
Marek Posolda 34605ee3c6 Merge pull request #3777 from mposolda/msad-ldap
KEYCLOAK-4266 MSAD: User is disabled after registration
2017-01-20 09:29:50 +01:00
mposolda 3444fb62f1 KEYCLOAK-4266 MSAD: User is disabled after registration 2017-01-19 21:32:10 +01:00
Slawomir Dabek cc788cf44e KEYCLOAK-4222 Remove slash from state parameter 2017-01-19 20:11:18 +01:00
Hynek Mlnarik 13e4f607ad KEYCLOAK-2847 Fix exception convertor for Wildfly 2017-01-19 18:11:51 +01:00
Hynek Mlnarik 5da491c270 KEYCLOAK-4181 Fix handling of SAML error code in broker 2017-01-19 16:30:06 +01:00
Hynek Mlnarik 99fcc51019 KEYCLOAK-4261 Fix response type to SAML AuthnRequest messages 2017-01-19 16:30:06 +01:00
Hynek Mlnarik 350b9550c3 KEYCLOAK-4264 2017-01-19 16:30:01 +01:00
Hynek Mlnarik f289b281a0 KEYCLOAK-4262 2017-01-19 16:00:03 +01:00
Vlasta Ramik 9cd860d698 disable authorization tests in integration testsuite for product profile 2017-01-19 14:55:20 +01:00
Stian Thorgersen 536b88790e Merge pull request #3757 from mstruk/KEYCLOAK-4150
KEYCLOAK-4150 Unresolved variable ${cliane_security-admin-console} in admin web client
2017-01-19 13:55:36 +01:00
Bill Burke 73d3e8afd9 Merge pull request #3770 from patriot1burke/master
KEYCLOAK-4077
2017-01-19 07:35:10 -05:00
Vlasta Ramik aef6bb9789 simplify + fix migration test 2017-01-19 12:35:59 +01:00
Bill Burke b4f56e92f3 Merge remote-tracking branch 'upstream/master' 2017-01-18 18:29:01 -05:00
Bill Burke 8daa2c3703 KEYCLOAK-4256 2017-01-18 18:28:08 -05:00
Pedro Igor c7f2a0ffdd Merge pull request #3766 from pedroigor/KEYCLOAK-4203
[KEYCLOAK-4203] - Removing references to Drools
2017-01-18 13:31:23 -02:00
Pedro Igor c19360c6f2 [KEYCLOAK-4203] - Removing references to Drools 2017-01-18 12:44:30 -02:00
Stian Thorgersen 71da6ab4e9 Merge pull request #3772 from stianst/KEYCLOAK-4252
KEYCLOAK-4252 Update server-overlay assembly
2017-01-18 13:44:04 +01:00
Stian Thorgersen 9f33685785 KEYCLOAK-4252 Update server-overlay assembly 2017-01-18 12:29:39 +01:00
Hynek Mlnarik df4f1e7129 KEYCLOAK-4167 Always use preset key for verification if key ID not set 2017-01-18 10:29:06 +01:00
Stian Thorgersen 212182ee34 Merge pull request #3765 from zschwarz/community
KEYCLOAK-4233 Run failing i18n tests with community profile
2017-01-18 08:52:17 +01:00
Stian Thorgersen 86988833e9 Merge pull request #3761 from abstractj/KEYCLOAK-4207
[KEYCLOAK-4207] SSSD Provider - NullPointerException when mail attribute is not filled
2017-01-18 08:41:36 +01:00
Stian Thorgersen 5a0504b5d9 Merge pull request #3753 from hmlnarik/KEYCLOAK-4216-mod-auth-mellon-logout-failed-when-using-SSO
KEYCLOAK-4216 Fix NPE and logout binding choice
2017-01-18 08:40:02 +01:00
Stian Thorgersen e364680792 Merge pull request #3721 from hmlnarik/KEYCLOAK-3399-End-session-endpoint-returns-error-when-keycloak-session-is-expired
KEYCLOAK-3399 Ignore user session expiration on OIDC logout
2017-01-18 08:38:53 +01:00
Marek Posolda ef46070410 Merge pull request #3771 from mposolda/msad-ldap
KEYCLOAK-2333 LDAP/MSAD password policies are not used when user chan…
2017-01-17 21:54:01 +01:00
mposolda 843b4b470b KEYCLOAK-2333 LDAP/MSAD password policies are not used when user changes password 2017-01-17 21:06:09 +01:00
Bill Burke dcf6da2a51 KEYCLOAK-4077 2017-01-17 09:20:44 -05:00
Slawomir Dabek 9bb65ba9b7 KEYCLOAK-4224 Allow hiding identity providers on login page 2017-01-17 14:32:59 +01:00
Stian Thorgersen 3d29816ea3 Merge pull request #3763 from vmuzikar/KEYCLOAK-4230
KEYCLOAK-4230 Fix failing Arquillian tests in the "other" module
2017-01-17 14:15:03 +01:00
Stan Silvert 2eeb2f52c5 KEYCLOAK-3884: Another small tweak. 2017-01-16 14:24:44 -05:00
Stan Silvert 32827be8b1 Merge pull request #3767 from ssilvert/remove-time-conversion
KEYCLOAK-3953: Remove recalculation of time when units change
2017-01-16 12:05:37 -05:00
Stan Silvert 23c1f513e7 KEYCLOAK-3953: Remove recalculation of time when units change 2017-01-16 09:55:08 -05:00
zschwarz ae40bfb96e KEYCLOAK-4233 Run failing i18n tests with community profile 2017-01-16 15:27:39 +01:00
Vaclav Muzikar 547f5ecfa6 KEYCLOAK-4230 Fix failing Arquillian tests in the "other" module 2017-01-16 10:59:02 +01:00
Stian Thorgersen 1913f801b9 Merge pull request #3739 from hmlnarik/KEYCLOAK-2847-Unexpected-error-when-trying-to-update-clientTemplate-to-already-existing-name
KEYCLOAK-2847 Fix for client template duplicate name
2017-01-16 09:45:39 +01:00
Stian Thorgersen 5842f7c837 Merge pull request #3751 from stianst/KEYCLOAK-4192
KEYCLOAK-4192 Added missing produces annotations for update methods
2017-01-16 09:41:29 +01:00
Stian Thorgersen 1ef2eb6110 Merge pull request #3693 from ssilvert/config-migration-2
KEYCLOAK-4101: jboss-cli script to do migration of configuration
2017-01-16 09:37:01 +01:00
Stian Thorgersen 178625d3f2 Merge pull request #3745 from velias/master
KEYCLOAK-4202 - Attribute importer of Social Identity providers doesn't handle JSON 'null' values correctly
2017-01-16 08:22:04 +01:00
Bruno Oliveira 9fb46a7b1c [KEYCLOAK-4207] SSSD Provider - NullPointerException when mail attribute is not filled 2017-01-13 17:35:55 -02:00
Bill Burke bea8de8a1a Merge pull request #3758 from patriot1burke/master
KEYCLOAK-4220
2017-01-13 12:58:21 -05:00
Marko Strukelj d68f6bbc42 KEYCLOAK-4150 Unresolved variable ${cliane_security-admin-console} in admin web client 2017-01-13 17:48:21 +01:00
Marko Strukelj 7de999a7f9 KEYCLOAK-3657 Role id is not preserved during import-export operation 2017-01-13 17:46:30 +01:00
Bill Burke ffb688b393 Merge remote-tracking branch 'upstream/master' 2017-01-13 11:45:55 -05:00
Bill Burke 6aee6b0c46 KEYCLOAK-4220 2017-01-13 11:45:48 -05:00
Bill Burke aa78c9eaf5 Merge pull request #3666 from hmlnarik/KEYCLOAK-4072-User-ID-from-User-Storage-Provider-too-long-for-Offline-User-Session
KEYCLOAK-4072 Add explicit check for key format
2017-01-13 09:39:45 -05:00
Hynek Mlnarik 02eda8943c KEYCLOAK-4216 Fix NPE and logout binding choice 2017-01-13 14:30:32 +01:00
Pavel Drozd 2f7143e72f Merge pull request #3749 from pdrozd/KEYCLOAK-4210
KEYCLOAK-4210: Added Fuse admin tests
2017-01-13 11:37:24 +01:00
mposolda 9ad14d991c KEYCLOAK-4140 Migration of old offline tokens 2017-01-13 11:35:19 +01:00
Marek Posolda 59a6c9f13f Merge pull request #3748 from mposolda/master
KEYCLOAK-4201 Offline tokens become useless when accessing admin REST…
2017-01-13 10:20:33 +01:00
Stian Thorgersen ae838c12db Merge pull request #3744 from martin-kanis/KEYCLOAK-4157
KEYCLOAK-4157 Move drools-bom from keycloak-parent
2017-01-13 09:57:21 +01:00
Stian Thorgersen ac9268bd48 KEYCLOAK-4192 Added missing produces annotations for update methods 2017-01-13 09:56:20 +01:00
Hynek Mlnarik 0b58bebc90 KEYCLOAK-2847 Fix for client template duplicate name 2017-01-13 09:32:28 +01:00
mposolda 93157e49d5 KEYCLOAK-4201 Offline tokens become useless when accessing admin REST API 2017-01-13 09:06:53 +01:00
Pavel Drozd 3d9f11168e KEYCLOAK-4210: Added Fuse admin tests 2017-01-13 01:05:37 +01:00
Stan Silvert c4cce147e2 Merge pull request #3747 from ssilvert/otp-scrollbar
KEYCLOAK-3884: OTP login page cutoff under weird sizes
2017-01-12 16:37:43 -05:00
Stan Silvert 3a2927e12e KEYCLOAK-3884: OTP login page cutoff under weird sizes 2017-01-12 16:02:04 -05:00
Stan Silvert 901ff9c3d5 KEYCLOAK-4101: Uncomment sssd module from pom 2017-01-12 12:10:03 -05:00
Bill Burke 8de3b26126 Merge pull request #3746 from patriot1burke/master
KEYCLOAK-4099
2017-01-12 11:17:28 -05:00
Bill Burke 1e51ade620 Merge remote-tracking branch 'upstream/master' 2017-01-12 09:34:36 -05:00
Bill Burke 89e6f93fa4 KEYCLOAK-4099 2017-01-12 09:34:26 -05:00
Bill Burke 41630d6962 Merge pull request #3727 from hmlnarik/KEYCLOAK-4141
KEYCLOAK-4141
2017-01-12 08:49:29 -05:00
Stian Thorgersen efcd0346fc Merge pull request #3742 from hmlnarik/KEYCLOAK-4167-Unable-to-validate-access-token-for-OIDC-External-IDP-using-configured-public-key
KEYCLOAK-4167 Make OIDC identity provider key ID configurable
2017-01-12 14:41:53 +01:00
Vlastimil Elias f13deab812 KEYCLOAK-4202 - Attribute importer of Social Identity providers doesn't
handle JSON 'null' values correctly
2017-01-12 14:14:09 +01:00
Martin Kanis f28b3c1269 KEYCLOAK-4157 Move drools-bom from keycloak-parent 2017-01-12 13:58:56 +01:00
Marek Posolda 5e1ec459e5 Merge pull request #3743 from mposolda/master
KEYCLOAK-4137 Significant performance lag in 'get client role by role…
2017-01-12 12:48:23 +01:00
mposolda 9a6f202c46 KEYCLOAK-4137 Significant performance lag in 'get client role by role name' 2017-01-12 11:55:58 +01:00
Hynek Mlnarik e11957ecf3 KEYCLOAK-4167 Make OIDC identity provider key ID configurable 2017-01-11 18:24:22 +01:00
Marek Posolda 23c8809598 Merge pull request #3738 from mposolda/master
KEYCLOAK-4066 TimeoutException in cluster environment in ClearExpired…
2017-01-11 13:01:58 +01:00
mposolda 7098daaf72 KEYCLOAK-4066 TimeoutException in cluster environment in ClearExpiredSessions 2017-01-11 12:27:51 +01:00
Guus der Kinderen ba73ab1c2a API documentation: Overview to left-hand side 2017-01-10 17:08:32 +01:00
Guus der Kinderen 45f5fa6a74 API documentation: Introduce and group by tags.
This commit introduces grouping of the documented REST resources. The grouping is based
on a free-form name of a resource (a 'tag' in Swagger terminology), which is introduced
by adding a @resource javadoc tag to every Resource class.
2017-01-10 17:08:27 +01:00
Guus der Kinderen 50b7dbe7b2 API documentation: Update dependencies. 2017-01-10 17:08:14 +01:00
Stian Thorgersen 811d532b48 Merge pull request #3735 from stianst/KEYCLOAK-4179
KEYCLOAK-4179 Fixed logic to init with token to prevent issues with t…
2017-01-10 15:19:40 +01:00
Stian Thorgersen 7ceef826ac Merge pull request #3734 from stianst/KEYCLOAK-4176
KEYCLOAK-4176
2017-01-10 15:19:05 +01:00
Stan Silvert fe294dcb58 KEYCLOAK-4101: Fix pom 2017-01-10 07:37:40 -05:00
Stan Silvert 8441bda3da KEYCLOAK-4101: Move tests under testsuite. Only run under
-Pauth-server-wildfly
2017-01-10 07:30:58 -05:00
Marek Posolda 227900f288 Merge pull request #3731 from mposolda/master
KEYCLOAK-4175 Provide a way to set the connect and read timeout for l…
2017-01-10 09:49:18 +01:00
Stian Thorgersen 345e0da76d Merge pull request #3733 from stianst/KEYCLOAK-4180
KEYCLOAK-4180 When you turn on authorization for client Clustering ta…
2017-01-10 09:33:04 +01:00
Stian Thorgersen 139e12fa5f KEYCLOAK-4179 Fixed logic to init with token to prevent issues with timeSkew 2017-01-10 09:09:50 +01:00
Hynek Mlnarik 4df70c517d KEYCLOAK-4141 2017-01-10 09:02:36 +01:00
Pavel Drozd cbd6f7e1d0 Merge pull request #3723 from mhajas/KEYCLOAK-3841
KEYCLOAK-3841 Unignore and fix fuse on eap test
2017-01-10 08:10:22 +01:00
Stian Thorgersen 426e55664f KEYCLOAK-4176 2017-01-10 08:02:49 +01:00
Stian Thorgersen ab0a669662 KEYCLOAK-4180 When you turn on authorization for client Clustering tab appears without saving 2017-01-10 06:59:40 +01:00
Stian Thorgersen 5c03b20bd1 Merge pull request #3730 from tkyjovsk/fix-module-version
fixed version of module `integration-arquillian-tests-adapters-remote`
2017-01-10 06:24:14 +01:00
Stian Thorgersen 7eeebff874 Merge pull request #3720 from hmlnarik/KEYCLOAK-4091-Possible-NullPointerExceptions-with-disabled-cache
KEYCLOAK-4091 Prevent NPE with disabled cache
2017-01-10 06:23:10 +01:00
Stian Thorgersen a0a7372160 Merge pull request #3728 from stianst/KEYCLOAK-4014
KEYCLOAK-4165 KEYCLOAK-4014 Add missing sources for ace editor and fi…
2017-01-10 06:20:07 +01:00
Stan Silvert 9e697d033f KEYCLOAK-4101: Use the same undocumented tags for server-args. Only
documented in the examples.
2017-01-09 18:15:37 -05:00
Stan Silvert 2ec3eaf68a KEYCLOAK-4101: Use undocumented method to specify java-opts 2017-01-09 18:15:34 -05:00
Stan Silvert e047872c25 KEYCLOAK-4101: Bump version on pom 2017-01-09 18:15:31 -05:00
Stan Silvert f1173f8022 KEYCLOAK-4101: Try setting javaOpts on each individual execution. 2017-01-09 18:15:28 -05:00
Stan Silvert 420286c103 KEYCLOAK-4101: jboss-cli script to do migration of configuration 2017-01-09 18:15:26 -05:00
Bill Burke 1495f4881e Merge pull request #3732 from patriot1burke/master
KEYCLOAK-3617 KEYCLOAK-4117 KEYCLOAK-4118
2017-01-09 18:14:11 -05:00
Bill Burke 452611242c Merge remote-tracking branch 'upstream/master' 2017-01-09 17:14:34 -05:00
Bill Burke d075172fd2 KEYCLOAK-3617 KEYCLOAK-4117 KEYCLOAK-4118 2017-01-09 17:14:20 -05:00
mposolda c32620b718 KEYCLOAK-4175 Provide a way to set the connect and read timeout for ldap connections 2017-01-09 21:35:58 +01:00
Tomas Kyjovsky 37b8d1ad10 fixed version of module integration-arquillian-tests-adapters-remote and added it to the project structure 2017-01-09 18:45:27 +01:00
Marek Posolda be4f2aff63 Merge pull request #3729 from mposolda/master
KEYCLOAK-4178 Bad error message when kerberos provider unavailable
2017-01-09 18:31:49 +01:00
mposolda 14669dfbc5 KEYCLOAK-4178 Bad error message when kerberos provider unavailable 2017-01-09 16:56:58 +01:00
Marek Posolda 5cec0d4bef Merge pull request #3726 from mposolda/master
KEYCLOAK-2888 KEYCLOAK-3927 Fully migrate kerberos tests to the new t…
2017-01-09 15:07:28 +01:00
Stian Thorgersen dd74b57d13 KEYCLOAK-4165 KEYCLOAK-4014 Add missing sources for ace editor and fix loading of ace libs 2017-01-09 14:59:50 +01:00
mposolda a09bc6520f KEYCLOAK-2888 KEYCLOAK-3927 Fully migrate kerberos tests to the new testsuite 2017-01-09 13:50:41 +01:00
Stian Thorgersen 8a02ef1859 Merge pull request #3715 from hmlnarik/KEYCLOAK-4160
KEYCLOAK-4160
2017-01-09 12:50:38 +01:00
Stian Thorgersen 9ccd05ff54 Merge pull request #3725 from bdalenoord/KEYCLOAK-4177
KEYCLOAK-4177: Changed URL to FreeOTP homepage;
2017-01-09 11:28:09 +01:00
Bas Dalenoord 42a8a0eb15 KEYCLOAK-4177: Changed URL to FreeOTP homepage; 2017-01-09 10:30:29 +01:00
Pavel Drozd fb374ad99d Merge pull request #3716 from mhajas/KEYCLOAK-3704
KEYCLOAK-3704 Add missing test
2017-01-08 16:09:12 +01:00
Pavel Drozd a4f46d3310 Merge pull request #3714 from vramik/KEYCLOAK-4109
KEYCLOAK-4109 test + minor fix
2017-01-08 16:07:34 +01:00
Pedro Igor 5bc134ea7b Merge pull request #3717 from pedroigor/KEYCLOAK-4164
[KEYCLOAK-4164] - Creating typed resources always result in error
2017-01-06 17:29:47 -02:00
Pedro Igor 28c289cfb8 Merge pull request #3724 from pedroigor/KEYCLOAK-4166
[KEYCLOAK-4166] - Export/Import clients functionality not working as expected
2017-01-06 17:29:17 -02:00
Pedro Igor 0b5b27ea3a [KEYCLOAK-4166] - Export/Import clients functionality not working as expected 2017-01-06 16:07:10 -02:00
Stian Thorgersen f1dbe3c9e2 Merge pull request #3722 from stianst/KEYCLOAK-4096
KEYCLOAK-4096 Add migration test for realm keys
2017-01-06 16:08:10 +01:00
Hynek Mlnarik 9fb3201c8b KEYCLOAK-3399 Ignore user session expiration on OIDC logout 2017-01-06 15:15:46 +01:00
Stian Thorgersen 96f8f99313 Merge pull request #3707 from hmlnarik/KEYCLOAK-4148-AbstractParser-should-do-the-same
KEYCLOAK-4148 [AbstractParser] instantiate XMLInputFactory in singleton-like manner
2017-01-06 14:44:41 +01:00
mhajas 86c49f5e89 KEYCLOAK-3841 Unignore and fix fuse on eap test 2017-01-06 14:39:24 +01:00
Stian Thorgersen 017dbb1d9f Merge pull request #3719 from ssilvert/overlay-cli
KEYCLOAK-4123: keycloak-install.cli fails if not run from bin dir
2017-01-06 14:24:35 +01:00
Stian Thorgersen 60eda52aba KEYCLOAK-4096 Add migration test for realm keys 2017-01-06 14:18:57 +01:00
Hynek Mlnarik 377fbced4a KEYCLOAK-4091 Prevent NPE with disabled cache 2017-01-06 10:00:11 +01:00
Stian Thorgersen fb6a8da863 Merge pull request #3713 from stianst/KEYCLOAK-3952
KEYCLOAK-3952
2017-01-06 07:17:27 +01:00
Hynek Mlnarik 0cb5ba0f6e KEYCLOAK-4160 2017-01-06 07:00:47 +01:00
Stan Silvert eb1b011989 KEYCLOAK-4123: keycloak-install.cli fails if not run from bin dir 2017-01-05 21:25:41 -05:00
Pedro Igor 72691b2e74 [KEYCLOAK-4164] - Creating typed resources always result in error 2017-01-05 14:32:49 -02:00
Bill Burke f9eeecf836 test KEYCLOAK-4013 2017-01-05 11:27:17 -05:00
mhajas 61e7936d79 KEYCLOAK-3704 Add missing test 2017-01-05 16:55:40 +01:00
Bill Burke 4934fe5a8e Merge remote-tracking branch 'upstream/master' 2017-01-05 10:52:12 -05:00
Hynek Mlnarik 2035398ef4 KEYCLOAK-4148 Instantiate XML DocumentBuilder in singleton-like manner 2017-01-05 16:07:50 +01:00
Stian Thorgersen 56160ef12b Merge pull request #3652 from little-headbanger/KEYCLOAK-4088_Http_wrapper_of_Angular_2_demo_app_doesn't_forward_http_errors
KEYCLOAK-4088 Http wrapper of Angular 2 demo app doesn't forward http…
2017-01-05 13:19:36 +01:00
Vlasta Ramik b0644ce18c test for KEYCLOAK-4109 + fix AuthorizationDisabledInPreviewTest 2017-01-05 11:14:41 +01:00
Pavel Drozd cf5c3aa53b Merge pull request #3710 from mhajas/KEYCLOAK-3488
KEYCLOAK-3488 Add missing test
2017-01-05 11:03:35 +01:00
Pavel Drozd f9e87516ae Merge pull request #3709 from mhajas/KEYCLOAK-3658
KEYCLOAK-3658 Add missing test
2017-01-05 11:02:44 +01:00
Pavel Drozd ed1a30f67b Merge pull request #3704 from vmuzikar/KEYCLOAK-4147
KEYCLOAK-4147 Fix Password Policy UI test
2017-01-05 11:01:18 +01:00
Pavel Drozd 77293b85e0 Merge pull request #3701 from vramik/KEYCLOAK-4145
KEYCLOAK-4145 fix PartialImportTest for migration tests
2017-01-05 10:58:51 +01:00
Hynek Mlnarik ad9210a7a7 KEYCLOAK-4148 Prevent unnecessary deserialization when supported
... and gain another ~ 5-10 %
2017-01-05 10:41:31 +01:00
Stian Thorgersen 15af61a7cc Merge pull request #3708 from stianst/KEYCLOAK-2856
KEYCLOAK-2856
2017-01-05 09:01:37 +01:00
Stian Thorgersen 2d1417d72b KEYCLOAK-3952
User Administration: Double step cancel
2017-01-05 08:50:22 +01:00
Stan Silvert 41404424ac Merge pull request #3712 from ssilvert/page-not-found-federation
KEYCLOAK-4155: User Federation: Page not found when click cancel crea…
2017-01-04 14:43:22 -05:00
Pedro Igor a2a531a747 Merge pull request #3711 from pedroigor/KEYCLOAK-3517
[KEYCLOAK-3517] - Filtering SAML ECP flow
2017-01-04 17:34:09 -02:00
Stan Silvert a76c52ef84 KEYCLOAK-4155: User Federation: Page not found when click cancel creating
ldap provider
2017-01-04 14:03:39 -05:00
Pedro Igor ed75ef900a [KEYCLOAK-3517] - Removing SAML ECP from expected flows. ECP already tested in other places. 2017-01-04 13:06:08 -02:00
Hynek Mlnarik 862502f3ed KEYCLOAK-4148 StringUtils property replacer optimization
StringUtils.getSystemPropertyAsString is used in SAML attribute
retrieval and uses StringBuffer and suboptimal regex. This optimization
gains another ~ 3 %.
2017-01-04 15:24:57 +01:00
Hynek Mlnarik 2b57b8371b KEYCLOAK-4148 Instantiate XML DatatypeFactory in singleton-like manner
... to gain another ~ 6 %
2017-01-04 15:24:57 +01:00
Pedro Igor 4044b39ab7 [KEYCLOAK-3517] - Filtering SAML ECP flow 2017-01-04 11:17:39 -02:00
mhajas e0bc56960b KEYCLOAK-3488 Add missing test 2017-01-04 10:06:07 +01:00
mhajas 180352aa09 KEYCLOAK-3658 Add missing test 2017-01-04 09:00:36 +01:00
Stian Thorgersen 09a61f4706 KEYCLOAK-2856 2017-01-04 08:38:06 +01:00
Hynek Mlnarik 5150251141 KEYCLOAK-4148 [AbstractParser] instantiate XMLInputFactory in singleton-like manner 2017-01-04 08:06:56 +01:00
Stian Thorgersen 732d56b0c0 Merge pull request #3706 from hmlnarik/KEYCLOAK-4148-StaxParserUtil-should-instantiate-XMLInputFactory-only-once
KEYCLOAK-4148 Instantiate XMLInputFactory in singleton-like manner
2017-01-04 07:22:17 +01:00
Stian Thorgersen 08aeb13804 Merge pull request #3705 from hmlnarik/KEYCLOAK-3950-Tests-of-SAML-AuthnRequests-NameID-format-variants
KEYCLOAK-3950 - Tests for SAML Name ID format variants in AuthnRequest
2017-01-04 07:15:33 +01:00
Stian Thorgersen 1f0469894a Merge pull request #3702 from mstruk/admin-cli
KEYCLOAK-4146 Admin CLI enhancements
2017-01-04 07:13:09 +01:00
Stian Thorgersen 8a0859fcba Merge pull request #3700 from stianst/KEYCLOAK-2980
KEYCLOAK-2980 Fix admin query for resource path
2017-01-04 07:01:19 +01:00
Stian Thorgersen 5212f57b5b Merge pull request #3703 from stianst/KEYCLOAK-4116
KEYCLOAK-4116 Trim username on recover password page
2017-01-04 07:00:51 +01:00
Bill Burke 6ac1301dc2 Merge remote-tracking branch 'upstream/master' 2017-01-03 15:21:16 -05:00
Hynek Mlnarik 1eb0cde74f KEYCLOAK-4148 Instantiate XMLInputFactory in singleton-like manner 2017-01-03 15:34:28 +01:00
Hynek Mlnarik 32f8fd4b9f KEYCLOAK-3950 - Tests for SAML Name ID format variants in AuthnRequest 2017-01-03 15:34:28 +01:00
Vaclav Muzikar 90a5272860 KEYCLOAK-4147 Fix Password Policy UI test 2017-01-03 13:09:38 +01:00
Hynek Mlnarik 40a8f0a243 KEYCLOAK-3950 - Tests for SAML Name ID format variants in AuthnRequest 2017-01-03 12:48:18 +01:00
Stian Thorgersen f2ee9df600 KEYCLOAK-4116 Trim username on recover password page 2017-01-03 11:50:08 +01:00
Marko Strukelj 9ab44b79ce KEYCLOAK-4146 Admin CLI enhancements
- Added -b, --body and composite roles support
- Added a test that performs a demo session
2017-01-03 11:14:12 +01:00
Vlasta Ramik 50c11e105b fix PartialImportTest for migration tests 2017-01-03 10:36:22 +01:00
Stian Thorgersen b7c98ed433 KEYCLOAK-2980 Fix admin query for resource path 2017-01-03 10:34:21 +01:00
Stian Thorgersen d217b23719 Merge pull request #3699 from stianst/KEYCLOAK-4090
KEYCLOAK-4090
2017-01-03 10:27:59 +01:00
Stian Thorgersen 171c6ab88f Merge pull request #3697 from stianst/master
Cleanup of tests including groups for Travis
2017-01-03 08:41:00 +01:00
Stian Thorgersen 45411b1199 KEYCLOAK-4090 2017-01-03 07:53:08 +01:00
Stian Thorgersen e0bfb13ed9 Cleanup of tests including groups for Travis 2017-01-03 07:52:00 +01:00
Stian Thorgersen 902332c5ae Merge pull request #3696 from stianst/KEYCLOAK-4038
KEYCLOAK-4038 Get bind credential from component if stored
2017-01-02 15:44:59 +01:00
Stian Thorgersen 08d7211a93 KEYCLOAK-4038 Get bind credential from component if stored 2017-01-02 14:40:12 +01:00
Stian Thorgersen 1c0e204f50 Merge pull request #3690 from stianst/master
Bump version to 2.5.1.Final-SNAPSHOT
2017-01-02 08:52:04 +01:00
Stian Thorgersen d6e620a266 Merge pull request #3689 from stianst/KEYCLOAK-4133
KEYCLOAK-4133
2017-01-02 08:51:37 +01:00
Pedro Igor 54b3d3abec Merge pull request #3695 from pedroigor/KEYCLOAK-4136
[KEYCLOAK-4136] - Missing update on resource_set endpoint
2017-01-01 18:01:53 -02:00
Pedro Igor 31ed69a970 [KEYCLOAK-4136] - Missing update on resource_set endpoint 2016-12-29 11:59:42 -02:00
Marek Posolda b1d9fd670a Merge pull request #3691 from vramik/migration-duplicate-emails
KEYCLOAK-4059 Added migration test
2016-12-22 12:42:16 +01:00
Marek Posolda bf58511d81 Merge pull request #3692 from mposolda/l1-bug
RHSSO-377 Added reproducer unit test L1SerializationIssueTest
2016-12-22 12:41:49 +01:00
mposolda b5317f3485 RHSSO-377 Added reproducer unit test L1SerializationIssueTest 2016-12-22 11:41:10 +01:00
Stian Thorgersen e805ffd945 Bump version to 2.5.1.Final-SNAPSHOT 2016-12-22 08:22:18 +01:00
Stian Thorgersen 40b5731198 KEYCLOAK-4133
Login status iframe endpoint doesn't set encoding
2016-12-22 08:20:55 +01:00
Vlasta Ramik bb00524f94 Added migration for KEYCLOAK-4059 2016-12-21 15:39:48 +01:00
Bill Burke 172007f59c conflict 2016-12-20 08:56:08 -05:00
Hynek Mlnarik 3e3216fb23 KEYCLOAK-4072 Add explicit check for key format 2016-12-19 11:01:45 +01:00
Bill Burke 34f82fa1b1 KEYCLOAK-4072 2016-12-16 08:38:08 -05:00
Michael Klein 74fd904bc4 KEYCLOAK-4088 Http wrapper of Angular 2 demo app doesn't forward http errors 2016-12-15 11:13:46 +01:00
Gabriel Lavoie 4910b35d69 KEYCLOAK-3989: Replacing COMPOSITE_ROLE Collection with Set.
- Hibernate optimization that avoids deleting/re-inserting all composite roles when adding/removing a composite.
2016-11-28 09:43:05 -05:00
4564 changed files with 464918 additions and 70352 deletions

No files matched your search

+7
View File
@@ -14,6 +14,7 @@
nbactions.xml
nb-configuration.xml
catalog.xml
nbproject
# Compiled source #
###################
@@ -48,3 +49,9 @@ target
# Maven shade
#############
*dependency-reduced-pom.xml
# nodejs #
##########
# KEYCLOAK-5391: We will re-exclude node_modules when node_modules handling is worked out.
# For now, we keep our js libraries checked into GitHub, so we don't ignore.
#node_modules
+11 -17
View File
@@ -1,34 +1,28 @@
language: java
dist: precise
cache:
directories:
- $HOME/.m2
before_cache:
- rm -rf $HOME/.m2/repository/org/keycloak
cache: false
env:
global:
- MAVEN_SKIP_RC=true
- MAVEN_OPTS="-Xms512m -Xmx2048m"
- MAVEN_OPTS="-Xms512m -Xmx1536m"
matrix:
- TESTS=unit
- TESTS=server-group1
- TESTS=server-group2
- TESTS=server-group3
- TESTS=server-group4
- TESTS=old
- TESTS=group1
- TESTS=group2
- TESTS=group3
- TESTS=group4
- TESTS=adapter
- TESTS=crossdc
jdk:
- oraclejdk8
before_script:
- export MAVEN_SKIP_RC=true
install: true
install:
- travis_wait 60 mvn install -Pdistribution -DskipTests=true -B -V -q
script:
script:
- ./travis-run-tests.sh $TESTS
sudo: false
Executable → Regular
+8 -4
View File
@@ -38,17 +38,21 @@ Starting Keycloak
To start Keycloak during development first build as specified above, then run:
mvn -f testsuite/integration/pom.xml exec:java -Pkeycloak-server
mvn -f testsuite/utils/pom.xml exec:java -Pkeycloak-server
To start Keycloak from the appliance distribution first build the distribution it as specified above, then run:
To start Keycloak from the server distribution first build the distribution it as specified above, then run:
tar xfz distribution/appliance-dist/target/keycloak-appliance-dist-all-<VERSION>.tar.gz
cd keycloak-appliance-dist-all-<VERSION>/keycloak
tar xfz distribution/server-dist/target/keycloak-<VERSION>.tar.gz
cd keycloak-<VERSION>
bin/standalone.sh
To stop the server press `Ctrl + C`.
Reporting security vulnerabilities
----------------------------------
If you've found a security vulnerability, please look at the [instructions on how to properly report it](http://www.keycloak.org/security.html)
Help and Documentation
----------------------
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -277,6 +277,16 @@ public class AdapterDeploymentContext {
delegate.setSslRequired(sslRequired);
}
@Override
public int getConfidentialPort() {
return delegate.getConfidentialPort();
}
@Override
public void setConfidentialPort(int confidentialPort) {
delegate.setConfidentialPort(confidentialPort);
}
@Override
public TokenStore getTokenStore() {
return delegate.getTokenStore();
@@ -101,6 +101,7 @@ public class AuthenticatedActionsHandler {
if (!deployment.isCors()) return false;
KeycloakSecurityContext securityContext = facade.getSecurityContext();
String origin = facade.getRequest().getHeader(CorsHeaders.ORIGIN);
String exposeHeaders = deployment.getCorsExposedHeaders();
String requestOrigin = UriUtils.getOrigin(facade.getRequest().getURI());
log.debugv("Origin: {0} uri: {1}", origin, facade.getRequest().getURI());
if (securityContext != null && origin != null && !origin.equals(requestOrigin)) {
@@ -124,6 +125,9 @@ public class AuthenticatedActionsHandler {
facade.getResponse().setStatus(200);
facade.getResponse().setHeader(CorsHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, origin);
facade.getResponse().setHeader(CorsHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true");
if (exposeHeaders != null) {
facade.getResponse().setHeader(CorsHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, exposeHeaders);
}
} else {
log.debugv("cors validation not needed as we're not a secure session or origin header was null: {0}", facade.getRequest().getURI());
}
@@ -71,9 +71,10 @@ public class BasicAuthRequestAuthenticator extends BearerTokenRequestAuthenticat
AccessTokenResponse atr=null;
try {
String userpw=new String(Base64.decode(tokenString));
String[] parts=userpw.split(":");
atr = getToken(parts[0], parts[1]);
int seperatorIndex = userpw.indexOf(":");
String user = userpw.substring(0, seperatorIndex);
String pw = userpw.substring(seperatorIndex + 1);
atr = getToken(user, pw);
tokenString = atr.getToken();
} catch (Exception e) {
log.debug("Failed to obtain token", e);
@@ -82,8 +83,8 @@ public class BasicAuthRequestAuthenticator extends BearerTokenRequestAuthenticat
}
return authenticateToken(exchange, atr.getToken());
}
}
private AccessTokenResponse getToken(String username, String password) throws Exception {
AccessTokenResponse tokenResponse=null;
HttpClient client = deployment.getClient();
@@ -23,6 +23,8 @@ import org.keycloak.adapters.spi.AuthChallenge;
import org.keycloak.adapters.spi.AuthOutcome;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.common.VerificationException;
import org.keycloak.jose.jws.JWSInput;
import org.keycloak.jose.jws.JWSInputException;
import org.keycloak.representations.AccessToken;
import javax.security.cert.X509Certificate;
@@ -83,6 +85,16 @@ public class BearerTokenRequestAuthenticator {
}
protected AuthOutcome authenticateToken(HttpFacade exchange, String tokenString) {
log.debug("Verifying access_token");
if (log.isTraceEnabled()) {
try {
JWSInput jwsInput = new JWSInput(tokenString);
String wireString = jwsInput.getWireString();
log.tracef("\taccess_token: %s", wireString.substring(0, wireString.lastIndexOf(".")) + ".signature");
} catch (JWSInputException e) {
log.errorf(e, "Failed to parse access_token: %s", tokenString);
}
}
try {
token = AdapterRSATokenVerifier.verifyToken(tokenString, deployment);
} catch (VerificationException e) {
@@ -124,6 +136,7 @@ public class BearerTokenRequestAuthenticator {
}
surrogate = chain[0].getSubjectDN().getName();
}
log.debug("successful authorized");
return AuthOutcome.AUTHENTICATED;
}
@@ -164,7 +177,12 @@ public class BearerTokenRequestAuthenticator {
OIDCAuthenticationError error = new OIDCAuthenticationError(reason, description);
facade.getRequest().setError(error);
facade.getResponse().addHeader("WWW-Authenticate", challenge);
facade.getResponse().sendError(401);
if(deployment.isDelegateBearerErrorResponseSending()){
facade.getResponse().setStatus(401);
}
else {
facade.getResponse().sendError(401);
}
return true;
}
};
@@ -30,4 +30,5 @@ public interface CorsHeaders {
String ORIGIN = "Origin";
String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
}
@@ -170,8 +170,8 @@ public class HttpClientBuilder {
return this;
}
public HttpClientBuilder disableCookieCache() {
this.disableCookieCache = true;
public HttpClientBuilder disableCookieCache(boolean disable) {
this.disableCookieCache = disable;
return this;
}
@@ -334,7 +334,7 @@ public class HttpClientBuilder {
}
public HttpClient build(AdapterHttpClientConfig adapterConfig) {
disableCookieCache(); // disable cookie cache as we don't want sticky sessions for load balancing
disableCookieCache(true); // disable cookie cache as we don't want sticky sessions for load balancing
String truststorePath = adapterConfig.getTruststore();
if (truststorePath != null) {
@@ -35,6 +35,8 @@ import java.util.Map;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @author <a href="mailto:brad.culley@spartasystems.com">Brad Culley</a>
* @author <a href="mailto:john.ament@spartasystems.com">John D. Ament</a>
* @version $Revision: 1 $
*/
public class KeycloakDeployment {
@@ -66,6 +68,7 @@ public class KeycloakDeployment {
protected String scope;
protected SslRequired sslRequired = SslRequired.ALL;
protected int confidentialPort = -1;
protected TokenStore tokenStore = TokenStore.SESSION;
protected String stateCookieName = "OAuth_Token_Request_State";
protected boolean useResourceRoleMappings;
@@ -73,6 +76,7 @@ public class KeycloakDeployment {
protected int corsMaxAge = -1;
protected String corsAllowedHeaders;
protected String corsAllowedMethods;
protected String corsExposedHeaders;
protected boolean exposeToken;
protected boolean alwaysRefreshToken;
protected boolean registerNodeAtStartup;
@@ -85,6 +89,14 @@ public class KeycloakDeployment {
protected int publicKeyCacheTtl;
private PolicyEnforcer policyEnforcer;
// https://tools.ietf.org/html/rfc7636
protected boolean pkce = false;
protected boolean ignoreOAuthQueryParameter;
protected Map<String, String> redirectRewriteRules;
protected boolean delegateBearerErrorResponseSending = false;
public KeycloakDeployment() {
}
@@ -266,6 +278,14 @@ public class KeycloakDeployment {
this.sslRequired = sslRequired;
}
public int getConfidentialPort() {
return confidentialPort;
}
public void setConfidentialPort(int confidentialPort) {
this.confidentialPort = confidentialPort;
}
public TokenStore getTokenStore() {
return tokenStore;
}
@@ -322,6 +342,14 @@ public class KeycloakDeployment {
this.corsAllowedMethods = corsAllowedMethods;
}
public String getCorsExposedHeaders() {
return corsExposedHeaders;
}
public void setCorsExposedHeaders(String corsExposedHeaders) {
this.corsExposedHeaders = corsExposedHeaders;
}
public boolean isExposeToken() {
return exposeToken;
}
@@ -414,4 +442,37 @@ public class KeycloakDeployment {
public PolicyEnforcer getPolicyEnforcer() {
return policyEnforcer;
}
// https://tools.ietf.org/html/rfc7636
public boolean isPkce() {
return pkce;
}
public void setPkce(boolean pkce) {
this.pkce = pkce;
}
public void setIgnoreOAuthQueryParameter(boolean ignoreOAuthQueryParameter) {
this.ignoreOAuthQueryParameter = ignoreOAuthQueryParameter;
}
public boolean isOAuthQueryParameterEnabled() {
return !this.ignoreOAuthQueryParameter;
}
public Map<String, String> getRedirectRewriteRules() {
return redirectRewriteRules;
}
public void setRewriteRedirectRules(Map<String, String> redirectRewriteRules) {
this.redirectRewriteRules = redirectRewriteRules;
}
public boolean isDelegateBearerErrorResponseSending() {
return delegateBearerErrorResponseSending;
}
public void setDelegateBearerErrorResponseSending(boolean delegateBearerErrorResponseSending) {
this.delegateBearerErrorResponseSending = delegateBearerErrorResponseSending;
}
}
@@ -37,6 +37,8 @@ import java.security.PublicKey;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @author <a href="mailto:brad.culley@spartasystems.com">Brad Culley</a>
* @author <a href="mailto:john.ament@spartasystems.com">John D. Ament</a>
* @version $Revision: 1 $
*/
public class KeycloakDeploymentBuilder {
@@ -76,6 +78,11 @@ public class KeycloakDeploymentBuilder {
} else {
deployment.setSslRequired(SslRequired.EXTERNAL);
}
if (adapterConfig.getConfidentialPort() != -1) {
deployment.setConfidentialPort(adapterConfig.getConfidentialPort());
}
if (adapterConfig.getTokenStore() != null) {
deployment.setTokenStore(TokenStore.valueOf(adapterConfig.getTokenStore().toUpperCase()));
} else {
@@ -96,6 +103,12 @@ public class KeycloakDeploymentBuilder {
deployment.setCorsMaxAge(adapterConfig.getCorsMaxAge());
deployment.setCorsAllowedHeaders(adapterConfig.getCorsAllowedHeaders());
deployment.setCorsAllowedMethods(adapterConfig.getCorsAllowedMethods());
deployment.setCorsExposedHeaders(adapterConfig.getCorsExposedHeaders());
}
// https://tools.ietf.org/html/rfc7636
if (adapterConfig.isPkce()) {
deployment.setPkce(true);
}
deployment.setBearerOnly(adapterConfig.isBearerOnly());
@@ -107,6 +120,8 @@ public class KeycloakDeploymentBuilder {
deployment.setTokenMinimumTimeToLive(adapterConfig.getTokenMinimumTimeToLive());
deployment.setMinTimeBetweenJwksRequests(adapterConfig.getMinTimeBetweenJwksRequests());
deployment.setPublicKeyCacheTtl(adapterConfig.getPublicKeyCacheTtl());
deployment.setIgnoreOAuthQueryParameter(adapterConfig.isIgnoreOAuthQueryParameter());
deployment.setRewriteRedirectRules(adapterConfig.getRedirectRewriteRules());
if (realmKeyPem == null && adapterConfig.isBearerOnly() && adapterConfig.getAuthServerUrl() == null) {
throw new IllegalArgumentException("For bearer auth, you must set the realm-public-key or auth-server-url");
@@ -25,7 +25,6 @@ import org.keycloak.adapters.spi.AuthChallenge;
import org.keycloak.adapters.spi.AuthOutcome;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.common.VerificationException;
import org.keycloak.common.util.Encode;
import org.keycloak.common.util.KeycloakUriBuilder;
import org.keycloak.common.util.UriUtils;
import org.keycloak.constants.AdapterConstants;
@@ -38,7 +37,10 @@ import org.keycloak.representations.IDToken;
import org.keycloak.util.TokenUtil;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicLong;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.logging.Level;
/**
@@ -64,7 +66,7 @@ public class OAuthRequestAuthenticator {
this.reqAuthenticator = requestAuthenticator;
this.facade = facade;
this.deployment = deployment;
this.sslRedirectPort = sslRedirectPort;
this.sslRedirectPort = deployment.getConfidentialPort() != -1 ? deployment.getConfidentialPort() : sslRedirectPort;
this.tokenStore = tokenStore;
}
@@ -141,6 +143,7 @@ public class OAuthRequestAuthenticator {
protected String getRedirectUri(String state) {
String url = getRequestUrl();
log.debugf("callback uri: %s", url);
if (!facade.getRequest().isSecure() && deployment.getSslRequired().isRequired(facade.getRequest().getRemoteAddr())) {
int port = sslRedirectPort();
if (port < 0) {
@@ -167,10 +170,13 @@ public class OAuthRequestAuthenticator {
String maxAge = getQueryParamValue(OAuth2Constants.MAX_AGE);
url = UriUtils.stripQueryParam(url, OAuth2Constants.MAX_AGE);
String uiLocales = getQueryParamValue(OAuth2Constants.UI_LOCALES_PARAM);
url = UriUtils.stripQueryParam(url, OAuth2Constants.UI_LOCALES_PARAM);
KeycloakUriBuilder redirectUriBuilder = deployment.getAuthUrl().clone()
.queryParam(OAuth2Constants.RESPONSE_TYPE, OAuth2Constants.CODE)
.queryParam(OAuth2Constants.CLIENT_ID, deployment.getResourceName())
.queryParam(OAuth2Constants.REDIRECT_URI, Encode.encodeQueryParamAsIs(url)) // Need to encode uri ourselves as queryParam() will not encode % characters.
.queryParam(OAuth2Constants.REDIRECT_URI, rewrittenRedirectUri(url))
.queryParam(OAuth2Constants.STATE, state)
.queryParam("login", "true");
if(loginHint != null && loginHint.length() > 0){
@@ -185,6 +191,9 @@ public class OAuthRequestAuthenticator {
if (maxAge != null && maxAge.length() > 0) {
redirectUriBuilder.queryParam(OAuth2Constants.MAX_AGE, maxAge);
}
if (uiLocales != null && uiLocales.length() > 0) {
redirectUriBuilder.queryParam(OAuth2Constants.UI_LOCALES_PARAM, uiLocales);
}
scope = TokenUtil.attachOIDCScope(scope);
redirectUriBuilder.queryParam(OAuth2Constants.SCOPE, scope);
@@ -196,10 +205,8 @@ public class OAuthRequestAuthenticator {
return sslRedirectPort;
}
protected static final AtomicLong counter = new AtomicLong();
protected String getStateCode() {
return counter.getAndIncrement() + "/" + AdapterUtils.generateId();
return AdapterUtils.generateId();
}
protected AuthChallenge loginRedirect() {
@@ -322,14 +329,15 @@ public class OAuthRequestAuthenticator {
AccessTokenResponse tokenResponse = null;
strippedOauthParametersRequestUri = stripOauthParametersFromRedirect();
try {
// For COOKIE store we don't have httpSessionId and single sign-out won't be available
String httpSessionId = deployment.getTokenStore() == TokenStore.SESSION ? reqAuthenticator.changeHttpSessionId(true) : null;
tokenResponse = ServerRequest.invokeAccessCodeToToken(deployment, code, strippedOauthParametersRequestUri, httpSessionId);
tokenResponse = ServerRequest.invokeAccessCodeToToken(deployment, code, rewrittenRedirectUri(strippedOauthParametersRequestUri), httpSessionId);
} catch (ServerRequest.HttpFailure failure) {
log.error("failed to turn code into token");
log.error("status from server: " + failure.getStatus());
if (failure.getStatus() == 400 && failure.getError() != null) {
if (failure.getError() != null) {
log.error(" " + failure.getError());
}
return challenge(403, OIDCAuthenticationError.Reason.CODE_TO_TOKEN_FAILURE, null);
@@ -342,6 +350,14 @@ public class OAuthRequestAuthenticator {
tokenString = tokenResponse.getToken();
refreshToken = tokenResponse.getRefreshToken();
idTokenString = tokenResponse.getIdToken();
log.debug("Verifying tokens");
if (log.isTraceEnabled()) {
logToken("\taccess_token", tokenString);
logToken("\tid_token", idTokenString);
logToken("\trefresh_token", refreshToken);
}
try {
token = AdapterRSATokenVerifier.verifyToken(tokenString, deployment);
if (idTokenString != null) {
@@ -377,6 +393,32 @@ public class OAuthRequestAuthenticator {
.replaceQueryParam(OAuth2Constants.STATE, null);
return builder.build().toString();
}
private String rewrittenRedirectUri(String originalUri) {
Map<String, String> rewriteRules = deployment.getRedirectRewriteRules();
if(rewriteRules != null && !rewriteRules.isEmpty()) {
try {
URL url = new URL(originalUri);
Map.Entry<String, String> rule = rewriteRules.entrySet().iterator().next();
StringBuilder redirectUriBuilder = new StringBuilder(url.getProtocol());
redirectUriBuilder.append("://"+ url.getAuthority());
redirectUriBuilder.append(url.getPath().replaceFirst(rule.getKey(), rule.getValue()));
return redirectUriBuilder.toString();
} catch (MalformedURLException ex) {
log.error("Not a valid request url");
throw new RuntimeException(ex);
}
}
return originalUri;
}
private void logToken(String name, String token) {
try {
JWSInput jwsInput = new JWSInput(token);
String wireString = jwsInput.getWireString();
log.tracef("\t%s: %s", name, wireString.substring(0, wireString.lastIndexOf(".")) + ".signature");
} catch (JWSInputException e) {
log.errorf(e, "Failed to parse %s: %s", name, token);
}
}
}
@@ -22,6 +22,8 @@ import org.keycloak.adapters.spi.HttpFacade;
/**
* @author <a href="mailto:froehlich.ch@gmail.com">Christian Froehlich</a>
* @author <a href="mailto:brad.culley@spartasystems.com">Brad Culley</a>
* @author <a href="mailto:john.ament@spartasystems.com">John D. Ament</a>
* @version $Revision: 1 $
*/
public class QueryParamterTokenRequestAuthenticator extends BearerTokenRequestAuthenticator {
@@ -33,6 +35,9 @@ public class QueryParamterTokenRequestAuthenticator extends BearerTokenRequestAu
}
public AuthOutcome authenticate(HttpFacade exchange) {
if(!deployment.isOAuthQueryParameterEnabled()) {
return AuthOutcome.NOT_ATTEMPTED;
}
tokenString = null;
tokenString = getAccessTokenFromQueryParamter(exchange);
if (tokenString == null || tokenString.trim().isEmpty()) {
@@ -155,7 +155,9 @@ public class RefreshableKeycloakSecurityContext extends KeycloakSecurityContext
this.refreshToken = response.getRefreshToken();
}
this.tokenString = tokenString;
tokenStore.refreshCallback(this);
if (tokenStore != null) {
tokenStore.refreshCallback(this);
}
return true;
}
@@ -24,6 +24,7 @@ import org.keycloak.KeycloakPrincipal;
import org.keycloak.adapters.spi.AuthChallenge;
import org.keycloak.adapters.spi.AuthOutcome;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.common.enums.SslRequired;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
@@ -160,7 +161,8 @@ public abstract class RequestAuthenticator {
protected boolean verifySSL() {
if (!facade.getRequest().isSecure() && deployment.getSslRequired().isRequired(facade.getRequest().getRemoteAddr())) {
log.warn("SSL is required to authenticate");
log.warnf("SSL is required to authenticate. Remote address %s is secure: %s, SSL required for: %s .",
facade.getRequest().getRemoteAddr(), facade.getRequest().isSecure(), deployment.getSslRequired().name());
return true;
}
return false;
@@ -33,6 +33,8 @@ import org.keycloak.constants.AdapterConstants;
import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.util.JsonSerialization;
import org.jboss.logging.Logger;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -46,6 +48,8 @@ import java.util.List;
*/
public class ServerRequest {
private static Logger logger = Logger.getLogger(ServerRequest.class);
public static class HttpFailure extends Exception {
private int status;
private String error;
@@ -136,6 +140,62 @@ public class ServerRequest {
}
}
// https://tools.ietf.org/html/rfc7636#section-4
public static AccessTokenResponse invokeAccessCodeToToken(KeycloakDeployment deployment, String code, String redirectUri, String sessionId, String codeVerifier) throws IOException, HttpFailure {
List<NameValuePair> formparams = new ArrayList<>();
redirectUri = stripOauthParametersFromRedirect(redirectUri);
formparams.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, "authorization_code"));
formparams.add(new BasicNameValuePair(OAuth2Constants.CODE, code));
formparams.add(new BasicNameValuePair(OAuth2Constants.REDIRECT_URI, redirectUri));
if (sessionId != null) {
formparams.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_STATE, sessionId));
formparams.add(new BasicNameValuePair(AdapterConstants.CLIENT_SESSION_HOST, HostUtils.getHostName()));
}
// https://tools.ietf.org/html/rfc7636#section-4
if (codeVerifier != null) {
logger.debugf("add to POST parameters of Token Request, codeVerifier = %s", codeVerifier);
formparams.add(new BasicNameValuePair(OAuth2Constants.CODE_VERIFIER, codeVerifier));
} else {
logger.debug("add to POST parameters of Token Request without codeVerifier");
}
HttpPost post = new HttpPost(deployment.getTokenUrl());
ClientCredentialsProviderUtils.setClientCredentials(deployment, post, formparams);
UrlEncodedFormEntity form = new UrlEncodedFormEntity(formparams, "UTF-8");
post.setEntity(form);
HttpResponse response = deployment.getClient().execute(post);
int status = response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
if (status != 200) {
error(status, entity);
}
if (entity == null) {
throw new HttpFailure(status, null);
}
InputStream is = entity.getContent();
try {
ByteArrayOutputStream os = new ByteArrayOutputStream();
int c;
while ((c = is.read()) != -1) {
os.write(c);
}
byte[] bytes = os.toByteArray();
String json = new String(bytes);
try {
return JsonSerialization.readValue(json, AccessTokenResponse.class);
} catch (IOException e) {
throw new IOException(json, e);
}
} finally {
try {
is.close();
} catch (IOException ignored) {
}
}
}
public static AccessTokenResponse invokeRefresh(KeycloakDeployment deployment, String refreshToken) throws IOException, HttpFailure {
List<NameValuePair> formparams = new ArrayList<NameValuePair>();
formparams.add(new BasicNameValuePair(OAuth2Constants.GRANT_TYPE, OAuth2Constants.REFRESH_TOKEN));
@@ -32,7 +32,7 @@ import java.util.Map;
*/
public class ClientIdAndSecretCredentialsProvider implements ClientCredentialsProvider {
private static Logger logger = Logger.getLogger(ClientCredentialsProviderUtils.class);
private static Logger logger = Logger.getLogger(ClientIdAndSecretCredentialsProvider.class);
public static final String PROVIDER_ID = CredentialRepresentation.SECRET;
@@ -17,7 +17,6 @@
*/
package org.keycloak.adapters.authorization;
import java.net.URI;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -29,13 +28,12 @@ import org.keycloak.AuthorizationContext;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.HttpFacade.Request;
import org.keycloak.adapters.spi.HttpFacade.Response;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.ResourceRepresentation;
import org.keycloak.authorization.client.resource.ProtectedResource;
import org.keycloak.authorization.client.ClientAuthorizationContext;
import org.keycloak.representations.AccessToken;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.EnforcementMode;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.MethodConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import org.keycloak.representations.idm.authorization.Permission;
@@ -56,7 +54,7 @@ public abstract class AbstractPolicyEnforcer {
this.policyEnforcer = policyEnforcer;
this.enforcerConfig = policyEnforcer.getEnforcerConfig();
this.authzClient = policyEnforcer.getClient();
this.pathMatcher = new PathMatcher();
this.pathMatcher = policyEnforcer.getPathMatcher();
this.paths = policyEnforcer.getPaths();
}
@@ -74,7 +72,6 @@ public abstract class AbstractPolicyEnforcer {
if (accessToken != null) {
Request request = httpFacade.getRequest();
Response response = httpFacade.getResponse();
String path = getPath(request);
PathConfig pathConfig = this.pathMatcher.matches(path, this.paths);
@@ -82,11 +79,16 @@ public abstract class AbstractPolicyEnforcer {
if (pathConfig == null) {
if (EnforcementMode.PERMISSIVE.equals(enforcementMode)) {
return createAuthorizationContext(accessToken);
return createAuthorizationContext(accessToken, null);
}
LOGGER.debugf("Could not find a configuration for path [%s]", path);
response.sendError(403, "Could not find a configuration for path [" + path + "].");
if (isDefaultAccessDeniedUri(request, enforcerConfig)) {
return createAuthorizationContext(accessToken, null);
}
handleAccessDenied(httpFacade);
return createEmptyAuthorizationContext(false);
}
@@ -95,20 +97,21 @@ public abstract class AbstractPolicyEnforcer {
return createEmptyAuthorizationContext(true);
}
PathConfig actualPathConfig = resolvePathConfig(pathConfig, request);
Set<String> requiredScopes = getRequiredScopes(actualPathConfig, request);
MethodConfig methodConfig = getRequiredScopes(pathConfig, request);
if (isAuthorized(actualPathConfig, requiredScopes, accessToken, httpFacade)) {
if (isAuthorized(pathConfig, methodConfig, accessToken, httpFacade)) {
try {
return createAuthorizationContext(accessToken);
return createAuthorizationContext(accessToken, pathConfig);
} catch (Exception e) {
throw new RuntimeException("Error processing path [" + actualPathConfig.getPath() + "].", e);
throw new RuntimeException("Error processing path [" + pathConfig.getPath() + "].", e);
}
}
if (!challenge(actualPathConfig, requiredScopes, httpFacade)) {
LOGGER.debugf("Sending challenge to the client. Path [%s]", pathConfig);
response.sendError(403, "Authorization failed.");
LOGGER.debugf("Sending challenge to the client. Path [%s]", pathConfig);
if (!challenge(pathConfig, methodConfig, httpFacade)) {
LOGGER.debugf("Challenge not sent, sending default forbidden response. Path [%s]", pathConfig);
handleAccessDenied(httpFacade);
}
}
}
@@ -116,9 +119,9 @@ public abstract class AbstractPolicyEnforcer {
return createEmptyAuthorizationContext(false);
}
protected abstract boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade);
protected abstract boolean challenge(PathConfig pathConfig, MethodConfig methodConfig, OIDCHttpFacade facade);
protected boolean isAuthorized(PathConfig actualPathConfig, Set<String> requiredScopes, AccessToken accessToken, OIDCHttpFacade httpFacade) {
protected boolean isAuthorized(PathConfig actualPathConfig, MethodConfig methodConfig, AccessToken accessToken, OIDCHttpFacade httpFacade) {
Request request = httpFacade.getRequest();
PolicyEnforcerConfig enforcerConfig = getEnforcerConfig();
@@ -144,7 +147,7 @@ public abstract class AbstractPolicyEnforcer {
continue;
}
if (hasResourceScopePermission(requiredScopes, permission, actualPathConfig)) {
if (hasResourceScopePermission(methodConfig, permission)) {
LOGGER.debugf("Authorization GRANTED for path [%s]. Permissions [%s].", actualPathConfig, permissions);
if (request.getMethod().equalsIgnoreCase("DELETE") && actualPathConfig.isInstance()) {
this.paths.remove(actualPathConfig);
@@ -153,7 +156,7 @@ public abstract class AbstractPolicyEnforcer {
}
}
} else {
if (hasResourceScopePermission(requiredScopes, permission, actualPathConfig)) {
if (hasResourceScopePermission(methodConfig, permission)) {
hasPermission = true;
return true;
}
@@ -164,11 +167,15 @@ public abstract class AbstractPolicyEnforcer {
return true;
}
LOGGER.debugf("Authorization FAILED for path [%s]. No enough permissions [%s].", actualPathConfig, permissions);
LOGGER.debugf("Authorization FAILED for path [%s]. Not enough permissions [%s].", actualPathConfig, permissions);
return false;
}
protected void handleAccessDenied(OIDCHttpFacade httpFacade) {
httpFacade.getResponse().sendError(403);
}
private boolean isDefaultAccessDeniedUri(Request request, PolicyEnforcerConfig enforcerConfig) {
String accessDeniedPath = enforcerConfig.getOnDenyRedirectTo();
@@ -180,9 +187,29 @@ public abstract class AbstractPolicyEnforcer {
return false;
}
private boolean hasResourceScopePermission(Set<String> requiredScopes, Permission permission, PathConfig actualPathConfig) {
private boolean hasResourceScopePermission(MethodConfig methodConfig, Permission permission) {
List<String> requiredScopes = methodConfig.getScopes();
Set<String> allowedScopes = permission.getScopes();
return (allowedScopes.containsAll(requiredScopes) || allowedScopes.isEmpty());
if (allowedScopes.isEmpty()) {
return true;
}
PolicyEnforcerConfig.ScopeEnforcementMode enforcementMode = methodConfig.getScopesEnforcementMode();
if (PolicyEnforcerConfig.ScopeEnforcementMode.ALL.equals(enforcementMode)) {
return allowedScopes.containsAll(requiredScopes);
}
if (PolicyEnforcerConfig.ScopeEnforcementMode.ANY.equals(enforcementMode)) {
for (String requiredScope : requiredScopes) {
if (allowedScopes.contains(requiredScope)) {
return true;
}
}
}
return requiredScopes.isEmpty();
}
protected AuthzClient getAuthzClient() {
@@ -198,7 +225,7 @@ public abstract class AbstractPolicyEnforcer {
}
private AuthorizationContext createEmptyAuthorizationContext(final boolean granted) {
return new AuthorizationContext() {
return new ClientAuthorizationContext(authzClient) {
@Override
public boolean hasPermission(String resourceName, String scopeName) {
return granted;
@@ -226,55 +253,30 @@ public abstract class AbstractPolicyEnforcer {
};
}
private PathConfig resolvePathConfig(PathConfig originalConfig, Request request) {
String path = getPath(request);
if (originalConfig.hasPattern()) {
ProtectedResource resource = this.authzClient.protection().resource();
Set<String> search = resource.findByFilter("uri=" + path);
if (!search.isEmpty()) {
// resource does exist on the server, cache it
ResourceRepresentation targetResource = resource.findById(search.iterator().next()).getResourceDescription();
PathConfig config = PolicyEnforcer.createPathConfig(targetResource);
config.setScopes(originalConfig.getScopes());
config.setMethods(originalConfig.getMethods());
config.setParentConfig(originalConfig);
config.setEnforcementMode(originalConfig.getEnforcementMode());
this.policyEnforcer.addPath(config);
return config;
}
}
return originalConfig;
}
private String getPath(Request request) {
String pathInfo = URI.create(request.getURI()).getPath().substring(1);
return pathInfo.substring(pathInfo.indexOf('/'), pathInfo.length());
return request.getRelativePath();
}
private Set<String> getRequiredScopes(PathConfig pathConfig, Request request) {
Set<String> requiredScopes = new HashSet<>();
requiredScopes.addAll(pathConfig.getScopes());
private MethodConfig getRequiredScopes(PathConfig pathConfig, Request request) {
String method = request.getMethod();
for (PolicyEnforcerConfig.MethodConfig methodConfig : pathConfig.getMethods()) {
for (MethodConfig methodConfig : pathConfig.getMethods()) {
if (methodConfig.getMethod().equals(method)) {
requiredScopes.addAll(methodConfig.getScopes());
return methodConfig;
}
}
return requiredScopes;
MethodConfig methodConfig = new MethodConfig();
methodConfig.setMethod(request.getMethod());
methodConfig.setScopes(pathConfig.getScopes());
methodConfig.setScopesEnforcementMode(PolicyEnforcerConfig.ScopeEnforcementMode.ANY);
return methodConfig;
}
private AuthorizationContext createAuthorizationContext(AccessToken accessToken) {
return new AuthorizationContext(accessToken, this.paths);
private AuthorizationContext createAuthorizationContext(AccessToken accessToken, PathConfig pathConfig) {
return new ClientAuthorizationContext(accessToken, pathConfig, this.paths, authzClient);
}
private boolean isResourcePermission(PathConfig actualPathConfig, Permission permission) {
@@ -17,6 +17,8 @@
*/
package org.keycloak.adapters.authorization;
import java.util.HashSet;
import org.jboss.logging.Logger;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.HttpFacade;
@@ -24,10 +26,9 @@ import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.PermissionRequest;
import org.keycloak.authorization.client.resource.PermissionResource;
import org.keycloak.authorization.client.resource.ProtectionResource;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import java.util.Set;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
@@ -40,9 +41,9 @@ public class BearerTokenPolicyEnforcer extends AbstractPolicyEnforcer {
}
@Override
protected boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
protected boolean challenge(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, OIDCHttpFacade facade) {
if (getEnforcerConfig().getUserManagedAccess() != null) {
challengeUmaAuthentication(pathConfig, requiredScopes, facade);
challengeUmaAuthentication(pathConfig, methodConfig, facade);
} else {
challengeEntitlementAuthentication(facade);
}
@@ -52,28 +53,34 @@ public class BearerTokenPolicyEnforcer extends AbstractPolicyEnforcer {
private void challengeEntitlementAuthentication(OIDCHttpFacade facade) {
HttpFacade.Response response = facade.getResponse();
AuthzClient authzClient = getAuthzClient();
String clientId = authzClient.getConfiguration().getClientId();
String clientId = authzClient.getConfiguration().getResource();
String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/entitlement";
response.setStatus(401);
response.setHeader("WWW-Authenticate", "KC_ETT realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\"");
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Sending Entitlement challenge");
}
}
private void challengeUmaAuthentication(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
private void challengeUmaAuthentication(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, OIDCHttpFacade facade) {
HttpFacade.Response response = facade.getResponse();
AuthzClient authzClient = getAuthzClient();
String ticket = getPermissionTicket(pathConfig, requiredScopes, authzClient);
String clientId = authzClient.getConfiguration().getClientId();
String ticket = getPermissionTicket(pathConfig, methodConfig, authzClient);
String clientId = authzClient.getConfiguration().getResource();
String authorizationServerUri = authzClient.getServerConfiguration().getIssuer().toString() + "/authz/authorize";
response.setStatus(401);
response.setHeader("WWW-Authenticate", "UMA realm=\"" + clientId + "\",as_uri=\"" + authorizationServerUri + "\",ticket=\"" + ticket + "\"");
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Sending UMA challenge");
}
}
private String getPermissionTicket(PathConfig pathConfig, Set<String> requiredScopes, AuthzClient authzClient) {
private String getPermissionTicket(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, AuthzClient authzClient) {
ProtectionResource protection = authzClient.protection();
PermissionResource permission = protection.permission();
PermissionRequest permissionRequest = new PermissionRequest();
permissionRequest.setResourceSetId(pathConfig.getId());
permissionRequest.setScopes(requiredScopes);
permissionRequest.setScopes(new HashSet<>(methodConfig.getScopes()));
return permission.forResource(permissionRequest).getTicket();
}
}
@@ -35,6 +35,7 @@ import org.keycloak.authorization.client.representation.EntitlementResponse;
import org.keycloak.authorization.client.representation.PermissionRequest;
import org.keycloak.authorization.client.representation.PermissionResponse;
import org.keycloak.representations.AccessToken;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import org.keycloak.representations.idm.authorization.Permission;
@@ -50,14 +51,14 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
}
@Override
protected boolean isAuthorized(PathConfig pathConfig, Set<String> requiredScopes, AccessToken accessToken, OIDCHttpFacade httpFacade) {
protected boolean isAuthorized(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, AccessToken accessToken, OIDCHttpFacade httpFacade) {
AccessToken original = accessToken;
if (super.isAuthorized(pathConfig, requiredScopes, accessToken, httpFacade)) {
if (super.isAuthorized(pathConfig, methodConfig, accessToken, httpFacade)) {
return true;
}
accessToken = requestAuthorizationToken(pathConfig, requiredScopes, httpFacade);
accessToken = requestAuthorizationToken(pathConfig, methodConfig, httpFacade);
if (accessToken == null) {
return false;
@@ -78,11 +79,17 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
original.setAuthorization(authorization);
return super.isAuthorized(pathConfig, requiredScopes, accessToken, httpFacade);
return super.isAuthorized(pathConfig, methodConfig, accessToken, httpFacade);
}
@Override
protected boolean challenge(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade facade) {
protected boolean challenge(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, OIDCHttpFacade facade) {
handleAccessDenied(facade);
return true;
}
@Override
protected void handleAccessDenied(OIDCHttpFacade facade) {
String accessDeniedPath = getEnforcerConfig().getOnDenyRedirectTo();
HttpFacade.Response response = facade.getResponse();
@@ -92,11 +99,9 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
} else {
response.sendError(403);
}
return true;
}
private AccessToken requestAuthorizationToken(PathConfig pathConfig, Set<String> requiredScopes, OIDCHttpFacade httpFacade) {
private AccessToken requestAuthorizationToken(PathConfig pathConfig, PolicyEnforcerConfig.MethodConfig methodConfig, OIDCHttpFacade httpFacade) {
try {
String accessToken = httpFacade.getSecurityContext().getTokenString();
AuthzClient authzClient = getAuthzClient();
@@ -107,7 +112,7 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
PermissionRequest permissionRequest = new PermissionRequest();
permissionRequest.setResourceSetId(pathConfig.getId());
permissionRequest.setScopes(requiredScopes);
permissionRequest.setScopes(new HashSet<>(methodConfig.getScopes()));
PermissionResponse permissionResponse = authzClient.protection().permission().forResource(permissionRequest);
AuthorizationRequest authzRequest = new AuthorizationRequest(permissionResponse.getTicket());
@@ -123,7 +128,7 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
AccessToken token = httpFacade.getSecurityContext().getToken();
if (token.getAuthorization() == null) {
EntitlementResponse authzResponse = authzClient.entitlement(accessToken).getAll(authzClient.getConfiguration().getClientId());
EntitlementResponse authzResponse = authzClient.entitlement(accessToken).getAll(authzClient.getConfiguration().getResource());
return AdapterRSATokenVerifier.verifyToken(authzResponse.getRpt(), deployment);
} else {
EntitlementRequest request = new EntitlementRequest();
@@ -133,7 +138,7 @@ public class KeycloakAdapterPolicyEnforcer extends AbstractPolicyEnforcer {
permissionRequest.setScopes(new HashSet<>(pathConfig.getScopes()));
LOGGER.debugf("Sending entitlements request: resource_set_id [%s], resource_set_name [%s], scopes [%s].", permissionRequest.getResourceSetId(), permissionRequest.getResourceSetName(), permissionRequest.getScopes());
request.addPermission(permissionRequest);
EntitlementResponse authzResponse = authzClient.entitlement(accessToken).get(authzClient.getConfiguration().getClientId(), request);
EntitlementResponse authzResponse = authzClient.entitlement(accessToken).get(authzClient.getConfiguration().getResource(), request);
return AdapterRSATokenVerifier.verifyToken(authzResponse.getRpt(), deployment);
}
}
@@ -0,0 +1,170 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.authorization;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.LockSupport;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class PathCache {
/**
* The load factor.
*/
private static final float DEFAULT_LOAD_FACTOR = 0.75f;
private final Map<String, CacheEntry> cache;
private final AtomicBoolean writing = new AtomicBoolean(false);
private final long maxAge;
/**
* Creates a new instance.
*
* @param maxEntries the maximum number of entries to keep in the cache
*/
public PathCache(int maxEntries) {
this(maxEntries, -1);
}
/**
* Creates a new instance.
*
* @param maxEntries the maximum number of entries to keep in the cache
* @param maxAge the time in milliseconds that an entry can stay in the cache. If {@code -1}, entries never expire
*/
public PathCache(final int maxEntries, long maxAge) {
cache = new LinkedHashMap<String, CacheEntry>(16, DEFAULT_LOAD_FACTOR, true) {
@Override
protected boolean removeEldestEntry(Map.Entry eldest) {
return cache.size() > maxEntries;
}
};
this.maxAge = maxAge;
}
public void put(String uri, PathConfig newValue) {
try {
if (parkForWriteAndCheckInterrupt()) {
return;
}
CacheEntry cacheEntry = cache.get(uri);
if (cacheEntry == null) {
cache.put(uri, new CacheEntry(uri, newValue, maxAge));
}
} finally {
writing.lazySet(false);
}
}
public PathConfig get(String uri) {
if (parkForReadAndCheckInterrupt()) {
return null;
}
CacheEntry cached = cache.get(uri);
if (cached != null) {
return removeIfExpired(cached);
}
return null;
}
public void remove(String key) {
try {
if (parkForWriteAndCheckInterrupt()) {
return;
}
cache.remove(key);
} finally {
writing.lazySet(false);
}
}
private PathConfig removeIfExpired(CacheEntry cached) {
if (cached == null) {
return null;
}
if (cached.isExpired()) {
remove(cached.key());
return null;
}
return cached.value();
}
private boolean parkForWriteAndCheckInterrupt() {
while (!writing.compareAndSet(false, true)) {
LockSupport.parkNanos(1L);
if (Thread.interrupted()) {
return true;
}
}
return false;
}
private boolean parkForReadAndCheckInterrupt() {
while (writing.get()) {
LockSupport.parkNanos(1L);
if (Thread.interrupted()) {
return true;
}
}
return false;
}
private static final class CacheEntry {
final String key;
final PathConfig value;
final long expiration;
CacheEntry(String key, PathConfig value, long maxAge) {
this.key = key;
this.value = value;
if(maxAge == -1) {
expiration = -1;
} else {
expiration = System.currentTimeMillis() + maxAge;
}
}
String key() {
return key;
}
PathConfig value() {
return value;
}
boolean isExpired() {
return expiration != -1 ? System.currentTimeMillis() > expiration : false;
}
}
}
@@ -17,93 +17,226 @@
*/
package org.keycloak.adapters.authorization;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.representation.ResourceRepresentation;
import org.keycloak.authorization.client.resource.ProtectedResource;
import org.keycloak.representations.adapters.config.PolicyEnforcerConfig.PathConfig;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
class PathMatcher {
private static final String ANY_RESOURCE_PATTERN = "/*";
private static final char WILDCARD = '*';
private final AuthzClient authzClient;
// TODO: make this configurable
private PathCache cache = new PathCache(100, 30000);
PathConfig matches(final String requestedUri, Map<String, PathConfig> paths) {
PathConfig pathConfig = paths.get(requestedUri);
public PathMatcher(AuthzClient authzClient) {
this.authzClient = authzClient;
}
public PathConfig matches(final String targetUri, Map<String, PathConfig> paths) {
PathConfig pathConfig = paths.get(targetUri) == null ? cache.get(targetUri) : paths.get(targetUri);
if (pathConfig != null) {
return pathConfig;
}
PathConfig actualConfig = null;
PathConfig matchingAnyPath = null;
PathConfig matchingAnySuffixPath = null;
for (PathConfig entry : paths.values()) {
String protectedUri = entry.getPath();
String selectedUri = null;
String expectedUri = entry.getPath();
String matchingUri = null;
if (protectedUri.equals(ANY_RESOURCE_PATTERN) && actualConfig == null) {
selectedUri = protectedUri;
if (exactMatch(expectedUri, targetUri, expectedUri)) {
matchingUri = expectedUri;
}
int suffixIndex = protectedUri.indexOf(ANY_RESOURCE_PATTERN + ".");
if (isTemplate(expectedUri)) {
String templateUri = buildUriFromTemplate(expectedUri, targetUri);
if (suffixIndex != -1) {
String protectedSuffix = protectedUri.substring(suffixIndex + ANY_RESOURCE_PATTERN.length());
if (requestedUri.endsWith(protectedSuffix)) {
selectedUri = protectedUri;
}
}
if (protectedUri.equals(requestedUri)) {
selectedUri = protectedUri;
}
if (protectedUri.endsWith(ANY_RESOURCE_PATTERN)) {
String formattedPattern = removeWildCardsFromUri(protectedUri);
if (!formattedPattern.equals("/") && requestedUri.startsWith(formattedPattern)) {
selectedUri = protectedUri;
}
if (!formattedPattern.equals("/") && formattedPattern.endsWith("/") && formattedPattern.substring(0, formattedPattern.length() - 1).equals(requestedUri)) {
selectedUri = protectedUri;
}
}
int startRegex = protectedUri.indexOf('{');
if (startRegex != -1) {
String prefix = protectedUri.substring(0, startRegex);
if (requestedUri.startsWith(prefix)) {
selectedUri = protectedUri;
}
}
if (selectedUri != null) {
selectedUri = protectedUri;
}
if (selectedUri != null) {
if (actualConfig == null) {
actualConfig = entry;
} else {
if (actualConfig.equals(ANY_RESOURCE_PATTERN)) {
actualConfig = entry;
if (templateUri != null) {
if (exactMatch(expectedUri, targetUri, templateUri)) {
matchingUri = templateUri;
entry = resolvePathConfig(entry, targetUri);
}
}
}
if (protectedUri.startsWith(removeWildCardsFromUri(actualConfig.getPath()))) {
actualConfig = entry;
if (matchingUri != null) {
StringBuilder path = new StringBuilder(expectedUri);
int patternIndex = path.indexOf("/" + WILDCARD);
if (patternIndex != -1) {
path.delete(patternIndex, path.length());
}
patternIndex = path.indexOf("{");
if (patternIndex != -1) {
path.delete(patternIndex, path.length());
}
String pathString = path.toString();
if ("".equals(pathString)) {
pathString = "/";
}
if (matchingUri.equals(targetUri) || pathString.equals(targetUri)) {
cache.put(targetUri, entry);
return entry;
}
if (WILDCARD == expectedUri.charAt(expectedUri.length() - 1)) {
matchingAnyPath = entry;
} else {
int suffixIndex = expectedUri.indexOf(WILDCARD + ".");
if (suffixIndex != -1) {
String protectedSuffix = expectedUri.substring(suffixIndex + 1);
if (targetUri.endsWith(protectedSuffix)) {
matchingAnySuffixPath = entry;
}
}
}
}
}
return actualConfig;
if (matchingAnySuffixPath != null) {
cache.put(targetUri, matchingAnySuffixPath);
return matchingAnySuffixPath;
}
if (matchingAnyPath != null) {
cache.put(targetUri, matchingAnyPath);
}
return matchingAnyPath;
}
private String removeWildCardsFromUri(String protectedUri) {
return protectedUri.replaceAll("/[*]", "/");
private boolean exactMatch(String expectedUri, String targetUri, String value) {
if (targetUri.equals(value)) {
return value.equals(targetUri);
}
if (endsWithWildcard(expectedUri)) {
return targetUri.startsWith(expectedUri.substring(0, expectedUri.length() - 2));
}
String suffix = "/*.";
int suffixIndex = expectedUri.indexOf(suffix);
if (suffixIndex != -1) {
return targetUri.endsWith(expectedUri.substring(suffixIndex + suffix.length() - 1));
}
return false;
}
public String buildUriFromTemplate(String expectedUri, String targetUri) {
int patternStartIndex = expectedUri.indexOf("{");
if (patternStartIndex == -1 || patternStartIndex >= targetUri.length()) {
return null;
}
if (expectedUri.split("/").length > targetUri.split("/").length) {
return null;
}
char[] expectedUriChars = expectedUri.toCharArray();
char[] matchingUri = Arrays.copyOfRange(expectedUriChars, 0, patternStartIndex);
int matchingUriLastIndex = matchingUri.length;
String targetUriParams = targetUri.substring(patternStartIndex);
if (Arrays.equals(matchingUri, Arrays.copyOf(targetUri.toCharArray(), matchingUri.length))) {
matchingUri = Arrays.copyOf(matchingUri, targetUri.length());
int paramIndex = 0;
for (int i = patternStartIndex; i < expectedUriChars.length; i++) {
if (matchingUriLastIndex >= matchingUri.length) {
break;
}
char c = expectedUriChars[i];
if (c == '{' || c == '*') {
String[] params = targetUriParams.split("/");
for (int k = paramIndex; k <= (c == '*' ? params.length : paramIndex); k++) {
if (k == params.length) {
break;
}
int paramLength = params[k].length();
if (matchingUriLastIndex + paramLength > matchingUri.length) {
return null;
}
for (int j = 0; j < paramLength; j++) {
matchingUri[matchingUriLastIndex++] = params[k].charAt(j);
}
if (c == '*' && matchingUriLastIndex < matchingUri.length) {
matchingUri[matchingUriLastIndex++] = '/';
}
}
i = expectedUri.indexOf('}', i);
} else {
if (c == '/') {
paramIndex++;
}
matchingUri[matchingUriLastIndex++] = c;
}
}
if (matchingUri[matchingUri.length - 1] == '\u0000') {
return null;
}
return String.valueOf(matchingUri);
}
return null;
}
public boolean endsWithWildcard(String expectedUri) {
return WILDCARD == expectedUri.charAt(expectedUri.length() - 1);
}
private boolean isTemplate(String uri) {
return uri.indexOf("{") != -1;
}
private PathConfig resolvePathConfig(PathConfig originalConfig, String path) {
if (originalConfig.hasPattern()) {
ProtectedResource resource = this.authzClient.protection().resource();
Set<String> search = resource.findByFilter("uri=" + path);
if (!search.isEmpty()) {
// resource does exist on the server, cache it
ResourceRepresentation targetResource = resource.findById(search.iterator().next()).getResourceDescription();
PathConfig config = PolicyEnforcer.createPathConfig(targetResource);
config.setScopes(originalConfig.getScopes());
config.setMethods(originalConfig.getMethods());
config.setParentConfig(originalConfig);
config.setEnforcementMode(originalConfig.getEnforcementMode());
return config;
}
}
return originalConfig;
}
}
@@ -21,7 +21,9 @@ import org.jboss.logging.Logger;
import org.keycloak.AuthorizationContext;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.authentication.ClientCredentialsProviderUtils;
import org.keycloak.authorization.client.AuthzClient;
import org.keycloak.authorization.client.ClientAuthenticator;
import org.keycloak.authorization.client.Configuration;
import org.keycloak.authorization.client.representation.RegistrationResponse;
import org.keycloak.authorization.client.representation.ResourceRepresentation;
@@ -51,11 +53,18 @@ public class PolicyEnforcer {
private final AuthzClient authzClient;
private final PolicyEnforcerConfig enforcerConfig;
private final Map<String, PathConfig> paths;
private final PathMatcher pathMatcher;
public PolicyEnforcer(KeycloakDeployment deployment, AdapterConfig adapterConfig) {
this.deployment = deployment;
this.enforcerConfig = adapterConfig.getPolicyEnforcerConfig();
this.authzClient = AuthzClient.create(new Configuration(adapterConfig.getAuthServerUrl(), adapterConfig.getRealm(), adapterConfig.getResource(), adapterConfig.getCredentials(), deployment.getClient()));
this.authzClient = AuthzClient.create(new Configuration(adapterConfig.getAuthServerUrl(), adapterConfig.getRealm(), adapterConfig.getResource(), adapterConfig.getCredentials(), deployment.getClient()), new ClientAuthenticator() {
@Override
public void configureClientCredentials(HashMap<String, String> requestParams, HashMap<String, String> requestHeaders) {
ClientCredentialsProviderUtils.setClientCredentials(PolicyEnforcer.this.deployment, requestHeaders, requestParams);
}
});
this.pathMatcher = new PathMatcher(this.authzClient);
this.paths = configurePaths(this.authzClient.protection().resource(), this.enforcerConfig);
if (LOGGER.isDebugEnabled()) {
@@ -218,7 +227,14 @@ public class PolicyEnforcer {
pathConfig.setId(resourceDescription.getId());
pathConfig.setName(resourceDescription.getName());
pathConfig.setPath(resourceDescription.getUri());
String uri = resourceDescription.getUri();
if (uri == null || "".equals(uri.trim())) {
throw new RuntimeException("Failed to configure paths. Resource [" + resourceDescription.getName() + "] has an invalid or empty URI [" + uri + "].");
}
pathConfig.setPath(uri);
List<String> scopeNames = new ArrayList<>();
@@ -231,4 +247,8 @@ public class PolicyEnforcer {
return pathConfig;
}
public PathMatcher getPathMatcher() {
return pathMatcher;
}
}
@@ -37,8 +37,12 @@ import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.LoginException;
import javax.security.auth.spi.LoginModule;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.Principal;
import java.util.HashSet;
import java.util.Map;
@@ -53,7 +57,7 @@ public abstract class AbstractKeycloakLoginModule implements LoginModule {
public static final String KEYCLOAK_CONFIG_FILE_OPTION = "keycloak-config-file";
public static final String ROLE_PRINCIPAL_CLASS_OPTION = "role-principal-class";
public static final String PROFILE_RESOURCE = "profile:";
protected Subject subject;
protected CallbackHandler callbackHandler;
protected Auth auth;
@@ -84,14 +88,27 @@ public abstract class AbstractKeycloakLoginModule implements LoginModule {
protected KeycloakDeployment resolveDeployment(String keycloakConfigFile) {
try {
InputStream is = FindFile.findFile(keycloakConfigFile);
InputStream is = null;
if (keycloakConfigFile.startsWith(PROFILE_RESOURCE)) {
try {
is = new URL(keycloakConfigFile).openStream();
} catch (MalformedURLException mfue) {
throw new RuntimeException(mfue);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
} else {
is = FindFile.findFile(keycloakConfigFile);
}
KeycloakDeployment kd = KeycloakDeploymentBuilder.build(is);
return kd;
} catch (RuntimeException e) {
getLogger().debug("Unable to find or parse file " + keycloakConfigFile + " due to " + e.getMessage(), e);
throw e;
}
}
@Override
public boolean login() throws LoginException {
@@ -81,7 +81,7 @@ public class JWKPublicKeyLocator implements PublicKeyLocator {
private PublicKey lookupCachedKey(int publicKeyCacheTtl, int currentTime, String kid) {
if (lastRequestTime + publicKeyCacheTtl > currentTime) {
if (lastRequestTime + publicKeyCacheTtl > currentTime && kid != null) {
return currentKeys.get(kid);
} else {
return null;
@@ -29,10 +29,13 @@ import org.keycloak.common.util.PemUtils;
import org.keycloak.enums.TokenStore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
* @author <a href="mailto:brad.culley@spartasystems.com">Brad Culley</a>
* @author <a href="mailto:john.ament@spartasystems.com">John D. Ament</a>
*/
public class KeycloakDeploymentBuilderTest {
@@ -53,10 +56,12 @@ public class KeycloakDeploymentBuilderTest {
assertEquals(1000, deployment.getCorsMaxAge());
assertEquals("POST, PUT, DELETE, GET", deployment.getCorsAllowedMethods());
assertEquals("X-Custom, X-Custom2", deployment.getCorsAllowedHeaders());
assertEquals("X-Custom3, X-Custom4", deployment.getCorsExposedHeaders());
assertTrue(deployment.isBearerOnly());
assertTrue(deployment.isPublicClient());
assertTrue(deployment.isEnableBasicAuth());
assertTrue(deployment.isExposeToken());
assertFalse(deployment.isOAuthQueryParameterEnabled());
assertEquals("234234-234234-234234", deployment.getResourceCredentials().get("secret"));
assertEquals(ClientIdAndSecretCredentialsProvider.PROVIDER_ID, deployment.getClientAuthenticator().getId());
assertEquals(20, ((ThreadSafeClientConnManager) deployment.getClient().getConnectionManager()).getMaxTotal());
@@ -70,6 +75,7 @@ public class KeycloakDeploymentBuilderTest {
assertEquals(10, deployment.getTokenMinimumTimeToLive());
assertEquals(20, deployment.getMinTimeBetweenJwksRequests());
assertEquals(120, deployment.getPublicKeyCacheTtl());
assertEquals("/api/$1", deployment.getRedirectRewriteRules().get("^/wsmaster/api/(.*)$"));
}
@Test
@@ -0,0 +1,49 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author <a href="mailto:brad.culley@spartasystems.com">Brad Culley</a>
* @author <a href="mailto:john.ament@spartasystems.com">John D. Ament</a>
*/
public class KeycloakDeploymentTest {
@Test
public void shouldNotEnableOAuthQueryParamWhenIgnoreIsTrue() {
KeycloakDeployment keycloakDeployment = new KeycloakDeployment();
keycloakDeployment.setIgnoreOAuthQueryParameter(true);
assertFalse(keycloakDeployment.isOAuthQueryParameterEnabled());
}
@Test
public void shouldEnableOAuthQueryParamWhenIgnoreIsFalse() {
KeycloakDeployment keycloakDeployment = new KeycloakDeployment();
keycloakDeployment.setIgnoreOAuthQueryParameter(false);
assertTrue(keycloakDeployment.isOAuthQueryParameterEnabled());
}
@Test
public void shouldEnableOAuthQueryParamWhenIgnoreNotSet() {
KeycloakDeployment keycloakDeployment = new KeycloakDeployment();
assertTrue(keycloakDeployment.isOAuthQueryParameterEnabled());
}
}
@@ -9,6 +9,7 @@
"cors-max-age": 1000,
"cors-allowed-methods": "POST, PUT, DELETE, GET",
"cors-allowed-headers": "X-Custom, X-Custom2",
"cors-exposed-headers": "X-Custom3, X-Custom4",
"bearer-only": true,
"public-client": true,
"enable-basic-auth": true,
@@ -31,5 +32,9 @@
"principal-attribute": "email",
"token-minimum-time-to-live": 10,
"min-time-between-jwks-requests": 20,
"public-key-cache-ttl": 120
"public-key-cache-ttl": 120,
"ignore-oauth-query-parameter": true,
"redirect-rewrite-rules" : {
"^/wsmaster/api/(.*)$" : "/api/$1"
}
}
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-as7-integration-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,13 @@
package org.keycloak.adapters.jbossweb;
import org.apache.catalina.Container;
import org.apache.catalina.Valve;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.tomcat.AbstractAuthenticatedActionsValve;
public class AuthenticatedActionsValve extends AbstractAuthenticatedActionsValve {
public AuthenticatedActionsValve(AdapterDeploymentContext deploymentContext, Valve next, Container container) {
super(deploymentContext, next, container);
}
}
@@ -17,11 +17,15 @@
package org.keycloak.adapters.jbossweb;
import org.apache.catalina.Container;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Valve;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.deploy.LoginConfig;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.tomcat.AbstractAuthenticatedActionsValve;
import org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve;
import org.keycloak.adapters.tomcat.GenericPrincipalFactory;
@@ -56,7 +60,6 @@ public class KeycloakAuthenticatorValve extends AbstractKeycloakAuthenticatorVal
super.start();
}
public void logout(Request request) {
logoutInternal(request);
}
@@ -65,4 +68,9 @@ public class KeycloakAuthenticatorValve extends AbstractKeycloakAuthenticatorVal
protected GenericPrincipalFactory createPrincipalFactory() {
return new JBossWebPrincipalFactory();
}
@Override
protected AbstractAuthenticatedActionsValve createAuthenticatedActionsValve(AdapterDeploymentContext deploymentContext, Valve next, Container container) {
return new AuthenticatedActionsValve(deploymentContext, next, container);
}
}
+1 -3
View File
@@ -21,7 +21,7 @@
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-as7-integration-pom</artifactId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -88,7 +88,6 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.0.GA</version>
</dependency>
<dependency>
@@ -104,7 +103,6 @@ projects that depend on this project.-->
<dependency>
<groupId>org.jboss.msc</groupId>
<artifactId>jboss-msc</artifactId>
<version>1.0.2.GA</version>
</dependency>
<dependency>
+13 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak AS7 / JBoss EAP 6 Integration</name>
@@ -30,6 +30,18 @@
<artifactId>keycloak-as7-integration-pom</artifactId>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-parent</artifactId>
<version>${jboss.as.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>as7-adapter-spi</module>
<module>as7-adapter</module>
+9
View File
@@ -0,0 +1,9 @@
CLI Single Sign On
===================================
This java-based utility is meant for providing Keycloak integration to
command line applications that are either written in Java or another language. The
idea is that the Java app provided by this utility performs a login for a specific
client, parses responses, and exports an access token as an environment variable
that can be used by the command line utility you are accessing.
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
export KC_AUTH_SERVER=http://localhost:8080/auth
export KC_REALM=master
export KC_CLIENT=cli
export KC_ACCESS_TOKEN=`java -DKEYCLOAK_AUTH_SERVER=$KC_AUTH_SERVER -DKEYCLOAK_REALM=$KC_REALM -DKEYCLOAK_CLIENT=$KC_CLIENT -jar target/keycloak-cli-sso-3.3.0.CR1-SNAPSHOT.jar login`
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
java -DKEYCLOAK_AUTH_SERVER=$KC_AUTH_SERVER -DKEYCLOAK_REALM=$KC_REALM -DKEYCLOAK_CLIENT=$KC_CLIENT -jar target/keycloak-cli-sso-3.3.0.CR1-SNAPSHOT.jar logout
unset KC_ACCESS_TOKEN
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-cli-sso</artifactId>
<name>Keycloak CLI SSO Framework</name>
<description/>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-installed-adapter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.keycloak.adapters.KeycloakCliSsoMain</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -14,36 +14,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters;
package org.keycloak.broker.oidc.util;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.keycloak.broker.provider.util.SimpleHttp;
import org.keycloak.adapters.installed.KeycloakCliSso;
import org.keycloak.adapters.installed.KeycloakInstalled;
import org.keycloak.common.util.Time;
import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.util.JsonSerialization;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class JsonSimpleHttp extends SimpleHttp {
public JsonSimpleHttp(String url, String method) {
super(url, method);
public class KeycloakCliSsoMain extends KeycloakCliSso {
public static void main(String[] args) throws Exception {
new KeycloakCliSsoMain().mainCmd(args);
}
public static JsonSimpleHttp doGet(String url) {
return new JsonSimpleHttp(url, "GET");
}
public static JsonSimpleHttp doPost(String url) {
return new JsonSimpleHttp(url, "POST");
}
private static ObjectMapper mapper = new ObjectMapper();
public static JsonNode asJson(SimpleHttp request) throws IOException {
return mapper.readTree(request.asString());
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,266 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.installed;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.KeycloakDeploymentBuilder;
import org.keycloak.adapters.ServerRequest;
import org.keycloak.common.util.Time;
import org.keycloak.representations.AccessTokenResponse;
import org.keycloak.representations.adapters.config.AdapterConfig;
import org.keycloak.util.JsonSerialization;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
*
*
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class KeycloakCliSso {
public void mainCmd(String[] args) throws Exception {
if (args.length != 1) {
printHelp();
return;
}
if (args[0].equalsIgnoreCase("login")) {
login();
} else if (args[0].equalsIgnoreCase("login-manual")) {
loginManual();
} else if (args[0].equalsIgnoreCase("token")) {
token();
} else if (args[0].equalsIgnoreCase("logout")) {
logout();
} else if (args[0].equalsIgnoreCase("env")) {
System.out.println(System.getenv().toString());
} else {
printHelp();
}
}
public void printHelp() {
System.err.println("Commands:");
System.err.println(" login - login with desktop browser if available, otherwise do manual login. Output is access token.");
System.err.println(" login-manual - manual login");
System.err.println(" token - print access token if logged in");
System.err.println(" logout - logout.");
System.exit(1);
}
public AdapterConfig getConfig() {
String url = System.getProperty("KEYCLOAK_AUTH_SERVER");
if (url == null) {
System.err.println("KEYCLOAK_AUTH_SERVER property not set");
System.exit(1);
}
String realm = System.getProperty("KEYCLOAK_REALM");
if (realm == null) {
System.err.println("KEYCLOAK_REALM property not set");
System.exit(1);
}
String client = System.getProperty("KEYCLOAK_CLIENT");
if (client == null) {
System.err.println("KEYCLOAK_CLIENT property not set");
System.exit(1);
}
String secret = System.getProperty("KEYCLOAK_CLIENT_SECRET");
AdapterConfig config = new AdapterConfig();
config.setAuthServerUrl(url);
config.setRealm(realm);
config.setResource(client);
config.setSslRequired("external");
if (secret != null) {
Map<String, Object> creds = new HashMap<>();
creds.put("secret", secret);
config.setCredentials(creds);
} else {
config.setPublicClient(true);
}
return config;
}
public boolean checkToken() throws Exception {
String token = getTokenResponse();
if (token == null) return false;
if (token != null) {
Matcher m = Pattern.compile("\\{.*\\}\\z").matcher(token);
if (m.find()) {
String json = m.group(0);
try {
AccessTokenResponse tokenResponse = JsonSerialization.readValue(json, AccessTokenResponse.class);
if (Time.currentTime() < tokenResponse.getExpiresIn()) {
return true;
}
AdapterConfig config = getConfig();
KeycloakInstalled installed = new KeycloakInstalled(KeycloakDeploymentBuilder.build(config));
installed.refreshToken(tokenResponse.getRefreshToken());
processResponse(installed);
return true;
} catch (Exception e) {
System.err.println("Error processing existing token");
e.printStackTrace();
}
}
}
return false;
}
private String getTokenResponse() throws IOException {
String token = null;
File tokenFile = getTokenFilePath();
if (tokenFile.exists()) {
FileInputStream fis = new FileInputStream(tokenFile);
byte[] data = new byte[(int) tokenFile.length()];
fis.read(data);
fis.close();
token = new String(data, "UTF-8");
}
return token;
}
public void token() throws Exception {
String token = getTokenResponse();
if (token == null) {
System.err.println("There is no token for client");
System.exit(1);
} else {
Matcher m = Pattern.compile("\\{.*\\}\\z").matcher(token);
if (m.find()) {
String json = m.group(0);
try {
AccessTokenResponse tokenResponse = JsonSerialization.readValue(json, AccessTokenResponse.class);
if (Time.currentTime() < tokenResponse.getExpiresIn()) {
System.out.println(tokenResponse.getToken());
return;
} else {
System.err.println("token in response file is expired");
System.exit(1);
}
} catch (Exception e) {
System.err.println("Failure processing token response file");
e.printStackTrace();
System.exit(1);
}
} else {
System.err.println("Could not find json within token response file");
System.exit(1);
}
}
}
public void login() throws Exception {
if (checkToken()) return;
AdapterConfig config = getConfig();
KeycloakInstalled installed = new KeycloakInstalled(KeycloakDeploymentBuilder.build(config));
installed.login();
processResponse(installed);
}
public String getHome() {
String home = System.getenv("HOME");
if (home == null) {
home = System.getProperty("HOME");
if (home == null) {
home = Paths.get("").toAbsolutePath().normalize().toString();
}
}
return home;
}
public File getTokenDirectory() {
return Paths.get(getHome(), System.getProperty("basepath", ".keycloak-sso"), System.getProperty("KEYCLOAK_REALM")).toFile();
}
public File getTokenFilePath() {
return Paths.get(getHome(), System.getProperty("basepath", ".keycloak-sso"), System.getProperty("KEYCLOAK_REALM"), System.getProperty("KEYCLOAK_CLIENT") + ".json").toFile();
}
private void processResponse(KeycloakInstalled installed) throws IOException {
AccessTokenResponse tokenResponse = installed.getTokenResponse();
tokenResponse.setExpiresIn(Time.currentTime() + tokenResponse.getExpiresIn());
tokenResponse.setIdToken(null);
String output = JsonSerialization.writeValueAsString(tokenResponse);
getTokenDirectory().mkdirs();
FileOutputStream fos = new FileOutputStream(getTokenFilePath());
fos.write(output.getBytes("UTF-8"));
fos.flush();
fos.close();
System.out.println(tokenResponse.getToken());
}
public void loginManual() throws Exception {
if (checkToken()) return;
AdapterConfig config = getConfig();
KeycloakDeployment deployment = KeycloakDeploymentBuilder.build(config);
KeycloakInstalled installed = new KeycloakInstalled(deployment);
installed.loginManual();
processResponse(installed);
}
public void logout() throws Exception {
String token = getTokenResponse();
if (token != null) {
Matcher m = Pattern.compile("\\{.*\\}\\z").matcher(token);
if (m.find()) {
String json = m.group(0);
try {
AccessTokenResponse tokenResponse = JsonSerialization.readValue(json, AccessTokenResponse.class);
if (Time.currentTime() > tokenResponse.getExpiresIn()) {
System.err.println("Login is expired");
System.exit(1);
}
AdapterConfig config = getConfig();
KeycloakDeployment deployment = KeycloakDeploymentBuilder.build(config);
ServerRequest.invokeLogout(deployment, tokenResponse.getRefreshToken());
for (File fp : getTokenDirectory().listFiles()) fp.delete();
System.out.println("logout complete");
} catch (Exception e) {
System.err.println("Failure processing token response file");
e.printStackTrace();
System.exit(1);
}
} else {
System.err.println("Could not find json within token response file");
System.exit(1);
}
} else {
System.err.println("Not logged in");
System.exit(1);
}
}
}
@@ -17,6 +17,7 @@
package org.keycloak.adapters.installed;
import org.apache.commons.codec.Charsets;
import org.keycloak.OAuth2Constants;
import org.keycloak.OAuthErrorException;
import org.keycloak.adapters.KeycloakDeployment;
@@ -24,6 +25,7 @@ import org.keycloak.adapters.KeycloakDeploymentBuilder;
import org.keycloak.adapters.ServerRequest;
import org.keycloak.adapters.rotation.AdapterRSATokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.common.util.KeycloakUriBuilder;
import org.keycloak.jose.jws.JWSInput;
import org.keycloak.jose.jws.JWSInputException;
import org.keycloak.representations.AccessToken;
@@ -43,6 +45,7 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Locale;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
@@ -51,6 +54,11 @@ import java.util.concurrent.TimeUnit;
*/
public class KeycloakInstalled {
public interface HttpResponseWriter {
void success(PrintWriter pw, KeycloakInstalled ki);
void failure(PrintWriter pw, KeycloakInstalled ki);
}
private static final String KEYCLOAK_JSON = "META-INF/keycloak.json";
private KeycloakDeployment deployment;
@@ -59,12 +67,18 @@ public class KeycloakInstalled {
LOGGED_MANUAL, LOGGED_DESKTOP
}
private AccessTokenResponse tokenResponse;
private String tokenString;
private String idTokenString;
private IDToken idToken;
private AccessToken token;
private String refreshToken;
private Status status;
private Locale locale;
private HttpResponseWriter loginResponseWriter;
private HttpResponseWriter logoutResponseWriter;
public KeycloakInstalled() {
InputStream config = Thread.currentThread().getContextClassLoader().getResourceAsStream(KEYCLOAK_JSON);
@@ -75,6 +89,92 @@ public class KeycloakInstalled {
deployment = KeycloakDeploymentBuilder.build(config);
}
public KeycloakInstalled(KeycloakDeployment deployment) {
this.deployment = deployment;
}
private static HttpResponseWriter defaultLoginWriter = new HttpResponseWriter() {
@Override
public void success(PrintWriter pw, KeycloakInstalled ki) {
pw.println("HTTP/1.1 200 OK");
pw.println("Content-Type: text/html");
pw.println();
pw.println("<html><h1>Login completed.</h1><div>");
pw.println("This browser will remain logged in until you close it, logout, or the session expires.");
pw.println("</div></html>");
pw.flush();
}
@Override
public void failure(PrintWriter pw, KeycloakInstalled ki) {
pw.println("HTTP/1.1 200 OK");
pw.println("Content-Type: text/html");
pw.println();
pw.println("<html><h1>Login attempt failed.</h1><div>");
pw.println("</div></html>");
pw.flush();
}
};
private static HttpResponseWriter defaultLogoutWriter = new HttpResponseWriter() {
@Override
public void success(PrintWriter pw, KeycloakInstalled ki) {
pw.println("HTTP/1.1 200 OK");
pw.println("Content-Type: text/html");
pw.println();
pw.println("<html><h1>Logout completed.</h1><div>");
pw.println("You may close this browser tab.");
pw.println("</div></html>");
pw.flush();
}
@Override
public void failure(PrintWriter pw, KeycloakInstalled ki) {
pw.println("HTTP/1.1 200 OK");
pw.println("Content-Type: text/html");
pw.println();
pw.println("<html><h1>Logout failed.</h1><div>");
pw.println("You may close this browser tab.");
pw.println("</div></html>");
pw.flush();
}
};
public HttpResponseWriter getLoginResponseWriter() {
if (loginResponseWriter == null) {
return defaultLoginWriter;
} else {
return loginResponseWriter;
}
}
public HttpResponseWriter getLogoutResponseWriter() {
if (logoutResponseWriter == null) {
return defaultLogoutWriter;
} else {
return logoutResponseWriter;
}
}
public void setLoginResponseWriter(HttpResponseWriter loginResponseWriter) {
this.loginResponseWriter = loginResponseWriter;
}
public void setLogoutResponseWriter(HttpResponseWriter logoutResponseWriter) {
this.logoutResponseWriter = logoutResponseWriter;
}
public Locale getLocale() {
return locale;
}
public void setLocale(Locale locale) {
this.locale = locale;
}
public void login() throws IOException, ServerRequest.HttpFailure, VerificationException, InterruptedException, OAuthErrorException, URISyntaxException {
if (isDesktopSupported()) {
loginDesktop();
@@ -108,19 +208,22 @@ public class KeycloakInstalled {
}
public void loginDesktop() throws IOException, VerificationException, OAuthErrorException, URISyntaxException, ServerRequest.HttpFailure, InterruptedException {
CallbackListener callback = new CallbackListener();
CallbackListener callback = new CallbackListener(getLoginResponseWriter());
callback.start();
String redirectUri = "http://localhost:" + callback.server.getLocalPort();
String state = UUID.randomUUID().toString();
String authUrl = deployment.getAuthUrl().clone()
KeycloakUriBuilder builder = deployment.getAuthUrl().clone()
.queryParam(OAuth2Constants.RESPONSE_TYPE, OAuth2Constants.CODE)
.queryParam(OAuth2Constants.CLIENT_ID, deployment.getResourceName())
.queryParam(OAuth2Constants.REDIRECT_URI, redirectUri)
.queryParam(OAuth2Constants.STATE, state)
.queryParam(OAuth2Constants.SCOPE, OAuth2Constants.SCOPE_OPENID)
.build().toString();
.queryParam(OAuth2Constants.SCOPE, OAuth2Constants.SCOPE_OPENID);
if (locale != null) {
builder.queryParam(OAuth2Constants.UI_LOCALES_PARAM, locale.getLanguage());
}
String authUrl = builder.build().toString();
Desktop.getDesktop().browse(new URI(authUrl));
@@ -144,7 +247,7 @@ public class KeycloakInstalled {
}
private void logoutDesktop() throws IOException, URISyntaxException, InterruptedException {
CallbackListener callback = new CallbackListener();
CallbackListener callback = new CallbackListener(getLogoutResponseWriter());
callback.start();
String redirectUri = "http://localhost:" + callback.server.getLocalPort();
@@ -167,9 +270,6 @@ public class KeycloakInstalled {
}
public void loginManual(PrintStream printer, Reader reader) throws IOException, ServerRequest.HttpFailure, VerificationException {
CallbackListener callback = new CallbackListener();
callback.start();
String redirectUri = "urn:ietf:wg:oauth:2.0:oob";
String authUrl = deployment.getAuthUrl().clone()
@@ -208,7 +308,14 @@ public class KeycloakInstalled {
parseAccessToken(tokenResponse);
}
public void refreshToken(String refreshToken) throws IOException, ServerRequest.HttpFailure, VerificationException {
AccessTokenResponse tokenResponse = ServerRequest.invokeRefresh(deployment, refreshToken);
parseAccessToken(tokenResponse);
}
private void parseAccessToken(AccessTokenResponse tokenResponse) throws VerificationException {
this.tokenResponse = tokenResponse;
tokenString = tokenResponse.getToken();
refreshToken = tokenResponse.getRefreshToken();
idTokenString = tokenResponse.getIdToken();
@@ -240,6 +347,10 @@ public class KeycloakInstalled {
return refreshToken;
}
public AccessTokenResponse getTokenResponse() {
return tokenResponse;
}
public boolean isDesktopSupported() {
return Desktop.isDesktopSupported();
}
@@ -248,6 +359,8 @@ public class KeycloakInstalled {
return deployment;
}
private void processCode(String code, String redirectUri) throws IOException, ServerRequest.HttpFailure, VerificationException {
AccessTokenResponse tokenResponse = ServerRequest.invokeAccessCodeToToken(deployment, code, redirectUri, null);
parseAccessToken(tokenResponse);
@@ -269,6 +382,7 @@ public class KeycloakInstalled {
return sb.toString();
}
public class CallbackListener extends Thread {
private ServerSocket server;
@@ -283,14 +397,19 @@ public class KeycloakInstalled {
private String state;
public CallbackListener() throws IOException {
private Socket socket;
private HttpResponseWriter writer;
public CallbackListener(HttpResponseWriter writer) throws IOException {
this.writer = writer;
server = new ServerSocket(0);
}
@Override
public void run() {
try {
Socket socket = server.accept();
socket = server.accept();
BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String request = br.readLine();
@@ -314,10 +433,15 @@ public class KeycloakInstalled {
}
}
PrintWriter pw = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
pw.println("Please close window and return to application");
pw.flush();
OutputStreamWriter out = new OutputStreamWriter(socket.getOutputStream());
PrintWriter pw = new PrintWriter(out);
if (error == null) {
writer.success(pw, KeycloakInstalled.this);
} else {
writer.failure(pw, KeycloakInstalled.this);
}
pw.flush();
socket.close();
} catch (IOException e) {
errorException = e;
@@ -328,6 +452,8 @@ public class KeycloakInstalled {
} catch (IOException e) {
}
}
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -66,6 +66,11 @@ public class JaxrsHttpFacade implements OIDCHttpFacade {
return requestContext.getUriInfo().getRequestUri().toString();
}
@Override
public String getRelativePath() {
return requestContext.getUriInfo().getPath();
}
@Override
public boolean isSecure() {
return securityContext.isSecure();
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -106,6 +106,8 @@ public abstract class AbstractKeycloakJettyAuthenticator extends LoginAuthentica
public abstract AdapterTokenStore createSessionTokenStore(Request request, KeycloakDeployment resolvedDeployment);
public abstract JettyUserSessionManagement createSessionManagement(Request request);
public void logoutCurrent(Request request) {
AdapterDeploymentContext deploymentContext = (AdapterDeploymentContext) request.getAttribute(AdapterDeploymentContext.class.getName());
KeycloakSecurityContext ksc = (KeycloakSecurityContext) request.getAttribute(KeycloakSecurityContext.class.getName());
@@ -287,7 +289,7 @@ public abstract class AbstractKeycloakJettyAuthenticator extends LoginAuthentica
log.debug("*** deployment isn't configured return false");
return Authentication.UNAUTHENTICATED;
}
PreAuthActionsHandler handler = new PreAuthActionsHandler(new JettyUserSessionManagement(request.getSessionManager()), deploymentContext, facade);
PreAuthActionsHandler handler = new PreAuthActionsHandler(createSessionManagement(request), deploymentContext, facade);
if (handler.handleRequest()) {
return Authentication.SEND_SUCCESS;
}
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,40 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.SessionManager;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty81SessionManager implements JettySessionManager {
protected SessionManager sessionManager;
public Jetty81SessionManager(SessionManager sessionManager) {
this.sessionManager = sessionManager;
}
@Override
public HttpSession getHttpSession(String id) {
return sessionManager.getHttpSession(id);
}
}
@@ -25,6 +25,7 @@ import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
import javax.servlet.ServletRequest;
@@ -44,6 +45,11 @@ public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticat
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
}
@Override
public JettyUserSessionManagement createSessionManagement(Request request) {
return new JettyUserSessionManagement(new Jetty81SessionManager(request.getSessionManager()));
}
@Override
protected Request resolveRequest(ServletRequest req) {
return (req instanceof Request)?(Request)req: AbstractHttpConnection.getCurrentConnection().getRequest();
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,40 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.SessionManager;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty91SessionManager implements JettySessionManager {
protected SessionManager sessionManager;
public Jetty91SessionManager(SessionManager sessionManager) {
this.sessionManager = sessionManager;
}
@Override
public HttpSession getHttpSession(String id) {
return sessionManager.getHttpSession(id);
}
}
@@ -27,6 +27,7 @@ import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
import javax.servlet.ServletRequest;
@@ -46,6 +47,11 @@ public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticat
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
}
@Override
public JettyUserSessionManagement createSessionManagement(Request request) {
return new JettyUserSessionManagement(new Jetty91SessionManager(request.getSessionManager()));
}
@Override
protected Request resolveRequest(ServletRequest req) {
return (req instanceof Request) ? (Request)req : HttpChannel.getCurrentHttpChannel().getRequest();
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,40 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.SessionManager;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty92SessionManager implements JettySessionManager {
protected SessionManager sessionManager;
public Jetty92SessionManager(SessionManager sessionManager) {
this.sessionManager = sessionManager;
}
@Override
public HttpSession getHttpSession(String id) {
return sessionManager.getHttpSession(id);
}
}
@@ -27,6 +27,7 @@ import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
import javax.servlet.ServletRequest;
@@ -61,6 +62,11 @@ public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticat
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
}
@Override
public JettyUserSessionManagement createSessionManagement(Request request) {
return new JettyUserSessionManagement(new Jetty92SessionManager(request.getSessionManager()));
}
@Override
protected JettyRequestAuthenticator createRequestAuthenticator(Request request, JettyHttpFacade facade,
KeycloakDeployment deployment, AdapterTokenStore tokenStore) {
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,40 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.SessionManager;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty93SessionManager implements JettySessionManager {
protected SessionManager sessionManager;
public Jetty93SessionManager(SessionManager sessionManager) {
this.sessionManager = sessionManager;
}
@Override
public HttpSession getHttpSession(String id) {
return sessionManager.getHttpSession(id);
}
}
@@ -26,6 +26,7 @@ import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
import javax.servlet.ServletRequest;
@@ -60,6 +61,11 @@ public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticat
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
}
@Override
public JettyUserSessionManagement createSessionManagement(Request request) {
return new JettyUserSessionManagement(new Jetty93SessionManager(request.getSessionManager()));
}
@Override
protected JettyRequestAuthenticator createRequestAuthenticator(Request request, JettyHttpFacade facade,
KeycloakDeployment deployment, AdapterTokenStore tokenStore) {
+156
View File
@@ -0,0 +1,156 @@
<?xml version="1.0"?>
<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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>3.4.1.CR1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-jetty94-adapter</artifactId>
<name>Keycloak Jetty 9.4.x Integration</name>
<properties>
<jetty9.version>9.4.2.v20170220</jetty9.version>
<keycloak.osgi.export>
org.keycloak.adapters.jetty.*
</keycloak.osgi.export>
<keycloak.osgi.import>
org.eclipse.jetty.*;resolution:=optional,
javax.servlet.*;version="[3.0,4)";resolution:=optional,
org.keycloak.*;version="${project.version}",
*;resolution:=optional
</keycloak.osgi.import>
</properties>
<description />
<dependencies>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss.logging.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-ClassPath>.</Bundle-ClassPath>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Import-Package>${keycloak.osgi.import}</Import-Package>
<Export-Package>${keycloak.osgi.export}</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,47 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.Request;
import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
import org.keycloak.adapters.spi.HttpFacade;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty94RequestAuthenticator extends JettyRequestAuthenticator {
public Jetty94RequestAuthenticator(HttpFacade facade, KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort, Request request) {
super(facade, deployment, tokenStore, sslRedirectPort, request);
}
@Override
protected String changeHttpSessionId(boolean create) {
Request request = this.request;
HttpSession session = request.getSession(false);
if (session == null) {
return request.getSession(true).getId();
}
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
else return session.getId();
}
}
@@ -0,0 +1,40 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.session.SessionHandler;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class Jetty94SessionManager implements JettySessionManager {
protected SessionHandler sessionHandler;
public Jetty94SessionManager(SessionHandler sessionHandler) {
this.sessionHandler = sessionHandler;
}
@Override
public HttpSession getHttpSession(String id) {
return sessionHandler.getHttpSession(id);
}
}
@@ -0,0 +1,111 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.security.authentication.FormAuthenticator;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.util.MultiMap;
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
import org.keycloak.adapters.spi.AdapterSessionStore;
import org.keycloak.common.util.MultivaluedHashMap;
import javax.servlet.http.HttpSession;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class JettyAdapterSessionStore implements AdapterSessionStore {
public static final String CACHED_FORM_PARAMETERS = "__CACHED_FORM_PARAMETERS";
protected Request myRequest;
public JettyAdapterSessionStore(Request request) {
this.myRequest = request; // for IDE/compilation purposes
}
protected MultiMap<String> extractFormParameters(Request base_request) {
MultiMap<String> formParameters = new MultiMap<String>();
base_request.extractFormParameters(formParameters);
return formParameters;
}
protected void restoreFormParameters(MultiMap<String> j_post, Request base_request) {
base_request.setContentParameters(j_post);
}
public boolean restoreRequest() {
HttpSession session = myRequest.getSession(false);
if (session == null) return false;
synchronized (session) {
String j_uri = (String) session.getAttribute(FormAuthenticator.__J_URI);
if (j_uri != null) {
// check if the request is for the same url as the original and restore
// params if it was a post
StringBuffer buf = myRequest.getRequestURL();
if (myRequest.getQueryString() != null)
buf.append("?").append(myRequest.getQueryString());
if (j_uri.equals(buf.toString())) {
String method = (String)session.getAttribute(JettyHttpFacade.__J_METHOD);
myRequest.setMethod(method);
MultivaluedHashMap<String, String> j_post = (MultivaluedHashMap<String, String>) session.getAttribute(CACHED_FORM_PARAMETERS);
if (j_post != null) {
myRequest.setContentType("application/x-www-form-urlencoded");
MultiMap<String> map = new MultiMap<String>();
for (String key : j_post.keySet()) {
for (String val : j_post.getList(key)) {
map.add(key, val);
}
}
restoreFormParameters(map, myRequest);
}
session.removeAttribute(FormAuthenticator.__J_URI);
session.removeAttribute(JettyHttpFacade.__J_METHOD);
session.removeAttribute(FormAuthenticator.__J_POST);
}
return true;
}
}
return false;
}
public void saveRequest() {
// remember the current URI
HttpSession session = myRequest.getSession();
synchronized (session) {
// But only if it is not set already, or we save every uri that leads to a login form redirect
if (session.getAttribute(FormAuthenticator.__J_URI) == null) {
StringBuffer buf = myRequest.getRequestURL();
if (myRequest.getQueryString() != null)
buf.append("?").append(myRequest.getQueryString());
session.setAttribute(FormAuthenticator.__J_URI, buf.toString());
session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod());
if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) {
MultiMap<String> formParameters = extractFormParameters(myRequest);
MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>();
for (String key : formParameters.keySet()) {
for (Object value : formParameters.getValues(key)) {
map.add(key, (String) value);
}
}
session.setAttribute(CACHED_FORM_PARAMETERS, map);
}
}
}
}
}
@@ -0,0 +1,75 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.Authentication;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.UserIdentity;
import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator;
import org.keycloak.adapters.jetty.core.JettyRequestAuthenticator;
import org.keycloak.adapters.jetty.core.JettySessionTokenStore;
import org.keycloak.adapters.jetty.spi.JettyHttpFacade;
import org.keycloak.adapters.jetty.spi.JettyUserSessionManagement;
import javax.servlet.ServletRequest;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticator {
public KeycloakJettyAuthenticator() {
super();
}
@Override
protected Request resolveRequest(ServletRequest req) {
return Request.getBaseRequest(req);
}
@Override
protected Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
@Override
public void logout() {
logoutCurrent(request);
}
};
}
@Override
public AdapterTokenStore createSessionTokenStore(Request request, KeycloakDeployment resolvedDeployment) {
return new JettySessionTokenStore(request, resolvedDeployment, new JettyAdapterSessionStore(request));
}
@Override
public JettyUserSessionManagement createSessionManagement(Request request) {
return new JettyUserSessionManagement(new Jetty94SessionManager(request.getSessionHandler()));
}
@Override
protected JettyRequestAuthenticator createRequestAuthenticator(Request request, JettyHttpFacade facade,
KeycloakDeployment deployment, AdapterTokenStore tokenStore) {
return new Jetty94RequestAuthenticator(facade, deployment, tokenStore, -1, request);
}
}
+16 -2
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<name>Keycloak Jetty Integration</name>
@@ -33,8 +33,22 @@
<modules>
<module>jetty-core</module>
<module>jetty8.1</module>
<module>jetty9.1</module>
<module>jetty9.2</module>
<module>jetty9.3</module>
</modules>
<profiles>
<profile>
<id>community</id>
<activation>
<property>
<name>!product</name>
</property>
</activation>
<modules>
<module>jetty9.1</module>
<module>jetty9.4</module>
</modules>
</profile>
</profiles>
</project>
+6 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -38,6 +38,11 @@
<plugin>
<groupId>com.samaxes.maven</groupId>
<artifactId>minify-maven-plugin</artifactId>
<configuration>
<jsEngine>CLOSURE</jsEngine>
<closureLanguageIn>ECMASCRIPT5</closureLanguageIn>
<closureCreateSourceMap>true</closureCreateSourceMap>
</configuration>
<executions>
<execution>
<id>min-js</id>
+59
View File
@@ -0,0 +1,59 @@
/*
* MIT License
*
* Copyright 2017 Brett Epps <https://github.com/eppsilon>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import * as Keycloak from 'keycloak';
export as namespace KeycloakAuthorization;
export = KeycloakAuthorization;
/**
* Creates a new Keycloak client instance.
* @param config Path to a JSON config file or a plain config object.
*/
declare function KeycloakAuthorization(keycloak: Keycloak.KeycloakInstance): KeycloakAuthorization.KeycloakAuthorizationInstance;
declare namespace KeycloakAuthorization {
interface KeycloakAuthorizationPromise {
then(onGrant: (rpt: string) => void, onDeny: () => void, onError: () => void): void;
}
interface KeycloakAuthorizationInstance {
rpt: any;
config: { rpt_endpoint: string };
init(): void;
/**
* This method enables client applications to better integrate with resource servers protected by a Keycloak
* policy enforcer.
*
* In this case, the resource server will respond with a 401 status code and a WWW-Authenticate header holding the
* necessary information to ask a Keycloak server for authorization data using both UMA and Entitlement protocol,
* depending on how the policy enforcer at the resource server was configured.
*/
authorize(wwwAuthenticateHeader: string): KeycloakAuthorizationPromise;
/**
* Obtains all entitlements from a Keycloak server based on a given resourceServerId.
*/
entitlement(resourceServerId: string, entitlementRequest: {}): KeycloakAuthorizationPromise;
}
}
+478
View File
@@ -0,0 +1,478 @@
/*
* MIT License
*
* Copyright 2017 Brett Epps <https://github.com/eppsilon>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
export as namespace Keycloak;
export = Keycloak;
/**
* Creates a new Keycloak client instance.
* @param config Path to a JSON config file or a plain config object.
*/
declare function Keycloak(config?: string|{}): Keycloak.KeycloakInstance;
declare namespace Keycloak {
type KeycloakAdapterName = 'cordova'|'default';
type KeycloakOnLoad = 'login-required'|'check-sso';
type KeycloakResponseMode = 'query'|'fragment';
type KeycloakResponseType = 'code'|'id_token token'|'code id_token token';
type KeycloakFlow = 'standard'|'implicit'|'hybrid';
interface KeycloakInitOptions {
/**
* @private Undocumented.
*/
adapter?: KeycloakAdapterName;
/**
* Specifies an action to do on load.
*/
onLoad?: KeycloakOnLoad;
/**
* Set an initial value for the token.
*/
token?: string;
/**
* Set an initial value for the refresh token.
*/
refreshToken?: string;
/**
* Set an initial value for the id token (only together with `token` or
* `refreshToken`).
*/
idToken?: string;
/**
* Set an initial value for skew between local time and Keycloak server in
* seconds (only together with `token` or `refreshToken`).
*/
timeSkew?: number;
/**
* Set to enable/disable monitoring login state.
* @default true
*/
checkLoginIframe?: boolean;
/**
* Set the interval to check login state (in seconds).
* @default 5
*/
checkLoginIframeInterval?: boolean;
/**
* Set the OpenID Connect response mode to send to Keycloak upon login.
* @default fragment After successful authentication Keycloak will redirect
* to JavaScript application with OpenID Connect parameters
* added in URL fragment. This is generally safer and
* recommended over query.
*/
responseMode?: KeycloakResponseMode;
/**
* Set the OpenID Connect flow.
* @default standard
*/
flow?: KeycloakFlow;
}
interface KeycloakLoginOptions {
/**
* @private Undocumented.
*/
scope?: string;
/**
* Specifies the uri to redirect to after login.
*/
redirectUri?: string;
/**
* By default the login screen is displayed if the user is not logged into
* Keycloak. To only authenticate to the application if the user is already
* logged in and not display the login page if the user is not logged in, set
* this option to `'none'`. To always require re-authentication and ignore
* SSO, set this option to `'login'`.
*/
prompt?: 'none'|'login';
/**
* If value is `'register'` then user is redirected to registration page,
* otherwise to login page.
*/
action?: 'register';
/**
* Used just if user is already authenticated. Specifies maximum time since
* the authentication of user happened. If user is already authenticated for
* longer time than `'maxAge'`, the SSO is ignored and he will need to
* authenticate again.
*/
maxAge?: number;
/**
* Used to pre-fill the username/email field on the login form.
*/
loginHint?: string;
/**
* Used to tell Keycloak which IDP the user wants to authenticate with.
*/
idpHint?: string;
/**
* Specifies the desired locale for the UI.
*/
locale?: string;
}
type KeycloakPromiseCallback<T> = (result: T) => void;
interface KeycloakPromise<TSuccess, TError> {
/**
* Function to call if the promised action succeeds.
*/
success(callback: KeycloakPromiseCallback<TSuccess>): KeycloakPromise<TSuccess, TError>;
/**
* Function to call if the promised action throws an error.
*/
error(callback: KeycloakPromiseCallback<TError>): KeycloakPromise<TSuccess, TError>;
}
interface KeycloakError {
error: string;
error_description: string;
}
interface KeycloakAdapter {
login(options?: KeycloakLoginOptions): KeycloakPromise<void, void>;
logout(options?: any): KeycloakPromise<void, void>;
register(options?: KeycloakLoginOptions): KeycloakPromise<void, void>;
accountManagement(): KeycloakPromise<void, void>;
redirectUri(options: { redirectUri: string; }, encodeHash: boolean): string;
}
interface KeycloakProfile {
id?: string;
username?: string;
email?: string;
firstName?: string;
lastName?: string;
enabled?: boolean;
emailVerified?: boolean;
totp?: boolean;
createdTimestamp?: number;
}
// export interface KeycloakUserInfo {}
/**
* A client for the Keycloak authentication server.
* @see {@link https://keycloak.gitbooks.io/securing-client-applications-guide/content/topics/oidc/javascript-adapter.html|Keycloak JS adapter documentation}
*/
interface KeycloakInstance {
/**
* Is true if the user is authenticated, false otherwise.
*/
authenticated?: boolean;
/**
* The user id.
*/
subject?: string;
/**
* Response mode passed in init (default value is `'fragment'`).
*/
responseMode?: KeycloakResponseMode;
/**
* Response type sent to Keycloak with login requests. This is determined
* based on the flow value used during initialization, but can be overridden
* by setting this value.
*/
responseType?: KeycloakResponseType;
/**
* Flow passed in init.
*/
flow?: KeycloakFlow;
/**
* The realm roles associated with the token.
*/
realmAccess?: { roles: string[] };
/**
* The resource roles associated with the token.
*/
resourceAccess?: string[];
/**
* The base64 encoded token that can be sent in the Authorization header in
* requests to services.
*/
token?: string;
/**
* The parsed token as a JavaScript object.
*/
tokenParsed?: {
exp?: number;
iat?: number;
nonce?: string;
sub?: string;
session_state?: string;
realm_access?: { roles: string[] };
resource_access?: string[];
};
/**
* The base64 encoded refresh token that can be used to retrieve a new token.
*/
refreshToken?: string;
/**
* The parsed refresh token as a JavaScript object.
*/
refreshTokenParsed?: { nonce?: string };
/**
* The base64 encoded ID token.
*/
idToken?: string;
/**
* The parsed id token as a JavaScript object.
*/
idTokenParsed?: { nonce?: string };
/**
* The estimated time difference between the browser time and the Keycloak
* server in seconds. This value is just an estimation, but is accurate
* enough when determining if a token is expired or not.
*/
timeSkew?: number;
/**
* @private Undocumented.
*/
loginRequired?: boolean;
/**
* @private Undocumented.
*/
authServerUrl?: string;
/**
* @private Undocumented.
*/
realm?: string;
/**
* @private Undocumented.
*/
clientId?: string;
/**
* @private Undocumented.
*/
clientSecret?: string;
/**
* @private Undocumented.
*/
redirectUri?: string;
/**
* @private Undocumented.
*/
sessionId?: string;
/**
* @private Undocumented.
*/
profile?: KeycloakProfile;
/**
* @private Undocumented.
*/
userInfo?: {}; // KeycloakUserInfo;
/**
* Called when the adapter is initialized.
*/
onReady?(authenticated?: boolean): void;
/**
* Called when a user is successfully authenticated.
*/
onAuthSuccess?(): void;
/**
* Called if there was an error during authentication.
*/
onAuthError?(errorData: KeycloakError): void;
/**
* Called when the token is refreshed.
*/
onAuthRefreshSuccess?(): void;
/**
* Called if there was an error while trying to refresh the token.
*/
onAuthRefreshError?(): void;
/**
* Called if the user is logged out (will only be called if the session
* status iframe is enabled, or in Cordova mode).
*/
onAuthLogout?(): void;
/**
* Called when the access token is expired. If a refresh token is available
* the token can be refreshed with Keycloak#updateToken, or in cases where
* it's not (ie. with implicit flow) you can redirect to login screen to
* obtain a new access token.
*/
onTokenExpired?(): void;
/**
* Called to initialize the adapter.
* @param initOptions Initialization options.
* @returns A promise to set functions to be invoked on success or error.
*/
init(initOptions: KeycloakInitOptions): KeycloakPromise<boolean, KeycloakError>;
/**
* Redirects to login form.
* @param options Login options.
*/
login(options?: KeycloakLoginOptions): KeycloakPromise<void, void>;
/**
* Redirects to logout.
* @param options Logout options.
* @param options.redirectUri Specifies the uri to redirect to after logout.
*/
logout(options?: any): KeycloakPromise<void, void>;
/**
* Redirects to registration form.
* @param options Supports same options as Keycloak#login but `action` is
* set to `'register'`.
*/
register(options?: any): KeycloakPromise<void, void>;
/**
* Redirects to the Account Management Console.
*/
accountManagement(): KeycloakPromise<void, void>;
/**
* Returns the URL to login form.
* @param options Supports same options as Keycloak#login.
*/
createLoginUrl(options?: KeycloakLoginOptions): string;
/**
* Returns the URL to logout the user.
* @param options Logout options.
* @param options.redirectUri Specifies the uri to redirect to after logout.
*/
createLogoutUrl(options?: any): string;
/**
* Returns the URL to registration page.
* @param options Supports same options as Keycloak#createLoginUrl but
* `action` is set to `'register'`.
*/
createRegisterUrl(options?: KeycloakLoginOptions): string;
/**
* Returns the URL to the Account Management Console.
*/
createAccountUrl(): string;
/**
* Returns true if the token has less than `minValidity` seconds left before
* it expires.
* @param minValidity If not specified, `0` is used.
*/
isTokenExpired(minValidity?: number): boolean;
/**
* If the token expires within `minValidity` seconds, the token is refreshed.
* If the session status iframe is enabled, the session status is also
* checked.
* @returns A promise to set functions that can be invoked if the token is
* still valid, or if the token is no longer valid.
* @example
* ```js
* keycloak.updateToken(5).success(function(refreshed) {
* if (refreshed) {
* alert('Token was successfully refreshed');
* } else {
* alert('Token is still valid');
* }
* }).error(function() {
* alert('Failed to refresh the token, or the session has expired');
* });
*/
updateToken(minValidity: number): KeycloakPromise<boolean, boolean>;
/**
* Clears authentication state, including tokens. This can be useful if
* the application has detected the session was expired, for example if
* updating token fails. Invoking this results in Keycloak#onAuthLogout
* callback listener being invoked.
*/
clearToken(): void;
/**
* Returns true if the token has the given realm role.
* @param role A realm role name.
*/
hasRealmRole(role: string): boolean;
/**
* Returns true if the token has the given role for the resource.
* @param role A role name.
* @param resource If not specified, `clientId` is used.
*/
hasResourceRole(role: string, resource?: string): boolean;
/**
* Loads the user's profile.
* @returns A promise to set functions to be invoked on success or error.
*/
loadUserProfile(): KeycloakPromise<KeycloakProfile, void>;
/**
* @private Undocumented.
*/
loadUserInfo(): KeycloakPromise<{}, void>;
}
}
+91 -70
View File
@@ -33,6 +33,13 @@
interval: 5
};
var scripts = document.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i++) {
if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {
kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];
}
}
kc.init = function (initOptions) {
kc.authenticated = false;
@@ -43,7 +50,7 @@
} else if (initOptions && initOptions.adapter === 'default') {
adapter = loadAdapter();
} else {
if (window.Cordova) {
if (window.Cordova || window.cordova) {
adapter = loadAdapter('cordova');
} else {
adapter = loadAdapter();
@@ -87,6 +94,10 @@
}
kc.flow = initOptions.flow;
}
if (initOptions.timeSkew != null) {
kc.timeSkew = initOptions.timeSkew;
}
}
if (!kc.responseMode) {
@@ -153,7 +164,7 @@
processCallback(callback, initPromise);
return;
} else if (initOptions) {
if (initOptions.token || initOptions.refreshToken) {
if (initOptions.token && initOptions.refreshToken) {
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);
if (loginIframe.enable) {
@@ -162,12 +173,8 @@
kc.onAuthSuccess && kc.onAuthSuccess();
initPromise.setSuccess();
}).error(function () {
kc.onAuthError && kc.onAuthError();
if (initOptions.onLoad) {
onLoad();
} else {
initPromise.setError();
}
setToken(null, null, null);
initPromise.setSuccess();
});
});
} else {
@@ -214,7 +221,7 @@
var callbackState = {
state: state,
nonce: nonce,
redirectUri: encodeURIComponent(redirectUri),
redirectUri: encodeURIComponent(redirectUri)
}
if (options && options.prompt) {
@@ -369,6 +376,11 @@
throw 'Not authenticated';
}
if (kc.timeSkew == null) {
console.info('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');
return true;
}
var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;
if (minValidity) {
expiresIn -= minValidity;
@@ -379,7 +391,7 @@
kc.updateToken = function(minValidity) {
var promise = createPromise();
if (!kc.tokenParsed || !kc.refreshToken) {
if (!kc.refreshToken) {
promise.setError();
return promise.promise;
}
@@ -388,14 +400,10 @@
var exec = function() {
var refreshToken = false;
if (kc.timeSkew == -1) {
console.info('Skew ' + kc.timeSkew);
refreshToken = true;
console.info('[KEYCLOAK] Refreshing token: time skew not set');
} else if (minValidity == -1) {
if (minValidity == -1) {
refreshToken = true;
console.info('[KEYCLOAK] Refreshing token: forced refresh');
} else if (kc.isTokenExpired(minValidity)) {
} else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {
refreshToken = true;
console.info('[KEYCLOAK] Refreshing token: token expired');
}
@@ -586,7 +594,7 @@
req.onreadystatechange = function () {
if (req.readyState == 4) {
if (req.status == 200) {
if (req.status == 200 || fileLoaded(req)) {
var config = JSON.parse(req.responseText);
kc.authServerUrl = config['auth-server-url'];
@@ -632,55 +640,16 @@
return promise.promise;
}
function fileLoaded(xhr) {
return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');
}
function setToken(token, refreshToken, idToken, timeLocal) {
if (kc.tokenTimeoutHandle) {
clearTimeout(kc.tokenTimeoutHandle);
kc.tokenTimeoutHandle = null;
}
if (token) {
kc.token = token;
kc.tokenParsed = decodeToken(token);
var sessionId = kc.realm + '/' + kc.tokenParsed.sub;
if (kc.tokenParsed.session_state) {
sessionId = sessionId + '/' + kc.tokenParsed.session_state;
}
kc.sessionId = sessionId;
kc.authenticated = true;
kc.subject = kc.tokenParsed.sub;
kc.realmAccess = kc.tokenParsed.realm_access;
kc.resourceAccess = kc.tokenParsed.resource_access;
if (timeLocal) {
kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;
console.info('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');
} else {
kc.timeSkew = -1;
}
if (kc.onTokenExpired) {
if (kc.timeSkew == -1) {
kc.onTokenExpired();
} else {
var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;
if (expiresIn <= 0) {
kc.onTokenExpired();
} else {
kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);
}
}
}
} else {
delete kc.token;
delete kc.tokenParsed;
delete kc.subject;
delete kc.realmAccess;
delete kc.resourceAccess;
kc.authenticated = false;
}
if (refreshToken) {
kc.refreshToken = refreshToken;
kc.refreshTokenParsed = decodeToken(refreshToken);
@@ -696,6 +665,42 @@
delete kc.idToken;
delete kc.idTokenParsed;
}
if (token) {
kc.token = token;
kc.tokenParsed = decodeToken(token);
kc.sessionId = kc.tokenParsed.session_state;
kc.authenticated = true;
kc.subject = kc.tokenParsed.sub;
kc.realmAccess = kc.tokenParsed.realm_access;
kc.resourceAccess = kc.tokenParsed.resource_access;
if (timeLocal) {
kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;
}
if (kc.timeSkew != null) {
console.info('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');
if (kc.onTokenExpired) {
var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;
console.info('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');
if (expiresIn <= 0) {
kc.onTokenExpired();
} else {
kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);
}
}
}
} else {
delete kc.token;
delete kc.tokenParsed;
delete kc.subject;
delete kc.realmAccess;
delete kc.resourceAccess;
kc.authenticated = false;
}
}
function decodeToken(str) {
@@ -833,16 +838,26 @@
}
var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';
if (kc.iframeVersion) {
src = src + '?version=' + kc.iframeVersion;
}
iframe.setAttribute('src', src );
iframe.setAttribute('title', 'keycloak-session-iframe' );
iframe.style.display = 'none';
document.body.appendChild(iframe);
var messageCallback = function(event) {
if (event.origin !== loginIframe.iframeOrigin) {
if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {
return;
}
if (event.data != "unchanged") {
if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {
return;
}
if (event.data != 'unchanged') {
kc.clearToken();
}
@@ -850,7 +865,7 @@
for (var i = callbacks.length - 1; i >= 0; --i) {
var promise = callbacks[i];
if (event.data == "unchanged") {
if (event.data == 'unchanged') {
promise.setSuccess();
} else {
promise.setError();
@@ -933,7 +948,14 @@
if (type == 'cordova') {
loginIframe.enable = false;
var cordovaOpenWindowWrapper = function(loginUrl, target, options) {
if (window.cordova && window.cordova.InAppBrowser) {
// Use inappbrowser for IOS and Android if available
return window.cordova.InAppBrowser.open(loginUrl, target, options);
} else {
return window.open(loginUrl, target, options);
}
};
return {
login: function(options) {
var promise = createPromise();
@@ -944,8 +966,7 @@
}
var loginUrl = kc.createLoginUrl(options);
var ref = window.open(loginUrl, '_blank', o);
var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', o);
var completed = false;
ref.addEventListener('loadstart', function(event) {
@@ -978,7 +999,7 @@
var promise = createPromise();
var logoutUrl = kc.createLogoutUrl(options);
var ref = window.open(logoutUrl, '_blank', 'location=no,hidden=yes');
var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');
var error;
@@ -1011,7 +1032,7 @@
register : function() {
var registerUrl = kc.createRegisterUrl();
var ref = window.open(registerUrl, '_blank', 'location=no');
var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', 'location=no');
ref.addEventListener('loadstart', function(event) {
if (event.url.indexOf('http://localhost') == 0) {
ref.close();
@@ -1021,7 +1042,7 @@
accountManagement : function() {
var accountUrl = kc.createAccountUrl();
var ref = window.open(accountUrl, '_blank', 'location=no');
var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');
ref.addEventListener('loadstart', function(event) {
if (event.url.indexOf('http://localhost') == 0) {
ref.close();
@@ -1229,7 +1250,7 @@
break;
default:
if (responseMode != 'query' || !handleQueryParam(param, queryParams[param], oauth)) {
oauth.newUrl += (oauth.newUrl.indexOf('?') == -1 ? '?' : '&') + param + '=' + queryParams[param];
oauth.newUrl += (oauth.newUrl.indexOf('?') == -1 ? '?' : '&') + param + '=' + encodeURIComponent(queryParams[param]);
}
break;
}
@@ -28,7 +28,7 @@
} else if (!init) {
var req = new XMLHttpRequest();
var url = location.href + "/init";
var url = location.href.split("?")[0] + "/init";
url += "?client_id=" + encodeURIComponent(clientId);
url += "&origin=" + encodeURIComponent(origin);
@@ -36,7 +36,7 @@
req.onreadystatechange = function () {
if (req.readyState === 4) {
if (req.status === 204) {
if (req.status === 204 || req.status === 1223) {
init = {
clientId: clientId,
origin: origin
@@ -53,7 +53,8 @@
req.send();
} else {
if (clientId === init.clientId && origin === init.origin) {
if (sessionState === cookie) {
var c = cookie.split('/');
if (sessionState === c[2]) {
callback('unchanged');
} else {
callback('changed');
@@ -81,7 +82,7 @@
var origin = event.origin;
var data = event.data.split(' ');
if (data.length != 2) {
event.source.postMessage('error', origin);
return;
}
var clientId = data[0];
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -0,0 +1,83 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.osgi;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import org.keycloak.adapters.KeycloakConfigResolver;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.KeycloakDeploymentBuilder;
import org.keycloak.adapters.spi.HttpFacade;
import org.osgi.framework.BundleContext;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class BundleBasedKeycloakConfigResolver implements KeycloakConfigResolver {
private volatile KeycloakDeployment cachedDeployment;
private BundleContext bundleContext;
private String configLocation = "WEB-INF/keycloak.json";
public BundleContext getBundleContext() {
return bundleContext;
}
public void setBundleContext(BundleContext bundleContext) {
this.bundleContext = bundleContext;
}
public String getConfigLocation() {
return configLocation;
}
public void setConfigLocation(String configLocation) {
this.configLocation = configLocation;
}
@Override
public KeycloakDeployment resolve(HttpFacade.Request request) {
if (cachedDeployment != null) {
return cachedDeployment;
} else {
cachedDeployment = findDeployment(request);
return cachedDeployment;
}
}
protected KeycloakDeployment findDeployment(HttpFacade.Request request) {
if (bundleContext == null) {
throw new IllegalStateException("bundleContext must be set for BundleBasedKeycloakConfigResolver!");
}
URL url = bundleContext.getBundle().getResource(configLocation);
if (url == null) {
throw new IllegalStateException("Failed to find the file " + configLocation + " on classpath.");
}
try {
InputStream is = url.openStream();
return KeycloakDeploymentBuilder.build(is);
} catch (IOException ioe) {
throw new IllegalStateException("Error reading file' " + configLocation + "' from bundle classpath.", ioe);
}
}
}
+4 -1
View File
@@ -20,7 +20,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Keycloak OIDC Client Adapter Modules</name>
@@ -34,6 +34,7 @@
<module>adapter-core</module>
<module>as7-eap6</module>
<module>installed</module>
<module>cli-sso</module>
<module>jaxrs-oauth-client</module>
<module>jetty</module>
<module>js</module>
@@ -41,9 +42,11 @@
<module>servlet-filter</module>
<module>servlet-oauth-client</module>
<module>spring-boot</module>
<module>spring-boot-container-bundle</module>
<module>spring-security</module>
<module>tomcat</module>
<module>undertow</module>
<module>wildfly</module>
<module>wildfly-elytron</module>
</modules>
</project>
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -53,70 +53,97 @@ import java.util.regex.Pattern;
* @version $Revision: 1 $
*/
public class KeycloakOIDCFilter implements Filter {
private final static Logger log = Logger.getLogger("" + KeycloakOIDCFilter.class);
public static final String SKIP_PATTERN_PARAM = "keycloak.config.skipPattern";
public static final String CONFIG_RESOLVER_PARAM = "keycloak.config.resolver";
public static final String CONFIG_FILE_PARAM = "keycloak.config.file";
public static final String CONFIG_PATH_PARAM = "keycloak.config.path";
protected AdapterDeploymentContext deploymentContext;
protected SessionIdMapper idMapper = new InMemorySessionIdMapper();
protected NodesRegistrationManagement nodesRegistrationManagement;
protected Pattern skipPattern;
private final static Logger log = Logger.getLogger(""+KeycloakOIDCFilter.class);
private final KeycloakConfigResolver definedconfigResolver;
/**
* Constructor that can be used to define a {@code KeycloakConfigResolver} that will be used at initialization to
* provide the {@code KeycloakDeployment}.
* @param definedconfigResolver the resolver
*/
public KeycloakOIDCFilter(KeycloakConfigResolver definedconfigResolver) {
this.definedconfigResolver = definedconfigResolver;
}
public KeycloakOIDCFilter() {
this(null);
}
@Override
public void init(final FilterConfig filterConfig) throws ServletException {
String skipPatternDefinition = filterConfig.getInitParameter("keycloak.config.skipPattern");
String skipPatternDefinition = filterConfig.getInitParameter(SKIP_PATTERN_PARAM);
if (skipPatternDefinition != null) {
skipPattern = Pattern.compile(skipPatternDefinition, Pattern.DOTALL);
}
String configResolverClass = filterConfig.getInitParameter("keycloak.config.resolver");
if (configResolverClass != null) {
try {
KeycloakConfigResolver configResolver = (KeycloakConfigResolver) getClass().getClassLoader().loadClass(configResolverClass).newInstance();
deploymentContext = new AdapterDeploymentContext(configResolver);
log.log(Level.INFO, "Using {0} to resolve Keycloak configuration on a per-request basis.", configResolverClass);
} catch (Exception ex) {
log.log(Level.FINE, "The specified resolver {0} could NOT be loaded. Keycloak is unconfigured and will deny all requests. Reason: {1}", new Object[]{configResolverClass, ex.getMessage()});
deploymentContext = new AdapterDeploymentContext(new KeycloakDeployment());
}
if (definedconfigResolver != null) {
deploymentContext = new AdapterDeploymentContext(definedconfigResolver);
log.log(Level.INFO, "Using {0} to resolve Keycloak configuration on a per-request basis.", definedconfigResolver.getClass());
} else {
String fp = filterConfig.getInitParameter("keycloak.config.file");
InputStream is = null;
if (fp != null) {
String configResolverClass = filterConfig.getInitParameter(CONFIG_RESOLVER_PARAM);
if (configResolverClass != null) {
try {
is = new FileInputStream(fp);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
KeycloakConfigResolver configResolver = (KeycloakConfigResolver) getClass().getClassLoader().loadClass(configResolverClass).newInstance();
deploymentContext = new AdapterDeploymentContext(configResolver);
log.log(Level.INFO, "Using {0} to resolve Keycloak configuration on a per-request basis.", configResolverClass);
} catch (Exception ex) {
log.log(Level.FINE, "The specified resolver {0} could NOT be loaded. Keycloak is unconfigured and will deny all requests. Reason: {1}", new Object[]{configResolverClass, ex.getMessage()});
deploymentContext = new AdapterDeploymentContext(new KeycloakDeployment());
}
} else {
String path = "/WEB-INF/keycloak.json";
String pathParam = filterConfig.getInitParameter("keycloak.config.path");
if (pathParam != null) path = pathParam;
is = filterConfig.getServletContext().getResourceAsStream(path);
String fp = filterConfig.getInitParameter(CONFIG_FILE_PARAM);
InputStream is = null;
if (fp != null) {
try {
is = new FileInputStream(fp);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
} else {
String path = "/WEB-INF/keycloak.json";
String pathParam = filterConfig.getInitParameter(CONFIG_PATH_PARAM);
if (pathParam != null) path = pathParam;
is = filterConfig.getServletContext().getResourceAsStream(path);
}
KeycloakDeployment kd = createKeycloakDeploymentFrom(is);
deploymentContext = new AdapterDeploymentContext(kd);
log.fine("Keycloak is using a per-deployment configuration.");
}
KeycloakDeployment kd = createKeycloakDeploymentFrom(is);
deploymentContext = new AdapterDeploymentContext(kd);
log.fine("Keycloak is using a per-deployment configuration.");
}
filterConfig.getServletContext().setAttribute(AdapterDeploymentContext.class.getName(), deploymentContext);
nodesRegistrationManagement = new NodesRegistrationManagement();
}
private KeycloakDeployment createKeycloakDeploymentFrom(InputStream is) {
if (is == null) {
log.fine("No adapter configuration. Keycloak is unconfigured and will deny all requests.");
return new KeycloakDeployment();
}
return KeycloakDeploymentBuilder.build(is);
}
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
log.fine("Keycloak OIDC Filter");
//System.err.println("Keycloak OIDC Filter: " + ((HttpServletRequest)req).getRequestURL().toString());
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
@@ -198,7 +225,7 @@ public class KeycloakOIDCFilter implements Filter {
*
* @param request the request to check
* @return {@code true} if the request should not be handled,
* {@code false} otherwise.
* {@code false} otherwise.
*/
private boolean shouldSkip(HttpServletRequest request) {
@@ -168,7 +168,7 @@ public class OIDCFilterSessionStore extends FilterSessionStore implements Adapte
HttpSession httpSession = request.getSession();
httpSession.setAttribute(KeycloakAccount.class.getName(), sAccount);
httpSession.setAttribute(KeycloakSecurityContext.class.getName(), sAccount.getKeycloakSecurityContext());
if (idMapper != null) idMapper.map(account.getKeycloakSecurityContext().getToken().getClientSession(), account.getPrincipal().getName(), httpSession.getId());
if (idMapper != null) idMapper.map(account.getKeycloakSecurityContext().getToken().getSessionState(), account.getPrincipal().getName(), httpSession.getId());
//String username = securityContext.getToken().getSubject();
//log.fine("userSessionManagement.login: " + username);
}
+1 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -41,12 +41,60 @@ import java.io.InputStream;
import java.net.URI;
import java.util.List;
import org.jboss.logging.Logger;
import org.keycloak.common.util.Base64Url;
import java.security.MessageDigest;
import java.security.SecureRandom;
/**
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
public class ServletOAuthClient extends KeycloakDeploymentDelegateOAuthClient {
// https://tools.ietf.org/html/rfc7636#section-4
private String codeVerifier;
private String codeChallenge;
private String codeChallengeMethod = OAuth2Constants.PKCE_METHOD_S256;
private static Logger logger = Logger.getLogger(ServletOAuthClient.class);
public static String generateSecret() {
return generateSecret(32);
}
public static String generateSecret(int bytes) {
byte[] buf = new byte[bytes];
new SecureRandom().nextBytes(buf);
return Base64Url.encode(buf);
}
private void setCodeVerifier() {
codeVerifier = generateSecret();
logger.debugf("Generated codeVerifier = %s", codeVerifier);
return;
}
private void setCodeChallenge() {
try {
if (codeChallengeMethod.equals(OAuth2Constants.PKCE_METHOD_S256)) {
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(codeVerifier.getBytes());
StringBuilder sb = new StringBuilder();
for (byte b : md.digest()) {
String hex = String.format("%02x", b);
sb.append(hex);
}
codeChallenge = Base64Url.encode(sb.toString().getBytes());
} else {
codeChallenge = Base64Url.encode(codeVerifier.getBytes());
}
logger.debugf("Encode codeChallenge = %s, codeChallengeMethod = %s", codeChallenge, codeChallengeMethod);
} catch (Exception e) {
logger.info("PKCE client side unknown hash algorithm");
codeChallenge = Base64Url.encode(codeVerifier.getBytes());
}
}
/**
* closes client
*/
@@ -57,7 +105,15 @@ public class ServletOAuthClient extends KeycloakDeploymentDelegateOAuthClient {
private AccessTokenResponse resolveBearerToken(HttpServletRequest request, String redirectUri, String code) throws IOException, ServerRequest.HttpFailure {
// Don't send sessionId in oauth clients for now
KeycloakDeployment resolvedDeployment = resolveDeployment(getDeployment(), request);
return ServerRequest.invokeAccessCodeToToken(resolvedDeployment, code, redirectUri, null);
// https://tools.ietf.org/html/rfc7636#section-4
if (codeVerifier != null) {
logger.debugf("Before sending Token Request, codeVerifier = %s", codeVerifier);
return ServerRequest.invokeAccessCodeToToken(resolvedDeployment, code, redirectUri, null, codeVerifier);
} else {
logger.debug("Before sending Token Request without codeVerifier");
return ServerRequest.invokeAccessCodeToToken(resolvedDeployment, code, redirectUri, null);
}
}
/**
@@ -94,6 +150,12 @@ public class ServletOAuthClient extends KeycloakDeploymentDelegateOAuthClient {
String authUrl = resolvedDeployment.getAuthUrl().clone().build().toString();
String scopeParam = TokenUtil.attachOIDCScope(scope);
// https://tools.ietf.org/html/rfc7636#section-4
if (resolvedDeployment.isPkce()) {
setCodeVerifier();
setCodeChallenge();
}
KeycloakUriBuilder uriBuilder = KeycloakUriBuilder.fromUri(authUrl)
.queryParam(OAuth2Constants.RESPONSE_TYPE, OAuth2Constants.CODE)
.queryParam(OAuth2Constants.CLIENT_ID, getClientId())
@@ -218,6 +280,11 @@ public class ServletOAuthClient extends KeycloakDeploymentDelegateOAuthClient {
return servletRequest.getRequestURL().toString();
}
@Override
public String getRelativePath() {
return servletRequest.getServletPath();
}
@Override
public boolean isSecure() {
return servletRequest.isSecure();
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>spring-boot-container-bundle</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-tomcat8-adapter</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-undertow-adapter</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty93-adapter</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.keycloak:keycloak-tomcat8-adapter</include>
<include>org.keycloak:keycloak-undertow-adapter</include>
<include>org.keycloak:keycloak-jetty93-adapter</include>
<include>org.keycloak:keycloak-tomcat-core-adapter</include>
<include>org.keycloak:keycloak-tomcat-adapter-spi</include>
<include>org.keycloak:keycloak-undertow-adapter</include>
<include>org.keycloak:keycloak-undertow-adapter-spi</include>
<include>org.keycloak:keycloak-jetty-core</include>
<include>org.keycloak:keycloak-jetty-adapter-spi</include>
</includes>
</artifactSet>
<createSourcesJar>true</createSourcesJar>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
+50 -44
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -31,7 +31,9 @@
<description/>
<properties>
<spring-boot.version>1.2.1.RELEASE</spring-boot.version>
<spring-boot.version>1.4.0.RELEASE</spring-boot.version>
<spring.version>4.1.6.RELEASE</spring.version>
<mockito.version>1.9.5</mockito.version>
</properties>
<dependencies>
@@ -43,74 +45,79 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>spring-boot-container-bundle</artifactId>
<version>${project.version}</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-security-adapter</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-tomcat8-adapter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-undertow-adapter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty92-adapter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot.version}</version>
<scope>provided</scope>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-servlet</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty9.version}</version>
<scope>provided</scope>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-servlet</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-undertow-adapter-spi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
<version>${spring-boot.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
@@ -118,11 +125,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -33,6 +33,7 @@ import org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve;
import org.keycloak.adapters.undertow.KeycloakServletExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
@@ -60,7 +61,8 @@ import java.util.Set;
@Configuration
@ConditionalOnWebApplication
@EnableConfigurationProperties(KeycloakSpringBootProperties.class)
public class KeycloakSpringBootConfiguration {
@ConditionalOnProperty(value = "keycloak.enabled", matchIfMissing = true)
public class KeycloakAutoConfiguration {
private KeycloakSpringBootProperties keycloakProperties;
@@ -70,6 +72,7 @@ public class KeycloakSpringBootConfiguration {
KeycloakSpringBootConfigResolver.setAdapterConfig(keycloakProperties);
}
@Bean
public EmbeddedServletContainerCustomizer getKeycloakContainerCustomizer() {
return new EmbeddedServletContainerCustomizer() {
@@ -141,10 +144,10 @@ public class KeycloakSpringBootConfiguration {
List<io.undertow.servlet.api.SecurityConstraint> undertowSecurityConstraints = new ArrayList<io.undertow.servlet.api.SecurityConstraint>();
for (KeycloakSpringBootProperties.SecurityConstraint constraintDefinition : keycloakProperties.getSecurityConstraints()) {
for (KeycloakSpringBootProperties.SecurityCollection collectionDefinition : constraintDefinition.getSecurityCollections()) {
io.undertow.servlet.api.SecurityConstraint undertowSecurityConstraint = new io.undertow.servlet.api.SecurityConstraint();
undertowSecurityConstraint.addRolesAllowed(constraintDefinition.getAuthRoles());
io.undertow.servlet.api.SecurityConstraint undertowSecurityConstraint = new io.undertow.servlet.api.SecurityConstraint();
undertowSecurityConstraint.addRolesAllowed(collectionDefinition.getAuthRoles());
for (KeycloakSpringBootProperties.SecurityCollection collectionDefinition : constraintDefinition.getSecurityCollections()) {
WebResourceCollection webResourceCollection = new WebResourceCollection();
webResourceCollection.addHttpMethods(collectionDefinition.getMethods());
@@ -153,8 +156,9 @@ public class KeycloakSpringBootConfiguration {
undertowSecurityConstraint.addWebResourceCollections(webResourceCollection);
undertowSecurityConstraints.add(undertowSecurityConstraint);
}
undertowSecurityConstraints.add(undertowSecurityConstraint);
}
return undertowSecurityConstraints;
}
@@ -174,42 +178,70 @@ public class KeycloakSpringBootConfiguration {
KeycloakJettyAuthenticator keycloakJettyAuthenticator = new KeycloakJettyAuthenticator();
keycloakJettyAuthenticator.setConfigResolver(new KeycloakSpringBootConfigResolver());
/* see org.eclipse.jetty.webapp.StandardDescriptorProcessor#visitSecurityConstraint for an example
on how to map servlet spec to Constraints */
List<ConstraintMapping> jettyConstraintMappings = new ArrayList<ConstraintMapping>();
for (KeycloakSpringBootProperties.SecurityConstraint constraintDefinition : keycloakProperties.getSecurityConstraints()) {
for (KeycloakSpringBootProperties.SecurityCollection securityCollectionDefinition : constraintDefinition
.getSecurityCollections()) {
// securityCollection matches servlet spec's web-resource-collection
Constraint jettyConstraint = new Constraint();
if (constraintDefinition.getAuthRoles().size() > 0) {
jettyConstraint.setAuthenticate(true);
jettyConstraint.setRoles(constraintDefinition.getAuthRoles().toArray(new String[0]));
}
jettyConstraint.setName(securityCollectionDefinition.getName());
jettyConstraint.setAuthenticate(true);
if (securityCollectionDefinition.getName() != null) {
jettyConstraint.setName(securityCollectionDefinition.getName());
// according to the servlet spec each security-constraint has at least one URL pattern
for(String pattern : securityCollectionDefinition.getPatterns()) {
/* the following code is asymmetric as Jetty's ConstraintMapping accepts only one allowed HTTP method,
but multiple omitted methods. Therefore we add one ConstraintMapping for each allowed
mapping but only one mapping in the cases of omitted methods or no methods.
*/
if (securityCollectionDefinition.getMethods().size() > 0) {
// according to the servlet spec we have either methods ...
for(String method : securityCollectionDefinition.getMethods()) {
ConstraintMapping jettyConstraintMapping = new ConstraintMapping();
jettyConstraintMappings.add(jettyConstraintMapping);
jettyConstraintMapping.setConstraint(jettyConstraint);
jettyConstraintMapping.setPathSpec(pattern);
jettyConstraintMapping.setMethod(method);
}
} else if (securityCollectionDefinition.getOmittedMethods().size() > 0){
// ... omitted methods ...
ConstraintMapping jettyConstraintMapping = new ConstraintMapping();
jettyConstraintMappings.add(jettyConstraintMapping);
jettyConstraintMapping.setConstraint(jettyConstraint);
jettyConstraintMapping.setPathSpec(pattern);
jettyConstraintMapping.setMethodOmissions(
securityCollectionDefinition.getOmittedMethods().toArray(new String[0]));
} else {
// ... or no methods at all
ConstraintMapping jettyConstraintMapping = new ConstraintMapping();
jettyConstraintMappings.add(jettyConstraintMapping);
jettyConstraintMapping.setConstraint(jettyConstraint);
jettyConstraintMapping.setPathSpec(pattern);
}
}
jettyConstraint.setRoles(securityCollectionDefinition.getAuthRoles().toArray(new String[0]));
ConstraintMapping jettyConstraintMapping = new ConstraintMapping();
if (securityCollectionDefinition.getPatterns().size() > 0) {
//First pattern wins
jettyConstraintMapping.setPathSpec(securityCollectionDefinition.getPatterns().get(0));
jettyConstraintMapping.setConstraint(jettyConstraint);
}
if (securityCollectionDefinition.getMethods().size() > 0) {
//First method wins
jettyConstraintMapping.setMethod(securityCollectionDefinition.getMethods().get(0));
}
jettyConstraintMapping.setMethodOmissions(
securityCollectionDefinition.getOmittedMethods().toArray(new String[0]));
jettyConstraintMappings.add(jettyConstraintMapping);
}
}
WebAppContext webAppContext = server.getBean(WebAppContext.class);
//if not found as registered bean let's try the handler
if(webAppContext==null){
webAppContext = (WebAppContext) server.getHandler();
}
ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
securityHandler.setConstraintMappings(jettyConstraintMappings);
@@ -235,12 +267,10 @@ public class KeycloakSpringBootConfiguration {
Set<String> authRoles = new HashSet<String>();
for (KeycloakSpringBootProperties.SecurityConstraint constraint : keycloakProperties.getSecurityConstraints()) {
for (KeycloakSpringBootProperties.SecurityCollection collection : constraint.getSecurityCollections()) {
for (String authRole : collection.getAuthRoles()) {
if (!authRoles.contains(authRole)) {
context.addSecurityRole(authRole);
authRoles.add(authRole);
}
for (String authRole : constraint.getAuthRoles()) {
if (!authRoles.contains(authRole)) {
context.addSecurityRole(authRole);
authRoles.add(authRole);
}
}
}
@@ -248,6 +278,10 @@ public class KeycloakSpringBootConfiguration {
for (KeycloakSpringBootProperties.SecurityConstraint constraint : keycloakProperties.getSecurityConstraints()) {
SecurityConstraint tomcatConstraint = new SecurityConstraint();
for (String authRole : constraint.getAuthRoles()) {
tomcatConstraint.addAuthRole(authRole);
}
for (KeycloakSpringBootProperties.SecurityCollection collection : constraint.getSecurityCollections()) {
SecurityCollection tomcatSecCollection = new SecurityCollection();
@@ -258,10 +292,6 @@ public class KeycloakSpringBootConfiguration {
tomcatSecCollection.setDescription(collection.getDescription());
}
for (String authRole : collection.getAuthRoles()) {
tomcatConstraint.addAuthRole(authRole);
}
for (String pattern : collection.getPatterns()) {
tomcatSecCollection.addPattern(pattern);
}
@@ -34,14 +34,42 @@ public class KeycloakSpringBootProperties extends AdapterConfig {
@JsonIgnore
private Map config = new HashMap();
/**
* Allow enabling of Keycloak Spring Boot adapter by configuration.
*/
private boolean enabled = true;
public Map getConfig() {
return config;
}
/**
* To provide Java EE security constraints
*/
private List<SecurityConstraint> securityConstraints = new ArrayList<SecurityConstraint>();
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
/**
* This matches security-constraint of the servlet spec
*/
@ConfigurationProperties()
public static class SecurityConstraint {
/**
* A list of security collections
*/
private List<SecurityCollection> securityCollections = new ArrayList<SecurityCollection>();
private List<String> authRoles = new ArrayList<String>();
public List<String> getAuthRoles() {
return authRoles;
}
public List<SecurityCollection> getSecurityCollections() {
return securityCollections;
@@ -50,20 +78,39 @@ public class KeycloakSpringBootProperties extends AdapterConfig {
public void setSecurityCollections(List<SecurityCollection> securityCollections) {
this.securityCollections = securityCollections;
}
public void setAuthRoles(List<String> authRoles) {
this.authRoles = authRoles;
}
}
/**
* This matches web-resource-collection of the servlet spec
*/
@ConfigurationProperties()
public static class SecurityCollection {
/**
* The name of your security constraint
*/
private String name;
/**
* The description of your security collection
*/
private String description;
private List<String> authRoles = new ArrayList<String>();
/**
* A list of URL patterns that should match to apply the security collection
*/
private List<String> patterns = new ArrayList<String>();
/**
* A list of HTTP methods that applies for this security collection
*/
private List<String> methods = new ArrayList<String>();
/**
* A list of HTTP methods that will be omitted for this security collection
*/
private List<String> omittedMethods = new ArrayList<String>();
public List<String> getAuthRoles() {
return authRoles;
}
public List<String> getPatterns() {
return patterns;
}
@@ -92,10 +139,6 @@ public class KeycloakSpringBootProperties extends AdapterConfig {
this.description = description;
}
public void setAuthRoles(List<String> authRoles) {
this.authRoles = authRoles;
}
public void setPatterns(List<String> patterns) {
this.patterns = patterns;
}
@@ -0,0 +1,24 @@
package org.keycloak.adapters.springboot.client;
import org.springframework.boot.web.client.RestTemplateCustomizer;
import org.springframework.web.client.RestTemplate;
public class KeycloakRestTemplateCustomizer implements RestTemplateCustomizer {
private final KeycloakSecurityContextClientRequestInterceptor keycloakInterceptor;
public KeycloakRestTemplateCustomizer() {
this(new KeycloakSecurityContextClientRequestInterceptor());
}
protected KeycloakRestTemplateCustomizer(
KeycloakSecurityContextClientRequestInterceptor keycloakInterceptor
) {
this.keycloakInterceptor = keycloakInterceptor;
}
@Override
public void customize(RestTemplate restTemplate) {
restTemplate.getInterceptors().add(keycloakInterceptor);
}
}
@@ -0,0 +1,55 @@
package org.keycloak.adapters.springboot.client;
import org.keycloak.KeycloakPrincipal;
import org.keycloak.KeycloakSecurityContext;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.io.IOException;
import java.security.Principal;
/**
* Interceptor for {@link ClientHttpRequestExecution} objects created for server to server secured
* communication using OAuth2 bearer tokens issued by Keycloak.
*
* @author <a href="mailto:jmcshan1@gmail.com">James McShane</a>
* @version $Revision: 1 $
*/
public class KeycloakSecurityContextClientRequestInterceptor implements ClientHttpRequestInterceptor {
private static final String AUTHORIZATION_HEADER = "Authorization";
/**
* Returns the {@link KeycloakSecurityContext} from the Spring {@link ServletRequestAttributes}'s {@link Principal}.
*
* The principal must support retrieval of the KeycloakSecurityContext, so at this point, only {@link KeycloakPrincipal}
* values are supported
*
* @return the current <code>KeycloakSecurityContext</code>
*/
protected KeycloakSecurityContext getKeycloakSecurityContext() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
Principal principal = attributes.getRequest().getUserPrincipal();
if (principal == null) {
throw new IllegalStateException("Cannot set authorization header because there is no authenticated principal");
}
if (!(principal instanceof KeycloakPrincipal)) {
throw new IllegalStateException(
String.format(
"Cannot set authorization header because the principal type %s does not provide the KeycloakSecurityContext",
principal.getClass()));
}
return ((KeycloakPrincipal) principal).getKeycloakSecurityContext();
}
@Override
public ClientHttpResponse intercept(HttpRequest httpRequest, byte[] bytes, ClientHttpRequestExecution clientHttpRequestExecution) throws IOException {
KeycloakSecurityContext context = this.getKeycloakSecurityContext();
httpRequest.getHeaders().set(AUTHORIZATION_HEADER, "Bearer " + context.getTokenString());
return clientHttpRequestExecution.execute(httpRequest, bytes);
}
}
@@ -1,2 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.keycloak.adapters.springboot.KeycloakSpringBootConfiguration
org.keycloak.adapters.springboot.KeycloakAutoConfiguration
@@ -0,0 +1,28 @@
package org.keycloak.adapters.springboot.client;
import org.junit.Before;
import org.junit.Test;
import org.springframework.web.client.RestTemplate;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
public class KeycloakRestTemplateCustomizerTest {
private KeycloakRestTemplateCustomizer customizer;
private KeycloakSecurityContextClientRequestInterceptor interceptor =
mock(KeycloakSecurityContextClientRequestInterceptor.class);
@Before
public void setup() {
customizer = new KeycloakRestTemplateCustomizer(interceptor);
}
@Test
public void interceptorIsAddedToRequest() {
RestTemplate restTemplate = new RestTemplate();
customizer.customize(restTemplate);
assertTrue(restTemplate.getInterceptors().contains(interceptor));
}
}
@@ -0,0 +1,87 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.springboot.client;
import org.junit.Before;
import org.junit.Test;
import org.keycloak.KeycloakPrincipal;
import org.keycloak.KeycloakSecurityContext;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.security.Principal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.when;
/**
* Keycloak spring boot client request factory tests.
*/
public class KeycloakSecurityContextClientRequestInterceptorTest {
@Spy
private KeycloakSecurityContextClientRequestInterceptor factory;
private MockHttpServletRequest servletRequest;
@Mock
private KeycloakSecurityContext keycloakSecurityContext;
@Mock
private KeycloakPrincipal keycloakPrincipal;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
servletRequest = new MockHttpServletRequest();
RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(servletRequest));
servletRequest.setUserPrincipal(keycloakPrincipal);
when(keycloakPrincipal.getKeycloakSecurityContext()).thenReturn(keycloakSecurityContext);
}
@Test
public void testGetKeycloakSecurityContext() throws Exception {
KeycloakSecurityContext context = factory.getKeycloakSecurityContext();
assertNotNull(context);
assertEquals(keycloakSecurityContext, context);
}
@Test(expected = IllegalStateException.class)
public void testGetKeycloakSecurityContextInvalidPrincipal() throws Exception {
servletRequest.setUserPrincipal(new MarkerPrincipal());
factory.getKeycloakSecurityContext();
}
@Test(expected = IllegalStateException.class)
public void testGetKeycloakSecurityContextNullAuthentication() throws Exception {
servletRequest.setUserPrincipal(null);
factory.getKeycloakSecurityContext();
}
private static class MarkerPrincipal implements Principal {
@Override
public String getName() {
return null;
}
}
}
+3 -1
View File
@@ -21,7 +21,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>2.5.0.Final</version>
<version>3.4.1.CR1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -59,12 +59,14 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
<dependency>
@@ -0,0 +1,25 @@
package org.keycloak.adapters.springsecurity;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Add this annotation to a class that extends {@code KeycloakWebSecurityConfigurerAdapter} to provide
* a keycloak based Spring security configuration.
*
* @author Hendrik Ebbers
*/
@Retention(value = RUNTIME)
@Target(value = { TYPE })
@Configuration
@ComponentScan(basePackageClasses = KeycloakSecurityComponents.class)
@EnableWebSecurity
public @interface KeycloakConfiguration {
}
@@ -45,11 +45,7 @@ public class HttpHeaderInspectingApiRequestMatcher implements RequestMatcher {
*/
@Override
public boolean matches(HttpServletRequest request) {
boolean ajax = X_REQUESTED_WITH_HEADER_AJAX_VALUE.equals(request.getHeader(X_REQUESTED_WITH_HEADER));
boolean html = request.getHeader(HttpHeaders.ACCEPT) != null && request.getHeader(HttpHeaders.ACCEPT).contains(
MediaType.TEXT_HTML_VALUE);
return ajax || !html;
return X_REQUESTED_WITH_HEADER_AJAX_VALUE.equals(request.getHeader(X_REQUESTED_WITH_HEADER));
}
}
@@ -17,7 +17,16 @@
package org.keycloak.adapters.springsecurity.authentication;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpHeaders;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
@@ -26,17 +35,6 @@ import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.util.Assert;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter;
import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
* Provides a Keycloak {@link AuthenticationEntryPoint authentication entry point}. Uses a
* {@link RequestMatcher} to determine if the request is an interactive login request or a
@@ -62,15 +60,14 @@ public class KeycloakAuthenticationEntryPoint implements AuthenticationEntryPoin
private final RequestMatcher apiRequestMatcher;
private String loginUri = DEFAULT_LOGIN_URI;
private String realm = DEFAULT_REALM;
private AdapterDeploymentContext adapterDeploymentContext;
/**
* Creates a new Keycloak authentication entry point.
*/
public KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext) {
this(DEFAULT_API_REQUEST_MATCHER);
this.adapterDeploymentContext = adapterDeploymentContext;
this(adapterDeploymentContext, DEFAULT_API_REQUEST_MATCHER);
}
/**
@@ -80,14 +77,15 @@ public class KeycloakAuthenticationEntryPoint implements AuthenticationEntryPoin
* @param apiRequestMatcher the <code>RequestMatcher</code> to use to determine
* if the current request is an API request or a browser request (required)
*/
public KeycloakAuthenticationEntryPoint(RequestMatcher apiRequestMatcher) {
public KeycloakAuthenticationEntryPoint(AdapterDeploymentContext adapterDeploymentContext, RequestMatcher apiRequestMatcher) {
Assert.notNull(apiRequestMatcher, "apiRequestMatcher required");
Assert.notNull(adapterDeploymentContext, "adapterDeploymentContext required");
this.adapterDeploymentContext = adapterDeploymentContext;
this.apiRequestMatcher = apiRequestMatcher;
}
@Override
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException
{
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
HttpFacade facade = new SimpleHttpFacade(request, response);
if (apiRequestMatcher.matches(request) || adapterDeploymentContext.resolveDeployment(facade).isBearerOnly()) {
commenceUnauthorizedResponse(request, response);
@@ -0,0 +1,48 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.springsecurity.authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* To return the forbidden code with the corresponding message.
*
* @author emilienbondu
*
*/
public class KeycloakAuthenticationFailureHandler implements AuthenticationFailureHandler {
@Override
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
// Check that the response was not committed yet (this may happen when another
// part of the Keycloak adapter sends a challenge or a redirect).
if (!response.isCommitted()) {
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unable to authenticate using the Authorization header");
} else {
if (200 <= response.getStatus() && response.getStatus() < 300) {
throw new RuntimeException("Success response was committed while authentication failed!", exception);
}
}
}
}
@@ -50,7 +50,7 @@ public class KeycloakAuthenticationProvider implements AuthenticationProvider {
for (String role : token.getAccount().getRoles()) {
grantedAuthorities.add(new KeycloakRole(role));
}
return new KeycloakAuthenticationToken(token.getAccount(), mapAuthorities(grantedAuthorities));
return new KeycloakAuthenticationToken(token.getAccount(), token.isInteractive(), mapAuthorities(grantedAuthorities));
}
private Collection<? extends GrantedAuthority> mapAuthorities(
@@ -94,7 +94,7 @@ public class SpringSecurityRequestAuthenticator extends RequestAuthenticator {
logger.debug("Completing bearer authentication. Bearer roles: {} ",roles);
SecurityContextHolder.getContext().setAuthentication(new KeycloakAuthenticationToken(account));
SecurityContextHolder.getContext().setAuthentication(new KeycloakAuthenticationToken(account, false));
request.setAttribute(KeycloakSecurityContext.class.getName(), securityContext);
}
@@ -23,9 +23,11 @@ import org.keycloak.adapters.springsecurity.AdapterDeploymentContextFactoryBean;
import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationEntryPoint;
import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider;
import org.keycloak.adapters.springsecurity.authentication.KeycloakLogoutHandler;
import org.keycloak.adapters.springsecurity.filter.KeycloakAuthenticatedActionsFilter;
import org.keycloak.adapters.springsecurity.filter.KeycloakAuthenticationProcessingFilter;
import org.keycloak.adapters.springsecurity.filter.KeycloakCsrfRequestMatcher;
import org.keycloak.adapters.springsecurity.filter.KeycloakPreAuthActionsFilter;
import org.keycloak.adapters.springsecurity.filter.KeycloakSecurityContextRequestFilter;
import org.keycloak.adapters.springsecurity.management.HttpSessionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -41,6 +43,7 @@ import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.authentication.logout.LogoutFilter;
import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
/**
* Provides a convenient base class for creating a {@link WebSecurityConfigurer}
@@ -91,6 +94,11 @@ public abstract class KeycloakWebSecurityConfigurerAdapter extends WebSecurityCo
return new KeycloakPreAuthActionsFilter(httpSessionManager());
}
@Bean
protected KeycloakAuthenticatedActionsFilter keycloakAuthenticatedActionsFilter() {
return new KeycloakAuthenticatedActionsFilter();
}
protected KeycloakCsrfRequestMatcher keycloakCsrfRequestMatcher() {
return new KeycloakCsrfRequestMatcher();
}
@@ -117,6 +125,8 @@ public abstract class KeycloakWebSecurityConfigurerAdapter extends WebSecurityCo
.and()
.addFilterBefore(keycloakPreAuthActionsFilter(), LogoutFilter.class)
.addFilterBefore(keycloakAuthenticationProcessingFilter(), BasicAuthenticationFilter.class)
.addFilterBefore(keycloakAuthenticatedActionsFilter(), BasicAuthenticationFilter.class)
.addFilterAfter(keycloakSecurityContextRequestFilter(), SecurityContextHolderAwareRequestFilter.class)
.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint())
.and()
.logout()
@@ -124,4 +134,9 @@ public abstract class KeycloakWebSecurityConfigurerAdapter extends WebSecurityCo
.logoutUrl("/sso/logout").permitAll()
.logoutSuccessUrl("/");
}
@Bean
protected KeycloakSecurityContextRequestFilter keycloakSecurityContextRequestFilter() {
return new KeycloakSecurityContextRequestFilter();
}
}
@@ -19,6 +19,9 @@ package org.keycloak.adapters.springsecurity.facade;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.OIDCHttpFacade;
import org.keycloak.adapters.spi.KeycloakAccount;
import org.keycloak.adapters.springsecurity.account.SimpleKeycloakAccount;
import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.util.Assert;
@@ -57,7 +60,8 @@ public class SimpleHttpFacade implements OIDCHttpFacade {
SecurityContext context = SecurityContextHolder.getContext();
if (context != null && context.getAuthentication() != null) {
return (KeycloakSecurityContext) context.getAuthentication().getDetails();
KeycloakAuthenticationToken authentication = (KeycloakAuthenticationToken) context.getAuthentication();
return authentication.getAccount().getKeycloakSecurityContext();
}
return null;
@@ -70,6 +70,11 @@ class WrappedHttpServletRequest implements Request {
return buf.toString();
}
@Override
public String getRelativePath() {
return request.getServletPath();
}
@Override
public boolean isSecure() {
return request.isSecure();
@@ -17,6 +17,14 @@
package org.keycloak.adapters.springsecurity.filter;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.keycloak.OAuth2Constants;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.AdapterTokenStore;
import org.keycloak.adapters.KeycloakDeployment;
@@ -25,10 +33,11 @@ import org.keycloak.adapters.spi.AuthChallenge;
import org.keycloak.adapters.spi.AuthOutcome;
import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.springsecurity.KeycloakAuthenticationException;
import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationEntryPoint;
import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationFailureHandler;
import org.keycloak.adapters.springsecurity.authentication.SpringSecurityRequestAuthenticator;
import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade;
import org.keycloak.adapters.springsecurity.token.AdapterTokenStoreFactory;
import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken;
import org.keycloak.adapters.springsecurity.token.SpringSecurityAdapterTokenStoreFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,19 +50,12 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.OrRequestMatcher;
import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.util.Assert;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Provides a Keycloak authentication processing filter.
*
@@ -63,15 +65,17 @@ import java.io.IOException;
public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticationProcessingFilter implements ApplicationContextAware {
public static final String DEFAULT_LOGIN_URL = "/sso/login";
public static final String AUTHORIZATION_HEADER = "Authorization";
public static final String SCHEME_BEARER = "bearer ";
public static final String SCHEME_BASIC = "basic ";
/**
* Request matcher that matches requests to the {@link KeycloakAuthenticationEntryPoint#DEFAULT_LOGIN_URI default login URI}
* and any request with a <code>Authorization</code> header.
*/
public static final RequestMatcher DEFAULT_REQUEST_MATCHER =
new OrRequestMatcher(new AntPathRequestMatcher(DEFAULT_LOGIN_URL), new RequestHeaderRequestMatcher(AUTHORIZATION_HEADER));
new OrRequestMatcher(
new AntPathRequestMatcher(DEFAULT_LOGIN_URL),
new RequestHeaderRequestMatcher(AUTHORIZATION_HEADER),
new QueryParamPresenceRequestMatcher(OAuth2Constants.ACCESS_TOKEN)
);
private static final Logger log = LoggerFactory.getLogger(KeycloakAuthenticationProcessingFilter.class);
@@ -89,7 +93,7 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
*/
public KeycloakAuthenticationProcessingFilter(AuthenticationManager authenticationManager) {
this(authenticationManager, DEFAULT_REQUEST_MATCHER);
setAuthenticationFailureHandler(new SimpleUrlAuthenticationFailureHandler(DEFAULT_LOGIN_URL));
setAuthenticationFailureHandler(new KeycloakAuthenticationFailureHandler());
}
/**
@@ -109,7 +113,7 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
*
*/
public KeycloakAuthenticationProcessingFilter(AuthenticationManager authenticationManager, RequestMatcher
requiresAuthenticationRequestMatcher) {
requiresAuthenticationRequestMatcher) {
super(requiresAuthenticationRequestMatcher);
Assert.notNull(authenticationManager, "authenticationManager cannot be null");
this.authenticationManager = authenticationManager;
@@ -132,6 +136,10 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
HttpFacade facade = new SimpleHttpFacade(request, response);
KeycloakDeployment deployment = adapterDeploymentContext.resolveDeployment(facade);
// using Spring authenticationFailureHandler
deployment.setDelegateBearerErrorResponseSending(true);
AdapterTokenStore tokenStore = adapterTokenStoreFactory.createAdapterTokenStore(deployment, request);
RequestAuthenticator authenticator
= new SpringSecurityRequestAuthenticator(facade, request, deployment, tokenStore, -1);
@@ -140,9 +148,27 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
log.debug("Auth outcome: {}", result);
if (AuthOutcome.FAILED.equals(result)) {
throw new KeycloakAuthenticationException("Auth outcome: " + result);
AuthChallenge challenge = authenticator.getChallenge();
if (challenge != null) {
challenge.challenge(facade);
}
throw new KeycloakAuthenticationException("Invalid authorization header, see WWW-Authenticate header for details");
}
if (AuthOutcome.NOT_ATTEMPTED.equals(result)) {
AuthChallenge challenge = authenticator.getChallenge();
if (challenge != null) {
challenge.challenge(facade);
}
if (deployment.isBearerOnly()) {
// no redirection in this mode, throwing exception for the spring handler
throw new KeycloakAuthenticationException("Authorization header not found, see WWW-Authenticate header");
} else {
// let continue if challenged, it may redirect
return null;
}
}
else if (AuthOutcome.AUTHENTICATED.equals(result)) {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
Assert.notNull(authentication, "Authentication SecurityContextHolder was null");
@@ -157,36 +183,10 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
}
}
/**
* Returns true if the request was made with a bearer token authorization header.
*
* @param request the current <code>HttpServletRequest</code>
*
* @return <code>true</code> if the <code>request</code> was made with a bearer token authorization header;
* <code>false</code> otherwise.
*/
protected boolean isBearerTokenRequest(HttpServletRequest request) {
String authValue = request.getHeader(AUTHORIZATION_HEADER);
return authValue != null && authValue.toLowerCase().startsWith(SCHEME_BEARER);
}
/**
* Returns true if the request was made with a Basic authentication authorization header.
*
* @param request the current <code>HttpServletRequest</code>
* @return <code>true</code> if the <code>request</code> was made with a Basic authentication authorization header;
* <code>false</code> otherwise.
*/
protected boolean isBasicAuthRequest(HttpServletRequest request) {
String authValue = request.getHeader(AUTHORIZATION_HEADER);
return authValue != null && authValue.toLowerCase().startsWith(SCHEME_BASIC);
}
@Override
protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,
Authentication authResult) throws IOException, ServletException {
if (!(this.isBearerTokenRequest(request) || this.isBasicAuthRequest(request))) {
Authentication authResult) throws IOException, ServletException {
if (authResult instanceof KeycloakAuthenticationToken && ((KeycloakAuthenticationToken) authResult).isInteractive()) {
super.successfulAuthentication(request, response, chain, authResult);
return;
}
@@ -207,24 +207,11 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
} finally {
SecurityContextHolder.clearContext();
}
}
@Override
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response,
AuthenticationException failed) throws IOException, ServletException {
if (this.isBearerTokenRequest(request)) {
SecurityContextHolder.clearContext();
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unable to authenticate bearer token");
return;
}
else if (this.isBasicAuthRequest(request)) {
SecurityContextHolder.clearContext();
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unable to authenticate with basic authentication");
return;
}
AuthenticationException failed) throws IOException, ServletException {
super.unsuccessfulAuthentication(request, response, failed);
}
@@ -262,4 +249,4 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
public final void setContinueChainBeforeSuccessfulAuthentication(boolean continueChainBeforeSuccessfulAuthentication) {
throw new UnsupportedOperationException("This filter does not support explicitly setting a continue chain before success policy");
}
}
}
@@ -0,0 +1,113 @@
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.springsecurity.filter;
import org.keycloak.KeycloakPrincipal;
import org.keycloak.KeycloakSecurityContext;
import org.keycloak.adapters.AdapterDeploymentContext;
import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.RefreshableKeycloakSecurityContext;
import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.filter.GenericFilterBean;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class KeycloakSecurityContextRequestFilter extends GenericFilterBean implements ApplicationContextAware {
private static final String FILTER_APPLIED = KeycloakSecurityContext.class.getPackage().getName() + ".token-refreshed";
private ApplicationContext applicationContext;
private AdapterDeploymentContext deploymentContext;
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
if (request.getAttribute(FILTER_APPLIED) != null) {
filterChain.doFilter(request, response);
return;
}
request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
KeycloakSecurityContext keycloakSecurityContext = getKeycloakPrincipal();
if (keycloakSecurityContext instanceof RefreshableKeycloakSecurityContext) {
RefreshableKeycloakSecurityContext refreshableSecurityContext = (RefreshableKeycloakSecurityContext) keycloakSecurityContext;
if (refreshableSecurityContext.isActive()) {
KeycloakDeployment deployment = resolveDeployment(request, response);
if (deployment.isAlwaysRefreshToken()) {
if (refreshableSecurityContext.refreshExpiredToken(false)) {
request.setAttribute(KeycloakSecurityContext.class.getName(), refreshableSecurityContext);
} else {
clearAuthenticationContext();
}
}
} else {
clearAuthenticationContext();
}
}
filterChain.doFilter(request, response);
}
@Override
protected void initFilterBean() throws ServletException {
deploymentContext = applicationContext.getBean(AdapterDeploymentContext.class);
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
private KeycloakSecurityContext getKeycloakPrincipal() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null) {
Object principal = authentication.getPrincipal();
if (principal instanceof KeycloakPrincipal) {
return KeycloakPrincipal.class.cast(principal).getKeycloakSecurityContext();
}
}
return null;
}
private KeycloakDeployment resolveDeployment(ServletRequest servletRequest, ServletResponse servletResponse) {
return deploymentContext.resolveDeployment(new SimpleHttpFacade(HttpServletRequest.class.cast(servletRequest), HttpServletResponse.class.cast(servletResponse)));
}
private void clearAuthenticationContext() {
SecurityContextHolder.clearContext();
}
}
@@ -0,0 +1,39 @@
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.adapters.springsecurity.filter;
import javax.servlet.http.HttpServletRequest;
import org.springframework.security.web.util.matcher.RequestMatcher;
/**
* Spring RequestMatcher that checks for the presence of a query parameter.
*
* @author <a href="mailto:glavoie@gmail.com">Gabriel Lavoie</a>
*/
public class QueryParamPresenceRequestMatcher implements RequestMatcher {
private String param;
public QueryParamPresenceRequestMatcher(String param) {
this.param = param;
}
@Override
public boolean matches(HttpServletRequest httpServletRequest) {
return param != null && httpServletRequest.getParameter(param) != null;
}
}
Loaded 100 of 4564 files, more files were not shown because too many files have changed in this diff. Show more