forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FB8-53: Expose user certificate details to command line (facebook#959) (
facebook#959) Summary: Jira ticket: https://jira.percona.com/browse/FB8-53 Reference Patch: facebook@f29eb03 Reference Patch: facebook@c631017 'THD' class extended with the following convenience methods: - 'has_net_vio()' - 'get_net_vio()' - 'has_net_vio_ssl_arg()' - 'get_net_vio_ssl_arg()' - 'get_peer_certificate_info()' Implemented new 'Fill_authinfo_list' class derived from 'Do_THD_Impl' which populates 'INFORMATION_SCHEMA.AUTHINFO' table. This is a change to help the implementation of SSL based authentication efforts. Currently the certificate details are unavailable to the sys admin. The v3 extensions usually carry important information for identifying the user. This change adds a new table to the information schema to expose auth details. It is organized by process ID like processlist table. Pull Request resolved: facebook#959 Reviewed By: lloyd Differential Revision: D14137362 Pulled By: lth
- Loading branch information
1 parent
77a39a7
commit 3097c06
Showing
21 changed files
with
301 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# Test case for information_schema.authinfo table | ||
# (SSL connection) | ||
# | ||
include/assert.inc [SSL field for the current connection must be set to 1] | ||
include/assert.inc [Info field (peer certificate) for the current connection must be non-empty] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# Test case for information_schema.authinfo table | ||
# (non-SSL connection) | ||
# | ||
include/assert.inc [SSL field for the current connection must be set to 0] | ||
include/assert.inc [Info field (peer certificate) for the current connection must be NULL] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--ssl-mode=VERIFY_CA | ||
--ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem | ||
--ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem | ||
--ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--ssl=1 | ||
--ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem | ||
--ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert.pem | ||
--ssl-key=$MYSQL_TEST_DIR/std_data/server-key.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--echo # | ||
--echo # Test case for information_schema.authinfo table | ||
--echo # (SSL connection) | ||
--echo # | ||
|
||
--let $assert_text= SSL field for the current connection must be set to 1 | ||
--let $assert_cond= [ SELECT `ssl` = 1 FROM information_schema.authinfo WHERE id = CONNECTION_ID() ] | ||
--source include/assert.inc | ||
|
||
--let $assert_text= Info field (peer certificate) for the current connection must be non-empty | ||
--let $assert_cond= [ SELECT LENGTH(info) > 0 FROM information_schema.authinfo WHERE id = CONNECTION_ID() ] | ||
--source include/assert.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--echo # | ||
--echo # Test case for information_schema.authinfo table | ||
--echo # (non-SSL connection) | ||
--echo # | ||
|
||
--let $assert_text= SSL field for the current connection must be set to 0 | ||
--let $assert_cond= [ SELECT `ssl` = 0 FROM information_schema.authinfo WHERE id = CONNECTION_ID() ] | ||
--source include/assert.inc | ||
|
||
--let $assert_text= Info field (peer certificate) for the current connection must be NULL | ||
--let $assert_cond= [ SELECT info IS NULL FROM information_schema.authinfo WHERE id = CONNECTION_ID() ] | ||
--source include/assert.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.