Repository navigation
Implement Code Based Access Control for managing framework tables access
#1370
Unanswered
jgebal
asked this question in
Feature Requests
Implement Code Based Access Control for managing framework tables access
#1370
jgebal
Jul 18, 2026
·
2 comments
·
1 reply
Return to top
Discussion options
{{title}}
Something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Problem or motivation
AUTHID CURRENT USER packages currently rely on the invoking schema's privileges. The framework is relying on it's own tables. Those tables should not be visible publicly.
Currently, separate packages are used for operating on framework internal tables.
Proposed solution
With introduction of Code-Based Access Control in Oracle 12.1 there is no need for having separate packsges anymore.
So the direction would be to review all the package that access the framework internal tables and remove the separate packages where applicable.
The removed packages should be fully integrated into the existing authid current-user framework packages or types.
All the existing functional behavior should remain the same.
The main change will be the maintainability, readability and potentially better performance of the executed code.
Alternatives or workarounds considered
No response
Framework area
Other
utPLSQL version you are using
No response
|
You must be logged in to vote
All reactions
Replies:
2 comments
·
1 reply
Comment options
{{title}}
Something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AUTHID DEFINER analysis
List of definer-rights packages and types in utPLSQL v3 that use private framework objects in SQL, and who calls them.
Scope
- Included: definer-rights objects whose SQL references a private table, view or sequence.
- Callers: only callers of a subprogram that reaches private-object SQL, directly or through other subprograms of the same object. Callers that only use types, constants or SQL-free subprograms are left out.
- Caller AUTHID: an object type without its own
AUTHID clause inherits it from its supertype. The "AUTHID source" column names where the AUTHID comes from.
The analysis covers source/ directory.
Public and private objects
The grant scripts (create_grants.sql, create_synonyms_and_grants_for_public.sql) grant access on only four tables. Everything else is private. source/ contains no views.
| Object |
Kind |
Visibility |
Granted |
dbmspcc_blocks, dbmspcc_runs, dbmspcc_units |
table |
public |
select, insert, update, delete |
ut_coverage_runs |
table |
public |
select only |
ut_annotation_cache, ut_annotation_cache_info, ut_annotation_cache_schema |
table |
private |
|
ut_suite_cache, ut_suite_cache_package, ut_suite_cache_schema |
table |
private |
|
ut_output_buffer_info_tmp, ut_output_buffer_tmp, ut_output_clob_buffer_tmp |
table |
private |
|
plsql_profiler_runs, plsql_profiler_units, plsql_profiler_data |
table |
private |
|
ut_coverage_sources_tmp, ut_dbms_output_cache, ut_compound_data_tmp, ut_compound_data_diff_tmp, ut_json_data_diff_tmp |
temporary table |
private |
|
ut_annotation_cache_seq, ut_suite_cache_seq, ut_savepoint_seq, ut_output_buffer_tmp_seq, ut_output_clob_buffer_tmp_seq, plsql_profiler_runnumber |
sequence |
private |
|
Overview
| Definer-rights object |
AUTHID source |
Private objects used |
Public objects used |
Callers |
ut_annotation_cache_manager |
declared |
4 |
none |
2 |
ut_suite_cache_manager |
declared |
4 |
none |
1 |
ut_coverage_helper |
declared |
1 |
ut_coverage_runs |
6 |
ut_coverage_helper_profiler |
declared |
2 |
ut_coverage_runs |
1 |
ut_compound_data_helper |
declared |
3 |
none |
5 |
ut_utils |
declared |
2 |
none |
2 |
ut_output_buffer_base |
declared |
1 |
none |
4 |
ut_output_table_buffer |
inherited from ut_output_buffer_base |
3 |
none |
1 |
ut_output_clob_table_buffer |
inherited from ut_output_buffer_base |
3 |
none |
2 |
ut_output_bulk_buffer |
inherited from ut_output_buffer_base |
3 |
none |
7 |
Callers number is number of program units (packages/types) calling one or more procedure/function that is referencing the private SQL object (table/view etc).
ut_annotation_cache_manager
source/core/annotations/ut_annotation_cache_manager.pkb
| Object accessed |
Kind |
Visibility |
ut_annotation_cache |
table |
private |
ut_annotation_cache_info |
table |
private |
ut_annotation_cache_schema |
table |
private |
ut_annotation_cache_seq |
sequence |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_annotation_manager |
CURRENT_USER |
declared |
ut_suite_cache_manager |
DEFINER |
declared |
ut_suite_cache_manager
source/core/ut_suite_cache_manager.pkb
| Object accessed |
Kind |
Visibility |
ut_suite_cache |
table |
private |
ut_suite_cache_package |
table |
private |
ut_suite_cache_schema |
table |
private |
ut_suite_cache_seq |
sequence |
private |
It also reaches the annotation cache tables through ut_annotation_cache_manager.
| Caller |
Caller AUTHID |
AUTHID source |
ut_suite_manager |
CURRENT_USER |
declared |
ut_coverage_helper
source/core/coverage/ut_coverage_helper.pkb
| Object accessed |
Kind |
Visibility |
ut_coverage_sources_tmp |
temporary table |
private |
ut_coverage_runs |
table |
public (select only; this package inserts) |
| Caller |
Caller AUTHID |
AUTHID source |
ut_coverage |
CURRENT_USER |
declared |
ut_coverage_profiler |
CURRENT_USER |
declared |
ut_coverage_block |
CURRENT_USER |
declared |
ut_coverage_report_html_helper |
CURRENT_USER |
declared |
ut_runner |
CURRENT_USER |
declared |
ut_coverage_reporter_base |
CURRENT_USER |
inherited from ut_event_listener |
ut_coverage_helper_profiler
source/core/coverage/ut_coverage_helper_profiler.pkb
| Object accessed |
Kind |
Visibility |
plsql_profiler_units |
table |
private |
plsql_profiler_data |
table |
private |
ut_coverage_runs |
table |
public |
| Caller |
Caller AUTHID |
AUTHID source |
ut_coverage_profiler |
CURRENT_USER |
declared |
ut_compound_data_helper
source/expectations/data_values/ut_compound_data_helper.pkb
| Object accessed |
Kind |
Visibility |
ut_compound_data_tmp |
temporary table |
private |
ut_compound_data_diff_tmp |
temporary table |
private |
ut_json_data_diff_tmp |
temporary table |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_compound_data_value |
CURRENT_USER |
inherited from ut_data_value |
ut_data_value_refcursor |
CURRENT_USER |
inherited from ut_data_value |
ut_data_value_anydata |
CURRENT_USER |
inherited from ut_data_value |
ut_data_value_json |
CURRENT_USER |
inherited from ut_data_value |
ut_runner |
CURRENT_USER |
declared |
ut_utils
source/core/ut_utils.pkb
| Object accessed |
Kind |
Visibility |
ut_dbms_output_cache |
temporary table |
private |
ut_savepoint_seq |
sequence |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_suite_item |
CURRENT_USER |
inherited from ut_event_item |
ut_runner |
CURRENT_USER |
declared |
ut_output_buffer_base
source/core/output_buffers/ut_output_buffer_base.tpb
| Object accessed |
Kind |
Visibility |
ut_output_buffer_info_tmp |
table |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_output_reporter_base |
CURRENT_USER |
inherited from ut_event_listener |
ut_output_table_buffer |
DEFINER |
inherited from ut_output_buffer_base |
ut_output_clob_table_buffer |
DEFINER |
inherited from ut_output_buffer_base |
ut_output_bulk_buffer |
DEFINER |
inherited from ut_output_buffer_base |
ut_output_reporter_base holds its buffer as ut_output_buffer_base, so its calls also dispatch to the subtype methods below.
ut_output_table_buffer
source/core/output_buffers/ut_output_table_buffer.tpb
| Object accessed |
Kind |
Visibility |
ut_output_buffer_tmp |
table |
private |
ut_output_buffer_tmp_seq |
sequence |
private |
ut_output_buffer_info_tmp (through inherited methods) |
table |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_output_reporter_base |
CURRENT_USER |
inherited from ut_event_listener |
ut_output_clob_table_buffer
source/core/output_buffers/ut_output_clob_table_buffer.tpb
| Object accessed |
Kind |
Visibility |
ut_output_clob_buffer_tmp |
table |
private |
ut_output_clob_buffer_tmp_seq |
sequence |
private |
ut_output_buffer_info_tmp (through inherited methods) |
table |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_debug_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_realtime_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_output_bulk_buffer
source/core/output_buffers/ut_output_bulk_buffer.tpb
| Object accessed |
Kind |
Visibility |
ut_output_buffer_tmp |
table |
private |
ut_output_buffer_tmp_seq |
sequence |
private |
ut_output_buffer_info_tmp (through inherited methods) |
table |
private |
| Caller |
Caller AUTHID |
AUTHID source |
ut_junit_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_xunit_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_tfs_junit_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_sonar_test_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_coverage_html_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_coverage_sonar_reporter |
CURRENT_USER |
inherited from ut_event_listener |
ut_coverage_cobertura_reporter |
CURRENT_USER |
inherited from ut_event_listener |
The reporters only call the constructor, which calls the inherited init and writes ut_output_buffer_info_tmp.
|
You must be logged in to vote
All reactions
0 replies
Comment options
{{title}}
Something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
{{editor}}'s edit
{{actor}} deleted this content
.
{{editor}}'s edit
Something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Implementation plan and scope
Initially It would be best to do a narrow scope change by converting the packages:
ut_annotation_cache_manager
ut_suite_cache_manager
Those are currently using complex logic to allow for filtering of visible objects. Moving to CBAC could actually mean that many of the queries that are now spread across ut_annotation_cache_manager and ut_annotation_manager could be now integrated making code more readable and performant.
|
You must be logged in to vote
All reactions
1 reply

Comment options
{{title}}
Something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Changes introduced in #1389 are implementing CBAC for two core components of the framework.
|
All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Category
💡
Feature Requests
Labels
enhancement
security
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
Select a reply
Loading
Uh oh!
There was an error while loading. Please reload this page.
Create a new saved reply
reacted with thumbs up emoji
reacted with thumbs down emoji
reacted with laugh emoji
reacted with hooray emoji
reacted with confused emoji
reacted with heart emoji
reacted with rocket emoji
reacted with eyes emoji