Skip to content

feat: add --extra-header flag for custom gRPC headers#588

Open
sputnikraket wants to merge 1 commit intoauthzed:mainfrom
sputnikraket:add-custom-headers
Open

feat: add --extra-header flag for custom gRPC headers#588
sputnikraket wants to merge 1 commit intoauthzed:mainfrom
sputnikraket:add-custom-headers

Conversation

@sputnikraket
Copy link

Signed-off-by: Erik Hennings erik.hennings@freda.com

Description

This PR adds support for passing custom headers to gRPC requests via a new --extra-header flag.

Testing

Manual testing

References

Signed-off-by: Erik Hennings <erik.hennings@freda.com>
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@sputnikraket
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

authzedbot added a commit to authzed/cla that referenced this pull request Dec 1, 2025
@sputnikraket sputnikraket marked this pull request as ready for review December 1, 2025 19:02
@tstirrat15
Copy link
Contributor

I think this is fine, but what's the use case? I'm wondering if it's something that zed already supports.

@radhus
Copy link

radhus commented Feb 16, 2026

I think this is fine, but what's the use case? I'm wondering if it's something that zed already supports.

We're running SpiceDB behind a proxy that requires authentication (GCP Cloud Run), that can be specified either through the Authorization header or another header. So we kind-of need to pass double authentication tokens 😅

This setup is perhaps not ideal, but it works.

Copy link
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See question; otherwise LGTM

Comment on lines +231 to +232
md := metadata.New(headers)
ctx = metadata.NewOutgoingContext(ctx, md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this logic functionally merge the headers, or would this overwrite headers if some other component added new headers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants