Jira (FACT-1419) Add a 'privileged' element to the identity fact

3 views
Skip to first unread message

Michal Ruzicka (JIRA)

unread,
May 17, 2016, 1:37:02 PM5/17/16
to puppe...@googlegroups.com
Michal Ruzicka updated an issue
 
Facter / New Feature FACT-1419
Add a 'privileged' element to the identity fact
Change By: Michal Ruzicka
Summary: Add a ' superuser privileged ' element to the identity fact
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Michal Ruzicka (JIRA)

unread,
May 17, 2016, 1:37:05 PM5/17/16
to puppe...@googlegroups.com
Michal Ruzicka updated an issue
Enhance the {{identity}} fact with the {{ superuser privileged }} element - a boolean flag which is set to {{true}} if the facter process runs with UID of 0 on *NIX systems or with the privileges of the local Administrators group on Windows. Under any other circumstances the flag is set to {{false}}.

Michal Ruzicka (JIRA)

unread,
May 17, 2016, 3:13:02 PM5/17/16
to puppe...@googlegroups.com
Michal Ruzicka updated an issue
Change By: Michal Ruzicka
Release Notes Summary: The `identity` structured fact has been enhanced with the ` superuser privileged ` element - a boolean flag which is set to true if facter is running  with the superuser privileges  as a privileged process  or false if not.

Michael Smith (JIRA)

unread,
May 17, 2016, 4:28:04 PM5/17/16
to puppe...@googlegroups.com
Michael Smith updated an issue
Change By: Michael Smith
Fix Version/s: FACT 3.2.0

Steve Barlow (JIRA)

unread,
May 18, 2016, 11:12:05 AM5/18/16
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: PCP 2016-05-18 , PCP 2016-06-01 (pcpcon)

Michal Ruzicka (JIRA)

unread,
May 18, 2016, 2:44:03 PM5/18/16
to puppe...@googlegroups.com
Michal Ruzicka assigned an issue to Michal Ruzicka
 

The priviliged flag implemented in the frame of this ticket was identified as the cleanest solution to the problem discussed on PE-14501. And since it was blocking that issue it took its place in the sprint.

Change By: Michal Ruzicka
Assignee: Michal Ruzicka
Scope Change Category: Found
Scope Change Reason: created as a blocking prerequisite for PE-14501

Michal Ruzicka (JIRA)

unread,
May 18, 2016, 2:45:04 PM5/18/16
to puppe...@googlegroups.com
Michal Ruzicka updated an issue
Change By: Michal Ruzicka
Comment:
The {{priviliged}} flag implemented in the frame of this ticket was identified as the cleanest solution to the problem discussed on PE-14501. And since it was blocking that issue it took its place in the sprint.

James Stocks (JIRA)

unread,
May 19, 2016, 5:41:03 AM5/19/16
to puppe...@googlegroups.com
James Stocks updated an issue
Change By: James Stocks
QA Risk Assessment: Medium
QA Status: Reviewed

Michael Smith (JIRA)

unread,
May 19, 2016, 3:55:03 PM5/19/16
to puppe...@googlegroups.com
Michael Smith assigned an issue to qa
Change By: Michael Smith
Status: Ready for  CI  Test
Assignee: Michal Ruzicka qa

James Stocks (JIRA)

unread,
May 23, 2016, 12:05:05 PM5/23/16
to puppe...@googlegroups.com
James Stocks assigned an issue to James Stocks
Change By: James Stocks
Assignee: qa James Stocks

James Stocks (JIRA)

unread,
May 23, 2016, 12:53:03 PM5/23/16
to puppe...@googlegroups.com
James Stocks commented on New Feature FACT-1419
 
Re: Add a 'privileged' element to the identity fact

Tested in puppet-agent 1.5.0.60.g4aac788

Appears to work on EL7, but on Windows 2012 R2 it returns false for a local administrator user

EL7 -

-bash-4.2$ facter identity
{
  gid => 1000,
  group => "james",
  privileged => false,
  uid => 1000,
  user => "james"
}
-bash-4.2$ exit
logout
[root@g3pilx4z9x05qn3 ~]# facter identity
{
  gid => 0,
  group => "root",
  privileged => true,
  uid => 0,
  user => "root"
}

Windows 2012 R2 Administrator:

C:\Program Files\Puppet Labs\Puppet\bin>facter identity
{
  privileged => true,
  user => "C1RM6O1N75J8CNU\Administrator"
}

Windows 2012 R2 local admin user:

C:\Program Files\Puppet Labs\Puppet\bin>facter identity
{
  privileged => false,
  user => "C1RM6O1N75J8CNU\james_admin"
}

Windows 2012 R2 local non-admin user:

C:\Program Files\Puppet Labs\Puppet\bin>facter identity
{
  privileged => false,
  user => "C1RM6O1N75J8CNU\james_standard"
}

James Stocks (JIRA)

unread,
May 23, 2016, 12:57:04 PM5/23/16
to puppe...@googlegroups.com
James Stocks updated an issue

Attaching screenshot relating to previous comment to show that james_admin is in the local Administrators group

Change By: James Stocks
Attachment: Screen Shot 2016-05-23 at 17.55.10.png

James Stocks (JIRA)

unread,
May 23, 2016, 1:25:07 PM5/23/16
to puppe...@googlegroups.com
James Stocks updated an issue

Previous comment was incorrect - user was in Administrator group; but the command prompt (and therefore the facter process) did have elevated privileges. Attached screenshot shows privileged is true when facter is run with elevated privileges

Change By: James Stocks
Attachment: Screen Shot 2016-05-23 at 18.22.15.png

Claudia Petty (Jira)

unread,
Jun 21, 2023, 8:44:05 AM6/21/23
to puppe...@googlegroups.com
Claudia Petty updated an issue
Change By: Claudia Petty
Labels: new-feature
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages