Repository navigation
Description
Summary
SSOPlugin is registered and has a test file, but no SDK or CLI can reach it.
emulator/parser.go's targetServiceAliases maps a target prefix that no client
actually sends:
// "AWSSSOAdminService" → strip "AWS" → "ssoadminservice" → "sso".
// aws-sdk-go-v2 SSO Admin client uses X-Amz-Target: AWSSSOAdminService.{Op}.
"awsssoadminservice": "sso",The real target prefix in the sso-admin service model is SWBExternalService,
so every request falls through to the "service not emulated" path:
$ aws sso-admin list-instances
An error occurred (ServiceNotAvailable) … service not emulated: swbexternalservice
Confirmed over the wire with an explicit header, which produces the same error:
$ curl -s -X POST localhost:4620/ \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=…/us-east-1/sso/aws4_request' \
-H 'X-Amz-Target: SWBExternalService.ListInstances' \
-H 'Content-Type: application/x-amz-json-1.1' -d '{}'
Why it was never caught
sso_plugin_test.go calls p.HandleRequest directly, so it exercises the
plugin in-process and never goes through extractService. That is the same shape as
the API Gateway v2 routing gap recorded on #529: a registered, tested plugin that
the router cannot reach. Every unit test is green and the feature does not exist
from a caller's point of view.
Provenance
The SWBExternalService prefix comes from the sso-admin botocore service model's
metadata.targetPrefix, and from observing the CLI's actual request. The comment
in parser.go states the derivation it was guessed from with some confidence, so
the correction should be recorded there rather than silently replacing the line.
Fix
Add "swbexternalservice": "sso" to targetServiceAliases, alongside the
existing guessed key rather than replacing it — keeping it costs nothing and any
client that does send the guessed prefix keeps working — and correct the comment.
Not affected: casing
Unlike #529's plugins, SSO Admin's wire casing is already right. sso-admin is the
json protocol and ListInstances.Instances has no locationName rename, so its
effective wire key is Instances — PascalCase, which is what the plugin emits.
This is a routing fix only.
Acceptance criteria
-
aws sso-admin list-instancesreachesSSOPluginand returns a parseable
response against a livesubstrate server. - A table-driven case in
parser_test.goasserts that
X-Amz-Target: SWBExternalService.ListInstancesresolves tosso, so the
routing is covered without a live server. - The existing
awsssoadminservicealias still resolves tosso. - The
parser.gocomment records thatSWBExternalServiceis the real prefix
and that the old key is kept for compatibility, so the wrong derivation is not
re-copied.
Related
- API Gateway: state structs are marshalled straight to the wire, so responses are PascalCase and carry substrate's internal AccountID/Region #529 — same class of defect (registered plugin unreachable from the router),
found in the same sweep; its API Gateway v2 half is a precondition of that
issue's own acceptance criteria and so is tracked there.
Activity
fix(organizations,server): route the AWSOrganizationsV20161128 target…
fix(iam): decode query-protocol list parameters (#639) (#640)
feat(config): configuration recorder and delivery channel (#580) (#650)
docs(config): the Config service reference, and an SDK journey that p…
fix(routing): every registered plugin is reachable from a real AWS cl…