Type:
New Feature
Priority:
Major
Resolution:
Unresolved
Fix Version/s:
None
Ideally, it would probably make sense to provide ALTER USER syntax that supports multiple types of operations related to the multiple authentication methods functionality introduced by MDEV-11340 .
For example, let's say that we have the default root@localhost account:
MariaDB [(none)]> SHOW CREATE USER 'root' @ 'localhost' ;
+ ----------------------------------------------------------------------------------------------------+
| CREATE USER for root@localhost |
+ ----------------------------------------------------------------------------------------------------+
| CREATE USER 'root' @ 'localhost' IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket |
+ ----------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)
Users might want ALTER USER statements like:
An ALTER USER statement to set the authentication methods to exactly what the statement says, and discard any existing ones. I think the syntax for that would be the currently supported syntax:
-- change authentication method, discard existing ones
ALTER USER 'root' @ 'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD ( 'password' );
An ALTER USER statement to modify an existing authentication method, and leave the user account's other existing authentication methods as-is. This syntax might make sense:
-- change existing authentication method, keep other existing ones too
ALTER USER 'root' @ 'localhost' MODIFY IDENTIFIED VIA mysql_native_password USING PASSWORD ( 'password' );
An ALTER USER statement to add a new authentication method to the beginning of the list, and leave other existing authentication methods as-is. This syntax might make sense:
-- add new authentication method to beginning, keep existing ones too
ALTER USER 'root' @ 'localhost' ADD IDENTIFIED VIA pam USING 'mariadb' FIRST ;
An ALTER USER statement to add a new authentication method to the end of the list, and leave other existing authentication methods as-is. This syntax might make sense:
-- add new authentication method to end, keep existing ones too
ALTER USER 'root' @ 'localhost' ADD IDENTIFIED VIA pam USING 'mariadb' LAST ;
{"report":{"fcp":645.2999999523163,"ttfb":163.19999980926514,"pageVisibility":"visible","entityId":84065,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bda72554-6b3a-4cf1-87cf-715f86155a74","navigationType":0,"readyForUser":708.3999998569489,"redirectCount":0,"resourceLoadedEnd":663.0999999046326,"resourceLoadedStart":169,"resourceTiming":[{"duration":6.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":169,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":169,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":175.5,"responseStart":0,"secureConnectionStart":0},{"duration":6.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":169.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":169.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":175.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":59.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":169.39999985694885,"connectEnd":169.39999985694885,"connectStart":169.39999985694885,"domainLookupEnd":169.39999985694885,"domainLookupStart":169.39999985694885,"fetchStart":169.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":169.39999985694885,"responseEnd":229.29999995231628,"responseStart":229.29999995231628,"secureConnectionStart":169.39999985694885},{"duration":139.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":169.5,"connectEnd":169.5,"connectStart":169.5,"domainLookupEnd":169.5,"domainLookupStart":169.5,"fetchStart":169.5,"redirectEnd":0,"redirectStart":0,"requestStart":169.5,"responseEnd":308.69999980926514,"responseStart":308.69999980926514,"secureConnectionStart":169.5},{"duration":143.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":169.59999990463257,"connectEnd":169.59999990463257,"connectStart":169.59999990463257,"domainLookupEnd":169.59999990463257,"domainLookupStart":169.59999990463257,"fetchStart":169.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":169.59999990463257,"responseEnd":312.89999985694885,"responseStart":312.89999985694885,"secureConnectionStart":169.59999990463257},{"duration":143.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":169.69999980926514,"connectEnd":169.69999980926514,"connectStart":169.69999980926514,"domainLookupEnd":169.69999980926514,"domainLookupStart":169.69999980926514,"fetchStart":169.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":169.69999980926514,"responseEnd":313.39999985694885,"responseStart":313.39999985694885,"secureConnectionStart":169.69999980926514},{"duration":144.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":169.79999995231628,"connectEnd":169.79999995231628,"connectStart":169.79999995231628,"domainLookupEnd":169.79999995231628,"domainLookupStart":169.79999995231628,"fetchStart":169.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":169.79999995231628,"responseEnd":313.89999985694885,"responseStart":313.89999985694885,"secureConnectionStart":169.79999995231628},{"duration":144.60000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":169.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":169.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":314.5,"responseStart":0,"secureConnectionStart":0},{"duration":144.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":170,"connectEnd":170,"connectStart":170,"domainLookupEnd":170,"domainLookupStart":170,"fetchStart":170,"redirectEnd":0,"redirectStart":0,"requestStart":170,"responseEnd":314.5,"responseStart":314.5,"secureConnectionStart":170},{"duration":144.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":170.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":314.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":144.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":170.19999980926514,"connectEnd":170.19999980926514,"connectStart":170.19999980926514,"domainLookupEnd":170.19999980926514,"domainLookupStart":170.19999980926514,"fetchStart":170.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":170.19999980926514,"responseEnd":315.09999990463257,"responseStart":315.09999990463257,"secureConnectionStart":170.19999980926514},{"duration":490.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":171.09999990463257,"connectEnd":171.09999990463257,"connectStart":171.09999990463257,"domainLookupEnd":171.09999990463257,"domainLookupStart":171.09999990463257,"fetchStart":171.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":171.09999990463257,"responseEnd":661.3999998569489,"responseStart":661.3999998569489,"secureConnectionStart":171.09999990463257},{"duration":491.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":171.19999980926514,"connectEnd":171.19999980926514,"connectStart":171.19999980926514,"domainLookupEnd":171.19999980926514,"domainLookupStart":171.19999980926514,"fetchStart":171.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":171.19999980926514,"responseEnd":663.0999999046326,"responseStart":663,"secureConnectionStart":171.19999980926514},{"duration":204.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":446.2999999523163,"connectEnd":446.2999999523163,"connectStart":446.2999999523163,"domainLookupEnd":446.2999999523163,"domainLookupStart":446.2999999523163,"fetchStart":446.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":446.2999999523163,"responseEnd":651.0999999046326,"responseStart":651.0999999046326,"secureConnectionStart":446.2999999523163},{"duration":43,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":623.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":623.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":666.8999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":29,"responseStart":164,"responseEnd":167,"domLoading":167,"domInteractive":820,"domContentLoadedEventStart":820,"domContentLoadedEventEnd":862,"domComplete":1647,"loadEventStart":1647,"loadEventEnd":1648,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":800.1999998092651},{"name":"bigPipe.sidebar-id.end","time":800.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":801.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":803.5999999046326},{"name":"activityTabFullyLoaded","time":873.3999998569489}],"measures":[],"correlationId":"d3963cd745465a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":80,"dbReadsTimeInMs":9,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}