Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef cert being stored in the windows OS cert store issue. #218

Open
snohio opened this issue Feb 14, 2023 · 1 comment
Open

Chef cert being stored in the windows OS cert store issue. #218

snohio opened this issue Feb 14, 2023 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@snohio
Copy link

snohio commented Feb 14, 2023

Version:

23.2.1028

Environment:

Windows 10 / 11

Scenario:

Pushing a policy to the

Steps to Reproduce:

Install Chef Workstation on 23.2.1028 on a Windows 11 system
Push a policyfile to the Chef Infra server with a command like chef push dev .\base.lock.json
Do not run Chef from a Powershell session with Administrator elevated privileges.

Expected Result:

To not get a warning that "Hive and values not preset in registry".
To not get an error about Access is Denied on Win32::Registry::Error

Actual Result:

PS C:\Users\butler\repos\snohio\policyfiles> chef push dev .\base.lock.json
[2023-02-14T09:27:54-05:00] WARN: Authentication Hive and values not present in registry, creating them now
Error: Failed to upload policy to policy group dev
Reason: (Win32::Registry::Error) Access is denied.

And if running with Admin privileges:

PS C:\Users\butler\repos\snohio\policyfiles> chef push dev .\base.lock.json
[2023-02-14T09:59:42-05:00] WARN: Authentication Hive and values not present in registry, creating them now
Uploading policy base_win_choco (c83e387e32) to policy group dev
Using    chef-client         1.4.1  (977e300d)
Using    chef_client_updater 3.12.3 (4a3c5a1d)
@snohio snohio added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Feb 14, 2023
@Stromweld
Copy link
Contributor

Sounds like chef-cli is sharing a library or something with chef-client or knife where it's looking at the Windows OS cert store for the users login pem cert. This is the new behaviour in chef-client 18 for nodes. Since the user isn't running an administrator shell they are denied access but it works when they do run it in an administrator shell.

Logic may need to be updated to look at the config[client_key] first and if undefined then try to find it in the OS cert store.

This may be related to this PR chef/chef#13552 which references:
Reference Bug - https://chefio.atlassian.net/browse/INFC-407
Reference Bug - chef/chef#13402 (comment)
Related discussion - chef/chef#13407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants