Skip to content

Add client TCP port and TLS version to audit plugin connection events#665

Open
gengtianuiowa wants to merge 1 commit into
mysql:9.7from
gengtianuiowa:9.7-audit-plugin-port
Open

Add client TCP port and TLS version to audit plugin connection events#665
gengtianuiowa wants to merge 1 commit into
mysql:9.7from
gengtianuiowa:9.7-audit-plugin-port

Conversation

@gengtianuiowa

Copy link
Copy Markdown

Description

In MariaDB 12.3, new features were introduced in Server Audit Plugin. This change extends the audit plugin connection event structures to expose additional connection metadata: the client TCP port number and the TLS version used for encrypted connections.

Changes referred from similar changes in MariaDB:

The new fields will be available to audit plugins in MySQL.

Release Notes

N/A

How can this PR be tested?

This change has no impact to the server without Server Audit Plugin. All MTR tests should pass. Plugin related changes will be evaluated separately in MTR tests for the plugin.

Basing the PR against the correct MySQL version

  • This is a minor struct change for new plugin features, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

Copyright

This contribution is under the OCA signed by Amazon and covering submissions to the MySQL project.

Extend the audit plugin event structures to include:
- Client TCP port number (peer_port)
- TLS version used for encrypted connections

The TLS version is obtained via SSL_get_version() and will be empty
for non-TLS connections.

These fields are added to:
- mysql_event_connection (plugin API)
- mysql_event_tracking_connection_data (component services)

This change only adds new attributes to existing structs with no impact
to existing functionality. The new fields will be available when using
Server Audit Plugin in MySQL.

Ported from MariaDB Server:
MariaDB/server@1aba30b
MariaDB/server@2b46477

This contribution is under the OCA signed by Amazon and covering submissions to the MySQL project.
@mysql-oca-bot

Copy link
Copy Markdown

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at https://oca.opensource.oracle.com/
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@gengtianuiowa

Copy link
Copy Markdown
Author

This contribution is under the OCA signed by Amazon and covering submissions to the MySQL project.

Amazon doesn't need to sign the OCA form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants