After switching to Oracle11g today, when UTL_TCP was used to interact with the Service Program, an ACL Access Control Problem was reported. Fortunately, there were still some network basics, what is ACL,
In the Oracle11g environment, to enhance the security of network access, the ACL is implemented in a soft way. The following describes how to break through the ACL layer and conduct a survey on DBMS_NETWORK_ACL_ADMIN in Oracle. The following is a summary:
-- ACL usage Survey
The following table lists the execution permissions related to DBCoffer:
-- Used to obtain the Host IP address or host name
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
Acl => 'coffer _ acl_file.xml ',
Description => 'a test of the ACL functionality ',
-- Parameter: a user or a role
Principal => 'coffer ',
Is_grant => TRUE,
Privilege => 'resolve'
-- Start_date => policimestamp,
-- End_date => NULL
);
COMMIT;
END;
/
-- Allows users to access the Internet-related ports and IP addresses
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'coffer ',
Is_grant => TRUE,
Privilege => 'connect'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/
-- Specify a rule for this access control list
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
Acl => 'coffer _ acl_file.xml ',
Host => '*');
COMMIT;
END;
/
-- Execute this command when upgrading a DBCoffer user
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'resolve'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'connect'
-- Position => NULL,
-- Start_date => NULL,
-- End_date => NULL
);
COMMIT;
END;
/
-- When you cancel a DBCoffer user, you must execute
BEGIN
DBMS_NETWORK_ACL_ADMIN.delete_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'resolve ');
COMMIT;
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.delete_privilege (
Acl => 'coffer _ acl_file.xml ',
-- Parameter: a user or a role
Principal => 'test ',
Is_grant => TRUE,
Privilege => 'connect ');
COMMIT;
END;
-- Delete an access control list
BEGIN
DBMS_NETWORK_ACL_ADMIN.drop_acl (
Acl => 'coffer _ acl_file.xml ');
COMMIT;
END;
/