Skip to content
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

[OSS-ONLY] Login with mapped user should not use guest user privileges (#3088) #3156

Conversation

rishabhtanwar29
Copy link
Contributor

@rishabhtanwar29 rishabhtanwar29 commented Nov 25, 2024

Description

Previously, a guest users always remain member of a login even if login has a mapped user in a particular database. Due to this any database user is able to access the objects which are accessible to guest user which is undesirable.

Fixed this issue by only keeping one user member of a login at a time, which means, guest will be a member of login only if there is no mapped user to that login otherwise only that mapped user will be a member of login.

Task: BABEL-5389
Co-authored-by: Rishabh Tanwar [email protected]
Signed-off-by: Shalini Lohia [email protected]

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

  • Commits are signed per the DCO using --signoff

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.

rishabhtanwar29 and others added 2 commits November 25, 2024 11:09
babelfish-for-postgresql#3088)

Previously, a guest users always remain member of a login even if login has a mapped
user in a particular database. Due to this any database user is able to access the
objects which are accessible to guest user which is undesirable.

Fixed this issue by only keeping one user member of a login at a time, which means,
guest will be a member of login only if there is no mapped user to that login otherwise
only that mapped user will be a member of login.

Task: BABEL-5389

Co-authored-by: Rishabh Tanwar <[email protected]>
Signed-off-by: Shalini Lohia <[email protected]>
Signed-off-by: Rishabh Tanwar <[email protected]>
@coveralls
Copy link
Collaborator

coveralls commented Nov 25, 2024

Pull Request Test Coverage Report for Build 12009040802

Details

  • 65 of 89 (73.03%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 74.156%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/catalog.c 17 18 94.44%
contrib/babelfishpg_tsql/src/rolecmds.c 41 64 64.06%
Totals Coverage Status
Change from base Build 11975977288: 0.005%
Covered Lines: 45037
Relevant Lines: 60733

💛 - Coveralls

@shardgupta shardgupta merged commit 4b2a438 into babelfish-for-postgresql:BABEL_4_4_STABLE Nov 25, 2024
46 checks passed
@shardgupta shardgupta deleted the jira-babel-5389-4x branch November 25, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants