|
| 1 | +# CUPS scheduler configuration |
| 2 | +# Configured for network access from Docker containers and the local subnet. |
| 3 | +# See https://www.cups.org/doc/man-cupsd.conf.html for full reference. |
| 4 | + |
| 5 | +# Listen on all interfaces so other containers and LAN hosts can connect. |
| 6 | +# The default "Listen localhost:631" would block all external access. |
| 7 | +Port 631 |
| 8 | +Listen /run/cups/cups.sock |
| 9 | + |
| 10 | +# Allow mDNS/DNS-SD printer discovery on the LAN. |
| 11 | +Browsing Yes |
| 12 | +BrowseLocalProtocols dnssd |
| 13 | + |
| 14 | +# Default log destinations. |
| 15 | +AccessLog syslog |
| 16 | +ErrorLog syslog |
| 17 | +LogLevel warn |
| 18 | + |
| 19 | +# Paths |
| 20 | +ServerRoot /etc/cups |
| 21 | +StateDir /var/lib/cups |
| 22 | +RequestRoot /var/spool/cups |
| 23 | +TempDir /var/spool/cups/tmp |
| 24 | + |
| 25 | +MaxLogSize 0 |
| 26 | + |
| 27 | +# Restrict access to the local subnet and Docker networks. |
| 28 | +# @LOCAL matches any interface that is not the loopback and any |
| 29 | +# address on those interfaces — covers both the host LAN and |
| 30 | +# all attached Docker bridge networks. |
| 31 | +<Location /> |
| 32 | + Order allow,deny |
| 33 | + Allow @LOCAL |
| 34 | +</Location> |
| 35 | + |
| 36 | +<Location /admin> |
| 37 | + Order allow,deny |
| 38 | + Allow @LOCAL |
| 39 | +</Location> |
| 40 | + |
| 41 | +<Location /admin/conf> |
| 42 | + AuthType Default |
| 43 | + Require user @SYSTEM |
| 44 | + Order allow,deny |
| 45 | + Allow @LOCAL |
| 46 | +</Location> |
| 47 | + |
| 48 | +<Location /admin/log> |
| 49 | + AuthType Default |
| 50 | + Require user @SYSTEM |
| 51 | + Order allow,deny |
| 52 | + Allow @LOCAL |
| 53 | +</Location> |
| 54 | + |
| 55 | +<Policy default> |
| 56 | + JobPrivateAccess default |
| 57 | + JobPrivateValues default |
| 58 | + SubscriptionPrivateAccess default |
| 59 | + SubscriptionPrivateValues default |
| 60 | + |
| 61 | + <Limit Create-Job Print-Job Print-URI Validate-Job> |
| 62 | + Order deny,allow |
| 63 | + Allow @LOCAL |
| 64 | + </Limit> |
| 65 | + |
| 66 | + <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document> |
| 67 | + Require user @OWNER @SYSTEM |
| 68 | + Order deny,allow |
| 69 | + Allow @LOCAL |
| 70 | + </Limit> |
| 71 | + |
| 72 | + <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices> |
| 73 | + AuthType Default |
| 74 | + Require user @SYSTEM |
| 75 | + Order deny,allow |
| 76 | + Allow @LOCAL |
| 77 | + </Limit> |
| 78 | + |
| 79 | + <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs> |
| 80 | + AuthType Default |
| 81 | + Require user @SYSTEM |
| 82 | + Order deny,allow |
| 83 | + Allow @LOCAL |
| 84 | + </Limit> |
| 85 | + |
| 86 | + <Limit Cancel-Job CUPS-Authenticate-Job> |
| 87 | + Require user @OWNER @SYSTEM |
| 88 | + Order deny,allow |
| 89 | + Allow @LOCAL |
| 90 | + </Limit> |
| 91 | + |
| 92 | + <Limit All> |
| 93 | + Order deny,allow |
| 94 | + Allow @LOCAL |
| 95 | + </Limit> |
| 96 | +</Policy> |
0 commit comments