Skip to content

coffeed: add age-aware beverage selection using systemd age verification API #4

Description

@meremST

Description

Starting January 1, 2027, California law requires OS providers and application developers to implement “age assurance” mechanisms to determine whether a user is a minor. This requirement is expected to influence implementations across the US and potentially worldwide. Instead of exposing a full birthdate, the operating system provides a coarse-grained age bracket signal (e.g. minor, adult, unknown).

Recent changes in systemd introduce support for propagating this metadata to services (see systemd/systemd#40954).

coffeed currently assumes all users are eligible for coffee consumption, which may not be appropriate under these new constraints.

Proposal

Extend coffeed to query the user’s age bracket from systemd at request time and adapt its behavior accordingly:

  • adult: default behavior (serve coffee as usual)
  • minor: provide a child-compatible experience
    • substitute coffee with hot chocolate
    • enable marshmallow support (strongly recommended for compliance and morale)
  • unknown: fallback to a safe default (e.g. decaffeinated coffee or prompt via policy)

Possible implementation approach

  • Read age metadata from the service manager (e.g. via environment, credentials, or sd-bus API depending on how systemd exposes it)
  • Introduce a new configuration option: AgeAwareBeverage=yes|no (default: no)
  • Add a pluggable “beverage policy” layer to allow downstream customization

Rationale

  • Aligns coffeed with upcoming regulatory requirements
  • Improves user safety and compliance
  • Ensures minors are redirected toward safer alternatives such as hot chocolate with marshmallows

Open questions

  • What is the canonical interface for retrieving the age bracket from systemd?
  • Should beverage substitution be handled internally or delegated to an external policy agent?
  • Is marshmallow support considered experimental or stable?

I believe this topic must be taken very seriously, as the lives of our daily Linux users’ children depend on it.

Thank you for your attention to this matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions