-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add auth for gateway calls to /system/async-report #36
Conversation
This commit adds basic authenctication for the gateway to report metrics of the function when it is called asynchronously. Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
auth.go
Outdated
) | ||
|
||
//AddBasicAuth to a request by reading secrets | ||
func AddBasicAuth(req *http.Request) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code taken from the openfaas/faas project? perhaps we could vendor it or move it to the faas-provider project? cc @bartsmykla
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used openfaas-cloud
for the reference. I did not check if this is available in openfaas/faas
.
Excellent detail on the test scenarios. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outstanding changes are required. Please ping me again when done. Thanks Vivek
I have used |
I've released this now via https://github.com/openfaas/nats-queue-worker/releases/tag/0.5.1 Please could you update all the relevant places / YAML files in a PR for faas/faas-netes? |
yes |
This commit adds basic authenctication for the gateway to report metrics
of the function when it is called asynchronously.
Signed-off-by: Vivek Singh vivekkmr45@yahoo.in
Description
Motivation and Context
Fixes: #35
How Has This Been Tested?
I have tested on Docker for Mac with OpenFaaS Deployed on
Docker swarm
Testcase-1:
Positive case with authentication enabled
Output:
Testcase-2:
Negative case with authentication enabled, No secrets in
queue-worker
servicebaic-auth
secrets fromqueue-worker
serviceOutput:
Testcase-3:
Positive case with authentication disabled, secrets passed in
queue-worker
servicequeue-worker
service withbasic-auth
secretsOutput:
Testcase-4:
Positive test case with authetication disabled, secrets not passed in
queue-worker
servicequeue-worker
service withoutbasic-auth
secretsOutput:
Types of changes
Checklist:
git commit -s