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 #69

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

oguzhand95
Copy link
Member

@oguzhand95 oguzhand95 commented Dec 12, 2023

Summary

  • Added gRPC Metadata support
  • Simplified the internal client-building logic
  • Moved the playground-related logic to the cerbos client builder like other SDKs

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:30:40.905891Z",
  "callId":"01HHJ3P3C9FBSGC94Y12NMANTR",
  "peer":{
    "address":"127.0.0.1:51027",
    "userAgent":"grpc-php/1.55.0 grpc-c/32.0.0 (osx; chttp2)"
  },
  "metadata":{
    "wibble":{
      "values":[
        "wobble",
        "wobble"
      ]
    }
  },
  "method":"/cerbos.svc.v1.CerbosService/CheckResources"
}

@oguzhand95 oguzhand95 merged commit 9b7d366 into cerbos:main Dec 14, 2023
12 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