-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[functions] Don't auth functions worker metrics endpoint #6801
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
Conversation
|
/pulsarbot run-failure-checks |
2 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
sijie
left a comment
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.
@addisonj I think we should add a flag to control this behavior. In some environments, you probably don't let users curl /metrics endpoint without authentication. The proxy case is different from the broker case because the proxy is usually used for exposing the service to the public.
ac64ab7 to
ef75d77
Compare
|
@sijie I reworked this a fair bit and also expanded scope so you can get the prometheus metrics |
|
/pulsarbot run-failure-checks |
1 similar comment
|
/pulsarbot run-failure-checks |
| doc = "Whether the '/metrics' endpoint requires authentication. Defaults to false." | ||
| + "'authenticationEnabled' must also be set for this to take effect." | ||
| ) | ||
| private boolean authenticateMetricsEndpoint = false; |
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.
Can we change the default to true so it is compatible with existing behavior?
|
/pulsarbot run-failure-checks |
| private Integer workerPortTls; | ||
| @FieldContext( | ||
| category = CATEGORY_WORKER, | ||
| doc = "Whether the '/metrics' endpoint requires authentication. Defaults to false." |
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.
does it default to false or true? The doc says one and the default config says other
|
Whoops, I had changed the default in response to feedback and then forgot
to update the doc
…On Fri, May 22, 2020 at 1:42 PM Sanjeev Kulkarni ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
<#6801 (comment)>:
> @@ -99,6 +99,17 @@
doc = "The port for serving worker https requests"
)
private Integer workerPortTls;
+ @FieldContext(
+ category = CATEGORY_WORKER,
+ doc = "Whether the '/metrics' endpoint requires authentication. Defaults to false."
does it default to false or true? The doc says one and the default config
says other
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#6801 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE3LA5FKDU2FWRWIAXQT5TRS3IRZANCNFSM4MOXFK7A>
.
|
|
@addisonj Can you address the comment? |
5653aad to
7197b7e
Compare
|
@addisonj Please rebase to the master branch. There are some CI tests fix on the master branch. |
The broker and proxy both allow for hitting the metrics endpoint without auth. The functions worker should allow that to be configurable as well. This adds an option to allow for metrics endpoint to allow the endpoint to be hit without auth Additionally, the functions worker doesn't expose the default prometheus metrics (such as JVM info, etc). This commit implements and adds an option to support that
7197b7e to
b99b4c8
Compare
|
/pulsarbot run-failure-checks |
…pache#6801) The broker and proxy both allow for hitting the metrics endpoint without auth. The functions worker should allow that to be configurable as well. This adds an option to allow for metrics endpoint to allow the endpoint to be hit without auth Additionally, the functions worker doesn't expose the default prometheus metrics (such as JVM info, etc). This commit implements and adds an option to support that Co-authored-by: Addison Higham <ahigham@instructure.com>
…pache#6801) The broker and proxy both allow for hitting the metrics endpoint without auth. The functions worker should allow that to be configurable as well. This adds an option to allow for metrics endpoint to allow the endpoint to be hit without auth Additionally, the functions worker doesn't expose the default prometheus metrics (such as JVM info, etc). This commit implements and adds an option to support that Co-authored-by: Addison Higham <ahigham@instructure.com>
Motivation
The broker and proxy both allow for hitting the metrics endpoint without auth. The functions
worker should allow that to be configurable as well. This adds an option to
allow for metrics endpoint to allow the endpoint to be hit without auth
Additionally, the functions worker doesn't expose the default prometheus
metrics (such as JVM info, etc).
This commit implements and adds an option to support that
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation