Skip to main content

Configuration

This document outlines Science Island's specific Keycloak configuration, including realm settings, security policies, and client setup. The configuration is managed through the science-island.json realm file.

Realm Overview

Science Island uses a dedicated realm with the following core settings:

SettingValueDescription
Realm namescience-islandInternal identifier for the realm.
Display nameScience Island LoginUser-facing name displayed on login screens.
Require SSLExternal requestsSSL required for external requests.
Keycloak version26.1.4The version of Keycloak currently deployed.

Login Configuration

User registration is not currently handled through Keycloak. Student registration occurs through the main Science Island website, while all other users (teachers, administrators, etc.) are preconfigured. Additionally, email settings have not been configured for the realm, so features that depend on email functionality have been disabled as they are not part of the current authentication workflow.

Login Screen Customization

SettingValueDescription
User registrationfalseKeycloak user registration is disabled.
Forgot passwordfalsePassword reset functionality is disabled.
Remember mefalseRemember me functionality is disabled.

Email Settings

SettingValueDescription
Email as usernametrueEmail addresses are used as usernames during registration.
Login with emailtrueUsers can log in using their email address.
Duplicate emailsfalseEach email address can only be associated with one account.
Verify emailfalseEmail verification is not required upon registration.

User Info Settings

SettingValueDescription
Edit usernamefalseUsernames cannot be changed after account creation.

Client Applications

Science Island uses three client applications that integrate with Keycloak for authentication. Each client represents a production application.

ApplicationClient IDNameWeb originsValid redirect URIs
Science Island Websitescienceisland.comScience Island Clienthttps://scienceisland.comhttps://scienceisland.com/*
Teacher's Portalplatform.scienceisland.comTeachers Portal Clienthttps://platform.scienceisland.comhttps://platform.scienceisland.com/*
Curriculum Mappermapper.scienceisland.comCurriculum Mapper Clienthttps://mapper.scienceisland.comhttps://mapper.scienceisland.com/*

Authentication Configuration

All Science Island clients share the following authentication settings:

SettingValueDescription
Client typeOpenID ConnectAuthentication protocol used by all clients.
Client authenticationPublicClients do not require a secret for authentication.
Standard flowEnabledBrowser-based authentication flow (authorization code flow).
Direct access grantsEnabledAllows username/password authentication via direct API calls.

Roles

Roles are not currently being utilized in Keycloak. Science Island has a separate role system independent of Keycloak, which is what is currently being used for authorization and access control.


Email Configuration

Email settings are not currently configured for the Science Island realm. Once configured, email functionality will enable features such as email verification and password resets.

To set up email, refer to the Realms documentation for detailed instructions on connecting to an SMTP server.


Deployment

Local Development

The three Science Island applications use the si-auth-service Keycloak image for local development. Since this image is configured with a production-ready realm file, each service imports its own realm file specifically for local development.

Local Realm File Locations:

ApplicationRepositoryRealm File Location
Science Island WebsiteScienceIslandWebsiteWebsite/local_dev
The Teacher's PortalPlatformclient/local_dev
The Curriculum MapperMapping-System-2022S2src/keycloak

Live Environment

Keycloak's database currently resides on the GCP Virtual Machine. Each time the VM restarts, the database is recreated and the science-island.json realm file is redeployed from scratch. This means any user accounts created after the initial deployment are lost upon restart.

Ideally the Keycloak database should be exist in a persistent data storage solution. With persistent storage in place, the realm file would only need to be imported during initial setup, and ongoing realm configuration changes could be made directly through the Keycloak Admin Console without risk of data loss.