mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(cloudformation): identify unsupported SAM Cognito authorizers (#3535)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
1 parent
36c8396f25
commit
809ce40f1e
2 files changed
+36
No files matched your search
+7
@@ -566,6 +566,13 @@ class SamTransformProcessor {
|
||||
Map.Entry<String, JsonNode> entry = it.next();
|
||||
String name = entry.getKey();
|
||||
JsonNode config = entry.getValue();
|
||||
if (config.has("UserPoolArn")
|
||||
|| "COGNITO_USER_POOLS".equals(config.path("AuthType").asText())) {
|
||||
throw new AwsException("ValidationError",
|
||||
"SAM implicit REST API authorizer " + name
|
||||
+ " configures a Cognito user pool authorizer, which Floci does not "
|
||||
+ "support for SAM implicit REST APIs yet.", 400);
|
||||
}
|
||||
String payloadType = config.path("FunctionPayloadType").asText("TOKEN");
|
||||
if (!"REQUEST".equals(payloadType)) {
|
||||
throw new AwsException("ValidationError",
|
||||
|
||||
Reference in new issue
Block a user