Spotted during the #739 routing sweep and deliberately left out of it: #739 changes routing,
not error classification.
The mismatch
serviceErrorProtocols["sso"] = errProtoRESTJSON (emulator/error_protocol.go), and
cmd/gen-service-reference's matrix accordingly documents sso as REST/JSON. But
SSOPlugin emulates sso-admin, whose botocore model declares:
protocol: json, jsonVersion: 1.1
targetPrefix: SWBExternalService
which is why substrate routes it by X-Amz-Target at all (#561) — a REST/JSON service sends
no target.
Why it matters
accessDeniedCodeFor and errorProtocolFor pick the refusal shape from this table. The two
JSON families and REST/JSON do not agree on where the error code lives: JSON 1.1 puts it in
__type (and x-amzn-ErrorType), and a caller's errors.As/ClientError matching keys off
that. Classifying a JSON-1.1 service as REST/JSON is the same class of defect as config
(#580) and pricing (#653) — a refusal a real SDK cannot match, which makes the consumer's
error-handling branch unreachable.
Unlike those two, sso is not missing from the table, so
TestAccessDenied_EveryRegisteredPluginHasAnErrorProtocol passes: it asserts presence, not
correctness. Nothing currently asserts that a classification agrees with the model.
Acceptance criteria
Spotted during the #739 routing sweep and deliberately left out of it: #739 changes routing,
not error classification.
The mismatch
serviceErrorProtocols["sso"] = errProtoRESTJSON(emulator/error_protocol.go), andcmd/gen-service-reference's matrix accordingly documentsssoas REST/JSON. ButSSOPluginemulates sso-admin, whose botocore model declares:protocol: json,jsonVersion: 1.1targetPrefix: SWBExternalServicewhich is why substrate routes it by
X-Amz-Targetat all (#561) — a REST/JSON service sendsno target.
Why it matters
accessDeniedCodeForanderrorProtocolForpick the refusal shape from this table. The twoJSON families and REST/JSON do not agree on where the error code lives: JSON 1.1 puts it in
__type(andx-amzn-ErrorType), and a caller'serrors.As/ClientErrormatching keys offthat. Classifying a JSON-1.1 service as REST/JSON is the same class of defect as
config(#580) and
pricing(#653) — a refusal a real SDK cannot match, which makes the consumer'serror-handling branch unreachable.
Unlike those two,
ssois not missing from the table, soTestAccessDenied_EveryRegisteredPluginHasAnErrorProtocolpasses: it asserts presence, notcorrectness. Nothing currently asserts that a classification agrees with the model.
Acceptance criteria
ssois classified against its model'sprotocol/jsonVersion, or the currentclassification is justified in a comment citing what an sso-admin client actually parses.
sso-adminclient sees — the code readable from__typewhere the model says it should be.ssoinemulator/routing.goand the generated coveragematrix in
docs/services.mdmatches whatever the plugin actually speaks; the routingtable's
Whyfield currently records the disagreement and should record the resolution.protocol recorded for it, so the next mismatch of this kind is a failing test rather
than a reading of two tables side by side.