Jira (PUP-11454) Cannot login under user created by Puppet on MacOS 12.1

5 views
Skip to first unread message

Dmitriy Grigorev (Jira)

unread,
Feb 10, 2022, 6:53:02 AM2/10/22
to puppe...@googlegroups.com
Dmitriy Grigorev updated an issue
 
Puppet / Bug PUP-11454
Cannot login under user created by Puppet on MacOS 12.1
Change By: Dmitriy Grigorev
Environment: System:
{code}
uname -prsv
Darwin 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 i386
{code}
Puppet:
{code}
puppet --version
7.14.0
{code}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Dmitriy Grigorev (Jira)

unread,
Feb 10, 2022, 6:53:02 AM2/10/22
to puppe...@googlegroups.com
Dmitriy Grigorev updated an issue
I create a new user using code example from  stdlib docs
{code}
$pw = Sensitive.new('Pa55w0rd')
$salt = Sensitive.new('Using s0m3 s@lt')
$pw_info = Sensitive.new(str2saltedpbkdf2($pw, $salt, 50000))
user { 'jdoe':
  ensure     => present,
  iterations => unwrap($pw_info)['interations'],
  password   => unwrap($pw_info)['password_hex'],
  salt       => unwrap($pw_info)['salt_hex'],
}
{code}
Everything applies with no error, but I can't login until I change password via system preferences.

System:
{code}
uname -prsv
Darwin 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 i386
{code}
Puppet:
{code}
puppet --version
7.14.0
{code}

Dmitriy Grigorev (Jira)

unread,
Feb 10, 2022, 6:53:03 AM2/10/22
to puppe...@googlegroups.com
Dmitriy Grigorev created an issue
Issue Type: Bug Bug
Affects Versions: PUP 7.14.0
Assignee: Unassigned
Created: 2022/02/10 3:52 AM
Environment:

System:

 uname -prsv
Darwin 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 i386

Puppet:

puppet --version
7.14.0

Priority: Normal Normal
Reporter: Dmitriy Grigorev

I create a new user using code example from  stdlib docs

$pw = Sensitive.new('Pa55w0rd')
$salt = Sensitive.new('Using s0m3 s@lt')
$pw_info = Sensitive.new(str2saltedpbkdf2($pw, $salt, 50000))
user { 'jdoe':
  ensure     => present,
  iterations => unwrap($pw_info)['interations'],
  password   => unwrap($pw_info)['password_hex'],
  salt       => unwrap($pw_info)['salt_hex'],
}

Everything applies with no error, but I can't login until I change password via system preferences.

Nirupama Mantha (Jira)

unread,
Feb 15, 2022, 4:27:02 PM2/15/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
Change By: Nirupama Mantha
Epic Link: PA-4217
Environment:

Josh Cooper (Jira)

unread,
Feb 23, 2022, 9:45:01 PM2/23/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Mar 30, 2022, 11:46:01 AM3/30/22
to puppe...@googlegroups.com

Nirupama Mantha (Jira)

unread,
Mar 30, 2022, 11:50:02 AM3/30/22
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
Mar 30, 2022, 11:51:03 AM3/30/22
to puppe...@googlegroups.com

Aria Li (Jira)

unread,
Apr 5, 2022, 7:55:03 PM4/5/22
to puppe...@googlegroups.com

Aria Li (Jira)

unread,
Apr 6, 2022, 2:10:03 PM4/6/22
to puppe...@googlegroups.com
Aria Li updated an issue
I create a new user using code example from  stdlib docs

{code}
$pw = Sensitive.new('Pa55w0rd')
$salt = Sensitive.new('Using s0m3 s@lt')
$pw_info = Sensitive.new(str2saltedpbkdf2($pw, $salt, 50000))
user { 'jdoe':
  ensure     => present,
  iterations => unwrap($pw_info)[' interations iterations '],

  password   => unwrap($pw_info)['password_hex'],
  salt       => unwrap($pw_info)['salt_hex'],
}
{code}

Everything applies with no error, but I can't login until I change password via system preferences.
System:
{code}

uname -prsv
Darwin 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 i386
{code}
Puppet:
{code}

puppet --version
7.14.0
{code}

Josh Cooper (Jira)

unread,
Apr 8, 2022, 12:22:01 PM4/8/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11454
 
Re: Cannot login under user created by Puppet on MacOS 12.1

The issue is macOS requires the salt to be a 32-byte value, see https://developer.apple.com/documentation/devicemanagement/passwordhash/salted-sha512-pbkdf2 It may be that earlier macOS versions didn't have this requirement help_16.png but at least 10.15 and up require 32-bytes. Puppet's user resource requires the value to be hex encoded (so it must be a string of length 64).

For puppet, we should reject salt values whose length != 64 and if the value contains non-hex characters. Also update the description in https://github.com/puppetlabs/puppet/blob/79a6ffa87e540053f3a0f87240a996401e6bfe50/lib/puppet/type/user.rb#L224-L229

We should file a separate MODULES ticket to ensure the str2saltedpbkdf2 produces salt values that match those requirements, and update the documentation to show a valid salt. Also there's a typo in the module docs, it reference "interations" instead of "iterations".

Nirupama Mantha (Jira)

unread,
Apr 13, 2022, 11:20:01 AM4/13/22
to puppe...@googlegroups.com
Nirupama Mantha updated an issue
 
Change By: Nirupama Mantha
Sprint: Phoenix 2022-04-13 , Phoenix 2022-04-27

Josh Cooper (Jira)

unread,
Apr 26, 2022, 10:08:02 PM4/26/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: On macOS, puppet now validates that the "salt" parameter for the "user" resource is a hex encoded string of length 64 (exactly).

Aria Li (Jira)

unread,
May 18, 2022, 2:25:02 PM5/18/22
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Fix Version/s: PUP 7.17.0

Parker Leach (Jira)

unread,
May 23, 2022, 12:44:02 PM5/23/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages