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

HTTP headers in Source spec #6669

Closed
gab-satchi opened this issue Jan 6, 2023 · 1 comment
Closed

HTTP headers in Source spec #6669

gab-satchi opened this issue Jan 6, 2023 · 1 comment
Labels
kind/feature-request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@gab-satchi
Copy link
Contributor

gab-satchi commented Jan 6, 2023

Problem
There currently isn't a way to provide additional http headers for communication between a Source and its Sink. There's the ceOverrides field but it has a few shortcomings:

  • If the Sink isn't the last stop, anything provided in the ceOverrides will be passed along to subsequent destinations.
  • It isn't dynamic, it must be set statically in the source spec
  • It is all in plain text. It cannot be imported from a Secret.

A big usecase for headers would be for authentication. Currently, if the Source needs to make secure communication with its sink, the user needs to implement some sort of proxy to inject any required authentication.

One possible solution is to add to the Source spec the following:

type SourceSpec struct {
	// Sink is a reference to an object that will resolve to a uri to use as the sink.
	Sink Destination `json:"sink,omitempty"`

        ...

        Headers HttpHeaders `json:"headers,omitempty"`
}

type HttpHeaders struct {
        // StaticHeaders are a list of headers that should be used for outgoing http requests to the Sink.
        StaticHeaders map[string]string

        // Reference is a reference to an object from where extra http headers should be loaded. Any headers
        // redefined in the object will take precedence over static headers. 
        Reference KReference
}

There can be validation around which Kinds are allowed in Reference (ConfigMap and Secret). Another option is to modify the Destination type to include headers that should be added like what's included in this issue #5046

Persona:
Which persona is this feature for?

Exit Criteria
A Source can add additional http headers to its outgoing requests

Time Estimate (optional):
How many developer-days do you think this may take to resolve?

Additional context (optional)
Add any other context about the feature request here.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 7, 2023
@github-actions github-actions bot closed this as completed May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

1 participant