Jira (FACT-1346) Provide Environment Variables as a Structured Fact

2 views
Skip to first unread message

Rob Reynolds (JIRA)

unread,
Feb 17, 2016, 7:42:02 PM2/17/16
to puppe...@googlegroups.com
Rob Reynolds updated an issue
 
Facter / New Feature FACT-1346
Provide Environment Variables as a Structured Fact
Change By: Rob Reynolds
Summary: Provide Environment Variables as  Facts  a Structured Fact
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Rob Reynolds (JIRA)

unread,
Feb 18, 2016, 7:53:03 AM2/18/16
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Sprint: Windows Triage

Rob Reynolds (JIRA)

unread,
Feb 18, 2016, 7:53:05 AM2/18/16
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Scrum Team: Client Platform Windows

Rob Reynolds (JIRA)

unread,
Feb 18, 2016, 7:54:03 AM2/18/16
to puppe...@googlegroups.com
Rob Reynolds commented on New Feature FACT-1346
 
Re: Provide Environment Variables as a Structured Fact

This could also be focused on just the environment variables that are necessary for Puppet to work, we already provide Path as a variable, but not things like SystemDir, TEMP, etc. Those would be beneficial to provide.

Steve Barlow (JIRA)

unread,
Mar 7, 2016, 4:30:04 PM3/7/16
to puppe...@googlegroups.com
Steve Barlow assigned an issue to Kenaz Kwa
 
Change By: Steve Barlow
Assignee: Kenaz Kwa
Sprint: Windows Client  Triage
Scrum Team: Windows Client Platform

Josh Cooper (JIRA)

unread,
Mar 30, 2016, 6:48:04 PM3/30/16
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Client Triage
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Josh Cooper (JIRA)

unread,
Mar 30, 2016, 6:48:08 PM3/30/16
to puppe...@googlegroups.com
Josh Cooper commented on New Feature FACT-1346
 
Re: Provide Environment Variables as a Structured Fact

Kenaz Kwa Eric Sorenson we need more definition about which environment variables to include because including all environment facts can raise security issues. Can you provide guidance about which should be included in core facter (as opposed to windows specific module?)

Kenaz Kwa (JIRA)

unread,
Apr 4, 2016, 6:50:04 PM4/4/16
to puppe...@googlegroups.com
Kenaz Kwa commented on New Feature FACT-1346

+Nate McCurdy for additional facts he may have had to author.

