Skip to content

the cli cannot list an mssp's client tenants or iterate over them in a single command #54

Closed

Description

@d0ubl3g

Measured

  • openapi/v1.json has no operation that lists tenants.
  • Each credential covers a single tenant (README.md:104-107), so reading a portfolio requires one session or key per client and a custom script.

Why it matters

MSSP: their main use case is seeing the posture of their whole portfolio. Today they have to sign in once per client and repeat each command per profile, which does not scale beyond a handful of clients.

Acceptance criteria

  • A single MSSP credential (OAuth session or API key) is enough; no profile per client is required.
  • There is a command that lists the client tenants the credential is authorized for.
  • Read commands accept a client selection (one client, or all of them) and the output identifies the tenant on each row, in table form and with --json.
  • Selecting a client the credential is not authorized for fails with a clear message and a non-zero exit code.
  • It is documented in the MSSP guide (no guide for an MSSP reading several client tenants with the CLI #45).

Depends on

A change in the public /v1 API: a credential with portfolio scope, an operation that lists the authorized client tenants, and a way to select the client on data operations.

Activity

  1. added
    featureMissing functionality
    beta-blockerBlocks or embarrasses a beta tester on day one (Functional beta only)
    on Oct 6, 2026
  2. d0ubl3g commented on Oct 12, 2026

    @d0ubl3g
    ContributorAuthor

    Done in 0.4.0 (https://github.com/Hodeitek/hodeishield-cli/releases/tag/v0.4.0), by #134, on main at 3405f04.

    • One portfolio key is enough; no profile per client.
    • hodeishield tenants list lists the client tenants the key may read.
    • --tenant <slug|id> selects one client on any read command, and --all-tenants reads every client on a list command, with the tenant on each row (TENANT column; tenant_id, tenant_slug, tenant_name in --json and --csv).
    • A client outside the portfolio fails with "No client tenant … in this credential's portfolio." and exit code 5.
    • Documented in the README section "Several tenants (MSSP)" (no guide for an MSSP reading several client tenants with the CLI #45).
      Tested against the live API with two client tenants of a test MSSP account: the output for one client equals what that client's own key returns, and data from another tenant is never shown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beta-blockerBlocks or embarrasses a beta tester on day one (Functional beta only)featureMissing functionality

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions