accessControl checkOutObject

Securing Highly Sensitive HR Salary Columns

Scénario de test & Cas d'usage

Business Context

The HR department is updating access policies for the 'Salary' column in the employee database. They need to ensure that during the update process (transaction), no other admin can modify the security settings of this specific column, ensuring data integrity before the new policy goes live.
About the Set : accessControl

Management of access rights and data security.

Discover all actions of accessControl
Data Preparation

Creation of an employee table with sensitive salary information.

Copied!
1 
2PROC CAS;
3caslib hr_lib path='/tmp/hr_lib' dataSource={srcType='path'}
4SESSION=true;
5datastep.runCode / code='
6data hr_lib.employees;
7length Name $20 Dept $10;
8Name="Alice";
9Dept="IT";
10Salary=80000;
11output;
12Name="Bob";
13Dept="HR";
14Salary=75000;
15output;
16 
17run;
18';
19 
20RUN;
21 

Étapes de réalisation

1
Start the security transaction to bundle changes.
Copied!
1PROC CAS; ACCESSCONTROL.startTransaction; RUN;
2
Exclusively check out the 'Salary' column to prevent concurrent ACL modifications.
Copied!
1 
2PROC CAS;
3ACCESSCONTROL.checkOutObject / objectSelector={objType='COLUMN', caslib='hr_lib', TABLE='employees', column='Salary'}, checkOutType='EXCLUSIVE';
4 
5RUN;
6 
3
Apply the new access control and commit.
Copied!
1 
2PROC CAS;
3ACCESSCONTROL.updSomeAcs caslib='hr_lib' TABLE='employees' column='Salary' grants={{grant='Read', group='HR_Managers'}};
4ACCESSCONTROL.commitTransaction;
5 
6RUN;
7 

Expected Result


The 'Salary' column is successfully locked for the session duration. The access control update is applied without interference, and the transaction commits successfully.