question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Config setting to disallow `run_on_scheduler`

See original GitHub issue

We run an adaptive deployment wherein the dask Scheduler runs in an environment with elevated permissions compared with the workers. Consequently, we’d rather not have an easily accessible method for accidentally executing code sent from a worker on the scheduler.

I know that this functionality was introduced mainly for debugging purposes in https://github.com/dask/distributed/pull/808, so was hoping we could introduce a config setting that turned this feature off (probably by just implementing a simple if / else in https://github.com/dask/distributed/blob/master/distributed/scheduler.py#L3069).

I’m happy to make the PR but wanted to open this issue for discussion before doing so.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mrocklincommented, Mar 7, 2019

And then layering a config setting on top that automatically adds [‘terminate’, ‘feed’, ‘run_function’] to the blocked_handlers for the Scheduler.

Before we bake in a config setting I’m inclined to see if we might just have the blocked handlers as the config, and then have docs that encourage people to use a particular set in the scheduler. I’m trying to avoid having many small special cased options and instead have a few relatively general purpose ones until we see very common patterns emerge.

1reaction
mrocklincommented, Mar 7, 2019

Interesting; so that could be as simple as providing a list of strings to the blocked_handlers kwarg, and then pop those keys from self.handlers in the Server init, correct?

Could pop, or could check the blocked_handlers on each message and raise an informative error.

if op in self.blocked_handlers:
    raise Exception("The op OP has been explicitly disallowed in this TYPENAME, possibly due to security concerns")
else:
    func = self.handlers[op]
    ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I prevent a user from running or stopping a ...
Start regedit.exe on the machine where you want to block access. · Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Task Scheduler5. · From the Edit ...
Read more >
Enabling and disabling schedules
In the Schedules pane, clear the checkbox to the left of the schedule name. ... , and choose Disable Selected Schedule. Prevent all...
Read more >
Deny particular user to run schedule job or create schedule job
Expand Administrative Templates, Windows Components, Task Scheduler. Double-click "Prevent Task Run or End." Select Enabled and click OK. --If ...
Read more >
How to Prevent Others From Creating Tasks in ... - MakeUseOf
Press Win + R to open the Run command dialog box, type gpedit.msc, and then press Enter to open the LGPE. · Navigate...
Read more >
How to conditionally enable or disable scheduled jobs in ...
The most efficient way to disable @Scheduled in Spring is to set cron expression to - @Scheduled(cron = "-") public void autoEvictAllCache() ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found