• Web server: OpenID Connect provider, so GitLab and other hosts can use

    From Rob Swindell@VERT to GitLab issue in main/sbbs on Tue Nov 24 19:59:09 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1425
    2026-11-24 19:59:09 -0800

    ## Summary

    Let the Web Server act as an OpenID Connect (OIDC) identity provider, built on the server-owned browser session proposed in #1398, so that web applications the Synchronet Web Server does **not** serve can use a Synchronet sign-in. The first target is the GitLab web UI (gitlab.synchro.net on Vertrauen); the same endpoints would also serve DokuWiki, SWAG/SPAM and applications on other host names.

    ## Why #1398 alone does not reach GitLab

    #1398 makes the session available to what the Web Server itself serves: static files, file areas, server-side JavaScript, and CGI programs through `REMOTE_USER`. GitLab is outside that:

    - It runs behind its own bundled nginx, on a different host name (and, on Vertrauen, a different IP address), so its requests never pass through the Synchronet Web Server.
    - It has no trusted-header sign-in (no `REMOTE_USER` equivalent). A forward-auth check in front of its nginx (`auth_request`) could only block requests; it could not sign a user in to GitLab.
    - The ways it accepts an outside sign-in are LDAP, SAML and OmniAuth providers such as OpenID Connect. LDAP would need an LDAP server in Synchronet and would only check the same password a second time, not give one sign-in. OIDC is the closest fit.

    ## Proposal

    Add OIDC provider endpoints to the Web Server, next to the #1398 sign-in and sign-out pages:

    - discovery: `/.well-known/openid-configuration`
    - authorization endpoint (authorization code flow, with PKCE)
    - token endpoint
    - userinfo endpoint
    - signing keys (JWKS), if ID tokens are signed with RS256 or ES256

    At the authorization endpoint, a request with a valid #1398 session cookie is answered at once with a redirect back to the application; without one, the user is sent to the server's sign-in page and returned afterwards. So a user already signed in to the BBS web site signs in to GitLab with one click and no password, and `omniauth_auto_sign_in_with_provider` on the GitLab side can remove even that click.

    This is the "sign-in hand-off between hosts by redirect" option from the "Host names" question in #1398, in a standard form. It may also answer that question for DokuWiki on wiki.synchro.net (through a DokuWiki OIDC plugin, as an alternative to `REMOTE_USER`), without a parent-domain cookie.

    ### Claims

    - `sub`: a stable identifier that survives an alias change (the user number, or a value derived from it; not the alias).
    - `preferred_username` / `name`: the alias and real name, normalized as in #1398 for DokuWiki.
    - `email` and `email_verified`: see "Account linking" below.
    - Optionally, groups from security level or flags, as the `authsbbs` DokuWiki plugin derives `admin`, `readonly` and `guest` now.

    ### Client registry

    Each application is registered by the sysop: client ID, client secret, allowed redirect URIs, and optionally an access requirement string (ARS) a user must meet to sign in to that client. Configured in a `ctrl/` file and SCFG. The authorization endpoint accepts only exact registered redirect URIs.

    ## GitLab side

    An `openid_connect` entry in `gitlab_rails['omniauth_providers']` in `gitlab.rb`, pointing at the discovery URL, with the client ID and secret.

    - `after_sign_out_path` set to the server's sign-out address, so that signing out of GitLab ends the BBS session too.
    - **No automatic linking by e-mail address.** BBS e-mail addresses are not verified, so linking on e-mail would let anyone who sets a matching address on a BBS account take over the GitLab account that has it. Existing GitLab users link their Synchronet identity from their GitLab profile instead. The provider should send `email_verified: false` unless an address really has been verified.
    - Whether new GitLab accounts created through this sign-in are active at once or held for approval (`omniauth_block_auto_created_users`) is the GitLab admin's choice.
    - Password sign-in should stay available, at least for administrators, so that a broken BBS or Web Server does not lock everyone out of GitLab.
    - Git over HTTPS still uses personal access tokens or SSH keys; OIDC covers only the web UI.

    ## Limits

    - **Sign-out is one-way.** GitLab keeps its own session once a user is in. A sign-out at the BBS, a password change, or a "sign out everywhere" from #1398 does not end an open GitLab session; it lasts until GitLab's own session expires. OIDC back-channel logout would close this gap if the client supports it (to be checked for GitLab CE).
    - **Shared fate.** One BBS session then opens every registered application, as noted under "Shared fate" in #1398.

    ## Questions to settle

    - ID token signing: HS256 with the client secret (no key management) or RS256/ES256 with published keys. Which algorithms GitLab's `openid_connect` strategy accepts needs checking.
    - Whether refresh tokens are issued at all (GitLab's web sign-in does not need them).
    - Consent: whether a user is asked to approve each client once, or registered clients are trusted silently (reasonable for applications the sysop registers).
    - Where authorization codes are kept (short-lived; memory may do) and how this behaves when several BBS hosts share the data directory.

    ## Related

    - #1398: server-owned browser sessions (prerequisite).
    - #280: trusted reverse proxy for the Web Server.
    - Prior art: Keycloak, Authelia, Authentik and Dex as OIDC providers; GitLab's own OmniAuth `openid_connect` provider.

    - *Authored by Claude (Claude Code), on behalf of @rswindell*

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Rob Swindell on Wed Nov 25 04:02:24 2026
    Re: Web server: OpenID Connect provider, so GitLab and other hosts can use
    By: Rob Swindell to GitLab issue in main/sbbs on Tue Nov 24 2026 19:59:09

    Let the Web Server act as an OpenID Connect (OIDC) identity provider, built on the server-owned browser session proposed in #1398, so that web applications the Synchronet Web Server does **not** serve can use a Synchronet sign-in. The first target is the GitLab web UI (gitlab.synchro.net on Vertrauen); the same endpoints would also serve DokuWiki, SWAG/SPAM and applications on other host names.

    That's great...I added it, but I have no idea what I'm supposed to do with it. More details coming? :)

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Wed Nov 25 15:21:08 2026
    Re: Web server: OpenID Connect provider, so GitLab and other hosts can use
    By: nelgin to Rob Swindell on Wed Nov 25 2026 04:02 am

    Re: Web server: OpenID Connect provider, so GitLab and other hosts can use
    By: Rob Swindell to GitLab issue in main/sbbs on Tue Nov 24 2026 19:59:09

    Let the Web Server act as an OpenID Connect (OIDC) identity provider, built on the server-owned browser session proposed in #1398, so that web applications the Synchronet Web Server does **not** serve can use a Synchronet sign-in. The first target is the GitLab web UI (gitlab.synchro.net on Vertrauen); the same endpoints would also serve DokuWiki, SWAG/SPAM and applications on other host names.

    That's great...I added it, but I have no idea what I'm supposed to do with it. More details coming? :)

    You're responding to a feature idea (filed in gitlab as a "work item" aka "issue") that hasn't been implemented.
    --
    digital man (rob)

    Breaking Bad quote #15:
    Cheer up Gomey, your people still got J. Lo. - Hank Schrader
    Norco, CA WX: 73.9øF, 27.0% humidity, 3 mph NW wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Digital Man on Wed Nov 25 19:32:16 2026
    Re: Web server: OpenID Connect provider, so GitLab and other hosts can use
    By: Digital Man to nelgin on Wed Nov 25 2026 15:21:08

    You're responding to a feature idea (filed in gitlab as a "work item" aka "issue") that hasn't been implemented.

    Sorry for being curious.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Wed Nov 25 19:15:42 2026
    Re: Web server: OpenID Connect provider, so GitLab and other hosts can use
    By: nelgin to Digital Man on Wed Nov 25 2026 07:32 pm

    You're responding to a feature idea (filed in gitlab as a "work item" aka "issue") that hasn't been implemented.

    Sorry for being curious.

    Sure, no problem. I was confused by your post because you said:

    That's great...I added it, but I have no idea what I'm supposed to do with it.

    There no "it" to add (yet). <shrug>
    --
    digital man (rob)

    This Is Spinal Tap quote #25:
    Viv Savage: Have... a good... time... all the time. That's my philosophy. Norco, CA WX: 62.9øF, 32.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Digital Man on Wed Nov 25 22:16:59 2026
    On Wed, 25 Nov 2026 19:15:42 -0800
    "Digital Man" (VERT) <VERT!Digital.Man@endofthelinebbs.com> wrote:

    Re: Web server: OpenID Connect provider, so GitLab and other hosts
    can use By: nelgin to Digital Man on Wed Nov 25 2026 07:32 pm

    You're responding to a feature idea (filed in gitlab as a "work
    item" aka "issue") that hasn't been implemented.

    Sorry for being curious.

    Sure, no problem. I was confused by your post because you said:

    That's great...I added it, but I have no idea what I'm supposed to
    do with it.

    There no "it" to add (yet). <shrug>

    Well, there is a README in /web/root/oauth/install that describes how
    to install "it".
    --
    End Of The Line BBS - Plano, TX
    telnet endofthelinebbs.com 23
    ---
    * Synchronet * End Of The Line BBS - endofthelinebbs.com
  • From Digital Man@VERT to nelgin on Wed Nov 25 20:36:18 2026
    Re: Re: Web server: OpenID Connect provider, so GitLab and other hostscan use
    By: nelgin to Digital Man on Wed Nov 25 2026 10:16 pm

    There no "it" to add (yet). <shrug>

    Well, there is a README in /web/root/oauth/install that describes how
    to install "it".

    Deuce commited that web/root/oath thing, not me, and I don't know much about it other than its something he made long ago (for Mastadon/ActivityPub integration) and didn't clean-up and commit until now.

    The message you posted here was a reply to my issue creation announcement.
    --
    digital man (rob)

    Synchronet "Real Fact" #30:
    The COM I/O routines for Synchronet for DOS were written in ASM by Steve Deppe Norco, CA WX: 64.6øF, 29.0% humidity, 1 mph NW wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net