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

fix(database-permission): could not call inside dbms package in SQL console #2417

Merged
merged 3 commits into from
May 20, 2024

Conversation

smallsheeeep
Copy link
Contributor

What type of PR is this?

type-bug
module-database permission

What this PR does / why we need it:

When execute:

call DBMS_OUTPUT.putline('aaaa');

We cannot judge DBMS_OUTPUT is name of a database or a package. Now we will recognize them as database name, but the "database" is not exist, so the SQL will be intercepted during permission check.
This PR fix it by add a whitelist, the default vaule is all OB inside system packages. User can add items by config metaDB. If a new dialect type is supported, we no need to change codes, but add config key as odc.permission-check.whitelist.database.[dialect-type].

Which issue(s) this PR fixes:

Fixes #2391

Special notes for your reviewer:

Self-test passed.

Additional documentation e.g., usage docs, etc.:


@smallsheeeep smallsheeeep added this to the ODC 4.3.0 milestone May 17, 2024
@smallsheeeep smallsheeeep self-assigned this May 17, 2024
@smallsheeeep smallsheeeep linked an issue May 17, 2024 that may be closed by this pull request
@smallsheeeep smallsheeeep changed the base branch from dev/4.3.x to dev/4.3.0 May 17, 2024 06:24
@smallsheeeep smallsheeeep changed the title bugfix(database-permission): could not call inside dbms package in SQL console fix(database-permission): could not call inside dbms package in SQL console May 17, 2024
Copy link
Contributor

@yizhouxw yizhouxw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yhilmare yhilmare merged commit 714a327 into dev/4.3.0 May 20, 2024
7 checks passed
@yhilmare yhilmare deleted the bugfix/gaoda_43x_fix_db_permission_control branch May 20, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: failed to call dbms package in oracle mode
3 participants