Disabling a Schema Does Not Disable the Access to that Schema
(Doc ID 2989778.1)
Last updated on JANUARY 06, 2025
Applies to:
Oracle REST Data Services - Version 23.1 and laterOracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
Disabling a schema does not disable the schema's access.
The problem happens when creating a module: create a new module, a new template and a GET handler (select * from table_name;). After disabling the schema, one can still GET the module.
Running the below does not seem to be working as documented.
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
ORDS.ENABLE_SCHEMA(p_enabled => FALSE,
p_schema => 'SCHEMANAME',
p_url_mapping_type => 'BASE_PATH',
p_url_mapping_pattern => 'sn',
p_auto_rest_auth => TRUE);
commit;
END;
/
The documentation used:
https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/18.3/aelig/ORDS-reference.html#GUID-8A4C061C-8ED0-41F2-9F1B-9EC701C8F186
However, after running the above, the schema can still log into the portal and access to module handler is active. One loses access only to Autorest.
It reproduces only if ORDS is NOT restarted after disabling the schema. If one disables the schema and then restarts ORDS, the access to the schema is denied.
If one disables the schema and tries to access the URL, without restarting ORDS, the access is possible.
ORDS restart requirement after REST disabling schema is not documented to be mandatory.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |