I enabled debug for JobPrivate* directives and this is what I see in logs for every job when Completed Jobs are being listed:<br><br><font face="courier new, monospace">d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: Returning list.                                                                        <br>

d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs(policy=0x7f6128ad6c30(default), con=0x7f612929e2f0(15), printer=(nil)(), owner="korobkin")<br>d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: Get-Jobs                                                                              <br>

d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: username="anonymous"                                                              <br>d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: name=@OWNER                                                                      <br>

d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: name=@cups-admins                                                                                                                                  <br>d [06/Nov/2012:17:06:46 +0000] cupsdGetPrivateAttrs: Returning list.</font><br>

<br>Why would it think that the user is anonymous, when the user is actually authenticated properly?<br><br>This is a snippet of code that is supposed to get the proper user name:<br><br><font face="courier new, monospace"> /*<br>

  * Otherwise check the user against the access list...<br>  */<br><br>  if (con->username[0]) {<br>    username = con->username;<br>    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: username=\"%s\"",<br>

                  username);<br>  }<br>  else if ((attr = ippFindAttribute(con->request, "requesting-user-name",<br>                                    IPP_TAG_NAME)) != NULL)<br>                                    {<br>

    username = attr->values[0].string.text;<br>    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: username=\"%s\"",<br>                  username);<br>    }<br>  else<br>    username = "anonymous";</font><div>

<br></div><div><br></div><div><br><div><div class="gmail_quote">On 2 November 2012 10:17, Alex Korobkin <span dir="ltr"><<a href="mailto:korobkin+cups@gmail.com" target="_blank">korobkin+cups@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi all, </div><div><br></div>I cannot seem to understand how the JobPrivateAccess and JobPrivateValues directives actually work. My CUPS 1.5.4 Linux server authenticates users against LDAP, and I want it to hide print job names, displaying it only to job owners and cups-admins. <div>





<br></div><div>My cupsd.conf has single policy, "default". Here is the what I specify in the policy:</div><div><br></div><div><div><font face="courier new, monospace"><Policy default></font></div><div><font face="courier new, monospace">  JobPrivateAccess @OWNER @cups-admins</font></div>





<div><font face="courier new, monospace">  JobPrivateValues job-name</font></div></div><div><br></div><div>However, job-name is displayed as Unknown (why not Withheld, btw?) to anyone, from anonymous to authenticated ones. I even modified page template and added this stance to be able to see how I'm authenticated to CUPS. </div>





<div><div><font face="courier new, monospace"><TD>{remote_user=?:You are authenticated as <strong>{remote_user}</strong></TD></font></div></div><div><br></div><div>It correctly shows my username, but never shows me any job names: neither my own ones, nor of everyone else. </div>





<div>I tried multiple variations of JobPrivateAccess directive, including just "JobPrivateAccess my_username" and "JobPrivateAccess default", but I never see a difference between authenticated and non-authenticated users. </div>





<div><br></div><div>Excerpt from the logs:</div><div><br></div><div><div><font face="courier new, monospace">D [01/Nov/2012:17:05:38 +0000] [Job 13] Loading attributes...</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] cupsdCheckGroup(username="anonymous", user=(nil), groupname="OWNER")</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] get_md5_password(username="anonymous", group="OWNER", passwd=0x7fff945d0dc0)</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] cupsdCheckGroup(username="anonymous", user=(nil), groupname="cups-admins")</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] get_md5_password(username="anonymous", group="cups-admins", passwd=0x7fff945d0dc0)</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attrs(to=0x7f3905ca7ba0, from=0x7f3905cb7880, ra=0x7f39055087c0, group=2, quickcopy=0)</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7990[job-originating-user-name,2,42])</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7d10[time-at-creation,2,21])</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7d50[time-at-processing,2,21])</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7d90[time-at-completed,2,21])</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7dd0[job-id,2,21])</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7e10[job-state,2,23])</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7e50[job-media-sheets-completed,2,21])</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7ed0[job-k-octets,2,21])</font></div>





<div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] copy_attribute(0x7f3905ca7ba0, 0x7f3905cb7f10[job-printer-state-message,2,41])</font></div><div><font face="courier new, monospace">d [01/Nov/2012:17:05:38 +0000] get_jobs: job->id=14, dest="james-color", username="korobkin", state_value=9, attrs=(nil)</font></div>





<div><font face="courier new, monospace">D [01/Nov/2012:17:05:38 +0000] [Job 14] Loading attributes...</font></div></div><div><br></div><div>Any advice? </div><div>Thanks</div><span><font color="#888888"><div>
-Alex</div>
</font></span></blockquote></div><br></div>
</div>