Add documentation and logging for the default admin account in test suite

This commit is contained in:
Zed Spencer-Milnes 2018-09-10 20:04:49 +01:00 committed by Marek Posolda
parent 340c8e8426
commit eda09d2b32
3 changed files with 12 additions and 0 deletions

View file

@ -44,6 +44,7 @@ To start Keycloak during development first build as specified above, then run:
mvn -f testsuite/utils/pom.xml exec:java -Pkeycloak-server mvn -f testsuite/utils/pom.xml exec:java -Pkeycloak-server
When running testsuite, by default an account with username `admin` and password `admin` will be created within the master realm at start.
To start Keycloak from the server distribution first build the distribution it as specified above, then run: To start Keycloak from the server distribution first build the distribution it as specified above, then run:

View file

@ -42,6 +42,16 @@ and https port, optionally setting the truststore.
-Djavax.net.ssl.keyStorePassword=CHANGEME \ -Djavax.net.ssl.keyStorePassword=CHANGEME \
-Dkeycloak.port.https=8443 -Dkeycloak.port.https=8443
### Default admin account
The default admin within the master realm are created with credentials:
* Username: `admin`
* Password: `admin`
The Keycloak test suite server will automatically create the new master realm user when the following conditions are met
* Property `keycloak.createAdminUser` is set to `true` (defaults to `true` if not present)
* There is no existing user within the master realm
### Live edit of html and styles ### Live edit of html and styles
The Keycloak test server can load resources directly from the filesystem instead of the classpath. This allows editing html, styles and updating images without restarting the server. To make the server use resources from the filesystem start with: The Keycloak test server can load resources directly from the filesystem instead of the classpath. This allows editing html, styles and updating images without restarting the server. To make the server use resources from the filesystem start with:

View file

@ -359,6 +359,7 @@ public class KeycloakServer {
session.getTransactionManager().begin(); session.getTransactionManager().begin();
if (new ApplianceBootstrap(session).isNoMasterUser()) { if (new ApplianceBootstrap(session).isNoMasterUser()) {
new ApplianceBootstrap(session).createMasterRealmUser("admin", "admin"); new ApplianceBootstrap(session).createMasterRealmUser("admin", "admin");
log.info("Created master user with credentials admin:admin");
} }
session.getTransactionManager().commit(); session.getTransactionManager().commit();
} finally { } finally {