<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Preacher &#187; roles</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/tag/roles/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>A MySQL blog, from a MySQL DBA</description>
	<lastBuildDate>Wed, 16 Jun 2010 13:13:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Securich &#8211; 0.1.4</title>
		<link>http://mysqlpreacher.com/wordpress/2009/08/securich-0-1-4/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/08/securich-0-1-4/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 16:29:19 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[grant]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[password complexity]]></category>
		<category><![CDATA[password expiry]]></category>
		<category><![CDATA[revoke]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[securich]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=256</guid>
		<description><![CDATA[New Securich release - 0.1.4
   * Added Password complexity
   * Enhanced `set_password` - Old password is now necessary to replace it by a new one
   * Enhanced Revoke privileges to accept regexp
   * Added Block user@hostname on a database level
   * Added Creation of reserved usernames]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.securich.com">Just a small note to advise that Securich reached 0.1.4.</a><br />
Some new tools include:<br />
   * Added Password complexity<br />
   * Enhanced `set_password` &#8211; Old password is now necessary to replace it by a new one<br />
   * Enhanced Revoke privileges to accept regexp<br />
   * Added Block user@hostname on a database level<br />
   * Added Creation of reserved usernames<br />
   * Added Help stored procedure displays help for each stored proc<br />
   * Enhanced `create_update_role` to include the removal of privilages from roles<br />
   * Enhanced `grant_priveleges` on `alltables` for a database without tables would terminate with an error instead of gracefully (now fixed)<br />
   * Added Restore user@hostname on a database level<br />
   * Removed &#8217;show warnings&#8217; from sql installation</p>
<p>The database design using workbench is also available in the db folder (for easier understanding of what lies beneath.</p>
<p>Cheers,<br />
Darren</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/08/securich-0-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securich &#8211; The MySQL Security Package step by step run through</title>
		<link>http://mysqlpreacher.com/wordpress/2009/06/securich-the-mysql-security-package-step-by-step-run-through/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/06/securich-the-mysql-security-package-step-by-step-run-through/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 17:02:47 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql roles]]></category>
		<category><![CDATA[mysql security]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[password history]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=195</guid>
		<description><![CDATA[I would like to start off by excusing myself for having had a broken link on <a href="http://www.securich.com/downloads.html">http://www.securich.com/downloads.html</a> when I published the latest blog post about Securich.

The tool is downloadable from there and anyone can use it for free in accordance to GPLv2.

I wanted to throw out tutorial about how to install it and use it (Note this tutorial is for version securich version 0.1.2):]]></description>
			<content:encoded><![CDATA[<p>I would like to start off by excusing myself for having had a broken link on <a href="http://www.securich.com/downloads.html">http://www.securich.com/downloads.html</a> when I published the latest blog post about Securich.</p>
<p>The tool is downloadable from there and anyone can use it for free in accordance to GPLv2.</p>
<p>I wanted to throw out tutorial about how to install it and use it (Note this tutorial is for version securich version 0.1.2):</p>
<p>Steps:<br />
1. Download it,<br />
2. Install it,<br />
3. Create a role named &#39;role1&#39; having privileges: select insert update<br />
4. Check roles,<br />
5. Check role privileges,<br />
6. Create a first user<em> john@machine.domain.com</em> (granting privileges on a whole database employees apart from one table),<br />
7. Create a second user<em> paul@10.0.0.2</em> (granting privileges on all tables in world having word Country in them),<br />
8. Create a third user <em>peter@localhost</em> (granting privileges on the database test),<br />
9. Check user privileges for (<em>paul</em>),<br />
10. Update role created above and see changes (add delete to role 1),<br />
11. Update password (for <em>paul</em>) and see changes,<br />
12. Clone user <em>paul</em> to <em>judas</em>,<br />
13. Check user privileges<br />
14. Check user,<br />
15. Rename user <em>judas</em> to <em>james</em>,<br />
16. Revoke privileges from third user disconnecting any existing connections from that user (useful if a security breach is suspected or if you are a security paranoid thus wanting to make sure the person you are blocking out won&#39;t have any more access as from that point onwards).</p>
<p>1. Go to www.securich.com downloads page and download the install script<br />
2. Untar the install script and run it using ./securich_install.sh and it&#39;ll install everything automatically</p>
<blockquote><p>      dcassar@ubuntu:~/Desktop$ ./securich_install.sh<br />
      Enter version number: 0.1.1<br />
      Which kind of installation would you like to do?<br />
      1. Install from file on disk<br />
      2. Download and install (recommended)<br />
      Enter choice (default 2):</p>
<p>      Installation starting<br />
      &#8211;2009-06-19 16:27:56&#8211;  http://www.securich.com/downloads/securich.0.1.1.tar.gz<br />
      Resolving www.securich.com&#8230; 64.202.163.10<br />
      Connecting to www.securich.com|64.202.163.10|:80&#8230; connected.<br />
      HTTP request sent, awaiting response&#8230; 200 OK<br />
      Length: 29217 (29K) [application/x-tar]<br />
      Saving to: `securich.0.1.1.tar.gz&#39;</p>
<p>      100%[=====================================================================================================>] 29,217      64.7K/s   in 0.4s</p>
<p>      2009-06-19 16:27:59	(64.7 KB/s) &#8211; &#39;securich.0.1.1.tar.gz&#39; saved [29217/29217]</p>
<p>      Enter mysql root Password (default ):<br />
      Enter mysql Hostname/IP (default 127.0.0.1): localhost<br />
      Enter mysql Port (default 3306): 3306<br />
      Installation complete</p></blockquote>
<p>3. #log into mysql<br />
   use securich;<br />
   call create_update_role(&#39;role1&#39;,&#39;select&#39;);<br />
   call create_update_role(&#39;role1&#39;,&#39;insert&#39;);<br />
   call create_update_role(&#39;role1&#39;,&#39;update&#39;);<br />
4. call check_roles();<br />
5. call check_role_privileges(&#39;role1&#39;);<br />
6. call grant_privileges(&#39;john&#39; , &#39;machine.domain.com&#39; , &#39;employees&#39; , &#39;&#39; , &#39;alltables&#39; , &#39;role1&#39; , &#39;john@domain.com&#39;);<br />
   call revoke_privileges(&#39;john&#39; , &#39;machine.domain.com&#39; , &#39;employees&#39; , &#39;salaries&#39; , &#39;table&#39; , &#39;role1&#39; , &#39;N&#39;);<br />
7. call grant_privileges(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;world&#39; , &#39;^Country&#39; , &#39;regexp&#39; , &#39;role1&#39; , &#39;paul@domain.com&#39;);<br />
8. call grant_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;test&#39; , &#39;&#39; , &#39;all&#39; , &#39;role1&#39; , &#39;peter@domain.com&#39;);<br />
9. call check_full_user_entries(&#39;paul&#39;);<br />
10. call create_update_role(&#39;role1&#39;,&#39;delete&#39;);<br />
    call check_full_user_entries(&#39;paul&#39;);<br />
11. call set_password(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;password123&#39;);<br />
12. call clone_user(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;judas&#39; , &#39;10.0.0.2&#39; , &#39;judas@domain.com&#39;);<br />
13. call check_full_user_entries(&#39;judas&#39;);<br />
14. call check_user_privileges(&#39;judas&#39; , &#39;10.0.0.2&#39; , &#39;world&#39; , &#39;role1&#39;);<br />
15. call rename_user(&#39;judas&#39; , &#39;james&#39; , &#39;james@domain.com&#39;);<br />
16. call create_update_role(&#39;role2&#39;,&#39;execute&#39;);<br />
17. call grant_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;securich&#39; , &#39;my_privileges&#39; , &#39;storedprocedure&#39; , &#39;role2&#39; , &#39;peter@domain.com&#39;);</p>
<p>18. #connect to mysql using thirduser peter in another session<br />
    show databases;<br />
    use securich;<br />
    show tables;<br />
    call my_privileges(&#39;test&#39;);<br />
    show processlist;</p>
<p>19. call revoke_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;test&#39; , &#39;&#39; , &#39;&#39; , &#39;role1&#39; , &#39;Y&#39;);</p>
<p>20. #as user peter again from 2nd open instance run<br />
    show processlist;</p>
<blockquote><p>dcassar@ubuntu:~/Desktop$ ./securich_install.sh<br />
Enter version number: 0.1.1<br />
Which kind of installation would you like to do?<br />
1. Install from file on disk<br />
2. Download and install (recommended)<br />
Enter choice (default 2): </p>
<p>Installation starting<br />
&#8211;2009-06-19 16:27:56&#8211;  http://www.securich.com/downloads/securich.0.1.1.tar.gz<br />
Resolving www.securich.com&#8230; 64.202.163.10<br />
Connecting to www.securich.com|64.202.163.10|:80&#8230; connected.<br />
HTTP request sent, awaiting response&#8230; 200 OK<br />
Length: 29217 (29K) [application/x-tar]<br />
Saving to: `securich.0.1.1.tar.gz&#39;</p>
<p>100%[=====================================================================================================>] 29,217      64.7K/s   in 0.4s    </p>
<p>2009-06-19 16:27:59 (64.7 KB/s) &#8211; `securich.0.1.1.tar.gz&#39; saved [29217/29217]</p>
<p>Enter mysql root Password (default ):<br />
Enter mysql Hostname/IP (default 127.0.0.1): localhost<br />
Enter mysql Port (default 3306): 3306<br />
Installation complete<br />
dcassar@ubuntu:~/Desktop$ mysql -u root -p -h 127.0.0.1 -P 3306 Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 429<br />
Server version: 5.1.33 MySQL Community Server (GPL)</p>
<p>Type &#39;help;&#39; or &#39;\h&#39; for help. Type &#39;\c&#39; to clear the buffer.</p>
<p>mysql> use securich;<br />
Reading table information for completion of table and column names<br />
You can turn off this feature to get a quicker startup with -A</p>
<p>Database changed<br />
mysql> call create_update_role(&#39;role1&#39;,&#39;select&#39;);<br />
Query OK, 0 rows affected, 5 warnings (0.03 sec)</p>
<p>mysql> call create_update_role(&#39;role1&#39;,&#39;insert&#39;);<br />
Query OK, 0 rows affected (0.04 sec)</p>
<p>mysql> call create_update_role(&#39;role1&#39;,&#39;update&#39;);<br />
Query OK, 0 rows affected (0.04 sec)</p>
<p>mysql> call check_roles();<br />
+&#8212;-+&#8212;&#8212;-+<br />
| ID | ROLE  |<br />
+&#8212;-+&#8212;&#8212;-+<br />
|  1 | read  |<br />
|  2 | write |<br />
|  3 | role1 |<br />
+&#8212;-+&#8212;&#8212;-+<br />
3 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> call check_role_privileges(&#39;role1&#39;);<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| PRIVILEGE |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| INSERT    |<br />
| SELECT    |<br />
| UPDATE    |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
3 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> call grant_privileges(&#39;john&#39; , &#39;machine.domain.com&#39; , &#39;employees&#39; , &#39;&#39; , &#39;alltables&#39; , &#39;role1&#39; , &#39;john@domain.com&#39;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| USER_PASSWORD                                                                              |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Password for user &#8212; john &#8212; contactable at &#8212; john@domain.com &#8212; is &#8212; bfcbd8234d9eb44 &#8212; |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
1 row in set (0.16 sec)</p>
<p>Query OK, 0 rows affected, 1 warning (0.16 sec)</p>
<p>mysql> call revoke_privileges(&#39;john&#39; , &#39;machine.domain.com&#39; , &#39;employees&#39; , &#39;salaries&#39; , &#39;table&#39; , &#39;role1&#39; , &#39;N&#39;);<br />
Query OK, 0 rows affected (0.09 sec)</p>
<p>mysql> call grant_privileges(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;world&#39; , &#39;^Country&#39; , &#39;regexp&#39; , &#39;role1&#39; , &#39;paul@domain.com&#39;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| USER_PASSWORD                                                                              |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Password for user &#8212; paul &#8212; contactable at &#8212; paul@domain.com &#8212; is &#8212; bc4ab08785e1be6 &#8212; |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
1 row in set (0.06 sec)</p>
<p>Query OK, 0 rows affected, 1 warning (0.06 sec)</p>
<p>mysql> call grant_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;test&#39; , &#39;&#39; , &#39;all&#39; , &#39;role1&#39; , &#39;peter@domain.com&#39;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| USER_PASSWORD                                                                             |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Password for user &#8212; peter &#8212; contactable at &#8212; peter@domain.com &#8212; is &#8212; 7b3b4746d04b &#8212; |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
1 row in set (0.04 sec)</p>
<p>Query OK, 0 rows affected (0.04 sec)</p>
<p>mysql> call check_full_user_entries(&#39;paul&#39;);<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| USERNAME | HOSTNAME | DATABASENAME | TABLENAME       | ROLE  | PRIVILEGE | STATE |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | INSERT    | A     |<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | SELECT    | A     |<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | UPDATE    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | INSERT    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | SELECT    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | UPDATE    | A     |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
6 rows in set (0.01 sec)</p>
<p>Query OK, 0 rows affected, 4 warnings (0.01 sec)</p>
<p>mysql> call create_update_role(&#39;role1&#39;,&#39;delete&#39;);<br />
Query OK, 0 rows affected (0.09 sec)</p>
<p>mysql> call check_full_user_entries(&#39;paul&#39;);<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| USERNAME | HOSTNAME | DATABASENAME | TABLENAME       | ROLE  | PRIVILEGE | STATE |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | DELETE    | A     |<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | INSERT    | A     |<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | SELECT    | A     |<br />
| paul     | 10.0.0.2 | world        | Country         | role1 | UPDATE    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | DELETE    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | INSERT    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | SELECT    | A     |<br />
| paul     | 10.0.0.2 | world        | CountryLanguage | role1 | UPDATE    | A     |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
8 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> call set_password(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;password123&#39;);<br />
Query OK, 1 row affected (0.02 sec)</p>
<p>mysql> call clone_user(&#39;paul&#39; , &#39;10.0.0.2&#39; , &#39;judas&#39; , &#39;10.0.0.2&#39; , &#39;judas@domain.com&#39;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| USER_PASSWORD                                                                                |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Password for user &#8212; judas &#8212; contactable at &#8212; judas@domain.com &#8212; is &#8212; 70d5b79d80fab04 &#8212; |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
1 row in set (0.01 sec)</p>
<p>Query OK, 0 rows affected, 1 warning (0.10 sec)</p>
<p>mysql> call check_full_user_entries(&#39;judas&#39;);<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| USERNAME | HOSTNAME | DATABASENAME | TABLENAME       | ROLE  | PRIVILEGE | STATE |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
| judas    | 10.0.0.2 | world        | Country         | role1 | DELETE    | A     |<br />
| judas    | 10.0.0.2 | world        | Country         | role1 | INSERT    | A     |<br />
| judas    | 10.0.0.2 | world        | Country         | role1 | SELECT    | A     |<br />
| judas    | 10.0.0.2 | world        | Country         | role1 | UPDATE    | A     |<br />
| judas    | 10.0.0.2 | world        | CountryLanguage | role1 | DELETE    | A     |<br />
| judas    | 10.0.0.2 | world        | CountryLanguage | role1 | INSERT    | A     |<br />
| judas    | 10.0.0.2 | world        | CountryLanguage | role1 | SELECT    | A     |<br />
| judas    | 10.0.0.2 | world        | CountryLanguage | role1 | UPDATE    | A     |<br />
+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;-+<br />
8 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> call check_user_privileges(&#39;judas&#39; , &#39;10.0.0.2&#39; , &#39;world&#39; , &#39;role1&#39;);<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| PRIVILEGE |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| DELETE    |<br />
| INSERT    |<br />
| SELECT    |<br />
| UPDATE    |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
4 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> call rename_user(&#39;judas&#39; , &#39;james&#39; , &#39;james@domain.com&#39;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| USER_PASSWORD                                                                                |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Password for user &#8212; james &#8212; contactable at &#8212; james@domain.com &#8212; is &#8212; 85c2fc100d83884 &#8212; |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
1 row in set (0.02 sec)</p>
<p>Query OK, 0 rows affected, 1 warning (0.11 sec)</p>
<p>mysql> call create_update_role(&#39;role2&#39;,&#39;execute&#39;);<br />
Query OK, 0 rows affected (0.09 sec)</p>
<p>mysql> call grant_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;securich&#39; , &#39;my_privileges&#39; , &#39;storedprocedure&#39; , &#39;role2&#39; , &#39;peter@domain.com&#39;);<br />
Query OK, 0 rows affected (0.08 sec)</p>
<p>mysql> call revoke_privileges(&#39;peter&#39; , &#39;localhost&#39; , &#39;test&#39; , &#39;&#39; , &#39;&#39; , &#39;role1&#39; , &#39;Y&#39;);<br />
Query OK, 0 rows affected (0.15 sec)</p>
<p>mysql> </p>
<p>dcassar@ubuntu:~/Desktop$ mysql -u peter -p7b3b4746d04b -h 127.0.0.1 -P 3306<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 437<br />
Server version: 5.1.33 MySQL Community Server (GPL)</p>
<p>Type &#39;help;&#39; or &#39;\h&#39; for help. Type &#39;\c&#39; to clear the buffer.</p>
<p>mysql> show processlist;<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| Id  | User  | Host            | db   | Command | Time | State | Info             |<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| 437 | peter | localhost:49022 | NULL | Query   |    0 | NULL  | show processlist |<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
1 row in set (0.00 sec)</p>
<p>mysql> show databases;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Database           |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| information_schema |<br />
| securich           |<br />
| test               |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
3 rows in set (0.00 sec)</p>
<p>mysql> use securich;<br />
Database changed<br />
mysql> show tables;<br />
Empty set (0.00 sec)</p>
<p>**** Note that the only privileges peter has on securich is on the stored procedure &#39;my_privileges&#39; and definitely no tables</p>
<p>mysql> call my_privileges(&#39;test&#39;);<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| PRIVILEGE |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
| DELETE    |<br />
| INSERT    |<br />
| SELECT    |<br />
| UPDATE    |<br />
+&#8212;&#8212;&#8212;&#8211;+<br />
4 rows in set (0.00 sec)</p>
<p>Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql> show processlist;<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| Id  | User  | Host            | db   | Command | Time | State | Info             |<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| 437 | peter | localhost:49022 | NULL | Query   |    0 | NULL  | show processlist |<br />
+&#8212;&#8211;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
1 row in set (0.00 sec)</p>
<p>****** &#8211; In the meantime the dba revoked rights with terminate live connections from peter@localhost</p>
<p>mysql> show processlist;<br />
ERROR 2006 (HY000): MySQL server has gone away<br />
No connection. Trying to reconnect&#8230;<br />
ERROR 1045 (28000): Access denied for user &#39;peter&#39;@&#39;localhost&#39; (using password: YES)<br />
ERROR:<br />
Can&#39;t connect to the server</p>
<p>mysql> </p>
</blockquote>
<p>I truly hope you enjoyed this run through. I excuse myself it&#39;s a tad too long, but I wished to illustrate some of the cool features of this package.</p>
<p>Cheers,<br />
Darren</p>
<p>PS don&#39;t forget to check out <a href="http://www.securich.com">Securich HERE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/06/securich-the-mysql-security-package-step-by-step-run-through/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security &#8211; Roles and Password Expiry on MySQL using SECURICH</title>
		<link>http://mysqlpreacher.com/wordpress/2009/06/security-roles-and-password-expiry-on-mysql-using-securich/</link>
		<comments>http://mysqlpreacher.com/wordpress/2009/06/security-roles-and-password-expiry-on-mysql-using-securich/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:23:56 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[password expiry]]></category>
		<category><![CDATA[password history]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[securich]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=182</guid>
		<description><![CDATA[Lately there has been quite some talk about security on MySQL, and I've decided to GPL a package I wrote, implmenting Roles on MySQL.
This technology has been available on other databases for quite some time, but hasn't quite yet made it to MySQL's feature list and apart from this tool, the only solution I know of is google's patches for MySQL 5.0.
]]></description>
			<content:encoded><![CDATA[<p>Lately there has been quite some talk about security on MySQL, and I&#8217;ve decided to GPL a package I wrote, implmenting Roles on MySQL.<br />
This technology has been available on other databases for quite some time, but hasn&#8217;t quite yet made it to MySQL&#8217;s feature list and apart from this tool, the only solution I know of is google&#8217;s patches for MySQL 5.0.</p>
<p>The name is SECURICH and downloads as well as documentation are available at <a href="http://www.securich.com/">http://www.securich.com/</a>. The bug list is available at <a href="http://www.securich.com/mantis/">http://www.securich.com/mantis/</a> (you&#8217;ll have to register and log in first). Privileges can be granted on a database or table level with a few combinations like:<br />
	1. database as one,<br />
	2. all tables in database (useful when you need to grant a bunch of privileges to all tables but a few thus revoking the few later),<br />
	3. single tables,<br />
	4. stored procedure or<br />
	5. tables through the use of regular expression.</p>
<p>The user has the facility to create a role and update it on the fly thus propagating the changes onto already existing users having the role in question. There are also loads of other functionalities available and I urge you to check the documentation on <a href="http://www.securich.com/">http://www.securich.com/</a>.</p>
<p>A cool feature I like is password history which enables dbas to enforce changing of passwords after a certain period of time. </p>
<p>#################################################################################################################################################<br />
## PLEASE NOTE THAT:<br />
## 1. THIS IS AN ALPHA VERSION,<br />
## 2. YOU SHOULD NOT INSTALL THIS PACKAGE ON A PRE-EXISTING MYSQL WHICH ALREADY HAS PRIVILEGES SET UP.<br />
#################################################################################################################################################<br />
##<br />
## This tool will modify current privileges on the &#8220;mysql&#8221; database tables and should only be used with freshly installed mysqls.<br />
##<br />
##################################################################################################################################################</p>
<p>Features like block user and unblock user as well as many other functionalities are being developed and more features will be added as time goes by.</p>
<p>I would greatly appreciate your feedback about what you think of the package, features you might wish to include etc (feature requests should be done through <a href="http://www.securich.com/mantis/">http://www.securich.com/mantis/</a> as well.)</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2009/06/security-roles-and-password-expiry-on-mysql-using-securich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
