이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 1. Getting started


1.1. Before you start

Make sure your machine or container platform can provide sufficient memory and CPU for your desired usage of Red Hat build of Keycloak. See Concepts for sizing CPU and memory resources for more on how to get started with production sizing.

Make sure you have OpenJDK 21 installed.

1.2. Download Red Hat build of Keycloak

Download Red Hat build of Keycloak from the Red Hat website and extract it.

After extracting this file, you should have a directory that is named rhbk-26.0.6.

1.3. Start Red Hat build of Keycloak

  1. From a terminal, open the rhbk-26.0.6 directory.
  2. Enter the following command:

    • On Linux, run:

      bin/kc.sh start-dev
    • On Windows, run:

      bin\kc.bat start-dev

Using the start-dev option, you are starting Red Hat build of Keycloak in development mode. In this mode, you can try out Red Hat build of Keycloak for the first time to get it up and running quickly. This mode offers convenient defaults for developers, such as for developing a new Red Hat build of Keycloak theme.

1.4. Create an admin user

Red Hat build of Keycloak has no default admin user. You need to create an admin user before you can start Keycloak.

  1. Open http://localhost:8080/.
  2. Fill in the form with your preferred username and password.

1.5. Log in to the Admin Console

  1. Go to the Red Hat build of Keycloak Admin Console.
  2. Log in with the username and password you created earlier.

1.6. Create a realm

A realm in Red Hat build of Keycloak is equivalent to a tenant. Each realm allows an administrator to create isolated groups of applications and users. Initially, Red Hat build of Keycloak includes a single realm, called master. Use this realm only for managing Red Hat build of Keycloak and not for managing any applications.

Use these steps to create the first realm.

  1. Open the Red Hat build of Keycloak Admin Console.
  2. Click Red Hat build of Keycloak next to master realm, then click Create Realm.
  3. Enter myrealm in the Realm name field.
  4. Click Create.
Add realm

1.7. Create a user

Initially, the realm has no users. Use these steps to create a user:

  1. Verify that you are still in the myrealm realm, which is shown above the word Manage.
  2. Click Users in the left-hand menu.
  3. Click Create new user.
  4. Fill in the form with the following values:

    • Username: myuser
    • First name: any first name
    • Last name: any last name
  5. Click Create.
Create user

This user needs a password to log in. To set the initial password:

  1. Click Credentials at the top of the page.
  2. Fill in the Set password form with a password.
  3. Toggle Temporary to Off so that the user does not need to update this password at the first login.
Set password

1.8. Log in to the Account Console

You can now log in to the Account Console to verify this user is configured correctly.

  1. Open the Red Hat build of Keycloak Account Console.
  2. Log in with myuser and the password you created earlier.

As a user in the Account Console, you can manage your account including modifying your profile, adding two-factor authentication, and including identity provider accounts.

Red Hat build of Keycloak Account Console

1.9. Secure the first application

To secure the first application, you start by registering the application with your Red Hat build of Keycloak instance:

  1. Open the Red Hat build of Keycloak Admin Console.
  2. Click the word master in the top-left corner, then click myrealm.
  3. Click Clients.
  4. Click Create client
  5. Fill in the form with the following values:

    • Client type: OpenID Connect
    • Client ID: myclient

      Add Client
  6. Click Next
  7. Confirm that Standard flow is enabled.
  8. Click Next.
  9. Make these changes under Login settings.

    • Set Valid redirect URIs to https://www.keycloak.org/app/*
    • Set Web origins to https://www.keycloak.org
  10. Click Save.
Update Client

To confirm the client was created successfully, you can use the SPA testing application on the Keycloak website.

  1. Open https://www.keycloak.org/app/.
  2. Click Save to use the default configuration.
  3. Click Sign in to authenticate to this application using the Red Hat build of Keycloak server you started earlier.

1.10. Taking the next step

Before you run Red Hat build of Keycloak in production, consider the following actions:

  • Switch to a production ready database such as PostgreSQL.
  • Configure SSL with your own certificates.
  • Switch the admin password to a more secure password.

For more information, see the Server Configuration Guide.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.