100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Reset default admin password to something more sane
Christian Bauere76f79a4338a
diff --git a/README.md b/README.mdindex 8c952b6a4..ae86843b0 100644--- a/README.md+++ b/README.md@@ -26,7 +26,7 @@ docker-compose -p openremote \up```-Access the manager UI and API on http://192.168.99.100:8080/ with username `admin` and password `CHANGE_ME_ADMIN_PASSWORD`.+Access the manager UI and API on http://192.168.99.100:8080/ with username `admin` and password `secret`.For more information and how to set up a development environment, see the [Developer Guide](https://github.com/openremote/openremote/wiki).diff --git a/gradle.properties b/gradle.propertiesindex b3be0c371..3a0f56d67 100644--- a/gradle.properties+++ b/gradle.properties@@ -12,14 +12,14 @@ slf4jVersion = 1.7.10rxjavaVersion = 1.1.1guavaVersion = 19.0undertowVersion = 1.3.23.Final-# TODO 3.0.20.Final breaks Keycloak authentication!+# TODO https://issues.jboss.org/browse/RESTEASY-1599resteasyVersion = 3.0.19.FinalkeycloakVersion = 2.1.0.FinalgwtVersion = 2.8.0ginVersion = 2.1.2cglibVersion = 3.2.0gwtJacksonVersion = 0.14.1-jacksonVersion = 2.7.3+jacksonVersion = 2.7.4groovyVersion = 2.4.1sqliteVersion = 3.8.11.2hibernateVersion = 5.2.2.Finaldiff --git a/manager/client/src/main/webapp/js/loader.js b/manager/client/src/main/webapp/js/loader.jsindex 8aa38cd34..af4901a71 100644--- a/manager/client/src/main/webapp/js/loader.js+++ b/manager/client/src/main/webapp/js/loader.js@@ -46,6 +46,7 @@ window.checkLogoutRedirect = function(pathname) {// the /auth path (this is how we detect a redirect after session timeout), we logout// the parent window and go to the start page of the realmif (pathname.endsWith('/auth')) {+ console.log("Session timeout detected (iframe redirected to /auth), triggering Keycloak logout");var options = {redirectUri: "/" + keycloak.realm};keycloak.logout(options);}diff --git a/manager/server/src/main/java/org/openremote/manager/server/DemoDataService.java b/manager/server/src/main/java/org/openremote/manager/server/DemoDataService.javaindex eda94de24..ad2c3bd29 100644--- a/manager/server/src/main/java/org/openremote/manager/server/DemoDataService.java+++ b/manager/server/src/main/java/org/openremote/manager/server/DemoDataService.java@@ -59,22 +59,12 @@ public class DemoDataService implements ContainerService {private static final Logger LOG = Logger.getLogger(DemoDataService.class.getName());- public static final String IMPORT_DEMO_DATA = "IMPORT_DEMO_DATA";- public static final boolean IMPORT_DEMO_DATA_DEFAULT = false;-- public static final String DEMO_CONTROLLER_HOST = "DEMO_CONTROLLER_HOST";- public static final String DEMO_CONTROLLER_HOST_DEFAULT = "192.168.99.100";- public static final String DEMO_CONTROLLER_PORT = "DEMO_CONTROLLER_PORT";- public static final int DEMO_CONTROLLER_PORT_DEFAULT = 8083;- public static final String DEMO_CONTROLLER_USERNAME = "DEMO_CONTROLLER_USERNAME";- public static final String DEMO_CONTROLLER_USERNAME_DEFAULT = "";- public static final String DEMO_CONTROLLER_PASSWORD = "DEMO_CONTROLLER_PASSWORD";- public static final String DEMO_CONTROLLER_PASSWORD_DEFAULT = "";- public static final String DEMO_CONTROLLER_SECURE = "DEMO_CONTROLLER_SECURE";- public static final boolean DEMO_CONTROLLER_SECURE_DEFAULT = false;-public static final String ADMIN_CLI_CLIENT_ID = "admin-cli";- public static final String ADMIN_PASSWORD = "CHANGE_ME_ADMIN_PASSWORD";++ public static final String DEMO_IMPORT_DATA = "DEMO_IMPORT_DATA";+ public static final boolean DEMO_IMPORT_DATA_DEFAULT = false;+ public static final String DEMO_ADMIN_PASSWORD = "DEMO_ADMIN_PASSWORD";+ public static final String DEMO_ADMIN_PASSWORD_DEFAULT = "secret";public static String DEMO_AGENT_ID = null;public static String DEMO_THING_ID = null;@@ -94,22 +84,18 @@ public class DemoDataService implements ContainerService {assetService = container.getService(AssetService.class);}- @Override- public void configure(Container container) throws Exception {-- }-@Overridepublic void start(Container container) {- if (!container.isDevMode() && !getBoolean(container.getConfig(), IMPORT_DEMO_DATA, IMPORT_DEMO_DATA_DEFAULT)) {+ if (!container.isDevMode() && !getBoolean(container.getConfig(), DEMO_IMPORT_DATA, DEMO_IMPORT_DATA_DEFAULT)) {return;}LOG.info("--- IMPORTING DEMO DATA ---");// Use a non-proxy client to get the access token+ String demoAdminPassword = container.getConfig().getOrDefault(DEMO_ADMIN_PASSWORD, DEMO_ADMIN_PASSWORD_DEFAULT);String accessToken = identityService.getKeycloak().getAccessToken(- MASTER_REALM, new AuthForm(ADMIN_CLI_CLIENT_ID, MASTER_REALM_ADMIN_USER, ADMIN_PASSWORD)+ MASTER_REALM, new AuthForm(ADMIN_CLI_CLIENT_ID, MASTER_REALM_ADMIN_USER, demoAdminPassword)).getToken();try {diff --git a/profile/dependencies/keycloak.yml b/profile/dependencies/keycloak.ymlindex 36ff801cd..7d6bba17b 100644--- a/profile/dependencies/keycloak.yml+++ b/profile/dependencies/keycloak.yml@@ -18,7 +18,7 @@ services:# that imported demo data uses the admin account and also creates a 'test' user with# password 'test'. Importing will be broken if you change the password only here.# Demo data should not be imported in production.- KEYCLOAK_PASSWORD: CHANGE_ME_ADMIN_PASSWORD+ KEYCLOAK_PASSWORD: secret# Configure how Keycloak connects to the databasePOSTGRES_DATABASE: openremotediff --git a/profile/dependencies/keycloak_dev.yml b/profile/dependencies/keycloak_dev.ymlindex 4b6adeaee..ca1070104 100644--- a/profile/dependencies/keycloak_dev.yml+++ b/profile/dependencies/keycloak_dev.yml@@ -13,7 +13,7 @@ services:environment:TZ: "Europe/Zurich"KEYCLOAK_USER: admin- KEYCLOAK_PASSWORD: CHANGE_ME_ADMIN_PASSWORD+ KEYCLOAK_PASSWORD: secretKEYCLOAK_LOGLEVEL: DEBUGPOSTGRES_DATABASE: openremotePOSTGRES_USER: openremotediff --git a/profile/manager.yml b/profile/manager.ymlindex b5e9b51ed..4c3ca6244 100644--- a/profile/manager.yml+++ b/profile/manager.yml@@ -40,7 +40,7 @@ services:# database (the default), you might want to work with some automatically imported# demo data. The importer uses the Keycloak admin-cli user and the given password.DEMO_IMPORT_DATA: 'true'- DEMO_ADMIN_PASSWORD: CHANGE_ME_ADMIN_PASSWORD+ DEMO_ADMIN_PASSWORD: secret# The service-internal interface and port to listen on. This should not be changed.WEBSERVER_LISTEN_HOST: 0.0.0.0