Welcome! Log In Create A New Profile

Advanced

Re: request authorization with grpc (failure status code)

July 17, 2019 08:32AM
I had some success doing the intercept at the next level above the auth proxy location like this:
(using grpc_intercept_errors)

server {
listen 443 ssl http2;
include grpc_servers.conf;

# send all requests to the `/validate` endpoint for authorization
auth_request /validate;

grpc_intercept_errors on;
error_page 401 @grpc_auth_fail;

location = /validate {
proxy_pass http://auth:5000;

#proxy_intercept_errors on;
#error_page 401 @grpc_auth_fail;
}

location @grpc_auth_fail {
add_trailer grpc-status 16 always;
add_header grpc-status 16 always;
add_trailer grpc-message Unauthorized always;
add_header grpc-message Unauthorized always;
return 200;
}
}
Subject Author Posted

request authorization with grpc (failure status code)

bmacphee July 02, 2019 11:19AM

Re: request authorization with grpc (failure status code)

Maxim Dounin July 02, 2019 09:18PM

Re: request authorization with grpc (failure status code)

bmacphee July 16, 2019 04:23PM

Re: request authorization with grpc (failure status code)

Maxim Dounin July 17, 2019 07:50AM

Re: request authorization with grpc (failure status code)

bmacphee July 17, 2019 08:22AM

Re: request authorization with grpc (failure status code)

bmacphee July 17, 2019 08:35AM

Re: request authorization with grpc (failure status code)

bmacphee July 17, 2019 08:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready