Authentication & Authorization

Document: 18-authentication-authorization.md
Version: 1.0.0


Purpose

This document defines the authentication and authorization architecture used across all Rundown projects.

Authentication verifies the identity of a user.

Authorization determines what an authenticated user is permitted to access or modify.

These responsibilities must remain clearly separated throughout every application.


Authentication Philosophy

Authentication should only be implemented when required by the business.

Public websites should remain publicly accessible unless specific functionality requires user accounts.

Every authentication system introduces additional complexity, and should therefore provide measurable value.


Authentication vs Authorization

Authentication answers:

Who are you?

Examples:


Authorization answers:

What are you allowed to do?

Examples:

Authentication should always occur before authorization.


Standard Authentication Provider

Rundown standardizes on Payload CMS Authentication whenever practical.

Reasons include:

Alternative providers should only be introduced when project requirements justify them.


Responsibilities

The authentication layer owns:


Non-Responsibilities

Authentication should not own:

Authentication verifies identity.

It does not determine business behaviour.


Authorization

Authorization determines access after authentication has succeeded.

Permissions should be based on:

Access should always follow the principle of least privilege.


Standard Roles

Typical roles include:

Administrator

Responsibilities:


Editor

Responsibilities:

Editors should not manage system configuration.


Content Manager

Responsibilities:

Content Managers should not manage application settings.


Client

Responsibilities depend on the project.

Typical permissions include:

Clients should only access functionality relevant to their organization.


Session Management

Authenticated sessions should:

Persistent sessions should only be enabled when justified by usability requirements.


Password Policy

Passwords should:

Applications should never implement custom password hashing algorithms.


Multi-Factor Authentication

MFA should be supported when required by project requirements.

Recommended for:

Public marketing websites typically do not require MFA.


Route Protection

Protected routes should require authentication before access is granted.

Examples:

Public content should remain accessible without unnecessary authentication.


API Security

Protected API endpoints should:

Authorization should never rely solely on frontend validation.


Audit Logging

Authentication events should be logged where appropriate.

Examples:

Audit logs improve security and simplify troubleshooting.


Security Principles

Authentication systems should:

Security should prioritize protecting user identities while maintaining usability.


Engineering Decision

Authentication Strategy

Status: Accepted

Decision

Payload CMS Authentication is the standard authentication provider for Rundown applications.

Reasoning

Payload provides:

Alternative authentication providers should only be introduced when clearly justified.


Authentication Checklist

Before implementing authentication, verify:


Summary

Authentication establishes user identity, while authorization determines access to system resources.

By keeping these responsibilities distinct and implementing authentication only when justified, Rundown applications remain secure, maintainable, and appropriately simple.