-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Don't expose HTTP API for secure clusters #6408
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -52,7 +52,11 @@ Pages and JSON endpoints served by the scheduler | |||||||||
Scheduler API | ||||||||||
------------- | ||||||||||
|
||||||||||
Scheduler methods exposed by the API with an example of the request body they take | ||||||||||
Scheduler methods exposed by the API with an example of the request body they take. | ||||||||||
|
||||||||||
.. note:: | ||||||||||
To prevent unauthorized access, the scheduler API is disabled by default if `tls`_ is enabled. | ||||||||||
See the ``distributed.http.insecure-routes`` :doc:`config <configuration>` setting. | ||||||||||
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API is disabled if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the API is enabled if mTLS is disabled -> API is disabled if mTLS is enabled: distributed/distributed/scheduler.py Lines 2954 to 2957 in 3d7ea1a
|
||||||||||
|
||||||||||
- ``/api/v1/retire_workers`` : retire certain workers on the scheduler | ||||||||||
|
||||||||||
|
@@ -63,7 +67,7 @@ Scheduler methods exposed by the API with an example of the request body they ta | |||||||||
} | ||||||||||
|
||||||||||
- ``/api/v1/get_workers`` : get all workers on the scheduler | ||||||||||
- ``/api/v1/adaptive_target`` : get the target number of workers based on the scheduler's load | ||||||||||
- ``/api/v1/adaptive_target`` : get the target number of workers based on the scheduler's load | ||||||||||
|
||||||||||
Individual bokeh plots | ||||||||||
---------------------- | ||||||||||
|
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.
if there is a typo, the route is actually removed or the version number is bumped, this test would still pass.
You could parametrize over security and ensure that the route is reachable if security is disabled to make sure the test assumption is actually valid
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.
The above
test_api
should effectively do that (I just copied that test to write this one).I also found this testing less thorough than I'd like ideally (would be nice to have a
scheduler.py
unit test with a dummy route for theinsecure-routes
being dropped, plus this test here confirming that the API routes were dropped by default). But I noticed there's no testing inscheduler.py
for HTTP routes, only these sorts of tests.