Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-33834 Add TLS version to audit plugin available variables #3175

Open
wants to merge 1 commit into
base: 11.5
Choose a base branch
from

Conversation

Chupsy
Copy link

@Chupsy Chupsy commented Apr 3, 2024

MDEV: https://jira.mariadb.org/browse/MDEV-33834

Description

Add tls_version and tls_version_length variables to the audit plugin so they can be logged. This is useful to help identify suspicious or malformed connections attempting to use unsupported TLS versions. A log with this information will allow to detect and block more malicious connection attempts.

Users with 'server_audit_events' empty will have these two new variables automatically visible in their logs, but if users don't want them, they can always configure what fields to include by listing the fields in 'server_audit_events'.

Release Notes

None. This just adds more possibilities for users.

How can this PR be tested?

Modified the server audit plugin to include this new info, and updated the server audit plugin MTR tests.

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

Copyright

All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.

@CLAassistant
Copy link

CLAassistant commented Apr 3, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. Can you create a MDEV with the use case?

Is it logical to log cipher at the same time?

include/mysql/plugin_audit.h Outdated Show resolved Hide resolved
plugin/server_audit/server_audit.c Outdated Show resolved Hide resolved
@Chupsy Chupsy force-pushed the auth-audit-plugin-enhancement branch 2 times, most recently from cd78bd7 to c13da4e Compare April 4, 2024 23:06
@Chupsy Chupsy force-pushed the auth-audit-plugin-enhancement branch 3 times, most recently from 6081e75 to 833b83a Compare April 9, 2024 16:30
@Chupsy Chupsy requested review from grooverdan and vuvova April 9, 2024 16:31
@Chupsy Chupsy force-pushed the auth-audit-plugin-enhancement branch from 833b83a to 453312b Compare April 9, 2024 23:28
@LinuxJedi LinuxJedi changed the title Add TLS version to auth plugin available variables MDEV-33834 Add TLS version to auth plugin available variables Apr 10, 2024
@LinuxJedi LinuxJedi requested a review from holyfoot April 10, 2024 09:09
@LinuxJedi
Copy link
Contributor

Requested changes have been made. The MDEV is assigned to @holyfoot to review, so I have assigned here too.

…iables

Add tls_version and tls_version_length variables to the audit plugin so they can
be logged. This is useful to help identify suspicious or malformed connections
attempting to use unsupported TLS versions. A log with this information will
allow to detect and block more malicious connection attempts.

Users with 'server_audit_events' empty will have these two new variables
automatically visible in their logs, but if users don't want them, they can
always configure what fields to include by listing the fields in
'server_audit_events'.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.
@LinuxJedi LinuxJedi force-pushed the auth-audit-plugin-enhancement branch from 453312b to cf3265c Compare April 10, 2024 09:11
@vuvova
Copy link
Member

vuvova commented Apr 10, 2024

@Chupsy just to set the expectations: new features go into 10.6, we start working on 10.6 features in early May and finish it in min-June. Somewhere in that time @holyfoot should review and (if all good) merge your PR.

@Chupsy
Copy link
Author

Chupsy commented Apr 11, 2024

@LinuxJedi not sure I understand the changes that you have made to the PR, maybe another commit or modifying current commit message could help ?

@Chupsy
Copy link
Author

Chupsy commented Apr 11, 2024

Are you sure it's 10.6 and not 11.6 ?

@LinuxJedi
Copy link
Contributor

LinuxJedi commented Apr 16, 2024

@LinuxJedi not sure I understand the changes that you have made to the PR, maybe another commit or modifying current commit message could help ?

I did an automatic rebase onto the top of the branch. I have not altered the code. I also added the MDEV to the title of the PR, as this makes things much easier for us.

And yes, @vuvova would have meant 11.6.

@vuvova vuvova changed the title MDEV-33834 Add TLS version to auth plugin available variables MDEV-33834 Add TLS version to audit plugin available variables Apr 16, 2024
@Chupsy
Copy link
Author

Chupsy commented Apr 22, 2024

Hello @LinuxJedi @vuvova, any update on the validation of this PR ? Do you need me to do some modifications ?

@vuvova
Copy link
Member

vuvova commented Apr 23, 2024

To repeat, what I wrote above (with a s/10/11/ typo fix):

@Chupsy just to set the expectations: new features go into 11.6, we start working on 11.6 features in early May and finish it in min-June. Somewhere in that time @holyfoot should review and (if all good) merge your PR.

So, if nothing happens now — it's normal, the PR is not forgotten, please, wait until May-June

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants