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

Grant action should not require and modify the password #236

Closed
sekrett opened this issue Feb 21, 2019 · 3 comments
Closed

Grant action should not require and modify the password #236

sekrett opened this issue Feb 21, 2019 · 3 comments
Assignees
Labels
Stale This is marked as stale and will be closed shortly

Comments

@sekrett
Copy link

sekrett commented Feb 21, 2019

Cookbook version

1.5.4

Chef-client version

14.10.9

Platform Details

CentOS 7

Scenario:

In general when I create a mysql user, I need the password, but when I grant permissions, it does not need the password, it is a different action. Also from documentation it is not clear if I can do a grant with password assuming the user will be created as well. If grant action modifies the password, why should I specify the password in create action? Why should I specify the password twice according to documentation?

Steps to Reproduce:

mariadb_user 'user' do
  database_name 'db'
  action :grant
end

Expected Result:

It should only grant permissions. If password is supplied or not for grant or revoke action, ignore it, don't modify it. This should be simple, I can do a PR.

The best solution in my opinion is to split user creation and grant to two different resources, it will make the code cleaner also, but will break everything. Opinions?

Actual Result:

My password is reset to empty.

@sinfomicien
Copy link
Contributor

It make sense. Will try to write something about it. But unfortunately, will not try to work on the old 1.5.x branch. It will be on 2.x or even 3.x branch.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
@ramereth ramereth added the Stale This is marked as stale and will be closed shortly label Oct 4, 2020
@github-actions
Copy link

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This is marked as stale and will be closed shortly
Projects
None yet
Development

No branches or pull requests

4 participants