Skip to content

Commit

Permalink
Update the welcome page to create a temporary admin user (keycloak#32283
Browse files Browse the repository at this point in the history
)

Closes keycloak#30010

Signed-off-by: Martin Bartoš <[email protected]>
Co-authored-by: Stan Silvert <[email protected]>
  • Loading branch information
mabartos and ssilvert authored Sep 3, 2024
1 parent b13d6b4 commit db7694e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public class WelcomePage extends AuthServer {
private WebElement welcomeMessage;

public boolean isPasswordSet() {
return !(driver.getPageSource().contains("Please create an initial admin user to get started.") ||
driver.getPageSource().contains("You need local access to create the initial admin user.") ||
driver.getPageSource().contains("To get started with Keycloak, you first create an administrative user."));
return !(driver.getPageSource().contains("Create a temporary administrative user") ||
driver.getPageSource().contains("You will need local access to create the temporary administrative user.") ||
driver.getPageSource().contains("you first create a temporary administrative user. Later, to harden security, create a new permanent administrative user"));
}

public void setPassword(String username, String password) {
Expand Down
8 changes: 4 additions & 4 deletions themes/src/main/resources/theme/keycloak/welcome/index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
<main class="pf-v5-c-login__main">
<header class="pf-v5-c-login__main-header">
<#if localUser>
<h1 class="pf-v5-c-title pf-m-3xl">Create an administrative user</h1>
<h1 class="pf-v5-c-title pf-m-2xl">Create a temporary administrative user</h1>
<#if !successMessage?has_content>
<p class="pf-v5-c-login__main-header-desc">To get started with ${productName}, you first create an administrative user.</p>
<p class="pf-v5-c-login__main-header-desc">To get started with ${productName}, you first create a temporary administrative user. Later, to harden security, create a new permanent administrative user and delete the temporary user that was created during this setup.</p>
</#if>
<#else>
<h1 class="pf-v5-c-title pf-m-3xl">Local access required</h1>
<p class="pf-v5-c-login__main-header-desc">You will need local access to create the administrative user.</p>
<p class="pf-v5-c-login__main-header-desc">You will need local access to create the temporary administrative user.</p>
</#if>
</header>
<div class="pf-v5-c-login__main-body">
Expand Down Expand Up @@ -110,7 +110,7 @@
</div>
</form>
<#else>
<p>To create the administrative user open <a href="${localAdminUrl}">${localAdminUrl}</a>, or set the environment variables <code>KC_BOOTSTRAP_ADMIN_USERNAME</code> and <code>KC_BOOTSTRAP_ADMIN_PASSWORD</code> when starting the server.</p>
<p>To create the temporary administrative user open <a href="${localAdminUrl}">${localAdminUrl}</a>, or set the environment variables <code>KC_BOOTSTRAP_ADMIN_USERNAME</code> and <code>KC_BOOTSTRAP_ADMIN_PASSWORD</code> when starting the server.</p>
</#if>
</#if>
</div>
Expand Down

0 comments on commit db7694e

Please sign in to comment.