Some that recently came up (that required custom facts) include:

  • PageFile information (where it is & whether it's automanaged)
  • Directory locations for AppData, ProgramData, SystemRoot, ProgramFiles, PSModulePath etc.
  • User info (domain, user account)

I don't think any of that data should be security-impacting. These are general things that most Windows admins will use that today require custom facter-ing. The PageFile one may be a bit module specific, but I think the others are module-agnostic.

Kenaz

Eric Sorenson (JIRA)

unread,
Apr 11, 2016, 4:32:04 PM4/11/16
to puppe...@googlegroups.com

I'm having a hard time thinking of equivalents to those Kenaz Kwa mentioned in the Unix/Linux world.

Since you would not want to maintain an ever-expanding blacklist of env vars which should not be put into facts due to security exposure, and there's not an obvious set to start with besides "everything, just in case", I'd suggest not including any. If a module wants to add them as an external fact, that's easy to do.

Rob Reynolds (JIRA)

unread,
Apr 11, 2016, 5:10:08 PM4/11/16
to puppe...@googlegroups.com
Rob Reynolds commented on New Feature FACT-1346

These would be beneficial to provide:

  • SystemRoot
  • WinDir
  • TEMP
  • SystemDrive

They may not have *nix equivalents, but they are very helpful for those on Windows.

Maggie Dreyer (JIRA)

unread,
Oct 3, 2016, 2:14:03 PM10/3/16
to puppe...@googlegroups.com

Now that

FACT-718 has been completed, I'd like to note that it is unlikely to help with blocking only certain environment variables, unless each one is collected independently (i.e. has its own resolver in Facter), because FACT-718 blocks collection, not reporting. It also cannot currently be used for external facts. But it sounds like the important part is to not report variables that might be sensitive, so I think the relevant ticket is now FACT-1462.
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Maggie Dreyer (JIRA)

unread,
Feb 7, 2017, 2:53:02 PM2/7/17
to puppe...@googlegroups.com

Glenn Sarti Ethan Brown since we don't want to just report ALL environment variables on the system, what do you think of the list in the above comment, for useful ones to report? Are there any others you can think of?

Ethan Brown (JIRA)

unread,
Feb 7, 2017, 5:36:03 PM2/7/17
to puppe...@googlegroups.com
Ethan Brown commented on New Feature FACT-1346

I agree with the security implications - you wouldn't want, for instance, AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY propagated everywhere.

My list would include the following:

  • ALLUSERSPROFILE - sample value: C:\ProgramData
  • APPDATA - sample value: C:\Users\Administrator\AppData\Roaming
  • CommonProgramFiles - sample value: C:\Program Files\Common Files
  • CommonProgramFiles(x86) - sample value: C:\Program Files (x86)\Common Files (not present on 32-bit)
  • HOME - sample value: C:\Users\Administrator
  • HOMEDRIVE - sample value: C:
  • HOMEPATH - sample value: \Users\Administrator
  • LOCALAPPDATA - sample value: C:\Users\Administrator\AppData\Local
  • PATHEXT - sample value: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW;.CPL
  • PROCESSOR_IDENTIFIER - sample value: Intel64 Family 6 Model 70 Stepping 1, GenuineIntel - probably better to amend processors fact
  • PROCESSOR_LEVEL - sample value: 6 - probably better to amend processors fact
  • PROCESSOR_REVISION - sample value: 4601 - probably better to amend processors fact
  • ProgramData - sample value: C:\ProgramData
  • ProgramFiles - sample value: C:\Program Files
  • ProgramFiles(x86) - sample value: C:\Program Files (x86) (not present on 32-bit I don't believe)
  • PSModulePath - sample value: C:\Users\Administrator\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\ Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\WindowsPowerShell\Modules\;C:\Program F iles (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\;C:\Program Files (x86)\M icrosoft SDKs\Azure\PowerShell\ServiceManagement (arguably belongs in the PowerShell module)
  • PUBLIC - sample value: C:\Users\Public
  • SystemDrive - sample value: C:
  • SystemRoot - sample value: C:\Windows
  • TEMP - sample value: C:\Users\ADMINI~1\AppData\Local\Temp\1
  • TMP - sample value: C:\Users\ADMINI~1\AppData\Local\Temp\1
  • USERPROFILE - sample value: C:\Users\Administrator
  • windir - sample value: C:\Windows - probably better to amend os.windows fact to include this value

The following would have been useful as well, except that Facter includes them elsewhere already:

  • COMPUTERNAME - same as hostname fact
  • NUMBER_OF_PROCESSORS - sample value: 2 - processors fact contains this
  • OS - env var is Windows_NT but os fact basically includes same info
  • Path - same as path fact
  • PROCESSOR_ARCHITECTURE - sample value: AMD64 - processors fact has isa => "x64"
  • USERNAME - sample value: Administrator - fact identity.user has value VAGRANT-2008R2\Administrator

Glenn Sarti (JIRA)

unread,
Feb 7, 2017, 7:06:03 PM2/7/17
to puppe...@googlegroups.com
Glenn Sarti commented on New Feature FACT-1346

I assume these would be a structure fact as well?

Geoff Nichols (JIRA)

unread,
Apr 4, 2017, 10:32:02 PM4/4/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
 
Change By: Geoff Nichols
Sprint: Agent Needs Information

Geoff Nichols (JIRA)

unread,
Apr 13, 2017, 1:48:11 AM4/13/17
to puppe...@googlegroups.com

Maggie Dreyer (JIRA)

unread,
May 17, 2017, 1:57:04 PM5/17/17
to puppe...@googlegroups.com

Sean McDonald (JIRA)

unread,
May 17, 2017, 1:57:05 PM5/17/17
to puppe...@googlegroups.com
Sean McDonald assigned an issue to Unassigned
Change By: Sean McDonald
Assignee: Kenaz Kwa

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:54:20 PM5/18/17
to puppe...@googlegroups.com

Sean McDonald (JIRA)

unread,
Feb 21, 2018, 1:50:05 PM2/21/18
to puppe...@googlegroups.com
Sean McDonald updated an issue
Change By: Sean McDonald
Labels: triaged windows
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Brett Jacobson (JIRA)

unread,
Sep 29, 2018, 10:45:04 AM9/29/18
to puppe...@googlegroups.com
Brett Jacobson commented on New Feature FACT-1346
 
Re: Provide Environment Variables as a Structured Fact

Is there a good reason why this feature request died? Did everyone just go home and decide it was easier to write your own custom facts to get the Windows temp folder from an environment variable instead of Puppet building it in as a fact?

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Michael Fyffe (JIRA)

unread,
Oct 3, 2018, 6:25:03 AM10/3/18
to puppe...@googlegroups.com

Yea, I'm still surprised this isn't built into core facter.

Glenn Sarti (JIRA)

unread,
Oct 3, 2018, 9:27:04 PM10/3/18
to puppe...@googlegroups.com

Sean McDonald (JIRA)

unread,
Jan 11, 2019, 7:39:06 PM1/11/19
to puppe...@googlegroups.com

Since this seems solved in modules we would prefer to keep actual fact implementation out of the core facter implementation and inside modules.

If we can build the important windows env vars in to a module we could even include that module with the core set of modules that ship 'batteries included' with the agent.

If anyone disagrees, please feel free to re-open this ticket with reasoning on why it's important that this stay in core facter. /cc Branan Riley

Claudia Petty (Jira)

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