Add ChulaSSO 2.0 login (uni-gated)#1
Merged
Merged
Conversation
ChulaSSO is Chulalongkorn University's SSO — a custom ticket flow, NOT OIDC, so Kutt's built-in OIDC can't talk to it. This adds a native integration: - GET /login/chulasso/start -> redirect to ChulaSSO with our callback as `service` - GET /login/chulasso -> validate the returned ticket via POST /serviceValidation (DeeAppId/DeeAppSecret/DeeTicket), then find-or-create a verified user and issue the Kutt session (mirrors the OIDC handler). - Optional CHULASSO_ALLOWED_ROLES gate (e.g. student,faculty); empty = any Chula account. - "Login with ChulaSSO" button on the login page; login_disabled exempts ChulaSSO. - New CHULASSO_* env, documented in .example.env. Pure role-check helper + unit test. CI: build/push ghcr.io/isd-sgcu/kutt; drop the upstream Docker Hub workflows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nk, logo) Adds custom/ overrides: dark :root palette + ISD pink primary, Space Grotesk + Anuphan fonts (Google Fonts), dark form fields/tables/modals, ISD logo + header override. Matches the isd.sgcu.in.th visual identity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RawSalmon69
added a commit
that referenced
this pull request
Jun 25, 2026
* feat(auth): add ChulaSSO 2.0 login (uni-gated) ChulaSSO is Chulalongkorn University's SSO — a custom ticket flow, NOT OIDC, so Kutt's built-in OIDC can't talk to it. This adds a native integration: - GET /login/chulasso/start -> redirect to ChulaSSO with our callback as `service` - GET /login/chulasso -> validate the returned ticket via POST /serviceValidation (DeeAppId/DeeAppSecret/DeeTicket), then find-or-create a verified user and issue the Kutt session (mirrors the OIDC handler). - Optional CHULASSO_ALLOWED_ROLES gate (e.g. student,faculty); empty = any Chula account. - "Login with ChulaSSO" button on the login page; login_disabled exempts ChulaSSO. - New CHULASSO_* env, documented in .example.env. Pure role-check helper + unit test. CI: build/push ghcr.io/isd-sgcu/kutt; drop the upstream Docker Hub workflows. * feat(ui): SGCU/ISD brand theme (dark, Space Grotesk + Anuphan, ISD pink, logo) Adds custom/ overrides: dark :root palette + ISD pink primary, Space Grotesk + Anuphan fonts (Google Fonts), dark form fields/tables/modals, ISD logo + header override. Matches the isd.sgcu.in.th visual identity. --------- Co-authored-by: RawSalmon69 <worached.ink@dappmaker.co.th> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RawSalmon69
added a commit
that referenced
this pull request
Jun 25, 2026
* feat(auth): add ChulaSSO 2.0 login (uni-gated) ChulaSSO is Chulalongkorn University's SSO — a custom ticket flow, NOT OIDC, so Kutt's built-in OIDC can't talk to it. This adds a native integration: - GET /login/chulasso/start -> redirect to ChulaSSO with our callback as `service` - GET /login/chulasso -> validate the returned ticket via POST /serviceValidation (DeeAppId/DeeAppSecret/DeeTicket), then find-or-create a verified user and issue the Kutt session (mirrors the OIDC handler). - Optional CHULASSO_ALLOWED_ROLES gate (e.g. student,faculty); empty = any Chula account. - "Login with ChulaSSO" button on the login page; login_disabled exempts ChulaSSO. - New CHULASSO_* env, documented in .example.env. Pure role-check helper + unit test. CI: build/push ghcr.io/isd-sgcu/kutt; drop the upstream Docker Hub workflows. * feat(ui): SGCU/ISD brand theme (dark, Space Grotesk + Anuphan, ISD pink, logo) Adds custom/ overrides: dark :root palette + ISD pink primary, Space Grotesk + Anuphan fonts (Google Fonts), dark form fields/tables/modals, ISD logo + header override. Matches the isd.sgcu.in.th visual identity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds ChulaSSO 2.0 authentication so login can be gated to Chulalongkorn University accounts.
ChulaSSO is a custom ticket flow, not OIDC (
/login→?ticket=→POST /serviceValidationwithDeeAppId/DeeAppSecret/DeeTicket→ JSON profile), so Kutt's built-in OIDC can't use it. This is a native integration modelled on the existing OIDC handler.Flow
GET /login/chulasso/start→ redirect browser to{CHULASSO_BASE}/login?service={site}/login/chulasso&app_id=…GET /login/chulasso→ validate the ticket server-side, then find-or-create a verified user by email and issue the normal Kutt session cookie.CHULASSO_ALLOWED_ROLES(e.g.student,faculty) — empty = any authenticated Chula account.login_disablednow exempts ChulaSSO.Config (new env, see
.example.env)CHULASSO_ENABLED,CHULASSO_BASE,CHULASSO_APP_ID,CHULASSO_APP_SECRET,CHULASSO_ALLOWED_ROLES,CHULASSO_SERVICE_NAME.Register
https://chula.me/(andhttps://link.sgcu.in.th/) as allowed Service URL prefixes in the ChulaSSO app; callback is{DEFAULT_DOMAIN}/login/chulasso.Tests
node server/handlers/chulasso.util.test.js— pure role-gate logic (empty=allow-all, intersection, case/whitespace). Passing.CI
Adds
.github/workflows/ghcr-isd.yaml→ builds/pushesghcr.io/isd-sgcu/kutt. Removes the 3 upstream Docker Hub workflows (wrong registry for this fork). Enable Actions on this fork for it to run.Not in this PR (deploy-time)
chula.meis Active in Cloudflare.ghcr.io/isd-sgcu/kutt,DEFAULT_DOMAIN=chula.me,CHULASSO_ENABLED=true,DISALLOW_LOGIN_FORM=true, anon off; sealCHULASSO_APP_SECRET.custom/,SITE_NAME) — follow-up.🤖 Generated with Claude Code