-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support backend access key #45
Conversation
Signed-off-by: rcohencyberarmor <[email protected]>
PR Analysis
PR Feedback
How to use
|
Summary:
|
Signed-off-by: Amir Malka <[email protected]>
Summary:
|
…path Signed-off-by: Amir Malka <[email protected]>
Summary:
|
Signed-off-by: Amir Malka <[email protected]>
Summary:
|
Signed-off-by: Amir Malka <[email protected]>
Summary:
|
Signed-off-by: Amir Malka <[email protected]>
Signed-off-by: Amir Malka <[email protected]>
Summary:
|
Support backend access key (kubescape#45)
Support backend access key Signed-off-by: Amir Malka <[email protected]>
PR Type:
Enhancement
PR Description:
This pull request introduces the ability to use an access token when connecting to the backend. This is achieved by setting the access token in the headers of the WebSocketHandler. The token is loaded from a secret and passed to the WebSocketHandler during its creation. The changes also include updates to several dependencies in the go.mod file.
PR Main Files Walkthrough:
files:
watch/websocket.go
: Added a headers field to the WebSocketHandler struct to hold the access token. A new function, setHeaders, was introduced to set the access token in the headers. The createWebSocketHandler function was updated to accept a SecretData object and use it to set the headers. The connectToWebSocket function was updated to use the headers when dialing.watch/watchhandler.go
: Updated the CreateWatchHandler function to accept a SecretData object and pass it to the createWebSocketHandler function.main.go
: The main function was updated to load the access token from a secret and pass it to the CreateWatchHandler function.go.mod
: Several dependencies were updated, including the armoapi-go, backend, go-logger, kubevuln, and others.