Skip to content

Add expiry support to resource create/update commands #86

@enbiyagoral

Description

@enbiyagoral

Title: Add expiry support to resource create/update commands

Labels: enhancement, cli, resource

Summary
The CLI currently doesn’t expose Passbolt’s expired field for resources. Add support to set/clear expiry on create and update.

Motivation
Passbolt API supports setting an expiry date for resources. Align the CLI with the API to enable policy-compliant rotations and automation.
Reference: Passbolt API – Create a resource (Resources POST/PUT) https://www.passbolt.com/docs/api/#tag/Resources/operation/addResource

Proposed changes

  • create resource: add --expired "<ISO8601>" (set after creation).
  • update resource: add --expired "<ISO8601>" and --clear-expired (sets to null).
  • Update help text and README with short examples.

Usage examples

  • Create with expiry:
    passbolt create resource --name "Prod DB" --password "VeryStrong!" --expired "2025-12-31T23:59:59Z"
  • Update expiry:
    passbolt update resource --id --expired "2026-01-15T10:00:00Z"
  • Clear expiry:
    passbolt update resource --id --clear-expired

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions