diff --git a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java index 243479a7e4..3346371e48 100755 --- a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java @@ -61,8 +61,8 @@ public class RealmRepresentation { protected String accountTheme; protected String adminTheme; protected String emailTheme; - protected boolean eventsEnabled; - protected long eventsExpiration; + protected Boolean eventsEnabled; + protected Long eventsExpiration; protected List eventsListeners; public String getId() { @@ -445,7 +445,7 @@ public class RealmRepresentation { this.failureFactor = failureFactor; } - public boolean isEventsEnabled() { + public Boolean isEventsEnabled() { return eventsEnabled; } @@ -453,7 +453,7 @@ public class RealmRepresentation { this.eventsEnabled = eventsEnabled; } - public long getEventsExpiration() { + public Long getEventsExpiration() { return eventsExpiration; } diff --git a/core/src/main/java/org/keycloak/util/UriUtils.java b/core/src/main/java/org/keycloak/util/UriUtils.java index 8532c5b630..3f0f9afa62 100644 --- a/core/src/main/java/org/keycloak/util/UriUtils.java +++ b/core/src/main/java/org/keycloak/util/UriUtils.java @@ -8,7 +8,7 @@ import java.util.regex.Pattern; */ public class UriUtils { - private static final Pattern originPattern = Pattern.compile("(http://|https://)[\\w]+(\\.[\\w]+)*(:[\\d]{2,5})?"); + private static final Pattern originPattern = Pattern.compile("(http://|https://)[\\w-]+(\\.[\\w-]+)*(:[\\d]{2,5})?"); public static String getOrigin(URI uri) { return getOrigin(uri.toString()); diff --git a/core/src/test/java/org/keycloak/util/UriUtilsTest.java b/core/src/test/java/org/keycloak/util/UriUtilsTest.java index 52d484ded8..af89777dfb 100644 --- a/core/src/test/java/org/keycloak/util/UriUtilsTest.java +++ b/core/src/test/java/org/keycloak/util/UriUtilsTest.java @@ -24,6 +24,8 @@ public class UriUtilsTest { assertValid("http://192.168.123.123"); assertValid("https://192.168.123.123"); assertValid("https://192.168.123.123:8080"); + assertValid("https://sub-sub.test.com"); + assertValid("https://sub.test-test.com"); assertInvalid("https://test/"); assertInvalid("{"); diff --git a/docbook/reference/en/en-US/modules/server-installation.xml b/docbook/reference/en/en-US/modules/server-installation.xml index 9e595a194d..5ca0cd8f50 100755 --- a/docbook/reference/en/en-US/modules/server-installation.xml +++ b/docbook/reference/en/en-US/modules/server-installation.xml @@ -625,29 +625,74 @@ keycloak-war-dist-all-&project.version;/ X-Forwarded-Proto headers on the requests made to Keycloak. Next you need to enable proxy-address-forwarding on the Keycloak http connector. Assuming that your reverse proxy doesn't use port 8443 for SSL you also need to configure what port http traffic is redirected to. - This is done by editing standalone/configuration/standalone.xml. - First add proxy-address-forwarding and redirect-socket to the http-listener - element: - + +
+ WildFly + + + Open standalone/configuration/standalone.xml in your favorite editor. + + + + First add proxy-address-forwarding and redirect-socket to + the http-listener element: ... - + ... ]]> - Then add a new socket-binding element to the socket-binding-group element: + + + Then add a new socket-binding element to the socket-binding-group element: + ... ... ]]> - - - Check the WildFly documentation for more information. - + + + Check the WildFly documentation for more information. + +
+ +
+ AS7/EAP + + + Open standalone/configuration/standalone.xml in your favorite editor. + + + + You need to add redirect-port to http connector element and + add the RemoteIpValve valve: + + + + + + + + + + +]]> + + + + +
+
diff --git a/events/api/src/main/java/org/keycloak/events/EventType.java b/events/api/src/main/java/org/keycloak/events/EventType.java index bdfdb0ee3f..d41fb8125c 100755 --- a/events/api/src/main/java/org/keycloak/events/EventType.java +++ b/events/api/src/main/java/org/keycloak/events/EventType.java @@ -40,9 +40,9 @@ public enum EventType { SEND_VERIFY_EMAIL_ERROR, SEND_RESET_PASSWORD, SEND_RESET_PASSWORD_ERROR, - SOCIAL_LOGIN, - SOCIAL_LOGIN_ERROR, + INVALID_SIGNATURE_ERROR, REGISTER_NODE, UNREGISTER_NODE + } diff --git a/forms/common-themes/src/main/resources/theme/account/base/messages/messages.properties b/forms/common-themes/src/main/resources/theme/account/base/messages/messages.properties index 9dfa90a834..6feedf537d 100755 --- a/forms/common-themes/src/main/resources/theme/account/base/messages/messages.properties +++ b/forms/common-themes/src/main/resources/theme/account/base/messages/messages.properties @@ -1,4 +1,4 @@ -authenticatorCode=One-time-password +authenticatorCode=One-time code email=Email errorHeader=Error! firstName=First name @@ -23,8 +23,8 @@ invalidTotp=Invalid authenticator code readOnlyUser=You can't update your account as it is read only readOnlyPassword=You can't update your password as your account is read only -successTotp=Google authenticator configured. -successTotpRemoved=Google authenticator removed. +successTotp=Mobile authenticator configured. +successTotpRemoved=Mobile authenticator removed. accountUpdated=Your account has been updated accountPasswordUpdated=Your password has been updated diff --git a/forms/common-themes/src/main/resources/theme/account/base/totp.ftl b/forms/common-themes/src/main/resources/theme/account/base/totp.ftl index d05dd8b616..d48033734b 100755 --- a/forms/common-themes/src/main/resources/theme/account/base/totp.ftl +++ b/forms/common-themes/src/main/resources/theme/account/base/totp.ftl @@ -12,25 +12,32 @@ - + Mobile - + <#else> -

Google Authenticator Setup

+

Authenticator


    -
  1. Download the FreeOTP app in your device.
  2. -
  3. Create an account in FreeOTP and scan the barcode or type in the provided key below.
    +
  4. + Install FreeOTP or + Google Authenticator + on your mobile +
  5. +
  6. + Open the application and scan the barcode or enter the key
    Figure: Barcode
    ${totp.totpSecretEncoded}
  7. -
  8. Enter the one-time-password provided by FreeOTP below and click Submit to finish the setup.
  9. +
  10. + Enter the one-time code provided by the application and click Submit to finish the setup. +

diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js index 87dece9066..5fe70a76eb 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js @@ -282,7 +282,7 @@ module.controller('OAuthClientInstallationCtrl', function($scope, realm, install $scope.installation = installation; $scope.download = function() { - saveAs(new Blob([$scope.installation], { type: $scope.type }), 'keycloak.json'); + saveAs(new Blob([angular.toJson($scope.installation, true)], { type: 'application/json' }), 'keycloak.json'); } }); diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/application-list.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/application-list.html index 364b4c7c53..27a7d92bde 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/application-list.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/application-list.html @@ -1,8 +1,5 @@
-

{{realm.realm}} Applications

diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/oauth-client-list.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/oauth-client-list.html index f5638b47a4..69e687e3b7 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/oauth-client-list.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/oauth-client-list.html @@ -1,8 +1,5 @@
-

{{realm.realm}} OAuth Clients

diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-navigation-application.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-navigation-application.html index 02343270d4..cb4d44a8b3 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-navigation-application.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/templates/kc-navigation-application.html @@ -1,4 +1,4 @@ -