-
Notifications
You must be signed in to change notification settings - Fork 19
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 #154
Conversation
Signed-off-by: rcohencyberarmor <rcohen@armosec.io>
…ry-CR-objects-adjustments
Signed-off-by: rcohencyberarmor <rcohen@armosec.io>
…ry-CR-objects-adjustments
PR Analysis
PR Feedback
How to use
|
Summary:
|
Signed-off-by: Amir Malka <amirm@armosec.io>
Signed-off-by: Amir Malka <amirm@armosec.io>
Summary:
|
Signed-off-by: Amir Malka <amirm@armosec.io>
Signed-off-by: Amir Malka <amirm@armosec.io>
Signed-off-by: Amir Malka <amirm@armosec.io>
…kend-access-token Signed-off-by: Amir Malka <amirm@armosec.io>
Signed-off-by: Amir Malka <amirm@armosec.io>
Signed-off-by: Amir Malka <amirm@armosec.io>
Support backend access key Signed-off-by: Amir Malka <amirm@armosec.io>
PR Type:
Enhancement
PR Description:
This PR introduces the support for access tokens in the backend adapter. The access token is passed as a parameter to the
NewBackendAdapter
function and is used for authorization in HTTP requests. The token is also loaded from a secret file. The PR includes changes in the function signatures, tests, and the addition of a new function to set headers for post requests. It also includes updates to dependencies in the go.mod file.PR Main Files Walkthrough:
files:
adapters/v1/backend.go
: TheNewBackendAdapter
function now accepts an additional parameter for the access token. ThegetCVEExceptionsFunc
andsendStatusFunc
functions have been updated to use the access token. TheaccessToken
field has been added to theBackendAdapter
struct.adapters/v1/backend_test.go
: The tests have been updated to reflect the changes in function signatures in the backend.go file.cmd/http/main.go
: The access token is now loaded from a secret file and passed to theNewBackendAdapter
function.adapters/v1/backend_utils.go
: A new functionsetPostResultHeaders
has been added to set headers for post requests, including the Authorization header using the access token.config/config.go
: Added functions to load and decode the access token from a secret file.go.mod
: The versions of several dependencies have been updated.User Description:
Overview