-
Notifications
You must be signed in to change notification settings - Fork 581
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
seeded_rand_string() function #877
Conversation
| # @return [String] Random string. | ||
| dispatch :rand_string do | ||
| param 'Integer[1]', :length | ||
| param 'String', :seed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text description states that seed is optional, but this declaration is for a required param.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and fixed.
|
I think it is worth opening a ticket in puppet's Jira in the MODULES project to discuss the merit of this function. There are already other functions related to 'random' and there may be opportunity to do something about sprawling additions of "random this" and "random that"... |
|
@hlindberg we already have an fqdn_rand() and fqdn_rand_string() but only seeded_rand() with no seeded_rand_string(). This method doesn't seem like sprawl with that in mind. |
|
|
|
@hlindberg There is currently no way to generate the same randomized string on two different hosts. |
|
@pegasd Is there any movement on this PR? |
|
@david22swan How should I proceed here? I'm open to suggestions. Or, if the community finds this insecure, I'm OK with closing this for good. |
|
Hm, I had objections to this, those concerns were not addressed. We could do much better than what was now merged. Suggest reverting this. |
This function is useful for generating consistent random strings (read "passwords") across different nodes.