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

nut user configuration does not support AnsibleVaultEncryptedUnicode passwords #409

Closed
tedski opened this issue Aug 14, 2024 · 3 comments · Fixed by #449
Closed

nut user configuration does not support AnsibleVaultEncryptedUnicode passwords #409

tedski opened this issue Aug 14, 2024 · 3 comments · Fixed by #449

Comments

@tedski
Copy link
Contributor

tedski commented Aug 14, 2024

The upsd.users template checks each user option type and if it's a non-string iterable, it creates a multi-line repeat of the option. If a user password is encrypted with ansible vault, it is iterable, but not type string, therefore causing the password to be split out into many "password=" lines with each containing a single character. This is because the type of the password string is AnsibleVaultEncryptedUnicode, not string.

My proposed fix is to test if option name is password and always treat that as a single string since upsd.users does not support multiple passwords for a user anyway. Anything given to the template as a password key should be a single string.

If that solution is amenable, I can have a PR ready in a few minutes.

Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

@github-actions github-actions bot added the stale This issue or pull request has been marked 'stale' due to lack of recent activity label Nov 13, 2024
@vladgh vladgh removed the stale This issue or pull request has been marked 'stale' due to lack of recent activity label Nov 13, 2024
@tedski
Copy link
Contributor Author

tedski commented Feb 11, 2025

@vladgh any chance you can get some eyes on the linked PR to resolve this issue? Thanks so much!

@vladgh
Copy link
Owner

vladgh commented Feb 11, 2025

Just did. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants