Closed Lucifergene closed 1 month ago
/retitle OCPBUGS-43516 Added token to proxy header
@Lucifergene: This pull request references Jira Issue OCPBUGS-43516, which is valid. The bug has been moved to the POST state.
Requesting review from QA contact: /cc @sanketpathak
The bug has been updated to refer to the pull request using the external bug tracker.
@Lucifergene: This pull request references Jira Issue OCPBUGS-43516, which is valid.
Requesting review from QA contact: /cc @sanketpathak
/label tide/merge-method-squash
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jhadvig, lokanandaprabhu, Lucifergene
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@Lucifergene: all tests passed!
Full PR test history. Your PR dashboard.
@Lucifergene: Jira Issue OCPBUGS-43516: All pull requests linked via external trackers have merged:
Jira Issue OCPBUGS-43516 has been moved to the MODIFIED state.
/cherry-pick release-4.17
@Lucifergene: new pull request created: #14430
[ART PR BUILD NOTIFIER]
Distgit: openshift-enterprise-console This PR has been included in build openshift-enterprise-console-container-v4.18.0-202410231641.p0.g6577e73.assembly.stream.el9. All builds following this will include this PR.
Jira Link: https://issues.redhat.com/browse/OCPBUGS-43516
This pull request introduces several changes to the proxy handling mechanism in the
devconsole
package, focusing on adding user authentication and enhancing the proxy request structure.Enhancements to Proxy Request Structure:
frontend/packages/console-shared/src/utils/proxy.ts
: AddedallowAuthHeader
property toProxyRequest
type.pkg/devconsole/proxy/types.go
: AddedAllowAuthHeader
field toProxyRequest
struct.User Authentication Integration:
pkg/devconsole/proxy/proxy.go
: ModifiedHandler
andserve
functions to accept auser
parameter of type*auth.User
. Added logic to includeAuthorization
header in the service request ifAllowAuthHeader
is true. [1] [2] [3]pkg/server/server.go
: UpdatedHTTPHandler
method to pass theuser
parameter todevconsoleProxy.Handler
.Test Updates for Authentication:
pkg/devconsole/proxy/proxy_test.go
: Addeduser
variable and updated tests to includeAuthorization
header in requests and responses. [1] [2] [3] [4] [5]