📝 Report
This is a basic template to get started implementing an RBAC model analysis with Limboole.
As part of the assignment you will need to implement the TODOs in RoleBasecAccessControlAnalyzer (3 small TODOs) and RoleBasedAccessControlTableTranslator (1 bigger TODO).
- Install OpenJDK/JDK
- Clone your repository (Generated by GitHub Classroom)
- Open in any IDE of your choice (e.g. Eclipse, VS Code, etc.)
📼 see the code walk-through and explanation of this task
For this task, you need to implement the translateToFormula(RbacTableReader rbac)
method in RoleBasedAccessControlTableTranslator which will return the combined formula in limboole format for a given RBAC table.
An example of manual translations appeared in the exercise (T1) and in the first assignment.
After a correct translation all JUnit tests in RoleBasedAccessControlTableTranslatorTest
checks should pass.
Solve all of these by using a transaltion to Limboole rather than a direct search in the RBAC table!
-
Implement the
everyUserWithRoleHasPermissions(Set<String> roles, Set<String> permissions)
method in RoleBasecAccessControlAnalyzer Class, which assert that each of the given roles has all of the given permissions. -
Implement the
onlyUserWithRoleHasPermission(String role, String permission)
method in RoleBasecAccessControlAnalyzer Class, which assert that only users with the given role have the given permission. -
Implement the
noUserHasBothPermissions(String permission1, String permission2)
method in RoleBasecAccessControlAnalyzer Class, which assert that no user can have the given two permissions at the same time.
For this, reuse the formula you get from Task 1.