For a note, we ended up with the second variant of syntax:
SETDEFAULT ROLE yyy;
SETDEFAULT ROLE yyy [ FOR xxx ];
Elena Stepanova
added a comment - - edited For a note, we ended up with the second variant of syntax:
SET DEFAULT ROLE yyy;
SET DEFAULT ROLE yyy [ FOR xxx ];
It would be very non-standard. According to the SQL standard one needsSET ROLE to be able to use role's privileges, and one can have at most one role set at any given point in time.
To have all privileges from all roles one should — to stay within the SQL standard — create a new role, grant all other roles to it, and then SET this new role.
Sergei Golubchik
added a comment - It would be very non-standard. According to the SQL standard one needs SET ROLE to be able to use role's privileges, and one can have at most one role set at any given point in time.
To have all privileges from all roles one should — to stay within the SQL standard — create a new role, grant all other roles to it, and then SET this new role.
Without Roles, when a normal user logs-in, all his rights are loaded, and visible in the SHOW GRANTS FOR CURRENT_USER();
With roles, a user may want to get ALL privileges from all his ROLES granted at connect time.
This removes the need for default ROLE, and the need to run SET ROLE by applications/users to switch between roles.
What are your thoughts on this ?
Regards,
Joffrey
Joffrey MICHAIE (Inactive)
added a comment - Hi,
Without Roles, when a normal user logs-in, all his rights are loaded, and visible in the SHOW GRANTS FOR CURRENT_USER();
With roles, a user may want to get ALL privileges from all his ROLES granted at connect time.
This removes the need for default ROLE, and the need to run SET ROLE by applications/users to switch between roles.
What are your thoughts on this ?
Regards,
Joffrey
People
Sergei Golubchik
Sergei Golubchik
Votes:
3Vote for this issue
Watchers:
7Start 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":1126.3000001907349,"ttfb":246.2000002861023,"pageVisibility":"visible","entityId":26213,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"377e95fe-8e08-4fca-830f-82a94c258708","navigationType":0,"readyForUser":1203.5999999046326,"redirectCount":0,"resourceLoadedEnd":1729,"resourceLoadedStart":252.2000002861023,"resourceTiming":[{"duration":375.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":252.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":627.5,"responseStart":0,"secureConnectionStart":0},{"duration":375.40000009536743,"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":252.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":627.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":384.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":252.59999990463257,"connectEnd":252.59999990463257,"connectStart":252.59999990463257,"domainLookupEnd":252.59999990463257,"domainLookupStart":252.59999990463257,"fetchStart":252.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":252.59999990463257,"responseEnd":637.4000000953674,"responseStart":637.4000000953674,"secureConnectionStart":252.59999990463257},{"duration":423.5,"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":252.80000019073486,"connectEnd":252.80000019073486,"connectStart":252.80000019073486,"domainLookupEnd":252.80000019073486,"domainLookupStart":252.80000019073486,"fetchStart":252.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":252.80000019073486,"responseEnd":676.3000001907349,"responseStart":676.3000001907349,"secureConnectionStart":252.80000019073486},{"duration":427.40000009536743,"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":253.09999990463257,"connectEnd":253.09999990463257,"connectStart":253.09999990463257,"domainLookupEnd":253.09999990463257,"domainLookupStart":253.09999990463257,"fetchStart":253.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":253.09999990463257,"responseEnd":680.5,"responseStart":680.5,"secureConnectionStart":253.09999990463257},{"duration":427.59999990463257,"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":253.30000019073486,"connectEnd":253.30000019073486,"connectStart":253.30000019073486,"domainLookupEnd":253.30000019073486,"domainLookupStart":253.30000019073486,"fetchStart":253.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":253.30000019073486,"responseEnd":680.9000000953674,"responseStart":680.9000000953674,"secureConnectionStart":253.30000019073486},{"duration":427.80000019073486,"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":253.5,"connectEnd":253.5,"connectStart":253.5,"domainLookupEnd":253.5,"domainLookupStart":253.5,"fetchStart":253.5,"redirectEnd":0,"redirectStart":0,"requestStart":253.5,"responseEnd":681.3000001907349,"responseStart":681.3000001907349,"secureConnectionStart":253.5},{"duration":529.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":253.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":783.5,"responseStart":0,"secureConnectionStart":0},{"duration":428.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":253.80000019073486,"connectEnd":253.80000019073486,"connectStart":253.80000019073486,"domainLookupEnd":253.80000019073486,"domainLookupStart":253.80000019073486,"fetchStart":253.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":253.80000019073486,"responseEnd":681.9000000953674,"responseStart":681.9000000953674,"secureConnectionStart":253.80000019073486},{"duration":529.5999999046326,"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":254,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":783.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":428.19999980926514,"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":254.2000002861023,"connectEnd":254.2000002861023,"connectStart":254.2000002861023,"domainLookupEnd":254.2000002861023,"domainLookupStart":254.2000002861023,"fetchStart":254.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":254.2000002861023,"responseEnd":682.4000000953674,"responseStart":682.4000000953674,"secureConnectionStart":254.2000002861023},{"duration":657,"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":255.09999990463257,"connectEnd":255.09999990463257,"connectStart":255.09999990463257,"domainLookupEnd":255.09999990463257,"domainLookupStart":255.09999990463257,"fetchStart":255.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":255.09999990463257,"responseEnd":912.0999999046326,"responseStart":912.0999999046326,"secureConnectionStart":255.09999990463257},{"duration":1457.5999999046326,"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":255.2000002861023,"connectEnd":255.2000002861023,"connectStart":255.2000002861023,"domainLookupEnd":255.2000002861023,"domainLookupStart":255.2000002861023,"fetchStart":255.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":255.2000002861023,"responseEnd":1712.8000001907349,"responseStart":1712.8000001907349,"secureConnectionStart":255.2000002861023},{"duration":128.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":797.8000001907349,"connectEnd":797.8000001907349,"connectStart":797.8000001907349,"domainLookupEnd":797.8000001907349,"domainLookupStart":797.8000001907349,"fetchStart":797.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":797.8000001907349,"responseEnd":926.7000002861023,"responseStart":926.7000002861023,"secureConnectionStart":797.8000001907349},{"duration":652.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&slack-enabled=true&whisper-enabled=true","startTime":1076.7000002861023,"connectEnd":1076.7000002861023,"connectStart":1076.7000002861023,"domainLookupEnd":1076.7000002861023,"domainLookupStart":1076.7000002861023,"fetchStart":1076.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1076.7000002861023,"responseEnd":1729,"responseStart":1729,"secureConnectionStart":1076.7000002861023}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":101,"responseStart":247,"responseEnd":249,"domLoading":250,"domInteractive":1738,"domContentLoadedEventStart":1738,"domContentLoadedEventEnd":1780,"domComplete":2239,"loadEventStart":2239,"loadEventEnd":2240,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1714.7000002861023},{"name":"bigPipe.sidebar-id.end","time":1715.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":1715.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1717.7000002861023},{"name":"activityTabFullyLoaded","time":1793.4000000953674}],"measures":[],"correlationId":"54a5a53ca5837e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For a note, we ended up with the second variant of syntax: