galaxyproject / ansible-slurm

Ansible role for installing and managing the Slurm Workload Manager
86 stars 47 forks source link

passwords for databases are visible to anyone in slurm.conf #39

Open jakob1379 opened 1 year ago

jakob1379 commented 1 year ago

This is mainly a concern if the controller is available to others than admins, but it would not hurt to change to owner ship like so:

# tasks/common.yml
# ...

- name: Install slurm.conf
  ansible.builtin.template:
    src: "slurm.conf.j2"
    dest: "{{ slurm_config_dir }}/slurm.conf"
    owner: root
    group: slurm
    mode: "0640"
  notify:
    - Restart slurmd
    - Restart slurmctld

this way members of the group "slurm" are allowed to view the file but only root can edit. if scontrol or one of the other commands actually edits the file, the owner can be changed to slurm or change the rights to 0644 so members of the group can edit as well.