mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(sts): answer a disabled federation feature with AWS's sentence (#9158)
GetWebIdentityToken answered the error shape's own @documentation prose, which the model carries to describe the error rather than to be sent as one: the model states this refusal's code and status and not its message, so documentation was what the wording fell back to. AWS answers 'OutboundWebIdentityFederation is disabled.', wholly fixed text.
This commit is contained in:
1 parent
4735606fb9
commit
1bcd7620bb
3 files changed
+16
-5
No files matched your search
@@ -1216,10 +1216,12 @@ public class StsQueryHandler {
|
||||
Optional<OutboundWebIdentityFederation> federation =
|
||||
iamService.findEnabledOutboundWebIdentityFederation();
|
||||
if (federation.isEmpty()) {
|
||||
// AWS's own fixed text for this refusal, which the model cannot supply: it states
|
||||
// this error's code and its status and not its message, so a wording taken from the
|
||||
// shape describes the error instead of answering with it. The IAM page carries the
|
||||
// recording this sentence comes from.
|
||||
return AwsQueryResponse.error("OutboundWebIdentityFederationDisabledException",
|
||||
"The outbound web identity federation feature is not enabled for this account."
|
||||
+ " To use this feature, you must first enable it through the AWS"
|
||||
+ " Management Console or API.", AwsNamespaces.STS, 403);
|
||||
"OutboundWebIdentityFederation is disabled.", AwsNamespaces.STS, 403);
|
||||
}
|
||||
Instant issuedAt = clock.instant();
|
||||
Instant expiration = issuedAt.plusSeconds(
|
||||
|
||||
Reference in new issue
Block a user