Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
This needs a change in the client auth plugin API
- client authentication plugins to get a new method hash_password(), the same as in the server plugin
The new authentication will work like this
Client side, when sending client reply packet:
- If SSL is used, and --ssl-verify-server-cert is in force, but
- no --ssl-ca or --ssl-fingerprint is in force, and
- the certificate failed validation as self-signed, and
- client authentication plugin doesn't have hash_password() method, and
- the non-empty password was provided, then
- disconnect, otherwise
- continue (let's call it late certificate validation mode)
Server side, when sending the OK packet after successful authentication:
- if SSL is used, and
- the certificate is ephemeral (after
MDEV-31856), and - the account has non-empty password, then
- calculate SHA2(user's hashed password, scramble, certificate fingerprint), and
- put it in the OK's info field, prefixed by byte 0x01
Client side, when receiving OK packet:
- if in the late certificate validation mode, then
- use hash_password() callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare
Notes
- client plugin versions and the API version have to be incremented
- the server doesn't know if the client is in the late password validation mode, so it might do some unnecessary work just in case
- this could be fixed by a new capability bit, or
- just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode)
Attachments
Issue Links
- blocks
-
MDEV-31856 use ephemeral ssl certificates
-
- Closed
-
- causes
-
MDEV-33639 AuthSwitchResponse info has changed since 11.4
-
- Closed
-
- relates to
-
CONJ-1105 TLS certificate validation without needs to provide certificate client side
-
- Closed
-
-
CONJS-264 TLS ephemeral certificate automatic implementation
-
- Closed
-
-
MDEV-32210 Ephemeral certificate missing DN
-
- Closed
-
-
MXS-4102 Support for passphrase protected certificate keys
-
- Open
-
-
MXS-4774 Add support for ephemeral server certificates
-
- Closed
-
-
R2DBC-90 TLS ephemeral certificate automatic implementation
-
- Open
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue blocks |
Link |
This issue blocks |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side: * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side: * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password. *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
Link |
This issue blocks |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation * then append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
Priority | Major [ 3 ] | Critical [ 2 ] |
Assignee | Sergei Golubchik [ serg ] |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate *failed* validation and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{--ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{--ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) {panel:title=Original specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) {panel:title=Original specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and * *client authentication plugin doesn't have {{hash_password()}} method, then ** disconnect, otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and * *client authentication plugin doesn't have {{hash_password()}} method, then ** disconnect, otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and **client authentication plugin doesn't have {{hash_password()}} method, then ** disconnect, otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and **client authentication plugin doesn't have {{hash_password()}} method, then ** disconnect, otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and **client authentication plugin doesn't have {{hash_password()}} method, then *** disconnect **otherwise *** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * if SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and **client authentication plugin doesn't have {{hash_password()}} method, then *** disconnect **otherwise *** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {{code}} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {{\code}} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {{code}} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {{\code}} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {code} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {code} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {code} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {code} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {preformated} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {preformated} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {preformated} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {preformated} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {noformat} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {noformat} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: {noformat} If SSL is used, and {{--ssl-verify-server-cert}} is in force, but no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and the certificate failed validation as self-signed, and client authentication plugin doesn't have {{hash_password()}} method then disconnect otherwise continue (let's call it _late certificate validation_ mode) {noformat} Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and ** client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins get a method {{hash_password()}}, the same as in the server plugin *Authentication works like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but ** no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and ** the certificate failed validation as self-signed, and ** client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then * disconnect * otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then * disconnect * otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this approach allows the client to validate the server itself, not just the wire {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs (previous attempt to solve the issue), this new approach allows the client to validate the server itself, not just the wire. {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs (previous attempt to solve the issue), this new approach allows the client to validate the server itself, not just the wire. {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs (previous attempt to solve the issue), this new approach allows the client to validate the server itself, not just the wire. {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method * then ** disconnect * otherwise ** continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs (previous attempt to solve the issue), this new approach allows the client to validate the server itself, not just the wire. {panel:title=V1 specs for comparison: (old idea for the same problem)|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and, * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and, * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} is in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} is in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is self-signed, and * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} is in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is ephemeral (after * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Link | This issue relates to MDEV-31994 [ MDEV-31994 ] |
Link | This issue relates to MDEV-31994 [ MDEV-31994 ] |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Sergei Golubchik [ serg ] |
Link | This issue is part of TODO-4253 [ TODO-4253 ] |
Description |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} is in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is ephemeral (after * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) * Unlike the V1 specs, this new approach allows the client to validate the server itself, not just the wire. {panel:title=First version (V1) of the solution for comparison:|bgColor=#EEEEEE} *This needs a change in the client auth plugin API* * client authentication plugins get a property "can validate SSL certificates". It's TRUE for ed25519 and mysql_native_password, and * {{MYSQL_PLUGIN_VIO_INFO}} gets a field for SSL cert fingerprint or even {{SSL_CTX}} alternatively * {{MYSQL_PLUGIN_VIO}} gets {{ssl_fingerprint()}} callback — and calling it serves as a flag, a separate flag isn't needed *Authentication works like this* Client side (last step is implemented inside ed25519 and mysql_native_password client plugins): * if SSL is used and * {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} are in force, and * the certificate failed validation because it's self-signed, and * the client plugin supports SSL certificate validation, then * append (concatenate) SSL certificate fingerprint to the scramble (as sent by the server) and use that in the auth protocol Server side (implemented inside ed25519 and mysql_native_password server plugins): * concatenate the scramble and the SSL certificate fingerprint and use that in the auth * if failed, repeat with the original scramble, or * client's reply can indicate whether it used ssl fingerprint. e.g with an extra byte being "1" (protocol version?) *Notes* * plugin versions and the API version have to be incremented * "concatenate" might be replaced by some other "mixing", but it should be irreversible, SHA2 will do, XOR won't * the server has no way of distinguishing between "incorrect password" and "MitM SSL attack" — either we shoul extend the above to be able to distinguish or have a new error message "password incorrect or MitM SSL attack" {panel} |
*This needs a change in the client auth plugin API*
* client authentication plugins to get a new method {{hash_password()}}, the same as in the server plugin *The new authentication will work like this* Client side, when sending client reply packet: * If SSL is used, and {{--ssl-verify-server-cert}} is in force, but * no {{\-\-ssl-ca}} or {{--ssl-fingerprint}} is in force, and * the certificate failed validation as self-signed, and * client authentication plugin doesn't have {{hash_password()}} method, and * the non-empty password was provided, then * disconnect, otherwise * continue (let's call it _late certificate validation_ mode) Server side, when sending the OK packet after successful authentication: * if SSL is used, and * the certificate is ephemeral (after * the account has non-empty password, then * calculate SHA2(user's hashed password, scramble, certificate fingerprint), and * put it in the OK's info field, prefixed by byte 0x01 Client side, when receiving OK packet: * if in the _late certificate validation_ mode, then * use {{hash_password()}} callback, calculate SHA2(user's hashed password, scramble, certificate fingerprint), compare *Notes* * client plugin versions and the API version have to be incremented * the server doesn't know if the client is in the _late password validation_ mode, so it might do some unnecessary work just in case ** this could be fixed by a new capability bit, or ** just live with potential unnecessary work on connect — it is assumed that in overwhelming majority of the cases this work will be necessary (almost all setups will use this mode) |
Status | Stalled [ 10000 ] | In Testing [ 10301 ] |
Assignee | Sergei Golubchik [ serg ] | Alice Sherepa [ alice ] |
Link |
This issue relates to |
Labels | Preview_11.3 |
Assignee | Alice Sherepa [ alice ] | Lena Startseva [ JIRAUSER50478 ] |
Fix Version/s | 11.4 [ 29301 ] | |
Fix Version/s | 11.3 [ 28565 ] |
Issue Type | Task [ 3 ] | New Feature [ 2 ] |
Assignee | Lena Startseva [ JIRAUSER50478 ] | Sergei Golubchik [ serg ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
Fix Version/s | 11.5 [ 29506 ] | |
Fix Version/s | 11.4 [ 29301 ] |
Fix Version/s | 11.4 [ 29301 ] | |
Fix Version/s | 11.5 [ 29506 ] |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Priority | Blocker [ 1 ] | Critical [ 2 ] |
Fix Version/s | 11.4.1 [ 29523 ] | |
Fix Version/s | 11.4 [ 29301 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue causes |