cups_server: Fix authentication and authorization
This commit is contained in:
parent
8a3e283c27
commit
7089f38999
1 changed files with 16 additions and 6 deletions
|
@ -15,7 +15,9 @@
|
||||||
- name: Configure cups keytab location
|
- name: Configure cups keytab location
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/systemd/system/cups.service.d/keytab.conf
|
dest: /etc/systemd/system/cups.service.d/keytab.conf
|
||||||
content: "[Service]\nEnvironment=KRB5_KTNAME=FILE:/etc/cups/cups.keytab\n"
|
content: |
|
||||||
|
[Service]
|
||||||
|
Environment=KRB5_KTNAME=FILE:/etc/cups/cups.keytab
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
@ -38,7 +40,7 @@
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/cups/cupsd.conf
|
path: /etc/cups/cupsd.conf
|
||||||
line: "SSLListen 631"
|
line: "SSLListen 631"
|
||||||
insertafter: "Listen /var/run/cups/cups.sock"
|
insertafter: "^Listen .*.sock"
|
||||||
notify: Restart cups
|
notify: Restart cups
|
||||||
|
|
||||||
- name: Require tls 1.3
|
- name: Require tls 1.3
|
||||||
|
@ -94,10 +96,18 @@
|
||||||
- name: Disable unauthenticated access from cups
|
- name: Disable unauthenticated access from cups
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /etc/cups/cupsd.conf
|
path: /etc/cups/cupsd.conf
|
||||||
insertafter: "^<Location />"
|
marker: "{mark}"
|
||||||
block: |
|
marker_begin: "<Location />"
|
||||||
AuthType Default
|
marker_end: "</Location>"
|
||||||
Require user @foosh
|
block: |2
|
||||||
|
AuthType Default
|
||||||
|
Require group foosh
|
||||||
|
Order deny,allow
|
||||||
|
</Location>
|
||||||
|
<Location /admin>
|
||||||
|
AuthType Default
|
||||||
|
Require group sysadm
|
||||||
|
Order deny,allow
|
||||||
notify: Restart cups
|
notify: Restart cups
|
||||||
|
|
||||||
- name: Configure cups admin group
|
- name: Configure cups admin group
|
||||||
|
|
Loading…
Add table
Reference in a new issue