Skip to content

fix(secretsmanager): substrate implements ListTagsForResource, an operation the Secrets Manager API does not have #929

Closed

Description

@scttfrdmn

SecretsManagerPlugin dispatches and implements ListTagsForResource, an operation the Secrets
Manager API does not have.

The Secrets Manager API Reference publishes 23 operations:

BatchGetSecretValue, CancelRotateSecret, CreateSecret, DeleteResourcePolicy, DeleteSecret,
DescribeSecret, GetRandomPassword, GetResourcePolicy, GetSecretValue, ListSecrets,
ListSecretVersionIds, PutResourcePolicy, PutSecretValue, RemoveRegionsFromReplication,
ReplicateSecretToRegions, RestoreSecret, RotateSecret, StopReplicationToReplica, TagResource,
UntagResource, UpdateSecret, UpdateSecretVersionStage, ValidateResourcePolicy.

ListTagsForResource is not among them. A secret's tags are read through DescribeSecret, whose
response carries a Tags member — which is why #928's tagging row asserts cross-readability through
DescribeSecret rather than through the operation substrate invented.

Why this matters rather than being harmless surplus

A caller who reaches for it in substrate gets a 200, then gets UnknownOperationException from real
AWS — the inverse of the failure mode substrate exists to prevent. An emulator that answers an
operation AWS refuses is as wrong as one that refuses an operation AWS answers, and the second is at
least visible in a test.

It is also a source of divergence in the other direction: two read paths for one value, only one of
which AWS has, so a defect can be fixed in the one nothing real calls.

Acceptance criteria

  • ListTagsForResource is removed from SecretsManagerPlugin's dispatch, so the operation falls
    to the plugin's unknown-action path like any other name AWS does not publish.
  • The handler is removed, or kept only if some in-tree caller needs it — in which case that caller
    is named here and moved to DescribeSecret.
  • docs/services.md's Secrets Manager operations table no longer lists it, and the removal is
    recorded so a reader can tell it was deliberate rather than an omission.
  • Any test calling it is moved to DescribeSecret.

Provenance

Verified against the Secrets Manager API Reference's operations list. This is an operation AWS does
not publish
, not one whose shape substrate gets wrong, so there is nothing to model correctly — the
only faithful behaviour is to not answer it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions