Skip to content

(#4534) Add PROXY grant support to mysql_grant #934

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

Merged
merged 3 commits into from
Mar 16, 2017

Conversation

jhriggs
Copy link
Contributor

@jhriggs jhriggs commented Mar 15, 2017

The mysql_grant type does not currently support PROXY grants. The only real difference between PROXY and other grants is that the "table" is actually a user (proxy_user@proxy_host). This patch adds this support and allows for the following:

mysql_grant { 'foo@bar/baz@blah':
  ensure     => present, # or absent
  user       => 'foo@bar',
  table      => 'baz@blah',
  privileges => 'PROXY',
}

@wilson208
Copy link
Contributor

👍 LGTM. Thanks for the contribution!

@wilson208 wilson208 merged commit fbb2c8f into puppetlabs:master Mar 16, 2017
wilson208 pushed a commit to wilson208/puppetlabs-mysql that referenced this pull request Mar 16, 2017
I merged PR puppetlabs#934 and it failed CI for older mysql versions because PROXY privileges are not supported until mysql version 5.5.0. Rather than revert this functionality I have added validation to the mysql_grant type and also added an  acceptance test to test for this error.

All PROXY tests within mysql_grant type have been placed in their own describe block where pre_run is called and retrieves the mysql version from the SUT. The remaining PROXY tests are filtered on this musql version to ensure they do not run on mysql versions < 5.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants