Oracle DBMS_NETWORK_ACL_ADMIN Built-In Package Versions 9.0 - 19.3 |
---|
Security Advisory | |||||||||||||||||||||||||||||
This package provides security for
network accessing built-in PL/SQL packages such as UTL_TCP, UTL_HTTP, UTL_SMTP, UTL_MAIL, and UTL_INADDR. The package controls their ability to access destinations via TCP/IP networks by means of defining and enforcing Access Control Lists. If you are in any version of Oracle prior to 12cR1 or in any version of Oracle 12cR1 or above but not using the new container architecture the package and its associated ACLs is one of a very short list of options available for preventing the database's internal tools from being used to compromise security. By comparison with Lockdown Profiles ... ACLs are fine grained. Lockdown Profiles are an on/off switch permitting or blocking all access. ACLs allow for fine tuning so that access may be made possible but only to specifically identified targets. It is our opinion that any Oracle Database not using Access Control Lists is a database that is insecure and that the DBA team responsible for its care is guilty of malpractice. Sounds harsh perhaps but we worked on a breach involving a major medical center where PII and PHI data were shipped out of the database in a manner that could have been easily prevented with nothing more sophisticated than the few minutes it would have taken to create an ACL. |
|||||||||||||||||||||||||||||
Recommended Security Rules | |||||||||||||||||||||||||||||
NEVER
|
|||||||||||||||||||||||||||||
How Oracle Works | |||||||||||||||||||||||||||||
This section contains a test. This package is one of the most essential components of practicing good OpSec as it provides capabilities not available to a DBA anywhere else in IT.
That said, to make proper use of any tool you must understand what it can do, what it cannot do, and what risks must be guarded against.
Think of this package as a match. It can do very valuable things like starting a fire to give you warmth, to cook food, to boil water. But you know that match can also be used to burn down your house. Review the functionality below and write down a list of issues that must be address to take advantage of this package's features. Then, after you have it compiled ... highlight the area below this sentence with your mouse and see if you caught this one too. The package writes xml files to the file system. You must protect the integrity of the files from tampering or deletion? |
|||||||||||||||||||||||||||||
DBMS_NETWORK_ACL_ADMIN Package Information | |||||||||||||||||||||||||||||
AUTHID | DEFINER |
||||||||||||||||||||||||||||
Constants |
|
||||||||||||||||||||||||||||
Data Types | TYPE aclid_table IS TABLE OF NUMBER INDEX BY BINARY INTEGER; |
||||||||||||||||||||||||||||
Dependencies |
|
||||||||||||||||||||||||||||
Documented in Types & Packages | Yes | ||||||||||||||||||||||||||||
Exceptions |
|
||||||||||||||||||||||||||||
First Available | 11.1.0.6 | ||||||||||||||||||||||||||||
Security Model | Owned by SYS with EXECUTE granted to DBA, EXECUTE_CATALOG_ROLE, GSMADMIN_INTERNAL, GGSYS, and MDSYS | ||||||||||||||||||||||||||||
Source | {$ORACLE_HOME}/rdbms/admin/dbmsnacl.sql | ||||||||||||||||||||||||||||
Subprograms |
|
||||||||||||||||||||||||||||
ADD_PRIVILEGE | |||||||||||||||||||||||||||||
Adds a privilege to grant or deny the network access to the user in an access control list (ACL) Deprecated in 12.2: Use APPEND_HOST_ACE |
dbms_network_acl_admin.add_privilege( |
||||||||||||||||||||||||||||
exec dbms_network_acl_admin.add_privilege(acl => 'mlib-org-permissions.xml', principal => 'UWCLASS', is_grant => TRUE, privilege => 'connect'); |
|||||||||||||||||||||||||||||
APPEND_HOST_ACE | |||||||||||||||||||||||||||||
Append an access control entry (ACE) to the access control list (ACL) of a network host. The ACL controls access to the given host from the database and the ACE specifies the privileges granted to or denied from the specified principal. | dbms_network_acl_admin.append_host_ace( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
APPEND_HOST_ACL | |||||||||||||||||||||||||||||
Append access control entries (ACE) of an access control list (ACL) to the ACL of a network host | dbms_network_acl_admin.append_host_acl( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
APPEND_WALLET_ACE | |||||||||||||||||||||||||||||
Append an access control entry (ACE) to the access control list (ACL) of a wallet. The ACL controls access to the given wallet from the database and the ACE specifies the privileges granted to or denied from the specified principal. | dbms_network_acl_admin.append_wallet_ace( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
APPEND_WALLET_ACL | |||||||||||||||||||||||||||||
Append access control entries (ACE) of an access control list (ACL) to the ACL of a wallet | dbms_network_acl_admin.append_wallet_acl( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
ASSIGN_ACL | |||||||||||||||||||||||||||||
Assigns an access control list (ACL) to a network host, and optionally specific to a TCP port range Deprecated in 12.2: APPEND_HOST_ACE |
dbms_network_acl_admin.assign_acl( |
||||||||||||||||||||||||||||
BEGIN |
|||||||||||||||||||||||||||||
ASSIGN_WALLET_ACL | |||||||||||||||||||||||||||||
Assigns an access control list (ACL) to a wallet Deprecated in 12.2: Use APPEND_WALLET_ACE |
dbms_network_acl_admin.assign_wallet_acl( |
||||||||||||||||||||||||||||
BEGIN |
|||||||||||||||||||||||||||||
CHECK_PRIVILEGE | |||||||||||||||||||||||||||||
Check if a privilege is granted to or denied from the user in an access control list based on the ACL Deprecated in 12.2 |
dbms_network_acl_admin.check_privilege( |
||||||||||||||||||||||||||||
See CREATE_ACL Demo Below | |||||||||||||||||||||||||||||
CHECK_PRIVILEGE_ACLID | |||||||||||||||||||||||||||||
Check if a privilege is granted to or denied from the user in an access control list based on the ID of the ACL Deprecated in 12.2 |
dbms_network_acl_admin.check_privilege_aclid( |
||||||||||||||||||||||||||||
SELECT DISTINCT aclid |
|||||||||||||||||||||||||||||
CREATE_ACL | |||||||||||||||||||||||||||||
Creates an access control list (ACL) with an initial privilege setting Deprecated in 12.2: APPEND_HOST_ACE |
dbms_network_acl_admin.create_acl( |
||||||||||||||||||||||||||||
conn sys@pdbdev as sysdba |
|||||||||||||||||||||||||||||
DELETE_PRIVILEGE | |||||||||||||||||||||||||||||
Deletes a privilege in an access control list (ACL) Deprecated in 12.2: Use REMOVE_HOST_ACE |
dbms_network_acl_admin.delete_privilege( |
||||||||||||||||||||||||||||
BEGIN |
|||||||||||||||||||||||||||||
DROP_ACL | |||||||||||||||||||||||||||||
Drops an access control list (ACL) Deprecated in 12.2 |
dbms_network_acl_admin.drop_acl(acl IN VARCHAR2); |
||||||||||||||||||||||||||||
SELECT ANY_PATH |
|||||||||||||||||||||||||||||
GET_HOST_ACLIDS | |||||||||||||||||||||||||||||
Undocumented internal function | dbms_network_acl_admin.get_host_aclids( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
GET_WALLET_ACLID | |||||||||||||||||||||||||||||
Undocumented internal function | dbms_network_acl_admin.get_wallet_aclid(wallet_path IN VARCHAR2) |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
INSTANCE_CALLOUT_IMP | |||||||||||||||||||||||||||||
Undocumented | dbms_network_acl_import.instance_callout_imp( |
||||||||||||||||||||||||||||
CREATE TABLE x AS -- fails with ORA-31623: a job is not attached to this session via the specific handle which is to be expected |
|||||||||||||||||||||||||||||
REMOVE_HOST_ACE | |||||||||||||||||||||||||||||
Remove privileges from access control entries (ACE) in the access control list (ACL) of a network host matching the given ACE | dbms_network_acl_admin.remove_host_ace( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
REMOVE_WALLET_ACE | |||||||||||||||||||||||||||||
Remove privileges from access control entries (ACE) in the access control list (ACL) of a wallet matching the given ACE | dbms_network_acl_admin.remove_wallet_ace( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
SET_HOST_ACL | |||||||||||||||||||||||||||||
Set the access control list (ACL) of a network host which controls access to the host from the database As seen in the demo, at right, an ACL must be created before this is run |
dbms_network_acl_admin.set_host_acl( |
||||||||||||||||||||||||||||
exec dbms_network_acl_admin.set_host_acl('*.mlib.org', acl=>'mlib-org-permissions.xml'); |
|||||||||||||||||||||||||||||
SET_WALLET_ACL | |||||||||||||||||||||||||||||
Set the access control list (ACL) of a wallet which controls access to the wallet from the database | dbms_network_acl_admin.set_wallet_acl( |
||||||||||||||||||||||||||||
TBD | |||||||||||||||||||||||||||||
UNASSIGN_ACL | |||||||||||||||||||||||||||||
Unassigns the access control list (ACL) currently assigned to a network host Deprecated in 12.2: Use REMOVE_HOST_ACE |
dbms_network_acl_admin.unassign_acl( |
||||||||||||||||||||||||||||
BEGIN |
|||||||||||||||||||||||||||||
UNASSIGN_WALLET_ACL | |||||||||||||||||||||||||||||
Unassign the access control list (ACL) currently assigned to a wallet Deprecated in 12.2: Use REMOVE_WALLET_ACE |
dbms_network_acl_admin.unassign_wallet_acl( |
||||||||||||||||||||||||||||
exec dbms_network_acl_admin.unassign_wallet_acl('mlib-org-permissions.xml'); |
Related Topics |
DBMS_DEBUG_JDWP |
DBMS_NETWORK_ACL_UTILITY |
DBMS_SFW_ACL_ADMIN |
DBMS_XDBUTIL_INT |
Lockdown Profiles |
UTL_HTTP |
UTL_INADDR |
UTL_MAIL |
UTL_MAIL_INTERNAL |
UTL_SMTP |
UTL_TCP |
Wallet |
XS_ACL |
XS_ADMIN_UTIL |
XS_ADMIN_UTIL_INT |
XS_PRINCIPAL |