-
Notifications
You must be signed in to change notification settings - Fork 97
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
Added 'sa' login equivalent 'jdbc_user' login for non-sysadmin login in server_princiapls #1948
Added 'sa' login equivalent 'jdbc_user' login for non-sysadmin login in server_princiapls #1948
Conversation
…in server_princiapls view. Signed-off-by: ANJU BHARTI <[email protected]>
@@ -326,6 +326,7 @@ CAST(CASE WHEN Ext.type = 'R' THEN 1 ELSE Ext.is_fixed_role END AS sys.BIT) AS i | |||
FROM pg_catalog.pg_roles AS Base INNER JOIN sys.babelfish_authid_login_ext AS Ext ON Base.rolname = Ext.rolname | |||
WHERE pg_has_role(suser_id(), 'sysadmin'::TEXT, 'MEMBER') | |||
OR Ext.orig_loginname = suser_name() | |||
OR Ext.orig_loginname = 'jdbc_user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loginname
is not necessarily jdbc_user
always. We have created this role in init.sh, it could be anything else provided by the customer.
Please don't hardcode this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -326,6 +326,7 @@ CAST(CASE WHEN Ext.type = 'R' THEN 1 ELSE Ext.is_fixed_role END AS sys.BIT) AS i | |||
FROM pg_catalog.pg_roles AS Base INNER JOIN sys.babelfish_authid_login_ext AS Ext ON Base.rolname = Ext.rolname | |||
WHERE pg_has_role(suser_id(), 'sysadmin'::TEXT, 'MEMBER') | |||
OR Ext.orig_loginname = suser_name() | |||
OR Ext.orig_loginname = 'jdbc_user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Signed-off-by: ANJU BHARTI <[email protected]>
test/JDBC/upgrade/13_6/schedule
Outdated
@@ -233,7 +233,7 @@ sys-schema-name | |||
sys-schemas | |||
sys-schemas-dep | |||
sys-selective_xml_index_paths | |||
sys-server_principals | |||
sys-server_principals_before-15_5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name is incorrect, so the tests are failing.
It should be sys-server_principals-before-15_5
Signed-off-by: ANJU BHARTI <[email protected]>
9c135de
to
74dd54b
Compare
This reverts commit 74dd54b.
Signed-off-by: ANJU BHARTI <[email protected]>
b919797
into
babelfish-for-postgresql:BABEL_3_X_DEV
…in server_princiapls (babelfish-for-postgresql#1948) sys.server_principals view was returning only the rows for current login and fixed_server_role(sysadmin). Added 'sa' SQL_LOGIN sql server equivalent babelfish 'jdbc_user' SQL_LOGIN for non-sysadmin login in server_princiapls Task: BABEL-4361 (add on) Signed-off-by: Anju Bharti [email protected]
…in server_princiapls (babelfish-for-postgresql#1948) sys.server_principals view was returning only the rows for current login and fixed_server_role(sysadmin). Added 'sa' SQL_LOGIN sql server equivalent babelfish 'jdbc_user' SQL_LOGIN for non-sysadmin login in server_princiapls Task: BABEL-4361 (add on) Signed-off-by: Anju Bharti [email protected]
Description
sys.server_principals view was returning only the rows for current login and fixed_server_role(sysadmin).
Added 'sa' SQL_LOGIN sql server equivalent babelfish 'jdbc_user' SQL_LOGIN for non-sysadmin login in server_princiapls
Task: BABEL-4361 (add on)
Authored-by: Anju Bharti [email protected]
Signed-off-by: Anju Bharti [email protected]
Issues Resolved
JIRA BABEL-4361 (add on)
sys.server_principals view was returning only the rows for current login and fixed_server_role(sysadmin).
Test Scenarios Covered
Use case based -
Boundary conditions -
Arbitrary inputs -
Negative test cases -
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.