Skip to main navigation Skip to search Skip to main content

Single Sign-On and Multi-Factor Authentication forthe SNode.C Framework
: Design, Implementation, and Evaluation of an OAuth 2.0-Based Identity and Access Management System for Lightweight C++ Network Applications

  • Jan Nicolas Eberwein

    Student thesis: Master's Thesis

    Abstract

    Lightweight C++ network frameworks such as SNode.C have not provided integrated
    support for standardised identity and access management, so developers either build
    ad-hoc authentication solutions or depend on identity providers whose resource require
    ments are incompatible with embedded targets. Against this gap, the thesis asks how
    standardised SSO and MFA can be added to a lightweight C++ framework without
    exceeding embedded resource limits, and answers it by designing, implementing, and
    evaluating such a system for the SNode.C framework.
    The architecture positions the Identity Provider (IdP) on a dedicated V-server under
    a stable public domain. SNode.C-based applications and OpenWrt router installations
    act as OAuth2.0 relying parties that delegate authentication to this central IdP. This
    arrangement simplifies HTTPS certificate management, redirect URI configuration, and
    external identity provider integration, and it keeps router-side services lightweight. A
    local deployment mode is available for LAN-only or offline scenarios.
    Authentication follows the OAuth2.0 Authorization Code flow with Proof Key for
    Code Exchange (PKCE, RFC7636), so that an intercepted authorisation code cannot
    be redeemed by an attacker who does not also hold the original code verifier. Access
    tokens are issued as JSON Web Tokens (JWTs) signed with RS256, allowing relying
    parties to verify tokens using only the IdP’s public key. Multi-factor authentication
    uses Time-Based One-Time Passwords (TOTP, RFC6238), an offline-capable second
    factor compatible with standard authenticator applications. Passwords are hashed with
    PBKDF2-HMAC-SHA256 at 100000 iterations and per-user random salts via OpenSSL;
    TOTP secrets are encrypted at rest with AES-256-GCM.
    The implementation comprises three parts: a reusable authentication library, a self
    contained Identity Provider server, and a thin relying-party integration that lets any
    SNode.C application join the SSO with roughly fifteen lines of application-specific code.
    The library builds against unmodified upstream SNode.C, and its relying-party client
    is published as a CMake package (snodec-auth) that carries none of the IdP’s server
    side code. Federated login via Google was implemented as a representative external
    OAuth2.0/OIDC provider, validating the provider abstraction; Apple and Meta are de
    signed as future provider extensions via the same abstraction. Passkeys and WebAuthn
    are identified as a future expansion stage suited to the central V-server domain archi
    tecture but are not part of the implemented prototype. SQLite is the sole database
    dependency, supporting both V-server and embedded deployment without a database
    server process.
    Functional evaluation shows that the authentication flows align with the relevant
    IETF and OWASP guidance, and that a relying party adopts SSO and MFA through the middleware with roughly fifteen lines of code. The same middleware is integrated
    into the management interface of an MQTT broker suite: the SSO-enabled broker cross
    compiles for the OpenWrt aarch64 target and was deployed on a physical GL.iNet
    GL-MT3000 router, where the relying-party single sign-on flow is verified up to the
    credential-entry handoff: an unauthenticated request is redirected into the OAuth2.0
    Authorization Code flow with PKCE at the central Identity Provider. The broker’s
    on-device memory footprint and LAN redirect latency were measured directly on the
    GL-MT3000; the interactive credential login through to a token-protected view remains
    future work. In the current prototype the relying party completes the code-for-token
    exchange in the browser and stores the access token in a script-readable cookie; moving
    this exchange server-side and using an HttpOnly cookie is identified as the primary
    security hardening step.
    Date of Award2026
    Original languageEnglish (American)
    Awarding Institution
    • FH OÖ
    SupervisorVolker Christian (Supervisor)

    Studyprogram

    • Interactive Media

    Cite this

    '