Skip to content

Design & Objectives — Passbolt.Api + Passbolt.Cli charter #30

Description

@davidnmbond

This issue is the project charter: the design, objectives, and definition of done for Passbolt.Api and its companion Passbolt.Cli.

Background

Passbolt integration in our tooling currently goes through go-passbolt-cli, which is a thin wrapper over the go-passbolt Go library. It does not surface per-resource permissions/owners, which blocks ownership auditing (see PanoramicData.Skills#540 and OPS-63894 — "every entry needs ≥2 owners / a group owner"). Rather than depend on a Go binary and wait on upstream, we own a first-class .NET client in the house style (LogicMonitor.Api, ServiceNow.Api, Jira.Api) with a companion CLI (LogicMonitor.Cli, Meraki.Cli, Rundeck.Cli).

Design

  • Passbolt.Api — typed .NET client:
    • Refit-backed REST interfaces, System.Text.Json, DI-friendly PassboltClient + PassboltClientOptions, async throughout.
    • GPGAuth challenge-response login (verify → login → decrypt server token → login → session cookie + X-CSRF-Token), with MFA/TOTP support.
    • OpenPGP via a maintained .NET library (BouncyCastle / PgpCore) for the auth-token decrypt and for secret encrypt/decrypt.
    • Clean separation: Apis/ (Refit interfaces), Data/ (models), Requests/ (request bodies).
  • Passbolt.Cli — thin verb wrapper over Passbolt.Api (list/get/create/update/share resources, folders, users, groups; permissions/ownership reporting; status). Packaged/distributable like the other *.Cli tools so skills can shell into it.

Objectives

1. Meet all of Oscar's requirements (NuGet governance)

Comply fully with the PanoramicData.NugetManagement standard (its NEW_NUGETS.md rule set) and pass its governance scanner as compliant. That includes: NBGV (version.json) versioning; Central Package Management (no inline versions); TreatWarningsAsErrors + nullable + generated XML docs; complete package metadata + symbols (snupkg); README/LICENSE/CONTRIBUTING/SECURITY; CI + CodeQL + Dependabot; xUnit v3 tests using AwesomeAssertions with failSkips: true on unit test projects; clean tag-triggered publish. (Repo is already scaffolded to this bar — keep it green.)

2. Full feature parity with the Passbolt REST API

Cover the complete public API surface, not just what today's callers need. Target areas (extend as the API evolves):

  • Server status / health
  • Me (current user)
  • Users
  • Groups (+ group user memberships)
  • Roles
  • Resources
  • Folders
  • Permissions
  • Comments
  • Avatars
  • Resource types
  • Secrets (encrypt/decrypt of secret values, per-recipient)
  • Resource/folder share (create/update/delete permissions)
  • Favorites
  • Tags / metadata
  • Password expiry / TOTP resource types
  • MFA (TOTP verify) as part of auth
  • Move (resources/folders)
  • Groups create/update/delete + membership mutation
  • Healthcheck detail / settings
    (Checklist is a starting point from the current Apis/ set — verify each against the live API and the Passbolt OpenAPI/CakePHP routes; unchecked = not yet implemented or not yet verified.)

3. Serve the ownership-audit requirement (PanoramicData.Skills#540)

Provide, and prove with tests, the capability that motivated this: enumerate resources with their permissions/owners (GET /resources.json?contain[permission]=1&contain[permissions]=1), resolve principals to user vs group, and support the audit filters:

  • resources with no group owner, and/or
  • resources with fewer than two owner principals (permission type 15).
    Once shipped, the passbolt skill should shell into Passbolt.Cli for this (replacing the go-passbolt-cli dependency), unblocking OPS-63894.

Definition of done

  1. Passbolt.Cli project exists in the solution and is distributable.
  2. Feature-parity checklist (objective 2) complete and each item test-covered.
  3. Ownership report (objective 3) implemented with unit + integration tests.
  4. Oscar's governance scanner reports the repo compliant; CI publishes from a tag.
  5. GPGAuth (+MFA) verified against a live Passbolt instance.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions