This article is part of the CakeDC Advent Calendar 2024 (December 10th 2024)
When a major printing company won a contract with a prominent university, the need for a Single Sign-On (SSO) solution became clear. The goal was to create a seamless way for both university students and clients, as well as third-party developers, to access printing services. With multiple users and applications interacting with the system, SSO allowed for secure and centralized access to the print stores via web and mobile platforms.
JWT and RSA
The process relies on JWT (JSON Web Tokens) and RSA encryption for secure authentication. When users log in through a third-party app, the server checks both their credentials, as well as the app's legitimacy. If both are validated, a JWT is generated with the user’s session information, enabling them to send print jobs to the nearest store. The session is further secured with double key encryption, the printing software uses the server’s public key to verify the JWT, confirming that the session is legitimate without the need to call the central server repeatedly.
Enabling and disabling 3rd party apps and users
Additionally, the system allows for the easy management of user and app access. When a user becomes inactive, their login can be blocked. Similarly, if a third-party app is no longer authorized, the access can be disabled. This prevents malicious apps from bypassing security, as any invalid session token will not match the server’s public key, denying unauthorized requests and alerting the system to potential threats.
This SSO solution not only enhances user experience but also ensures robust security, streamlining access to printing services while protecting both the company and its clients from malicious activity.
Useful links:
This article is part of the CakeDC Advent Calendar 2024 (December 10th 2024)