Currently with the max_password_errors configured, we don't really see any tables having a flag about the blocked user account due to this reason. (i.e., user blocked with the max attempt of trying to connect db with wrong password).
One of our customers seems like in requirement of getting the list of blocked users, due to wrong password attempts.
Like for the "Account Locking", whenever a user is locked, will have "account_lock:false or true" in JSON object of the table "mysql.global_priv table", can we implement the similar type of info available for the blocked users for the max_password_errors case?
Attachments
Issue Links
includes
MDEV-32218message to notify end-user N-days prior the password get expired
Closed
is caused by
MDEV-7598Block user accounts after failed login attempts
Closed
relates to
MDEV-27205MariaDB user last login time details at DB level
Stalled
MDEV-30045settable message to notify end-user N-days prior the password get expired
Closed
MDEV-31186Provide information about a user via an information schema table
Open
MDEV-32649Add INFORMATION_SCHEMA Table with user related details
Open
MDEV-29209Implement connection response delay after a number of failed login attempts
Stalled
MDEV-32218message to notify end-user N-days prior the password get expired
nikitamalyavin, if we add a separate table it could make sense to address MDEV-27205 at the same time. And it could make sense to use a JSON field for the details.
Finding a good name is always tricky. Ideas are USER_DETAILS, USER_USAGE, USER_CONNECT_INFO, USER_STATUS
Ralf Gebhardt
added a comment - - edited nikitamalyavin , if we add a separate table it could make sense to address MDEV-27205 at the same time. And it could make sense to use a JSON field for the details.
Finding a good name is always tricky. Ideas are USER_DETAILS, USER_USAGE, USER_CONNECT_INFO, USER_STATUS
Thanks for another reference, ralf.gebhardt! Yes, MDEV-27205 absolutely makes sense to be put in the same table. As I can see by the code, we currently don't store last login time internally, so an extra effort will be required.
Since all these fields bend around user login details, my ideas are: AUTH, USER_ACCESS, USER_LOGIN, LOGON
INFORMATION_SCHEMA.LOGON sounds the most decent to me, but we won't be able to add more general information about users there.
Nikita Malyavin
added a comment - - edited Thanks for another reference, ralf.gebhardt ! Yes, MDEV-27205 absolutely makes sense to be put in the same table. As I can see by the code, we currently don't store last login time internally, so an extra effort will be required.
Since all these fields bend around user login details, my ideas are:
AUTH , USER_ACCESS , USER_LOGIN , LOGON
INFORMATION_SCHEMA.LOGON sounds the most decent to me, but we won't be able to add more general information about users there.
Finally I came across with the following implementation:
The view will iterate through the acl_users array under a single critical section. Given the fact that nearly the same is done during other operations (like login, etc), it should be fine, and will not disrupt already logged in users' performance.
The unprivileged user will see their own info. The access is optimized with binary search.
The table name is LOGON.
At the same time, password expiration timestamp has been added, so MDEV-32218 can be closed at once.
Nikita Malyavin
added a comment - - edited Finally I came across with the following implementation:
The view will iterate through the acl_users array under a single critical section. Given the fact that nearly the same is done during other operations (like login, etc), it should be fine, and will not disrupt already logged in users' performance.
The unprivileged user will see their own info. The access is optimized with binary search.
The table name is LOGON.
At the same time, password expiration timestamp has been added, so MDEV-32218 can be closed at once.
serg please review 9e5d4dfc , branch bb-11.5-password-errors
bb-11.5-password-errors d1ec5274161db821de7ae9ce9be2dd583ef23c2d is ok to push into 11.5.
Minor problem- if user has SELECT privileges to mysql.global_priv, then he should be able to see also all users after "select * from information_schema.users;" (similar to the situation when the user has SELECT privileges to the whole mysql.* database )
createuser a@localhost;
connect(con1, localhost, a);
select * from information_schema.users ;
--connection default
grantselecton mysql.global_priv to a@localhost;
--connection con1
select * from information_schema.users ;
select * from mysql.global_priv;
--connection default
grantselecton mysql.* to a@localhost;
--connection con1
select * from information_schema.users ;
--connection default
dropuser a@localhost;
Alice Sherepa
added a comment - - edited bb-11.5-password-errors d1ec5274161db821de7ae9ce9be2dd583ef23c2d is ok to push into 11.5.
Minor problem- if user has SELECT privileges to mysql.global_priv, then he should be able to see also all users after "select * from information_schema.users;" (similar to the situation when the user has SELECT privileges to the whole mysql.* database )
create user a@localhost;
connect (con1, localhost, a);
select * from information_schema.users ;
--connection default
grant select on mysql.global_priv to a@localhost;
--connection con1
select * from information_schema.users ;
select * from mysql.global_priv;
--connection default
grant select on mysql.* to a@localhost;
--connection con1
select * from information_schema.users ;
--connection default
drop user a@localhost;
serg, it seems that an access to mysql.global_priv is not done as we thought – not through show_global_privileges, which was a common sense, but rather as to a usual table...
Anyway, I don't see a problem. It's not consistent across implementations (SHOW GRANTS requires select on mysql.*), and we can require a privilege different from mysql.global_priv.
Nikita Malyavin
added a comment - serg , it seems that an access to mysql.global_priv is not done as we thought – not through show_global_privileges , which was a common sense, but rather as to a usual table...
Anyway, I don't see a problem. It's not consistent across implementations (SHOW GRANTS requires select on mysql.* ), and we can require a privilege different from mysql.global_priv .
People
Nikita Malyavin
suresh ramagiri
Votes:
0Vote for this issue
Watchers:
12Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1587.5999999046326,"ttfb":307.90000009536743,"pageVisibility":"visible","entityId":91668,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a715d0ae-ad94-4f3a-947e-cbbde31a103c","navigationType":0,"readyForUser":1641.9000000953674,"redirectCount":0,"resourceLoadedEnd":2110.5,"resourceLoadedStart":320,"resourceTiming":[{"duration":688.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":320,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":320,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1008.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":688.6999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":320.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":320.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1009,"responseStart":0,"secureConnectionStart":0},{"duration":721.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":320.40000009536743,"connectEnd":320.40000009536743,"connectStart":320.40000009536743,"domainLookupEnd":320.40000009536743,"domainLookupStart":320.40000009536743,"fetchStart":320.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":320.40000009536743,"responseEnd":1041.8000001907349,"responseStart":1041.8000001907349,"secureConnectionStart":320.40000009536743},{"duration":757,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":320.59999990463257,"connectEnd":320.59999990463257,"connectStart":320.59999990463257,"domainLookupEnd":320.59999990463257,"domainLookupStart":320.59999990463257,"fetchStart":320.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":320.59999990463257,"responseEnd":1077.5999999046326,"responseStart":1077.5999999046326,"secureConnectionStart":320.59999990463257},{"duration":760.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":320.90000009536743,"connectEnd":320.90000009536743,"connectStart":320.90000009536743,"domainLookupEnd":320.90000009536743,"domainLookupStart":320.90000009536743,"fetchStart":320.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":320.90000009536743,"responseEnd":1081.4000000953674,"responseStart":1081.4000000953674,"secureConnectionStart":320.90000009536743},{"duration":760.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":321.09999990463257,"connectEnd":321.09999990463257,"connectStart":321.09999990463257,"domainLookupEnd":321.09999990463257,"domainLookupStart":321.09999990463257,"fetchStart":321.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":321.09999990463257,"responseEnd":1081.9000000953674,"responseStart":1081.9000000953674,"secureConnectionStart":321.09999990463257},{"duration":761.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":321.2000002861023,"connectEnd":321.2000002861023,"connectStart":321.2000002861023,"domainLookupEnd":321.2000002861023,"domainLookupStart":321.2000002861023,"fetchStart":321.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":321.2000002861023,"responseEnd":1082.3000001907349,"responseStart":1082.2000002861023,"secureConnectionStart":321.2000002861023},{"duration":872.9000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":321.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":321.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1194.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":761.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":321.5,"connectEnd":321.5,"connectStart":321.5,"domainLookupEnd":321.5,"domainLookupStart":321.5,"fetchStart":321.5,"redirectEnd":0,"redirectStart":0,"requestStart":321.5,"responseEnd":1082.8000001907349,"responseStart":1082.8000001907349,"secureConnectionStart":321.5},{"duration":872.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":321.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":321.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1194.5,"responseStart":0,"secureConnectionStart":0},{"duration":761.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":321.80000019073486,"connectEnd":321.80000019073486,"connectStart":321.80000019073486,"domainLookupEnd":321.80000019073486,"domainLookupStart":321.80000019073486,"fetchStart":321.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":321.80000019073486,"responseEnd":1083.4000000953674,"responseStart":1083.4000000953674,"secureConnectionStart":321.80000019073486},{"duration":1092.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":323.2000002861023,"connectEnd":323.2000002861023,"connectStart":323.2000002861023,"domainLookupEnd":323.2000002861023,"domainLookupStart":323.2000002861023,"fetchStart":323.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":323.2000002861023,"responseEnd":1415.8000001907349,"responseStart":1415.8000001907349,"secureConnectionStart":323.2000002861023},{"duration":1729.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":339,"connectEnd":339,"connectStart":339,"domainLookupEnd":339,"domainLookupStart":339,"fetchStart":339,"redirectEnd":0,"redirectStart":0,"requestStart":339,"responseEnd":2068.300000190735,"responseStart":2068.300000190735,"secureConnectionStart":339},{"duration":193.60000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1224.0999999046326,"connectEnd":1224.0999999046326,"connectStart":1224.0999999046326,"domainLookupEnd":1224.0999999046326,"domainLookupStart":1224.0999999046326,"fetchStart":1224.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1224.0999999046326,"responseEnd":1417.7000002861023,"responseStart":1417.7000002861023,"secureConnectionStart":1224.0999999046326},{"duration":626.6999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1483.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1483.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2110.5,"responseStart":0,"secureConnectionStart":0},{"duration":608.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1485.5,"connectEnd":1485.5,"connectStart":1485.5,"domainLookupEnd":1485.5,"domainLookupStart":1485.5,"fetchStart":1485.5,"redirectEnd":0,"redirectStart":0,"requestStart":1485.5,"responseEnd":2093.800000190735,"responseStart":2093.800000190735,"secureConnectionStart":1485.5},{"duration":619.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1486,"connectEnd":1486,"connectStart":1486,"domainLookupEnd":1486,"domainLookupStart":1486,"fetchStart":1486,"redirectEnd":0,"redirectStart":0,"requestStart":1486,"responseEnd":2105.5,"responseStart":2105.5,"secureConnectionStart":1486}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":130,"responseStart":308,"responseEnd":339,"domLoading":318,"domInteractive":2173,"domContentLoadedEventStart":2173,"domContentLoadedEventEnd":2233,"domComplete":2892,"loadEventStart":2892,"loadEventEnd":2893,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2122.7000002861023},{"name":"bigPipe.sidebar-id.end","time":2123.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":2123.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":2126.300000190735},{"name":"activityTabFullyLoaded","time":2254.5999999046326}],"measures":[],"correlationId":"5311c8fb0f5e2f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":19,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
nikitamalyavin, if we add a separate table it could make sense to address MDEV-27205 at the same time. And it could make sense to use a JSON field for the details.
Finding a good name is always tricky. Ideas are USER_DETAILS, USER_USAGE, USER_CONNECT_INFO, USER_STATUS