

OLS简介




OLS前置检查





创建安全策略(Policy)




定义一个级别(level)

EXEC sa_components.create_level('HN_POLICY', 1000, 'LOW', 'LOW LEVEL');EXEC sa_components.create_level('HN_POLICY', 2000, 'MIDDLE', 'MIDDLE LEVEL');EXEC sa_components.create_level('HN_POLICY', 3000, 'HIGH', 'HIGH LEVEL');

EXEC sa_components.create_compartment('HN_POLICY', 100, 'GENERAL', 'GENERAL COMP');EXEC sa_components.create_compartment('HN_POLICY', 200, 'IMPORTANT', 'IMPORTANT COMP');EXEC sa_components.create_compartment('HN_POLICY', 300, 'VIP', 'VIP COMP');

EXEC sa_components.create_group('HN_POLICY', 10, 'APP', 'APP GROUP');EXEC sa_components.create_group('HN_POLICY', 20, 'DB', 'DB GROUP');EXEC sa_components.create_group('HN_POLICY', 30, 'DEV', 'DEV GROUP');



OLS标签

EXEC sa_label_admin.create_label('HN_POLICY', '10100', 'LOW:GENERAL:', TRUE);

exec sa_user_admin.set_user_labels('HN_POLICY','user1','LOW:GENERAL:');exec sa_user_admin.set_user_labels('HN_POLICY','user2','MIDDLE');exec sa_user_admin.set_user_labels('HN_POLICY','user3','HIGH:VIP:DEV');

exec sa_policy_admin.apply_table_policy('HN_POLICY','USER4','TTT','ALL_CONTROL');







总结

本 文 原 创 来 源:IT那活儿微信公众号(上海新炬王翦团队)


文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




