Skip to content

Feature: configurable / longer secret expiration options (beyond the 1h/1d/1w ceiling) #3720

Description

@bleidd

Summary

Yopass currently offers exactly three expiration durations — 1h, 1d, and
1w — and both --default-expiry and --force-expiration only accept those
same three values. This makes one week the hard maximum lifetime for any
secret.

I'd like to request the ability to configure longer and/or additional
expiration options (for example 14 days), ideally as an operator-controlled
setting rather than a wider fixed list baked into the UI.

Motivation / use case

We self-host Yopass as our internal secret-sharing tool (migrated from SnapPass,
which allowed a configurable expiry window). In some workflows we provision
several accounts in bulk and hand the credentials out over a longer period.
Recipients are sometimes slow to pick their secrets up, and a 7-day ceiling
causes links to expire before everyone has retrieved them.

SnapPass let the operator raise this window; Yopass' fixed one-week maximum is
the one gap when moving teams over.

Current behavior

  • UI/API expiration is limited to 1h, 1d, 1w.
  • --default-expiry accepts only 1h, 1d, 1w.
  • --force-expiration accepts only 1h, 1d, 1w.
  • There is no way to allow a secret to live longer than one week.

Proposed solutions (any one would solve it)

  1. A --max-expiry / configurable duration list flag, e.g.
    --expiry-options=1h,1d,1w,2w (env EXPIRY_OPTIONS), letting the operator
    define the selectable durations. The UI would render whatever the server
    advertises via /config, keeping the frontend data-driven instead of
    hardcoded.
  2. Add a couple more built-in durations (e.g. 2w, 30d) and allow them in
    --default-expiry / --force-expiration.

Option 1 is more flexible and keeps the storage-backend TTL as the real upper
bound (operators are responsible for choosing a sane maximum).

Notes / considerations

  • Backend TTL support: Memcached caps item expiration at 30 days, so any
    configurable maximum should be validated/documented against the chosen
    storage backend (Redis has no such 30-day limit).
  • Fully backward compatible: default set stays 1h/1d/1w if the operator
    configures nothing.

Environment

  • Self-hosted Yopass (Docker), Memcached backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions