Repository navigation
feat(users-roles): manage SQL Server and Oracle users, roles and privileges - #3733
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PluginPrincipalManagementand declare.userManagement: Database > Users & Roles opens on both.saisdbo). Permissions at server, database, schema, object and column scope; the catalog issys.fn_builtin_permissions.CREATE LOGIN+CREATE USER FOR LOGIN,CREATE ROLE,ALTER LOGIN ENABLE/DISABLE,ALTER ROLE/ALTER SERVER ROLE ... ADD/DROP MEMBER, passwords, drops, all in one transaction. Server permissions run inmaster, database statements in the database the list was read from, both throughEXEC [db].sys.sp_executesql, so the session never switches database. A login with no user there gets one first (SID checked).DBA_USERS/DBA_ROLES/DBA_*_PRIVS, falling back to theALL_,USER_andROLE_views on ORA-00942. System privileges at server scope, object privileges on tables and views, columnINSERT/UPDATE/REFERENCES, ADMIN and GRANT option kept. Create, lock, unlock, drop, password, role grants.TableProMSSQLCoreandTableProOracleCore; the plugins only map PluginKit types.supportsRoleLogin(false for both, kept through plugin registration). Can log in is off for roles and staged creates there; the connection limit is hidden.]and"doubling in the MSSQL plugin andOracleSchemaQueriesmatches by code unit. A grapheme match skipped a quote followed by a combining mark and ended the identifier early.Not in this PR
DENY, columnREVOKEexceptions under a table grant (state = 'R'), permissions a fixed role implies,EXECUTEon modules, Windows logins and contained users from the sheet.DROP USER ... CASCADE: the drop sheet offers reassign or drop-owned, which fits PostgreSQL only. Oracle revokes an object privilege only for its grantor (ORA-01927); the list does not show the grantor.quoteIdentifierdoubles"by grapheme cluster too.Test plan
TableProMSSQLCoreTests(105 run): directory merge and collisions, statements per kind, database scoping andsp_executesqlquoting, escaping, row parsing, catalog split.TableProOracleCoreTests(292 run): DBA and session queries, 11g vs 12c+ columns, statements, column revoke refusal, code-unit quoting.UsersRolesLoginToggleTests,PrincipalApplyOpenTransactionTestsplus the existing Users & Roles suites (44 run).MSSQLDriverandOracleDriverschemes build.apple/scripts/probes/check-mssql-principals.shon SQL Server 2022 CU14 (15 checks: one-transaction apply, Msg 4621 outside master,CREATE LOGINrollback, read-back, revoke, drop) andapple/scripts/probes/check-oracle-principals.shon Oracle Free 23ai (26 checks: create, grant, lock, read-back, ORA-00942 fallback, ORA-01750, revoke, password, drop). Not run on 2019 or 19c: no image on the build machine.Fixes #3610