Overriding cookie generation/handling in Slurm connection manager

(This is a cross post from Example of reading cookie from (shared) file? · Issue #69 · JuliaParallel/ClusterManagers.jl · GitHub since it hasn’t gotten any responses there.)

I need to figure out how to store / retrieve a parallel cluster cookie from a file on a shared filesystem that will be accessible to all workers. I’ve looked through the code but can’t figure out how to do it, though the documentation says it’s possible via a ClusterManager override:

Note that environments requiring higher levels of security can implement this via a custom ClusterManager. For example, cookies can be pre-shared and hence not specified as a startup argument.

If it matters, this is for a Slurm environment. Any guidance would be greatly appreciated.

(Also - if there’s a way to create a cookie of a specific length, that’d be awesome.)