Commit Graph
14 Commits
Author SHA1 Message Date
David Phillips 356c79e78e fix(ssm): parse and bound command delivery timeouts (#5908)
* fix(ssm): limit public command delivery time

* docs(ssm): describe command delivery timeouts

* fix(ssm): deserialize delivery timeouts before checking bounds

Handle numeric delivery timeouts consistently without bypassing limits.

* fix(ssm): report member-specific deserialization errors

Name the expected scalar type and explain malformed structures.

* refactor(ssm): keep delivery timeout errors consistent
2026-10-18 11:03:48 -04:00
David Phillips 23edd58992 fix(ssm): separate shell execution and delivery timeouts (#5865)
* fix(ssm): separate shell execution and delivery timeouts

* fix(ssm): require a command list for public shell requests

* test(ssm): share command request and cleanup fixtures
2026-10-17 13:43:37 -04:00
David Phillips d4158b954b fix(ssm): retain command ownership during background execution (#5841)
* fix(ssm): retain command ownership during background execution

* fix(ssm): keep agent fallback messages within their owner

* test(ssm): share region-scoped authorization fixtures
2026-10-16 22:34:08 -04:00
Ovidiu (Ovi) 4f34a903fc feat(ssm): support UnlabelParameterVersion (#5339)
* feat(ssm): support UnlabelParameterVersion

Remove one or more labels from a parameter version. Labels attached to
the version are returned in RemovedLabels; labels that are not on that
version, including ones attached to a different version, are returned in
InvalidLabels and left in place. A missing parameter is ParameterNotFound,
a missing version ParameterVersionNotFound, and an omitted ParameterVersion
or an empty or oversized label list a ValidationException.

* fix(ssm): match AWS errors and ordering in UnlabelParameterVersion

Verified against real AWS (us-east-1):

- Report every missing or invalid member in one ValidationException, in
  the order name, parameterVersion, labels, and render the label list
  the way AWS does ('[prod, ]').
- Reject a string or boolean ParameterVersion and a non-string Name or
  label with SerializationException; truncate a fractional version and
  clamp one outside the range of a long, as AWS does.
- Reject an ARN, a malformed or ssm-prefixed name, and deny an
  aws-prefixed one before the lookup; ignore surrounding whitespace in
  the lookup but echo the name as sent in error messages.
- Word ParameterVersionNotFound as AWS does.
- Return RemovedLabels in the order the labels are stored on the
  version, and InvalidLabels in request order.

LabelParameterVersion shares the label-list parsing, so its label
validation messages and non-string labels now match AWS too.

* fix(ssm): take the service monitor when deleting parameters

PutParameter, LabelParameterVersion and UnlabelParameterVersion already
run under the SsmService monitor, but DeleteParameter and
DeleteParameters did not. A delete landing between a label or unlabel
call's lookup and its history write left orphaned history that a later
PutParameter of the same name appended to.

Also pin LabelParameterVersion's AWS-verified label validation messages
and its SerializationException for a non-string label in its own
integration test, and share the parameter-name format rule between the
two reserved-name messages.
2026-10-09 13:11:29 -04:00
Mario Toffia 86c4904bcc fix(ssm): resolve Secrets Manager references in GetParameter (#4581)
* fix(ssm): resolve Secrets Manager references in GetParameter

GetParameter and GetParameters now answer
/aws/reference/secretsmanager/<secret-id>[:<version-id-or-label>] from
Secrets Manager, with the checks, error texts and response fields
measured against AWS: WithDecryption must be true, a missing secret is
ParameterNotFound, and GetParameters lists a reference it cannot answer
in InvalidParameters. ECS task secrets and CodeBuild parameter-store
variables read through the same path; a CloudFormation
AWS::SSM::Parameter::Value<String> parameter still refuses one, as on AWS.

* fix(ssm): check secretsmanager:GetSecretValue on a Secrets Manager reference

AWS reads /aws/reference/secretsmanager/ with the caller's own
secretsmanager:GetSecretValue, checked before the secret is looked up.
With IAM enforcement on, a caller allowed only ssm:GetParameter now gets
the ValidationException AWS sends, and GetParameters fails as a whole.

* fix(ssm): authorize a Secrets Manager reference on the secret's ARN

A grant on a secret's exact ARN, which CDK grantRead and a CloudFormation
Ref produce, did not match the suffix-less name ARN, so an allowed caller
was refused. The check now uses the secret's ARN and falls back to the
name only when the secret does not exist.

* fix(ssm): check a Secrets Manager reference's value on the secret it came from

The value is read by name after the check, so a secret force-deleted and
recreated in between was returned on the old secret's grant. The ARN of
the secret actually read is now checked too.

* fix(ssm): read a Secrets Manager reference's value from the secret it described

* docs(ssm): note the partial-ARN fallback a Secrets Manager reference read leaves

* fix(ssm): return SourceResult on a Secrets Manager reference

* fix(ssm): reject a malformed Secrets Manager reference before checking IAM

* chore(ssm): sort SsmService imports
2026-09-29 14:57:11 -04:00
Vũ Thế Huy 5ae46c2bd3 fix(ssm): support parameter selectors in GetParameter and align LabelParameterVersion with AWS (#4461)
* fix(ssm): support name:version and name:label selectors in GetParameter

- Support name:version and name:label selectors in GetParameter and GetParameters
- Resolve selector against parameter history copies without mutating stored parameters
- Validate labels in LabelParameterVersion per AWS spec (reject numeric and reserved labels)
- Return invalid labels in InvalidLabels response
- Synchronize labelParameterVersion and clone history entries to handle concurrent updates without in-place mutation
- Enforce 10-label maximum limit per parameter version
- Default to latest version only when ParameterVersion is omitted
- Guard against NPE and trailing colons in getParameter selector lookup

Closes #4396

* fix(ssm): enforce label validation constraints in LabelParameterVersion

- Reject empty labels and labels exceeding 100 characters with ValidationException
- Reject empty label lists and lists with more than 10 labels with ValidationException
- Update findSelectedVersion comment to reflect that labels are unique across versions
2026-09-28 21:07:46 -04:00
Simone Primarosa 188542e67f feat(ssm): seed the EKS optimized AMI parameter paths (#4191) 2026-09-23 12:00:12 -04:00
Matheus André f77cf4da77 fix(ec2,ssm): explain missing IMDS registration for SSM-only managed instances (#3283) 2026-09-09 00:26:30 -05:00
lex00 8142457f9b feat(ssm): answer the public Amazon Linux AMI parameters (#3173)
* feat(ssm): answer AWS's public Amazon Linux AMI parameters

GetParameter, GetParameters and GetParametersByPath resolve the
documented /aws/service/ami-amazon-linux-latest/ names from the EC2
image catalog, the way AWS seeds them in every account. They are
read-only and belong to no account, so DescribeParameters and the
parameter history leave them out.

Ported from the SSM half of lex00/floci#116.

* fix(ssm): reject reserved parameter names and list public ones under ancestors

PutParameter refuses names prefixed with aws or ssm, with or without a
leading slash and in any case, with the ValidationException AWS
returns. That closes the gap where a stored value could shadow a
public AMI parameter. GetParametersByPath applies the same path and
Recursive rules to public names as to stored ones, so a recursive
query on /aws or /aws/service lists them.

* fix(ssm): reserve only the aws and ssm path segments

The reserved-name check keyed on a bare prefix, which also refused the
names CloudFormation generates for an AWS::SSM::Parameter in a stack
whose name starts with aws or ssm. It now rejects a name whose first
path segment is aws or ssm, with or without a leading slash and in any
case, and accepts names such as ssm-auto-stack-Param-ABC.
2026-09-07 17:05:19 -04:00
Hector Ventura be9e61d788 feat(ssm): add DescribePatchBaselines and GetDefaultPatchBaseline (#1404)
Return AWS-owned predefined patch baselines (one default per operating system) so Terraform's aws_ssm_patch_baseline data source resolves. Supports DescribePatchBaselines filters OWNER/OPERATING_SYSTEM/NAME_PREFIX and GetDefaultPatchBaseline. Read-only reference data; no customer-owned baselines.

Refs #956
2026-06-17 00:41:24 -05:00
Jason van Zyl 660a8bceb3 feat(ssm): execute run commands in EC2 containers (#1387) 2026-06-16 22:51:21 -05:00
Hector Ventura 9e35046647 Docs/enviroment instead yml (#764)
* docs: moving all config to env instead of yml
* docs: sync with main and new features
* docs: reverting docker-compose.yml
2026-05-10 11:53:31 -05:00
TiM a32b7f1f3b docs: comprehensive audit sweep + CHANGELOG backfill (1.1.0-1.5.2) (#326)
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs
had drifted from code behaviour. This sweep reconciles docs against the
current codebase on upstream/main.

- Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history
- Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58),
  Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the
  actual dispatch handlers rather than @Path annotation counts.
- Rewrite README "Supported Services" table to drop per-service op counts
  (they drift too fast); point readers at docs/services/index.md
- Update 24 service docs for accuracy, add "Not Implemented" sections
  where relevant (s3.md, lambda.md, api-gateway.md)
- Refresh configuration and getting-started docs
- Add EventBridge Scheduler and AppConfig to mkdocs nav
- Add AppConfig / AppConfigData rows to README and services index
  following the 1.5.2 upstream release
2026-04-10 10:52:34 -05:00
Hector Ventura 61433f59ab firt commit 2026-03-15 17:43:56 -05:00