keycloak-uncached
Changes
adapters/oidc/js/src/main/resources/keycloak.d.ts 1038(+519 -519)
distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host.xml 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-master.xml 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-slave.xml 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/template.xml 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli 2(+1 -1)
distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli 2(+1 -1)
docker-compose.yml 17(+17 -0)
Dockerfile 8(+8 -0)
examples/cordova/example-realm.json 2(+1 -1)
examples/saml/testsaml.json 2(+1 -1)
integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/util/MergeAttributesTest.java 2(+1 -1)
misc/Testsuite.md 2(+1 -1)
model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java 4(+2 -2)
model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java 2(+1 -1)
model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheConcurrentWritesTest.java 2(+1 -1)
run.sh 7(+7 -0)
testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowAppServerProvider.java 2(+1 -1)
testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/ProfileAssume.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailServerConfiguration.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterClusteredTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/CorsExampleAdapterTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdminAdapterTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AbstractAdminTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/ClaimInformationPointProviderTest.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/AttributeTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/registration/AbstractRegCliTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationPoliciesTest.java 24(+12 -12)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cookies/CookiesPathTest.java 6(+3 -3)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/AbstractAdminCrossDCTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/docker/DockerClientTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportUtil.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/openshift/OpenshiftClientStorageTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/url/FixedHostnameTest.java 4(+2 -2)
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/x509/X509OCSPResponderTest.java 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml-behind-lb.json 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/offlinerealm.json 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/export/partialexport-testrealm.json 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/ldap/fed-provider-export.json 2(+1 -1)
testsuite/integration-arquillian/tests/base/src/test/resources/testrealm-duplicate-emails.json 2(+1 -1)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.8.1.xml 8(+4 -4)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.9.8.Final-redhat-1.xml 14(+7 -7)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-2.5.5.Final-redhat-1.xml 14(+7 -7)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-3.4.3.Final-redhat-2.xml 10(+5 -5)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/host-master-3.4.3.Final-redhat-2.xml 2(+1 -1)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.8.1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.9.8.Final-redhat-1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-2.5.5.Final-redhat-1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-3.4.3.Final-redhat-2.xml 6(+3 -3)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.8.1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.9.8.Final-redhat-1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-2.5.5.Final-redhat-1.xml 4(+2 -2)
testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-3.4.3.Final-redhat-2.xml 6(+3 -3)
testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java 2(+1 -1)
testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java 4(+2 -2)
testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml 2(+1 -1)
testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml 2(+1 -1)
Details
adapters/oidc/js/src/main/resources/keycloak.d.ts 1038(+519 -519)
diff --git a/adapters/oidc/js/src/main/resources/keycloak.d.ts b/adapters/oidc/js/src/main/resources/keycloak.d.ts
index 3f26cb4..3570d7c 100644
--- a/adapters/oidc/js/src/main/resources/keycloak.d.ts
+++ b/adapters/oidc/js/src/main/resources/keycloak.d.ts
@@ -1,519 +1,519 @@
-/*
- * 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' | 'cordova-native' |'default' | any;
- 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.
- */
- useNonce?: boolean;
-
- /**
- * Allows to use different adapter:
- *
- * - {string} default - using browser api for redirects
- * - {string} cordova - using cordova plugins
- * - {function} - allows to provide custom function as adapter.
- */
- 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?: number;
-
- /**
- * 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;
-
- /**
- * Specifies a default uri to redirect to after login or logout.
- * This is currently supported for adapter 'cordova-native' and 'default'
- */
- redirectUri?: string;
-
- /**
- * 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;
-
- /**
- * Sets the 'ui_locales' query param in compliance with section 3.1.2.1
- * of the OIDC 1.0 specification.
- */
- locale?: string;
-
- /**
- * Specifies the desired Keycloak locale for the UI. This differs from
- * the locale param in that it tells the Keycloak server to set a cookie and update
- * the user's profile to a new preferred locale.
- */
- kcLocale?: string;
-
- /**
- * Specifies arguments that are passed to the Cordova in-app-browser (if applicable).
- * Options 'hidden' and 'location' are not affected by these arguments.
- * All available options are defined at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/.
- * Example of use: { zoom: "no", hardwareback: "yes" }
- */
- cordovaOptions?: { [optionName: string]: 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;
- }
-
- interface KeycloakTokenParsed {
- exp?: number;
- iat?: number;
- nonce?: string;
- sub?: string;
- session_state?: string;
- realm_access?: { roles: string[] };
- resource_access?: string[];
- }
-
- interface KeycloakResourceAccess {
- [key: string]: KeycloakRoles
- }
-
- interface KeycloakRoles {
- roles: string[];
- }
-
- // 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?: KeycloakRoles;
-
- /**
- * The resource roles associated with the token.
- */
- resourceAccess?: KeycloakResourceAccess;
-
- /**
- * 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?: KeycloakTokenParsed;
-
- /**
- * 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?: KeycloakTokenParsed;
-
- /**
- * The base64 encoded ID token.
- */
- idToken?: string;
-
- /**
- * The parsed id token as a JavaScript object.
- */
- idTokenParsed?: KeycloakTokenParsed;
-
- /**
- * 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>;
- }
-}
+/*
+ * 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' | 'cordova-native' |'default' | any;
+ 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.
+ */
+ useNonce?: boolean;
+
+ /**
+ * Allows to use different adapter:
+ *
+ * - {string} default - using browser api for redirects
+ * - {string} cordova - using cordova plugins
+ * - {function} - allows to provide custom function as adapter.
+ */
+ 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?: number;
+
+ /**
+ * 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;
+
+ /**
+ * Specifies a default uri to redirect to after login or logout.
+ * This is currently supported for adapter 'cordova-native' and 'default'
+ */
+ redirectUri?: string;
+
+ /**
+ * 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;
+
+ /**
+ * Sets the 'ui_locales' query param in compliance with section 3.1.2.1
+ * of the OIDC 1.0 specification.
+ */
+ locale?: string;
+
+ /**
+ * Specifies the desired Keycloak locale for the UI. This differs from
+ * the locale param in that it tells the Keycloak server to set a cookie and update
+ * the user's profile to a new preferred locale.
+ */
+ kcLocale?: string;
+
+ /**
+ * Specifies arguments that are passed to the Cordova in-app-browser (if applicable).
+ * Options 'hidden' and 'location' are not affected by these arguments.
+ * All available options are defined at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/.
+ * Example of use: { zoom: "no", hardwareback: "yes" }
+ */
+ cordovaOptions?: { [optionName: string]: 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;
+ }
+
+ interface KeycloakTokenParsed {
+ exp?: number;
+ iat?: number;
+ nonce?: string;
+ sub?: string;
+ session_state?: string;
+ realm_access?: { roles: string[] };
+ resource_access?: string[];
+ }
+
+ interface KeycloakResourceAccess {
+ [key: string]: KeycloakRoles
+ }
+
+ interface KeycloakRoles {
+ roles: string[];
+ }
+
+ // 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?: KeycloakRoles;
+
+ /**
+ * The resource roles associated with the token.
+ */
+ resourceAccess?: KeycloakResourceAccess;
+
+ /**
+ * 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?: KeycloakTokenParsed;
+
+ /**
+ * 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?: KeycloakTokenParsed;
+
+ /**
+ * The base64 encoded ID token.
+ */
+ idToken?: string;
+
+ /**
+ * The parsed id token as a JavaScript object.
+ */
+ idTokenParsed?: KeycloakTokenParsed;
+
+ /**
+ * 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>;
+ }
+}
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host.xml
index c7afbf0..a5bd21c 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host.xml
@@ -42,7 +42,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-master.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-master.xml
index 0035e03..4c4fdf6 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-master.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-master.xml
@@ -41,7 +41,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-slave.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-slave.xml
index bb6dbc1..05da228 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-slave.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/host/host-slave.xml
@@ -41,7 +41,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/template.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/template.xml
index 4d78f99..730fab2 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/template.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/template.xml
@@ -20,7 +20,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
index 5dfe071..8dd33d1 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-clustered.cli
@@ -442,7 +442,7 @@ end-if
if (outcome == failed) of /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
/profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /profile=$clusteredProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "0.0.0.0",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
index e61d43d..dee3b3f 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-domain-standalone.cli
@@ -402,7 +402,7 @@ end-if
if (outcome == failed) of /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
/profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /profile=$standaloneProfile/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "0.0.0.0",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
index 13e9a6f..9613035 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone.cli
@@ -371,7 +371,7 @@ end-if
if (outcome == failed) of /subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "0.0.0.0",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
index bc54a70..6a59ffb 100644
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/content/bin/migrate-standalone-ha.cli
@@ -427,7 +427,7 @@ end-if
if (outcome == failed) of /subsystem=keycloak-server/spi=hostname/:read-resource
echo Adding spi=hostname...
/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
- /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+ /subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "0.0.0.0",httpPort => "-1",httpsPort => "-1"},enabled=true)
echo
end-if
docker-compose.yml 17(+17 -0)
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..5e4af2b
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,17 @@
+version: "3"
+services:
+ application:
+ build: .
+ container_name: keycloak
+ volumes:
+ - application:/application
+ - /root/.m2:/root/.m2
+ restart: unless-stopped
+ ports:
+ - 8080:8081
+ logging:
+ options:
+ max-size: "10m"
+ max-file: "10"
+volumes:
+ application:
\ No newline at end of file
Dockerfile 8(+8 -0)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..17eb475
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,8 @@
+FROM maven:3.3.9
+
+ADD . /application
+WORKDIR /application
+
+EXPOSE 8081
+
+CMD ["bash", "run.sh"]
\ No newline at end of file
examples/cordova/example-realm.json 2(+1 -1)
diff --git a/examples/cordova/example-realm.json b/examples/cordova/example-realm.json
index 8dd787a..84c4091 100755
--- a/examples/cordova/example-realm.json
+++ b/examples/cordova/example-realm.json
@@ -47,7 +47,7 @@
"enabled": true,
"publicClient": true,
"redirectUris": ["http://localhost"],
- "webOrigins": ["localhost"]
+ "webOrigins": ["0.0.0.0"]
}
],
"clientScopeMappings": {
diff --git a/examples/cordova-native/example-realm.json b/examples/cordova-native/example-realm.json
index 131ccbd..38b50ef 100755
--- a/examples/cordova-native/example-realm.json
+++ b/examples/cordova-native/example-realm.json
@@ -47,7 +47,7 @@
"enabled": true,
"publicClient": true,
"redirectUris": ["android-app://org.keycloak.examples.cordova/https/keycloak-cordova-example.github.io/login"],
- "webOrigins": ["localhost"]
+ "webOrigins": ["0.0.0.0"]
}
],
"clientScopeMappings": {
examples/saml/testsaml.json 2(+1 -1)
diff --git a/examples/saml/testsaml.json b/examples/saml/testsaml.json
index aae0eb3..a1b6009 100755
--- a/examples/saml/testsaml.json
+++ b/examples/saml/testsaml.json
@@ -9,7 +9,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/util/MergeAttributesTest.java b/integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/util/MergeAttributesTest.java
index ef6d897..836b7dc 100644
--- a/integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/util/MergeAttributesTest.java
+++ b/integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/util/MergeAttributesTest.java
@@ -44,7 +44,7 @@ public class MergeAttributesTest {
attrs.add(new AttributeOperation(SET, "enabled", "true"));
attrs.add(new AttributeOperation(SET, "revokeRefreshToken", "true"));
attrs.add(new AttributeOperation(SET, "accessTokenLifespan", "900"));
- attrs.add(new AttributeOperation(SET, "smtpServer.host", "localhost"));
+ attrs.add(new AttributeOperation(SET, "smtpServer.host", "0.0.0.0"));
attrs.add(new AttributeOperation(SET, "extra.key1", "somevalue"));
attrs.add(new AttributeOperation(SET, "extra.key2", "[\"somevalue\"]"));
attrs.add(new AttributeOperation(SET, "extra.key3[1]", "second item"));
misc/Testsuite.md 2(+1 -1)
diff --git a/misc/Testsuite.md b/misc/Testsuite.md
index 9b9fd2a..cb2e9e2 100644
--- a/misc/Testsuite.md
+++ b/misc/Testsuite.md
@@ -149,7 +149,7 @@ URI `localhost` must be allowed in `network.negotiate-auth.trusted-uris` config
For Chrome, you just need to run the browser with command similar to this (more details in Chrome documentation):
```
-/usr/bin/google-chrome-stable --auth-server-whitelist="localhost"
+/usr/bin/google-chrome-stable --auth-server-whitelist="0.0.0.0"
```
diff --git a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java
index 467b03f..f85517a 100755
--- a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java
+++ b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/DefaultInfinispanConnectionProviderFactory.java
@@ -340,7 +340,7 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
// Used for cross-data centers scenario. Usually integration with external JDG server, which itself handles communication between DCs.
private void configureRemoteCacheStore(ConfigurationBuilder builder, boolean async, String cacheName, boolean sessionCache) {
- String jdgServer = config.get("remoteStoreHost", "localhost");
+ String jdgServer = config.get("remoteStoreHost", "0.0.0.0");
Integer jdgPort = config.getInt("remoteStorePort", 11222);
builder.persistence()
@@ -368,7 +368,7 @@ public class DefaultInfinispanConnectionProviderFactory implements InfinispanCon
}
private void configureRemoteActionTokenCacheStore(ConfigurationBuilder builder, boolean async) {
- String jdgServer = config.get("remoteStoreHost", "localhost");
+ String jdgServer = config.get("remoteStoreHost", "0.0.0.0");
Integer jdgPort = config.getInt("remoteStorePort", 11222);
builder.persistence()
diff --git a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java
index 25a6ad1..1158e3e 100644
--- a/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java
+++ b/model/infinispan/src/main/java/org/keycloak/connections/infinispan/TopologyInfo.java
@@ -72,7 +72,7 @@ public class TopologyInfo {
nodeName = System.getProperty(InfinispanConnectionProvider.JBOSS_NODE_NAME);
siteName = System.getProperty(InfinispanConnectionProvider.JBOSS_SITE_NAME);
}
- if (nodeName == null || nodeName.equals("localhost")) {
+ if (nodeName == null || nodeName.equals("0.0.0.0")) {
isGeneratedNodeName = true;
nodeName = generateNodeName();
}
diff --git a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java
index 82de12c..6ac3101 100644
--- a/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java
+++ b/model/infinispan/src/test/java/org/keycloak/cluster/infinispan/TestCacheManagerFactory.java
@@ -62,7 +62,7 @@ class TestCacheManagerFactory {
private <T extends StoreConfigurationBuilder<?, T> & RemoteStoreConfigurationChildBuilder<T>> Configuration getCacheBackedByRemoteStore(int threadId, String cacheName, Class<T> builderClass) {
ConfigurationBuilder cacheConfigBuilder = new ConfigurationBuilder();
- String host = "localhost";
+ String host = "0.0.0.0";
int port = threadId==1 ? 12232 : 13232;
//int port = 11222;
diff --git a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheConcurrentWritesTest.java b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheConcurrentWritesTest.java
index 719a39a..847680c 100644
--- a/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheConcurrentWritesTest.java
+++ b/model/infinispan/src/test/java/org/keycloak/models/sessions/infinispan/initializer/DistributedCacheConcurrentWritesTest.java
@@ -226,7 +226,7 @@ public class DistributedCacheConcurrentWritesTest {
org.infinispan.client.hotrod.configuration.ConfigurationBuilder builder = new org.infinispan.client.hotrod.configuration.ConfigurationBuilder();
org.infinispan.client.hotrod.configuration.Configuration cfg = builder
- .addServer().host("localhost").port(port)
+ .addServer().host("0.0.0.0").port(port)
.version(ProtocolVersion.PROTOCOL_VERSION_26)
.build();
RemoteCacheManager mgr = new RemoteCacheManager(cfg);
diff --git a/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyConfig.java b/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyConfig.java
index facdbb2..9c39547 100755
--- a/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyConfig.java
+++ b/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyConfig.java
@@ -33,7 +33,7 @@ import java.util.Set;
*/
public class ProxyConfig {
@JsonProperty("bind-address")
- protected String bindAddress = "localhost";
+ protected String bindAddress = "0.0.0.0";
@JsonProperty("http-port")
protected Integer httpPort;
@JsonProperty("https-port")
diff --git a/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyServerBuilder.java b/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyServerBuilder.java
index f909937..e2663dc 100755
--- a/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyServerBuilder.java
+++ b/proxy/proxy-server/src/main/java/org/keycloak/proxy/ProxyServerBuilder.java
@@ -438,12 +438,12 @@ public class ProxyServerBuilder {
log.warn("You have not set up HTTP or HTTPS");
}
if (config.getHttpPort() != null) {
- String bindAddress = "localhost";
+ String bindAddress = "0.0.0.0";
if (config.getBindAddress() != null) bindAddress = config.getBindAddress();
builder.addHttpListener(config.getHttpPort(), bindAddress);
}
if (config.getHttpsPort() != null) {
- String bindAddress = "localhost";
+ String bindAddress = "0.0.0.0";
if (config.getBindAddress() != null) bindAddress = config.getBindAddress();
if (config.getKeystore() != null) {
InputStream is = FindFile.findFile(config.getKeystore());
run.sh 7(+7 -0)
diff --git a/run.sh b/run.sh
new file mode 100644
index 0000000..78ad209
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ ! -e compiled ]; then
+ mvn clean install -DskipTests
+ touch compiled
+fi
+mvn -f testsuite/utils/pom.xml exec:java -Pkeycloak-server
diff --git a/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java b/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
index 8d69420..f293142 100755
--- a/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
@@ -238,7 +238,7 @@ public class WelcomeResource {
logger.debugf("Checking WelcomePage. Remote address: %s, Local address: %s, X-Forwarded-For header: %s", remoteInetAddress.toString(), localInetAddress.toString(), xForwardedFor);
// Access through AJP protocol (loadbalancer) may cause that remoteAddress is "127.0.0.1".
- // So consider that welcome page accessed locally just if it was accessed really through "localhost" URL and without loadbalancer (x-forwarded-for header is empty).
+ // So consider that welcome page accessed locally just if it was accessed really through "0.0.0.0" URL and without loadbalancer (x-forwarded-for header is empty).
return isLocalAddress(remoteInetAddress) && isLocalAddress(localInetAddress) && xForwardedFor == null;
} catch (UnknownHostException e) {
throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
diff --git a/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowAppServerProvider.java b/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowAppServerProvider.java
index f9af9fe..fddf83b 100644
--- a/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowAppServerProvider.java
+++ b/testsuite/integration-arquillian/servers/app-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/container/UndertowAppServerProvider.java
@@ -74,7 +74,7 @@ public class UndertowAppServerProvider implements AppServerContainerProvider {
configuration = container.createChild("configuration");
createChild("enabled", "true");
- createChild("bindAddress", "localhost");
+ createChild("bindAddress", "0.0.0.0");
createChild("bindHttpPort", "8280");
createChild("bindHttpPortOffset", Integer.toString(number));
createChild("adapterImplClass", UndertowAppServer.class.getName());
diff --git a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java
index b27f8b5..8ca1dc8 100644
--- a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java
+++ b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java
@@ -68,7 +68,7 @@ public class SimpleUndertowLoadBalancer {
public static void main(String[] args) throws Exception {
String nodes = System.getProperty("keycloak.nodes", DEFAULT_NODES);
- SimpleUndertowLoadBalancer lb = new SimpleUndertowLoadBalancer("localhost", 8180, nodes);
+ SimpleUndertowLoadBalancer lb = new SimpleUndertowLoadBalancer("0.0.0.0", 8180, nodes);
lb.start();
Runtime.getRuntime().addShutdownHook(new Thread() {
diff --git a/testsuite/integration-arquillian/test-apps/cors/angular-product/src/main/webapp/js/app.js b/testsuite/integration-arquillian/test-apps/cors/angular-product/src/main/webapp/js/app.js
index d175bfd..3c66bcb 100755
--- a/testsuite/integration-arquillian/test-apps/cors/angular-product/src/main/webapp/js/app.js
+++ b/testsuite/integration-arquillian/test-apps/cors/angular-product/src/main/webapp/js/app.js
@@ -55,7 +55,7 @@ angular.element(document).ready(function ($http) {
console.log('here login');
auth.loggedIn = true;
auth.authz = keycloakAuth;
- auth.logoutUrl = keycloakAuth.authServerUrl + "/realms/" + keycloakAuth.realm + "/protocol/openid-connect/logout?redirect_uri=" + getAppServerUrl("localhost") + "/angular-cors-product/index.html"
+ auth.logoutUrl = keycloakAuth.authServerUrl + "/realms/" + keycloakAuth.realm + "/protocol/openid-connect/logout?redirect_uri=" + getAppServerUrl("0.0.0.0") + "/angular-cors-product/index.html"
module.factory('Auth', function() {
return auth;
});
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java
index 68d49ca..816ec87 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java
@@ -80,7 +80,7 @@ public class AppServerTestEnricher {
}
public static String getAppServerContextRoot(int clusterPortOffset) {
- String host = System.getProperty("app.server.host", "localhost");
+ String host = System.getProperty("app.server.host", "0.0.0.0");
boolean sslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required"));
@@ -170,7 +170,7 @@ public class AppServerTestEnricher {
try {
return ManagementClient.online(OnlineOptions
.standalone()
- .hostAndPort(System.getProperty("app.server.host", "localhost"), System.getProperty("app.server","").startsWith("eap6") ? 10199 : 10190)
+ .hostAndPort(System.getProperty("app.server.host", "0.0.0.0"), System.getProperty("app.server","").startsWith("eap6") ? 10199 : 10190)
.protocol(System.getProperty("app.server","").startsWith("eap6") ? ManagementProtocol.REMOTE : ManagementProtocol.HTTP_REMOTING)
.build()
);
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
index a56b2d4..ff115a9 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java
@@ -110,7 +110,7 @@ public class AuthServerTestEnricher {
}
public static String getAuthServerContextRoot(int clusterPortOffset) {
- String host = System.getProperty("auth.server.host", "localhost");
+ String host = System.getProperty("auth.server.host", "0.0.0.0");
int httpPort = Integer.parseInt(System.getProperty("auth.server.http.port")); // property must be set
int httpsPort = Integer.parseInt(System.getProperty("auth.server.https.port")); // property must be set
@@ -137,7 +137,7 @@ public class AuthServerTestEnricher {
try {
return ManagementClient.online(OnlineOptions
.standalone()
- .hostAndPort(System.getProperty("auth.server.host", "localhost"), Integer.parseInt(System.getProperty("auth.server.management.port", "10090")))
+ .hostAndPort(System.getProperty("auth.server.host", "0.0.0.0"), Integer.parseInt(System.getProperty("auth.server.management.port", "10090")))
.build()
);
} catch (IOException e) {
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java
index 354f2cd..9bbb51a 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/CacheStatisticsControllerEnricher.java
@@ -183,7 +183,7 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
if (container.getDeployableContainer() instanceof KeycloakOnUndertow) {
return () -> ManagementFactory.getPlatformMBeanServer();
}
- host = "localhost";
+ host = "0.0.0.0";
port = container.getContainerConfiguration().getContainerProperties().containsKey("managementPort")
? Integer.valueOf(container.getContainerConfiguration().getContainerProperties().get("managementPort"))
: 9990;
@@ -222,7 +222,7 @@ public class CacheStatisticsControllerEnricher implements TestEnricher {
if (container.getDeployableContainer() instanceof KeycloakOnUndertow) {
return () -> ManagementFactory.getPlatformMBeanServer();
}
- host = "localhost";
+ host = "0.0.0.0";
port = container.getContainerConfiguration().getContainerProperties().containsKey("managementPort")
? Integer.valueOf(container.getContainerConfiguration().getContainerProperties().get("managementPort"))
: 9990;
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java
index 1a349ec..f2483f2 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/provider/URLProvider.java
@@ -45,7 +45,7 @@ public class URLProvider extends URLResourceProvider {
public static final String BOUND_TO_ALL = "0.0.0.0";
public static final String LOCALHOST_ADDRESS = "127.0.0.1";
- public static final String LOCALHOST_HOSTNAME = "localhost";
+ public static final String LOCALHOST_HOSTNAME = "0.0.0.0";
private final boolean appServerSslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required"));
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/ProfileAssume.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/ProfileAssume.java
index 3aaf443..c731297 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/ProfileAssume.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/ProfileAssume.java
@@ -37,7 +37,7 @@ public class ProfileAssume {
private static String profile;
static {
- String host = System.getProperty("auth.server.host", "localhost");
+ String host = System.getProperty("auth.server.host", "0.0.0.0");
String port = System.getProperty("auth.server.http.port", "8180");
boolean adapterCompatTesting = Boolean.parseBoolean(System.getProperty("testsuite.adapter.compat.testing"));
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java
index efc82f3..da3daad 100755
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java
@@ -36,7 +36,7 @@ public class GreenMailRule extends ExternalResource {
private GreenMail greenMail;
private int port = 3025;
- private String host = "localhost";
+ private String host = "0.0.0.0";
public GreenMailRule() {
}
@@ -80,7 +80,7 @@ public class GreenMailRule extends ExternalResource {
public void configureRealm(RealmModel realm) {
Map<String, String> config = new HashMap<>();
config.put("from", "auto@keycloak.org");
- config.put("host", "localhost");
+ config.put("host", "0.0.0.0");
config.put("port", "3025");
realm.setSmtpConfig(config);
}
diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailServerConfiguration.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailServerConfiguration.java
index 50c8ed3..00cea92 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailServerConfiguration.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailServerConfiguration.java
@@ -23,7 +23,7 @@ package org.keycloak.testsuite.util;
*/
public class MailServerConfiguration {
public static final String FROM = "server@mail.test";
- public static final String HOST = "localhost";
+ public static final String HOST = "0.0.0.0";
public static final String PORT = "3025";
public static final String PORT_SSL = "3465";
public static final String STARTTLS = "true";
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterClusteredTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterClusteredTest.java
index 61827f4..4e69333 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterClusteredTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/AbstractAdapterClusteredTest.java
@@ -91,7 +91,7 @@ public abstract class AbstractAdapterClusteredTest extends AbstractServletsAdapt
loadBalancerToNodes = new LoadBalancingProxyClient().addHost(NODE_1_URI, NODE_1_NAME).setConnectionsPerThread(10);
int maxTime = 3600000; // 1 hour for proxy request timeout, so we can debug the backend keycloak servers
reverseProxyToNodes = Undertow.builder()
- .addHttpListener(HTTP_PORT_NODE_REVPROXY, "localhost")
+ .addHttpListener(HTTP_PORT_NODE_REVPROXY, "0.0.0.0")
.setIoThreads(2)
.setHandler(new ProxyHandler(loadBalancerToNodes, maxTime, ResponseCodeHandler.HANDLE_404)).build();
reverseProxyToNodes.start();
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/CorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/CorsExampleAdapterTest.java
index 7574fc0..4c5e127 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/CorsExampleAdapterTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/CorsExampleAdapterTest.java
@@ -116,7 +116,7 @@ public class CorsExampleAdapterTest extends AbstractExampleAdapterTest {
}
static{
- hostBackup = System.getProperty("auth.server.host", "localhost");
+ hostBackup = System.getProperty("auth.server.host", "0.0.0.0");
System.setProperty("auth.server.host", AUTH_SERVER_HOST);
}
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdminAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdminAdapterTest.java
index 6b51415..f3ec513 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdminAdapterTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/FuseAdminAdapterTest.java
@@ -292,7 +292,7 @@ public class FuseAdminAdapterTest extends AbstractExampleAdapterTest {
protected ClientSession openSshChannel(String username, String password) throws Exception {
client = SshClient.setUpDefaultClient();
client.start();
- ConnectFuture future = client.connect(username, "localhost", 8101);
+ ConnectFuture future = client.connect(username, "0.0.0.0", 8101);
future.await();
ClientSession session = future.getSession();
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AbstractAdminTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AbstractAdminTest.java
index 7d466a6..f5f6052 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AbstractAdminTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/AbstractAdminTest.java
@@ -67,7 +67,7 @@ public abstract class AbstractAdminTest extends AbstractTestRealmKeycloakTest {
adminRealmRep.setEnabled(true);
Map<String, String> config = new HashMap<>();
config.put("from", "auto@keycloak.org");
- config.put("host", "localhost");
+ config.put("host", "0.0.0.0");
config.put("port", "3025");
adminRealmRep.setSmtpServer(config);
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/ClaimInformationPointProviderTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/ClaimInformationPointProviderTest.java
index e3f05c1..fa640e0 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/ClaimInformationPointProviderTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/client/authorization/ClaimInformationPointProviderTest.java
@@ -75,7 +75,7 @@ public class ClaimInformationPointProviderTest extends AbstractKeycloakTest {
@BeforeClass
public static void onBeforeClass() {
- httpService = Undertow.builder().addHttpListener(8989, "localhost").setHandler(exchange -> {
+ httpService = Undertow.builder().addHttpListener(8989, "0.0.0.0").setHandler(exchange -> {
if (exchange.isInIoThread()) {
try {
if (exchange.getRelativePath().equals("/post-claim-information-provider")) {
@@ -354,7 +354,7 @@ public class ClaimInformationPointProviderTest extends AbstractKeycloakTest {
Map<String, Cookie> cookies = new HashMap<>();
- cookies.put("c", new Cookie("c", "cookie-c", 1, "localhost", "/"));
+ cookies.put("c", new Cookie("c", "cookie-c", 1, "0.0.0.0", "/"));
return new Request() {
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/AttributeTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/AttributeTest.java
index b61f6c4..8d94f51 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/AttributeTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/authz/AttributeTest.java
@@ -47,7 +47,7 @@ public class AttributeTest {
map.put("string", asList("some string"));
map.put("date", asList("12/12/2016"));
map.put("ip_network_address", asList("127.0.0.1"));
- map.put("host_network_address", asList("localhost"));
+ map.put("host_network_address", asList("0.0.0.0"));
map.put("multi_valued", asList("1", "2", "3", "4"));
Attributes attributes = Attributes.from(map);
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/registration/AbstractRegCliTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/registration/AbstractRegCliTest.java
index e171cca..4cc7dae 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/registration/AbstractRegCliTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cli/registration/AbstractRegCliTest.java
@@ -403,7 +403,7 @@ public abstract class AbstractRegCliTest extends AbstractCliTest {
String anonPolicy = ClientRegistrationPolicyManager.getComponentTypeKey(RegistrationAuth.ANONYMOUS);
ComponentRepresentation trustedHostRep = findPolicyByProviderAndAuth(realm, TrustedHostClientRegistrationPolicyFactory.PROVIDER_ID, anonPolicy);
- trustedHostRep.getConfig().putSingle(TrustedHostClientRegistrationPolicyFactory.TRUSTED_HOSTS, "localhost");
+ trustedHostRep.getConfig().putSingle(TrustedHostClientRegistrationPolicyFactory.TRUSTED_HOSTS, "0.0.0.0");
realmResource.components().component(trustedHostRep.getId()).update(trustedHostRep);
}
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationPoliciesTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationPoliciesTest.java
index ffb283d..b6e6bd0 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationPoliciesTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationPoliciesTest.java
@@ -181,7 +181,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
assertOidcFail(ClientRegOp.CREATE, client, 403, "Host not trusted");
// Should still fail (bad redirect_uri)
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
assertOidcFail(ClientRegOp.CREATE, client, 403, "URL doesn't match");
// Should still fail (bad base_uri)
@@ -200,7 +200,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testAnonUpdateWithTrustedHost() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
OIDCClientRepresentation client = create();
// Fail update client
@@ -241,7 +241,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testAnonConsentRequired() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
OIDCClientRepresentation client = create();
// Assert new client has consent required
@@ -261,7 +261,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testAnonFullScopeAllowed() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
OIDCClientRepresentation client = create();
// Assert new client has fullScopeAllowed disabled
@@ -281,7 +281,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testClientDisabledPolicy() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Assert new client is enabled
OIDCClientRepresentation client = create();
@@ -321,7 +321,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testMaxClientsPolicy() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
int clientsCount = realmResource().clients().findAll().size();
int newClientsLimit = clientsCount + 1;
@@ -421,7 +421,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testClientScopesPolicy() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Add some clientScope through Admin REST
ClientScopeRepresentation clientScope = new ClientScopeRepresentation();
@@ -459,7 +459,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testClientScopesPolicyWithPermittedScope() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Add some clientScope through Admin REST
ClientScopeRepresentation clientScope = new ClientScopeRepresentation();
@@ -492,7 +492,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testProtocolMappersCreate() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Try to add client with some "hardcoded role" mapper. Should fail
ClientRepresentation clientRep = createRep("test-app");
@@ -538,7 +538,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testProtocolMappersUpdate() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Check I can add client with allowed protocolMappers
ProtocolMapperRepresentation protocolMapper = new ProtocolMapperRepresentation();
@@ -573,7 +573,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testProtocolMappersConsentRequired() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Register client and assert it doesn't have builtin protocol mappers
ClientRepresentation clientRep = createRep("test-app");
@@ -588,7 +588,7 @@ public class ClientRegistrationPoliciesTest extends AbstractClientRegistrationTe
@Test
public void testProtocolMappersRemoveBuiltins() throws Exception {
- setTrustedHost("localhost");
+ setTrustedHost("0.0.0.0");
// Change policy to allow hardcoded mapper
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cookies/CookiesPathTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cookies/CookiesPathTest.java
index f736bd3..f10c054 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cookies/CookiesPathTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cookies/CookiesPathTest.java
@@ -103,7 +103,7 @@ public class CookiesPathTest extends AbstractKeycloakTest {
// create old cookie with wrong path
BasicClientCookie wrongCookie = new BasicClientCookie(AuthenticationSessionManager.AUTH_SESSION_ID, AUTH_SESSION_VALUE);
- wrongCookie.setDomain("localhost");
+ wrongCookie.setDomain("0.0.0.0");
wrongCookie.setPath(OLD_COOKIE_PATH);
wrongCookie.setExpiryDate(calendar.getTime());
@@ -170,7 +170,7 @@ public class CookiesPathTest extends AbstractKeycloakTest {
// create old cookie with wrong path
BasicClientCookie wrongCookie = new BasicClientCookie(AuthenticationSessionManager.AUTH_SESSION_ID, AUTH_SESSION_VALUE_NODE);
- wrongCookie.setDomain("localhost");
+ wrongCookie.setDomain("0.0.0.0");
wrongCookie.setPath(OLD_COOKIE_PATH);
wrongCookie.setExpiryDate(calendar.getTime());
@@ -261,7 +261,7 @@ public class CookiesPathTest extends AbstractKeycloakTest {
BasicClientCookie c = new BasicClientCookie(name, value);
c.setExpiryDate(calendar.getTime());
- c.setDomain("localhost");
+ c.setDomain("0.0.0.0");
c.setPath(path);
return c;
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/AbstractAdminCrossDCTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/AbstractAdminCrossDCTest.java
index f6f2a16..9383004 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/AbstractAdminCrossDCTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/AbstractAdminCrossDCTest.java
@@ -67,7 +67,7 @@ public abstract class AbstractAdminCrossDCTest extends AbstractCrossDCTest {
adminRealmRep.setEnabled(true);
Map<String, String> config = new HashMap<>();
config.put("from", "auto@keycloak.org");
- config.put("host", "localhost");
+ config.put("host", "0.0.0.0");
config.put("port", "3025");
adminRealmRep.setSmtpServer(config);
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/docker/DockerClientTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/docker/DockerClientTest.java
index fbc9fe1..872c09e 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/docker/DockerClientTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/docker/DockerClientTest.java
@@ -33,7 +33,7 @@ public class DockerClientTest extends AbstractKeycloakTest {
public static final String DOCKER_USER = "docker-user";
public static final String DOCKER_USER_PASSWORD = "password";
- public static final String REGISTRY_HOSTNAME = "localhost";
+ public static final String REGISTRY_HOSTNAME = "0.0.0.0";
public static final Integer REGISTRY_PORT = 5000;
public static final String MINIMUM_DOCKER_VERSION = "1.8.0";
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportUtil.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportUtil.java
index 5f10066..8a0b810 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportUtil.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportUtil.java
@@ -267,7 +267,7 @@ public class ExportImportUtil {
Map<String, String> smtpConfig = realm.getSmtpServer();
Assert.assertTrue(smtpConfig.size() == 3);
Assert.assertEquals("auto@keycloak.org", smtpConfig.get("from"));
- Assert.assertEquals("localhost", smtpConfig.get("host"));
+ Assert.assertEquals("0.0.0.0", smtpConfig.get("host"));
Assert.assertEquals("3025", smtpConfig.get("port"));
// Test identity providers
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java
index 413e9cf..a6bdc68 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java
@@ -295,7 +295,7 @@ public class UserStorageTest extends AbstractAuthTest {
.updateWith(r -> {
Map<String, String> config = new HashMap<>();
config.put("from", "auto@keycloak.org");
- config.put("host", "localhost");
+ config.put("host", "0.0.0.0");
config.put("port", "3025");
r.setSmtpServer(config);
r.setRegistrationAllowed(true);
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/openshift/OpenshiftClientStorageTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/openshift/OpenshiftClientStorageTest.java
index b038102..d20f904 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/openshift/OpenshiftClientStorageTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/openshift/OpenshiftClientStorageTest.java
@@ -102,7 +102,7 @@ public final class OpenshiftClientStorageTest extends AbstractTestRealmKeycloakT
@BeforeClass
public static void onBeforeClass() {
- OPENSHIFT_API_SERVER = Undertow.builder().addHttpListener(8880, "localhost", new HttpHandler() {
+ OPENSHIFT_API_SERVER = Undertow.builder().addHttpListener(8880, "0.0.0.0", new HttpHandler() {
@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
String uri = exchange.getRequestURI();
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/url/FixedHostnameTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/url/FixedHostnameTest.java
index 1ece435..ac94864 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/url/FixedHostnameTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/url/FixedHostnameTest.java
@@ -191,9 +191,9 @@ public class FixedHostnameTest extends AbstractKeycloakTest {
private void clearFixedHostname() throws Exception {
if (suiteContext.getAuthServerInfo().isUndertow()) {
- configureUndertow("request", "localhost", -1, -1,false);
+ configureUndertow("request", "0.0.0.0", -1, -1,false);
} else if (suiteContext.getAuthServerInfo().isJBossBased()) {
- configureWildFly("request", "localhost", -1, -1, false);
+ configureWildFly("request", "0.0.0.0", -1, -1, false);
} else {
throw new RuntimeException("Don't know how to config");
}
diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/x509/X509OCSPResponderTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/x509/X509OCSPResponderTest.java
index f44fc64..a8ea50e 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/x509/X509OCSPResponderTest.java
+++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/x509/X509OCSPResponderTest.java
@@ -47,7 +47,7 @@ import io.undertow.server.handlers.BlockingHandler;
public class X509OCSPResponderTest extends AbstractX509AuthenticationTest {
- private static final String OCSP_RESPONDER_HOST = "localhost";
+ private static final String OCSP_RESPONDER_HOST = "0.0.0.0";
private static final int OCSP_RESPONDER_PORT = 8888;
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
index 1f1287b..e8e4266 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml.json
@@ -12,7 +12,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"eventsEnabled" : true,
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml-behind-lb.json b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml-behind-lb.json
index ae10da2..0bbda3a 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml-behind-lb.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/keycloak-saml/testsaml-behind-lb.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/offlinerealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/offlinerealm.json
index 7155790..1480a41 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/offlinerealm.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/adapter-test/offline-client/offlinerealm.json
@@ -14,7 +14,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/admin-test/testrealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/admin-test/testrealm.json
index ef6f105..11285e2 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/admin-test/testrealm.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/admin-test/testrealm.json
@@ -13,7 +13,7 @@
"actionTokenGeneratedByUserLifespan": "258",
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/export/partialexport-testrealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/export/partialexport-testrealm.json
index 933a170..92f1d8e 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/export/partialexport-testrealm.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/export/partialexport-testrealm.json
@@ -204,7 +204,7 @@
],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port": "3025",
"user": "user",
"password": "secret"
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/ldap/fed-provider-export.json b/testsuite/integration-arquillian/tests/base/src/test/resources/ldap/fed-provider-export.json
index 06d5999..ed16d73 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/ldap/fed-provider-export.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/ldap/fed-provider-export.json
@@ -96,7 +96,7 @@
"contentSecurityPolicy": "frame-src 'self'"
},
"smtpServer": {
- "host": "localhost",
+ "host": "0.0.0.0",
"from": "auto@keycloak.org",
"port": "3025"
},
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites.json b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites.json
index 740a4e1..7120616 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites.json
@@ -11,7 +11,7 @@
"requiredCredentials": [ "password" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites2.json b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites2.json
index d9e9bb1..1312939 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites2.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testcomposites2.json
@@ -11,7 +11,7 @@
"requiredCredentials": [ "password" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testrealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testrealm.json
index 345cb7b..0ce3755 100755
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/model/testrealm.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/model/testrealm.json
@@ -15,7 +15,7 @@
"verifyEmail" : "true",
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"identityProviders" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/testcomposite.json b/testsuite/integration-arquillian/tests/base/src/test/resources/testcomposite.json
index e7819e6..cd13518 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/testcomposite.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/testcomposite.json
@@ -11,7 +11,7 @@
"requiredCredentials": [ "password" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm.json b/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm.json
index 81239fa..b0eb910 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm.json
@@ -12,7 +12,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025",
"fromDisplayName": "Keycloak SSO",
"replyTo":"reply-to@keycloak.org",
diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm-duplicate-emails.json b/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm-duplicate-emails.json
index 560c1d2..d215776 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm-duplicate-emails.json
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/testrealm-duplicate-emails.json
@@ -14,7 +14,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.8.1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.8.1.xml
index 7bcbdce..686c930 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.8.1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.8.1.xml
@@ -316,7 +316,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -647,7 +647,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -695,7 +695,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
@@ -712,7 +712,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</socket-binding-groups>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.9.8.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.9.8.Final-redhat-1.xml
index 2a011dc..2e616cd 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.9.8.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-1.9.8.Final-redhat-1.xml
@@ -323,7 +323,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -668,7 +668,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -795,7 +795,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="lb-handler"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -846,7 +846,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
@@ -862,7 +862,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<!-- load-balancer-sockets should be removed in production systems and replaced with a better softare or hardare based one -->
@@ -871,10 +871,10 @@
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<outbound-socket-binding name="remote-host1">
- <remote-destination host="localhost" port="8159"/>
+ <remote-destination host="0.0.0.0" port="8159"/>
</outbound-socket-binding>
<outbound-socket-binding name="remote-host2">
- <remote-destination host="localhost" port="8259"/>
+ <remote-destination host="0.0.0.0" port="8259"/>
</outbound-socket-binding>
</socket-binding-group>
</socket-binding-groups>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-2.5.5.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-2.5.5.Final-redhat-1.xml
index 997be99..f6c93ba 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-2.5.5.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-2.5.5.Final-redhat-1.xml
@@ -325,7 +325,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -749,7 +749,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -951,7 +951,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="lb-handler"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -1002,7 +1002,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
@@ -1018,7 +1018,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<!-- load-balancer-sockets should be removed in production systems and replaced with a better softare or hardare based one -->
@@ -1027,10 +1027,10 @@
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<outbound-socket-binding name="remote-host1">
- <remote-destination host="localhost" port="8159"/>
+ <remote-destination host="0.0.0.0" port="8159"/>
</outbound-socket-binding>
<outbound-socket-binding name="remote-host2">
- <remote-destination host="localhost" port="8259"/>
+ <remote-destination host="0.0.0.0" port="8259"/>
</outbound-socket-binding>
</socket-binding-group>
</socket-binding-groups>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-3.4.3.Final-redhat-2.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-3.4.3.Final-redhat-2.xml
index 3855f81..ff921a2 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-3.4.3.Final-redhat-2.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/domain-3.4.3.Final-redhat-2.xml
@@ -405,7 +405,7 @@
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
@@ -907,7 +907,7 @@
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
@@ -1044,7 +1044,7 @@
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<http-listener name="management" socket-binding="mcmp-management" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<filter-ref name="load-balancer"/>
</host>
</server>
@@ -1079,7 +1079,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<socket-binding-group name="ha-sockets" default-interface="public">
@@ -1093,7 +1093,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
<!-- load-balancer-sockets should be removed in production systems and replaced with a better softare or hardare based one -->
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/host-master-3.4.3.Final-redhat-2.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/host-master-3.4.3.Final-redhat-2.xml
index 7963f3d..85f9215 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/host-master-3.4.3.Final-redhat-2.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/domain/host-master-3.4.3.Final-redhat-2.xml
@@ -20,7 +20,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.domain.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.8.1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.8.1.xml
index f454a7c..b8b0fa4 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.8.1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.8.1.xml
@@ -347,7 +347,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -386,7 +386,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.9.8.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.9.8.Final-redhat-1.xml
index 7bcc5a6..30d05f3 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.9.8.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-1.9.8.Final-redhat-1.xml
@@ -353,7 +353,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -392,7 +392,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-2.5.5.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-2.5.5.Final-redhat-1.xml
index d344581..f4522ae 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-2.5.5.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-2.5.5.Final-redhat-1.xml
@@ -359,7 +359,7 @@
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -473,7 +473,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-3.4.3.Final-redhat-2.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-3.4.3.Final-redhat-2.xml
index 3f90433..d172ac2 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-3.4.3.Final-redhat-2.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-3.4.3.Final-redhat-2.xml
@@ -38,7 +38,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
@@ -467,7 +467,7 @@
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
@@ -567,7 +567,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.8.1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.8.1.xml
index aa9347a..dc91828 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.8.1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.8.1.xml
@@ -384,7 +384,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -432,7 +432,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.9.8.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.9.8.Final-redhat-1.xml
index 46ab999..c5e4c55 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.9.8.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-1.9.8.Final-redhat-1.xml
@@ -390,7 +390,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -438,7 +438,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-2.5.5.Final-redhat-1.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-2.5.5.Final-redhat-1.xml
index d85e77f..553bc1b 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-2.5.5.Final-redhat-1.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-2.5.5.Final-redhat-1.xml
@@ -398,7 +398,7 @@
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
@@ -521,7 +521,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-3.4.3.Final-redhat-2.xml b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-3.4.3.Final-redhat-2.xml
index d4c2884..b28510e 100644
--- a/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-3.4.3.Final-redhat-2.xml
+++ b/testsuite/integration-arquillian/tests/other/server-config-migration/src/test/resources/standalone/standalone-ha-3.4.3.Final-redhat-2.xml
@@ -40,7 +40,7 @@
<security-realm name="ApplicationRealm">
<server-identities>
<ssl>
- <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
+ <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="0.0.0.0"/>
</ssl>
</server-identities>
<authentication>
@@ -518,7 +518,7 @@
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
@@ -625,7 +625,7 @@
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
- <remote-destination host="localhost" port="25"/>
+ <remote-destination host="0.0.0.0" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
</server>
diff --git a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java
index 0affad5..2d02f8a 100644
--- a/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java
+++ b/testsuite/integration-arquillian/util/src/main/java/org/keycloak/testsuite/utils/arquillian/DeploymentArchiveProcessorUtils.java
@@ -231,7 +231,7 @@ public class DeploymentArchiveProcessorUtils {
private static String getAuthServerUrl() {
String scheme = AUTH_SERVER_SSL_REQUIRED ? "https" : "http";
- String host = System.getProperty("auth.server.host", "localhost");
+ String host = System.getProperty("auth.server.host", "0.0.0.0");
String port = AUTH_SERVER_SSL_REQUIRED ? System.getProperty("auth.server.https.port", "8443") :
System.getProperty("auth.server.http.port", "8180");
diff --git a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java
index a56ce36..e603148 100755
--- a/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java
+++ b/testsuite/integration-deprecated/src/test/java/org/keycloak/testsuite/rule/GreenMailRule.java
@@ -36,7 +36,7 @@ public class GreenMailRule extends ExternalResource {
@Override
protected void before() throws Throwable {
- ServerSetup setup = new ServerSetup(3025, "localhost", "smtp");
+ ServerSetup setup = new ServerSetup(3025, "0.0.0.0", "smtp");
greenMail = new GreenMail(setup);
greenMail.start();
@@ -64,7 +64,7 @@ public class GreenMailRule extends ExternalResource {
public void configureRealm(RealmModel realm) {
Map<String, String> config = new HashMap<>();
config.put("from", "auto@keycloak.org");
- config.put("host", "localhost");
+ config.put("host", "0.0.0.0");
config.put("port", "3025");
realm.setSmtpConfig(config);
}
diff --git a/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json b/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json
index f819b8c..96b4626 100755
--- a/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json
+++ b/testsuite/integration-deprecated/src/test/resources/broker-test/test-realm-with-broker.json
@@ -9,7 +9,7 @@
"publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgj8r0029eL0jJKXv6XbNj+QqsZO25HhZ0IjTEtb8mfh0tju/X8c6dXgILh5wU7OF00U+0mSYSE/+rrYKmY5g4oCleTe1+abavATP1tamtXGAUYqdutaXPrVn9yMsCWEPchSPZlEGq5iBJdA+xh9ejUmZJYXmln26HUVWq71/jC9GpjbRmFQ37f0X7WJoGyiqyttfKkKfUeBmRbX/0P0Zm6DVze8HjCDVPBllZE0a3HCgSF0rp0+s1xn7o91qdWKVattAVsGNjjDPz/sgwHOyyhDtSyajwXU+K/QUZ9pV4moGtwC9uIEymTylP7bu7qnxXIhfouEa+fEjAzTs0HJ5JQIDAQAB",
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"identityProviders" : [
diff --git a/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json b/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json
index d9e9bb1..1312939 100755
--- a/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json
+++ b/testsuite/integration-deprecated/src/test/resources/model/testcomposites.json
@@ -11,7 +11,7 @@
"requiredCredentials": [ "password" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml
index 3b50898..0179557 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/bad-client-signed-post/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8081/bad-client-sales-post-sig/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml
index b055b11..5d1df4e 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/bad-realm-signed-post/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8081/bad-realm-sales-post-sig/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml
index adad47d..2d92632 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/encrypted-post/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-enc/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml
index 4f7b9ba..f1ca358 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-front-get/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/employee-sig/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
</PicketLinkSP>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml
index dc0d208..00012c2 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-get/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/employee-sig/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
</PicketLinkSP>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml
index 6e6a90e..7f9a77b 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-metadata/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123" />
<Auth Key="SigningKeyPass" Value="test123" />
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-sig/" />
- <ValidatingAlias Key="localhost" Value="demo" />
+ <ValidatingAlias Key="0.0.0.0" Value="demo" />
<ValidatingAlias Key="127.0.0.1" Value="demo" />
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml
index 339030b..49d2c1a 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-post/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123"/>
<Auth Key="SigningKeyPass" Value="test123"/>
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-sig/"/>
- <ValidatingAlias Key="localhost" Value="demo"/>
+ <ValidatingAlias Key="0.0.0.0" Value="demo"/>
<ValidatingAlias Key="127.0.0.1" Value="demo"/>
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml
index 8c7be96..c752a31 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-email/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123"/>
<Auth Key="SigningKeyPass" Value="test123"/>
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-sig/"/>
- <ValidatingAlias Key="localhost" Value="demo"/>
+ <ValidatingAlias Key="0.0.0.0" Value="demo"/>
<ValidatingAlias Key="127.0.0.1" Value="demo"/>
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml
index 082a786..0dc59b9 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-persistent/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123"/>
<Auth Key="SigningKeyPass" Value="test123"/>
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-sig/"/>
- <ValidatingAlias Key="localhost" Value="demo"/>
+ <ValidatingAlias Key="0.0.0.0" Value="demo"/>
<ValidatingAlias Key="127.0.0.1" Value="demo"/>
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml
index 2fd59b7..9ccdd1c 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml
+++ b/testsuite/integration-deprecated/src/test/resources/saml/signed-post-transient/WEB-INF/picketlink.xml
@@ -28,7 +28,7 @@
<Auth Key="KeyStorePass" Value="store123"/>
<Auth Key="SigningKeyPass" Value="test123"/>
<Auth Key="SigningKeyAlias" Value="http://localhost:8080/sales-post-sig/"/>
- <ValidatingAlias Key="localhost" Value="demo"/>
+ <ValidatingAlias Key="0.0.0.0" Value="demo"/>
<ValidatingAlias Key="127.0.0.1" Value="demo"/>
</KeyProvider>
diff --git a/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json b/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json
index babfcd4..b0c21e5 100755
--- a/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json
+++ b/testsuite/integration-deprecated/src/test/resources/saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-deprecated/src/test/resources/testcomposite.json b/testsuite/integration-deprecated/src/test/resources/testcomposite.json
index 83d5611..4c6860d 100755
--- a/testsuite/integration-deprecated/src/test/resources/testcomposite.json
+++ b/testsuite/integration-deprecated/src/test/resources/testcomposite.json
@@ -11,7 +11,7 @@
"requiredCredentials": [ "password" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/integration-deprecated/src/test/resources/testrealm.json b/testsuite/integration-deprecated/src/test/resources/testrealm.json
index b4718dd..512d3a4 100755
--- a/testsuite/integration-deprecated/src/test/resources/testrealm.json
+++ b/testsuite/integration-deprecated/src/test/resources/testrealm.json
@@ -12,7 +12,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/Jetty9Test.java b/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/Jetty9Test.java
index f44d94b..ea7cc7d 100755
--- a/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/Jetty9Test.java
+++ b/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/Jetty9Test.java
@@ -56,7 +56,7 @@ public class Jetty9Test {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = Jetty9Test.class.getResource("/adapter-test/demorealm.json");
File base = new File(dir.getFile()).getParentFile();
list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/JettySamlTest.java b/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/JettySamlTest.java
index 9529c0f..e91c6cf 100755
--- a/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/JettySamlTest.java
+++ b/testsuite/jetty/jetty92/src/test/java/org/keycloak/testsuite/JettySamlTest.java
@@ -60,7 +60,7 @@ public class JettySamlTest {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = JettySamlTest.class.getResource("/keycloak-saml/testsaml.json");
File base = new File(dir.getFile()).getParentFile();
//list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty92/src/test/resources/keycloak-saml/testsaml.json b/testsuite/jetty/jetty92/src/test/resources/keycloak-saml/testsaml.json
index 71cde71..bc0f5ff 100755
--- a/testsuite/jetty/jetty92/src/test/resources/keycloak-saml/testsaml.json
+++ b/testsuite/jetty/jetty92/src/test/resources/keycloak-saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/Jetty9Test.java b/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/Jetty9Test.java
index f44d94b..ea7cc7d 100644
--- a/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/Jetty9Test.java
+++ b/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/Jetty9Test.java
@@ -56,7 +56,7 @@ public class Jetty9Test {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = Jetty9Test.class.getResource("/adapter-test/demorealm.json");
File base = new File(dir.getFile()).getParentFile();
list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/JettySamlTest.java b/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/JettySamlTest.java
index 9529c0f..e91c6cf 100644
--- a/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/JettySamlTest.java
+++ b/testsuite/jetty/jetty93/src/test/java/org/keycloak/testsuite/JettySamlTest.java
@@ -60,7 +60,7 @@ public class JettySamlTest {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = JettySamlTest.class.getResource("/keycloak-saml/testsaml.json");
File base = new File(dir.getFile()).getParentFile();
//list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty93/src/test/resources/keycloak-saml/testsaml.json b/testsuite/jetty/jetty93/src/test/resources/keycloak-saml/testsaml.json
index 71cde71..bc0f5ff 100644
--- a/testsuite/jetty/jetty93/src/test/resources/keycloak-saml/testsaml.json
+++ b/testsuite/jetty/jetty93/src/test/resources/keycloak-saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/Jetty9Test.java b/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/Jetty9Test.java
index f44d94b..ea7cc7d 100644
--- a/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/Jetty9Test.java
+++ b/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/Jetty9Test.java
@@ -56,7 +56,7 @@ public class Jetty9Test {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = Jetty9Test.class.getResource("/adapter-test/demorealm.json");
File base = new File(dir.getFile()).getParentFile();
list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/JettySamlTest.java b/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/JettySamlTest.java
index 9529c0f..e91c6cf 100644
--- a/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/JettySamlTest.java
+++ b/testsuite/jetty/jetty94/src/test/java/org/keycloak/testsuite/JettySamlTest.java
@@ -60,7 +60,7 @@ public class JettySamlTest {
server = new Server(8082);
List<Handler> list = new ArrayList<Handler>();
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = JettySamlTest.class.getResource("/keycloak-saml/testsaml.json");
File base = new File(dir.getFile()).getParentFile();
//list.add(new WebAppContext(new File(base, "customer-portal").toString(), "/customer-portal"));
diff --git a/testsuite/jetty/jetty94/src/test/resources/keycloak-saml/testsaml.json b/testsuite/jetty/jetty94/src/test/resources/keycloak-saml/testsaml.json
index 71cde71..bc0f5ff 100644
--- a/testsuite/jetty/jetty94/src/test/resources/keycloak-saml/testsaml.json
+++ b/testsuite/jetty/jetty94/src/test/resources/keycloak-saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/performance/tests/src/main/java/org/keycloak/gatling/MockHttpFacade.java b/testsuite/performance/tests/src/main/java/org/keycloak/gatling/MockHttpFacade.java
index 85c7e59..a03b97d 100644
--- a/testsuite/performance/tests/src/main/java/org/keycloak/gatling/MockHttpFacade.java
+++ b/testsuite/performance/tests/src/main/java/org/keycloak/gatling/MockHttpFacade.java
@@ -108,7 +108,7 @@ public class MockHttpFacade implements HttpFacade {
@Override
public String getRemoteAddr() {
- return "localhost"; // TODO
+ return "0.0.0.0"; // TODO
}
@Override
diff --git a/testsuite/performance/tests/src/test/resources/gatling.conf b/testsuite/performance/tests/src/test/resources/gatling.conf
index 6fbe38b..f837b39 100644
--- a/testsuite/performance/tests/src/test/resources/gatling.conf
+++ b/testsuite/performance/tests/src/test/resources/gatling.conf
@@ -150,7 +150,7 @@ gatling {
}
graphite {
#light = false # only send the all* stats
- #host = "localhost" # The host where the Carbon server is located
+ #host = "0.0.0.0" # The host where the Carbon server is located
#port = 2003 # The port to which the Carbon server listens to
#protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp")
#rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite
diff --git a/testsuite/proxy/src/test/resources/proxy-config.json b/testsuite/proxy/src/test/resources/proxy-config.json
index 1de7d61..19932e9 100755
--- a/testsuite/proxy/src/test/resources/proxy-config.json
+++ b/testsuite/proxy/src/test/resources/proxy-config.json
@@ -1,5 +1,5 @@
{
- "bind-address": "localhost",
+ "bind-address": "0.0.0.0",
"http-port": "8080",
"https-port": "8443",
"keystore": "classpath:ssl.jks",
diff --git a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java
index d3eadab..8312d66 100755
--- a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java
+++ b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/Tomcat7Test.java
@@ -54,7 +54,7 @@ public class Tomcat7Test {
tomcat.setPort(8082);
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = Tomcat7Test.class.getResource("/adapter-test/demorealm.json");
File base = new File(dir.getFile()).getParentFile();
tomcat.addWebapp("/customer-portal", new File(base, "customer-portal").toString());
diff --git a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
index 5b1066c..1511d1a 100755
--- a/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
+++ b/testsuite/tomcat7/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
@@ -58,7 +58,7 @@ public class TomcatSamlTest {
tomcat.setPort(8082);
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = TomcatSamlTest.class.getResource("/keycloak-saml/testsaml.json");
File base = new File(dir.getFile()).getParentFile();
tomcat.addWebapp("/sales-post", new File(base, "simple-post").toString());
diff --git a/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json b/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json
index 71cde71..bc0f5ff 100755
--- a/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json
+++ b/testsuite/tomcat7/src/test/resources/keycloak-saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
index 1324c14..6017f5d 100755
--- a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
+++ b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatSamlTest.java
@@ -55,7 +55,7 @@ public class TomcatSamlTest {
tomcat.setPort(8082);
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = TomcatSamlTest.class.getResource("/keycloak-saml/testsaml.json");
File base = new File(dir.getFile()).getParentFile();
tomcat.addWebapp("/sales-post", new File(base, "simple-post").toString());
diff --git a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java
index f684fc2..bd5868c 100755
--- a/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java
+++ b/testsuite/tomcat8/src/test/java/org/keycloak/testsuite/TomcatTest.java
@@ -54,7 +54,7 @@ public class TomcatTest {
tomcat.setPort(8082);
System.setProperty("app.server.base.url", "http://localhost:8082");
- System.setProperty("my.host.name", "localhost");
+ System.setProperty("my.host.name", "0.0.0.0");
URL dir = TomcatTest.class.getResource("/adapter-test/demorealm.json");
File base = new File(dir.getFile()).getParentFile();
tomcat.addWebapp("/customer-portal", new File(base, "customer-portal").toString());
diff --git a/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json b/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json
index 71cde71..bc0f5ff 100755
--- a/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json
+++ b/testsuite/tomcat8/src/test/resources/keycloak-saml/testsaml.json
@@ -11,7 +11,7 @@
"defaultRoles": [ "user" ],
"smtpServer": {
"from": "auto@keycloak.org",
- "host": "localhost",
+ "host": "0.0.0.0",
"port":"3025"
},
"users" : [
diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java
index 8871bfb..16243f8 100755
--- a/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java
+++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java
@@ -67,7 +67,7 @@ public class KeycloakServer {
private boolean sysout = false;
public static class KeycloakServerConfig {
- private String host = "localhost";
+ private String host = "0.0.0.0";
private int port = 8081;
private int portHttps = -1;
private int workerThreads = Math.max(Runtime.getRuntime().availableProcessors(), 2) * 8;
diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java
index 1c8fe27..a3b651a 100755
--- a/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java
+++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java
@@ -27,7 +27,7 @@ import javax.mail.internet.MimeMultipart;
public class MailServer {
public static void main(String[] args) throws Exception {
- ServerSetup setup = new ServerSetup(3025, "localhost", "smtp");
+ ServerSetup setup = new ServerSetup(3025, "0.0.0.0", "smtp");
GreenMail greenMail = new GreenMail(setup);
greenMail.start();
diff --git a/testsuite/utils/src/main/resources/META-INF/keycloak-server.json b/testsuite/utils/src/main/resources/META-INF/keycloak-server.json
index 5ed3ac1..5de49fd 100755
--- a/testsuite/utils/src/main/resources/META-INF/keycloak-server.json
+++ b/testsuite/utils/src/main/resources/META-INF/keycloak-server.json
@@ -4,7 +4,7 @@
"provider": "request",
"fixed": {
- "hostname": "localhost",
+ "hostname": "0.0.0.0",
"httpPort": "-1",
"httpsPort": "-1"
}
diff --git a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/LDAPEmbeddedServer.java b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/LDAPEmbeddedServer.java
index 619dbf2..03e8850 100644
--- a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/LDAPEmbeddedServer.java
+++ b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/LDAPEmbeddedServer.java
@@ -58,7 +58,7 @@ public class LDAPEmbeddedServer {
public static final String PROPERTY_DSF = "ldap.dsf";
private static final String DEFAULT_BASE_DN = "dc=keycloak,dc=org";
- private static final String DEFAULT_BIND_HOST = "localhost";
+ private static final String DEFAULT_BIND_HOST = "0.0.0.0";
private static final String DEFAULT_BIND_PORT = "10389";
private static final String DEFAULT_BIND_LDAPS_PORT = "10636";
private static final String DEFAULT_LDIF_FILE = "classpath:ldap/default-users.ldif";
diff --git a/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties b/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
index 23f862b..4f4ce18 100644
--- a/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
+++ b/wildfly/server-subsystem/src/main/config/default-server-subsys-config.properties
@@ -81,7 +81,7 @@ keycloak.server.subsys.default.config=\
<default-provider>request</default-provider>\
<provider name="fixed" enabled="true">\
<properties>\
- <property name="hostname" value="localhost"/>\
+ <property name="hostname" value="0.0.0.0"/>\
<property name="httpPort" value="-1"/>\
<property name="httpsPort" value="-1"/>\
</properties>\
diff --git a/wildfly/server-subsystem/src/main/resources/cli/default-keycloak-subsys-config.cli b/wildfly/server-subsystem/src/main/resources/cli/default-keycloak-subsys-config.cli
index 6e14be6..17f707d 100644
--- a/wildfly/server-subsystem/src/main/resources/cli/default-keycloak-subsys-config.cli
+++ b/wildfly/server-subsystem/src/main/resources/cli/default-keycloak-subsys-config.cli
@@ -1,7 +1,7 @@
/subsystem=keycloak-server:add(web-context=auth,master-realm-name=master,scheduled-task-interval=900)
/subsystem=keycloak-server/theme=defaults/:add(dir=${jboss.home.dir}/themes,staticMaxAge=2592000,cacheTemplates=true,cacheThemes=true)
/subsystem=keycloak-server/spi=hostname/:add(default-provider=request)
-/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "localhost",httpPort => "-1",httpsPort => "-1"},enabled=true)
+/subsystem=keycloak-server/spi=hostname/provider=fixed/:add(properties={hostname => "0.0.0.0",httpPort => "-1",httpsPort => "-1"},enabled=true)
/subsystem=keycloak-server/spi=eventsStore/:add
/subsystem=keycloak-server/spi=eventsStore/provider=jpa/:add(properties={exclude-events => "[\"REFRESH_TOKEN\"]"},enabled=true)
/subsystem=keycloak-server/spi=userCache/:add
diff --git a/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-undertow.xml b/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-undertow.xml
index ed1ab25..bdc78f2 100644
--- a/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-undertow.xml
+++ b/wildfly/server-subsystem/src/main/resources/subsystem-templates/keycloak-undertow.xml
@@ -30,7 +30,7 @@
<?AJP?>
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
- <host name="default-host" alias="localhost">
+ <host name="default-host" alias="0.0.0.0">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>