Problem/Motivation

HMAC capabilities are derived inconsistently from hash_salt alone in five of seven places, while core's convention and two ACT paths use private_key with hash_salt. hash_salt is commonly committed or copied between environments, so those signatures are weaker than intended. The act_reply_scope capability is a permanent, never-rotating per-user secret with no expiry or session binding (a site-wide constant for anonymous users). The versions hash also commits to admin-only fields (mail, hostname), forming a change-detection oracle.

Steps to reproduce

  • Inspect the signed capabilities: five use hash_salt alone, two use private_key plus hash_salt.
  • Confirm act_reply_scope never changes for a user and is a site-wide constant for anonymous users.

Proposed resolution

  • Derive all capabilities from private_key with hash_salt.
  • Add an expiry and optional session binding to act_reply_scope, validated on use.
  • Replace the versions hash with a non-sensitive token (cid:changed:status:childCount).

Remaining tasks

  • Add tests for expiry and rotation.

User interface changes

None.

API changes

Signed capabilities are keyed consistently and carry expiry.

Data model changes

None anticipated.

AI-Generated: Yes (Used Opus 5 and DeepSeek Flash to review and discover these issues)

Comments

freelock created an issue. See original summary.

  • freelock committed ecd8e6d1 on 1.0.x
    fix: #3623174 Security hardening of token and HMAC signing
    

  • freelock committed 29ce5df5 on 1.0.x
    fix: #3623174 Derive the diagnostic token through ActCapability
    

  • freelock committed 81a57454 on 1.0.x
    fix: #3623174 Drop session binding from reply scopes
    

  • freelock committed 3e2fa88f on 1.0.x
    fix: #3623174 Stop comparing the posted scope to the re-issued hidden...
freelock’s picture

Status: Active » Fixed

Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.