Scénario de test & Cas d'usage
Management of access rights and data security.
Discover all actions of accessControlNo specific data table is needed. This scenario focuses purely on session permissions and server state.
| 1 | /* No |
| 2 | data creation is necessary. The test relies on pre-existing user/group definitions on the CAS server. We simulate running as 'limited_user'. */ |
| 1 | /* This step represents the context of the test, running as a non-admin user. */ |
| 1 | PROC CAS; |
| 2 | /* This action is expected to fail with an authorization error. */ |
| 3 | ACCESSCONTROL.assumeRole / adminRole='SUPERUSER'; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | /* This action should also fail, proving no privileges were gained. */ |
| 3 | loggers.listLoggers; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | /* Run as an admin in a different session */ |
| 3 | SESSION.listSessions / allUsers=true; |
| 4 | /* The output table should be inspected to confirm 'limited_user' session has no assumed role. */ |
| 5 | RUN; |
The test is successful if the `assumeRole` action in step 2 generates a clear error message indicating the user is not authorized to assume the role. Consequently, the action in step 3 must also fail. The administrative audit in step 4 must show that the 'limited_user' session does not have any administrative roles assigned.