Column Level Security¶
Column level security is implemented by mapping allowed columns to a list of SAS groups. In VIEW mode, only allowed columns are visible. In EDIT mode, allowed columns are editable - the remaining columns are read-only.
Below is an example of an EDIT table with only one column enabled for editing:
See also: Row Level Security.
The variables in MPE_COLUMN_LEVEL_SECURITY should be configured as follows:
Determines whether the rule applies to the VIEW page, the EDIT page, or ALL pages. The impact of the rule varies as follows:
CLS_SCOPE in ('VIEW','ALL') then only the listed columns are visible (unless
CLS_SCOPE in ('EDIT','ALL') then only the listed columns are editable (the remaining columns are read-only, and visible). Furthermore:
- The user will be unable to ADD or DELETE records.
- Primary Key values are always read only
- Primary Key values cannot be hidden (
CLS_HIDE=1will have no effect)
The SAS Group to which the rule applies. The user could also be a member of a DC group.
- If a user is in ANY of the groups, the columns will be restricted.
- If a user is in NONE of the groups, no restrictions apply (all columns available).
- If a user is in MULTIPLE groups, they will see all allowed columns across all groups.
- If a user is in the Data Controller Admin Group, CLS rules DO NOT APPLY.
The library of the target table against which the security rule will be applied
The target table against which the security rule will be applied
This is the name of the variable against which the security rule will be applied. Note that
If you would like this rule to be applied, be sure this value is set to 1.
This variable can be set to
1 to hide specific variables, which allows greater control over the EDIT screen in particular. CLS_SCOPE behaviour is impacted as follows:
ALL- the variable will not be visible in either VIEW or EDIT.
EDIT- the variable will not be visible. Cannot be applied to a primary key column.
VIEW- the variable will not be visible. Can be applied to a primary key column. Simply omitting the row, or setting CLS_ACTIVE to 0, would result in the same behaviour.
It is possible that a variable can have multiple values for CLS_HIDE, eg if a user is in multiple groups, or if different rules apply for different scopes. In this case, if the user is any group where this variable is NOT hidden, then it will be displayed.
Example values as follows:
If a user is in Group 1, and viewing
MYLIB.MYDS in EDIT mode, all columns will be visible but only the following columns will be editable:
The user will be unable to add or delete rows.
If the user is in both Group 1 AND Group 2, viewing
MYLIB.MYDS in VIEW mode, only the following columns will be visible:
This short video does a walkthrough of applying Column Level Security from end to end.