Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Metadata (headers) support #115

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

oguzhand95
Copy link
Member

@oguzhand95 oguzhand95 commented Dec 12, 2023

Summary

  • Added gRPC Metadata support
  • Simplified the internal client-building logic

Example

When metadata ({"wibble": "wobble"}) is provided during both client initialization and CheckResources call, the cerbos audit logs show;

{
  "log.logger":"cerbos.audit",
  "log.kind":"access",
  "timestamp":"2023-12-13T17:26:56.614190Z",
  "callId":"01HHJ3F8B657J3PB3S6P21YY3X",
  "peer":{
    "address":"127.0.0.1:50993",
    "userAgent":"grpc-dotnet/2.59.0 (.NET 6.0.5; CLR 6.0.5; net6.0; osx; x64)"
  },
  "metadata":{
    "wibble":{
      "values":[
        "wobble, wobble"
      ]
    }
  },
  "method":"/cerbos.svc.v1.CerbosService/CheckResources"
}

Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
@oguzhand95 oguzhand95 changed the title enhancement: gRPC Metadata support enhancement: Metadata (headers) support Dec 12, 2023
@oguzhand95 oguzhand95 force-pushed the metadata branch 2 times, most recently from ef3a3ea to f837a4a Compare December 13, 2023 16:23
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
@oguzhand95 oguzhand95 marked this pull request as ready for review December 13, 2023 17:54
@oguzhand95 oguzhand95 merged commit fc5f369 into cerbos:main Dec 14, 2023
8 checks passed
@oguzhand95 oguzhand95 deleted the metadata branch December 14, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants