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

Poor idempotency for NPM "secret" keys #326

Closed
Infraded opened this issue Oct 12, 2017 · 0 comments · Fixed by #386
Closed

Poor idempotency for NPM "secret" keys #326

Infraded opened this issue Oct 12, 2017 · 0 comments · Fixed by #386
Labels
bug Something isn't working

Comments

@Infraded
Copy link

Infraded commented Oct 12, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5
  • Ruby: 2.4 (Embedded)
  • Distribution: CentOS 7
  • Module version: Latest

How to reproduce (e.g Puppet code you use)

Use nodejs::npm::global_config_entry to declare any "secret" config key in NPM, such as _auth, _password, or registry_uri:_password

What are you seeing

Puppet is unable to retrieve the existing key due to protections in NPM that prevent it from showing any key that is prefixed with an _. This forces it to recreate the resource with every run, preventing a node from ever showing as unchanged.

What behaviour did you expect instead

Puppet should be able to verify the key already exists (outside of NPM commands) and is in the desired state without forcing it to be reset with every run

Output log

Any additional information you'd like to impart

PR incoming, looking for feedback on best method to check for these keys. Considering just testing for the value directly against the config, but different OSs have different paths to the global config file and this path is not currently known/managed in the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants