Attendee User

In this lesson, we'll expand our Keycloak configuration by adding an attendee user and corresponding roles.

Adding the Attendee User

Creating a new user in Keycloak involves setting up basic user information and credentials.

Let's create a new attendee user with these steps:

  1. Navigate to the Keycloak Admin Console at localhost:1990
  2. Select the "event-ticket-platform" realm
  3. Go to Users and click "Add User"
  4. Fill in the following details:
    • Username: attendee
    • Email: attendee@yourdomain.com
    • First Name: attendee
    • Last Name: user

After creating the user, we need to set up their password:

  1. Go to the Credentials tab
  2. Set the password as "password" (Note: This is for development only)
  3. Disable the "Temporary" option to prevent password reset requirements

Creating and Assigning Roles

Roles in Keycloak help us manage user permissions effectively.

We'll create two roles:

ROLE_ATTENDEE // For regular event attendees ROLE_ORGANIZER // For event organizers

To create these roles:

  1. Navigate to Realm Roles
  2. Click "Create Role"
  3. Enter ROLE_ATTENDEE for the first role
  4. Repeat the process with ROLE_ORGANIZER

Next, we'll assign these roles:

  1. For the attendee user:

    • Go to Users → attendee → Role Mapping
    • Click "Assign Role"
    • Select ROLE_ATTENDEE
  2. For the organizer user:

    • Go to Users → organizer → Role Mapping
    • Click "Assign Role"
    • Select ROLE_ORGANIZER

Summary

  • Added the attendee user to Keycloak
  • Added the ROLE_ATTENDEE role to Keycloak
  • Added the ROLE_ORGANIZER role to Keycloak
© 2026 Devtiro Ltd. All rights reserved