Overview

This document outlines the authentication and session management architecture for the Party Registration application. The system is designed to provide Single Sign-On (SSO) for university members (students, staff, and admins) via SAML and a separate, credential-based login for police. All authenticated sessions are managed by a two-token model (Access and Refresh tokens).

Authentication Flows

The system supports two initial authentication methods. Upon successful authentication by either method, the flow merges into the unified two token system.

University Member Authentication: SAML SSO

The login process for all university members (students, staff, and admins) uses the university's SAML Identity Provider (IdP) as the source of truth for identity.

SAML Assertion Attributes

The university's IdP provides the following attributes in the SAML assertion. Of the available attributes, the system consumes first name, last name, Onyen, PID, and email.

Description HTTP Header Variable LDAP Variable Consumed
First Name HTTP_GIVENNAME givenName
Preferred First Name HTTP_EDUPERSONNICKNAME eduPersonNickname
Last Name HTTP_SN sn
Preferred Last Name HTTP_UNCPREFERREDSURNAME uncPreferredSurname
Display Full Name HTTP_DISPLAYNAME displayName
Onyen HTTP_UID uid
PID HTTP_PID pid
Email HTTP_MAIL mail
Host HTTP_HOST host
Affiliation HTTP_AFFILIATION affiliation

The affiliation attribute was considered for automatically mapping users to student, staff, or admin roles, but was excluded because some users hold dual student-staff roles. Role assignment is instead managed within the application itself.

Staff/Admin Invitation Flow

Staff and admin accounts are provisioned through an invite-based flow rather than being pre-seeded by an admin.