Closed dcowan-e-courier closed 2 years ago
There was a problem with the authorizers that i fixed in #827. I have a private fork of SCF 3.2.x with that fix installed, and they work for me now.
@Twometer I don't see APIGatewayCustomAuthorizerEvent in your pull request. Do you have an example of how you are implementing the authorizer?
I'm using the gateway proxy request event, it seems to work fine. I have my code something like this, and it works fine:
@Bean
Function<APIGatewayProxyRequestEvent, IamPolicyResponse> auth() {
return event -> {
IamPolicyResponse.builder() ...
};
}
I believe what @dcowan-e-courier is saying we need to ensure that we support APIGatewayCustomAuthorizerEvent
Basically at the moment we support only events that have beeb requested by the community, so this is basically a request to support APIGatewayCustomAuthorizerEvent
Describe the bug Spring Cloud 3.2.2 attempting to create an api gateway authorizer. Found no examples, initially tried building native and had failures. Then tried non native and also have failures. Looking at AWSLambdaUtils.java there does not appear to be support for the needed classes https://github.com/spring-cloud/spring-cloud-function/blob/9994503deac26572e52740767b7bd4bd7e5bacca/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/AWSLambdaUtils.java#L63-L71
APIGatewayCustomAuthorizerEvent is the class needed to support authorizers.
Example failure