Introduction
Overview
Most BC Government teams integrate with the SSO service through the Standard Realm — a shared Keycloak realm operated and maintained by the SSO team, where clients are provisioned automatically via the CSS. This is the recommended path for the vast majority of applications.
A Custom Realm is an alternative for teams whose requirements cannot be met within the Standard Realm. With a Custom Realm, your team has full control over the realm configuration — but also takes on full responsibility for operating it. This is a significant long-term commitment and should not be undertaken lightly.
What you'll learn:
- The difference between the Standard Realm and a Custom Realm
- What your team is responsible for when operating a Custom Realm
- Guidelines for governance, privacy, and technical configuration
- Best practices and common pitfalls to avoid
Standard Realm vs. Custom Realm
Standard Realm — SSO Team Configures It for You
The Standard Realm is the default service tier. When you submit an integration request through the CSS, a client is automatically provisioned in the Standard Realm on your behalf. You do not need to manage realm-level configuration.
What the SSO team provides:
- Self-registration — fully self-serve onboarding via the CSS with no manual steps required.
- Fast environment access — DEV and TEST environments are typically available within minutes.
- Continuous improvement — the SSO team actively maintains the realm, applies security patches, and improves configuration over time.
- Secure defaults — session timeouts, token lifespans, and security settings are pre-configured to align with BC Government security standards.
- Architecture best practices — the realm is structured to support shared-tenancy, with each client isolated within its own credentials and redirect URIs.
- Developer support — the SSO team is available via Microsoft Teams and email to help with integration questions.
- 24/7 site reliability monitoring — the platform is monitored continuously for availability and performance issues.
Custom Realm — Your Team Configures and Operates It
A Custom Realm gives your team direct access to Keycloak's realm-level configuration. This is appropriate for teams that need advanced customisation — for example, specific IDP federation requirements, custom mappers, or governance structures that cannot be expressed within the Standard Realm's shared model.
Important: Before requesting a Custom Realm, discuss your requirements with the SSO team. In many cases, your needs can be met within the Standard Realm without taking on the operational overhead of managing your own realm.
Your team's responsibilities include:
- Governance model — establishing clear policies for who can make configuration changes, how changes are reviewed and approved, and how access to the realm is managed over time.
- Infrastructure-as-code — writing and maintaining the infrastructure code used to promote realm configuration changes across dev, test, and production environments consistently and auditably.
- Access management — deciding which teams and individuals have access to the realm and at what level, and handling access changes as teams grow, shrink, or move between ministries.
- Ministry migration — managing the migration of project teams if they move between ministries, including updating identity federation and access controls accordingly.
- Long-term DevOps and technical support — ensuring there is always someone with the knowledge and capacity to support the realm. The SSO team does not provide operational support for Custom Realm configuration decisions.
Custom Service Guidelines
If you operate a Custom Realm, the following guidelines help ensure the realm is configured safely, privately, and in a way that is maintainable over time.
Privacy and Governance
- Understand your privacy obligations — everyone involved in operating the realm must understand which user identifiers, authorisations, and personal attributes are stored or processed, and the associated privacy implications.
- Review before sharing — if you intend to share the realm across multiple teams or ministries, you must first review the applicable STRA (Security Threat and Risk Assessment), PIA (Privacy Impact Assessment), and any relevant legislation or policy. Sharing a realm without this review creates privacy and security risk.
Configuration Principles
- Minimise log retention — Keycloak logs can contain sensitive user information. Ensure logs are either not stored, or stored only for the shortest period required and with appropriate access controls.