You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a stack with an AWS::Serverless::Function and an AWS::Serverless::Api resource with the intention of restricting access to an IP address range. An example stack looks as follows:
The above however doesn't work even when connecting to the specified IP address range. I have to manually update the resource identifier to arn:aws:execute-api:my-region-1:123456789012:my-api-id/MyStage/POST/republish/* instead.
--
It is also worth noting that a precursor to my above example, I had setup the path to be /republish/{entityType}/{parameters+} and this gave a resource-policy with a resource-identifier arn:aws:execute-api:my-region-1:123456789012:my-api-id/MyStage/POST/republish/*/{parameters+}.
My point is that standard parameters (without +) seem to get translated to a *, so the behaviour should likely be the same with parameters suffixed with a +.
Steps to reproduce the issue:
Import a stack structured like the one provided above, setting the IP address to a suitable value for yourself.
Attempt to access the API through the endpoint created.
An error will be observed.
Modify the Resource Policy in the AWS Api-Gateway console to use a simple * wildcard symbol, then republish the API.
Attempt to access the API again and you will gain access.
Observed result:
The automatically generated Resource-Policy does not describe parameters suffixed with + and therefore in the above example, access is denied.
Expected result:
Access in the above example should be granted.
The text was updated successfully, but these errors were encountered:
Description:
I have created a stack with an
AWS::Serverless::Function
and anAWS::Serverless::Api
resource with the intention of restricting access to an IP address range. An example stack looks as follows:When the API-Gateway resource policy, the resultant document looks as follows:
The above however doesn't work even when connecting to the specified IP address range. I have to manually update the resource identifier to
arn:aws:execute-api:my-region-1:123456789012:my-api-id/MyStage/POST/republish/*
instead.--
It is also worth noting that a precursor to my above example, I had setup the path to be
/republish/{entityType}/{parameters+}
and this gave a resource-policy with a resource-identifierarn:aws:execute-api:my-region-1:123456789012:my-api-id/MyStage/POST/republish/*/{parameters+}
.My point is that standard parameters (without
+
) seem to get translated to a*
, so the behaviour should likely be the same with parameters suffixed with a+
.Steps to reproduce the issue:
*
wildcard symbol, then republish the API.Observed result:
The automatically generated Resource-Policy does not describe parameters suffixed with
+
and therefore in the above example, access is denied.Expected result:
Access in the above example should be granted.
The text was updated successfully, but these errors were encountered: