There is an experimental audit logging API you can use for this.  See gRFC 
A59 <https://github.com/grpc/proposal/blob/master/A59-audit-logging.md> for 
details.  The actual exposed C++ API for you to use is here 
<https://github.com/grpc/grpc/blob/master/include/grpcpp/security/audit_logging.h>
.

On Wednesday, January 15, 2025 at 3:07:26 PM UTC-8 Rameshreddy Mudhireddy 
wrote:

> Hi Dev team,
>
> Is there a way to log policy based authorization failures using grpc-c++ 
> libs. 
> Typical flow includes
>
> std::shared_ptr<grpc::experimental::AuthorizationPolicyProviderInterface> 
> provider = 
> grpc::experimental::FileWatcherAuthorizationPolicyProvider::Create(policyFile,
>  
> 10, &status)
> builder.experimental().SetAuthorizationPolicyProvider(provider);
>
> This will load the policy file and authorize the incoming rpc requests. 
> Are there any hooks available to interact with the policy engine to log the 
> denied rpcs requests?
>
> Appreciate your feedback, Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/grpc-io/a13491df-1144-4ce9-a64a-603d63573046n%40googlegroups.com.

Reply via email to