Access Manager is used for authentication and authorization today, as well as feature management and dependency control. As a result of various migrations, the current implementation has become challenging to manage and understand.
We should refactor it to simplify and improve.
Detailed overview
Some improvement areas include:
Should we have multiple functions for user and project and creators and …? Would it be better to have a single function with a clean API? Example:
val accessResult: AccessResult<User> = accessManager.requestAccess(
targetType = Targets.USER,
targetId = request.path.userId,
targetPermission = Permissions.USER_WRITE_DATA,
credentials = request.token,
)
if (accessResult.isForbidden) throwForbidden("Unauthorized")
val user = accessResult.content
Separate access manager for Creators? It would make the first point obsolete, but may be a better approach.
A common interface for creators and consumers, as mentioned in the first point, with two/different implementations?
Provide a brief summary of the planned work
Access Manager is used for authentication and authorization today, as well as feature management and dependency control. As a result of various migrations, the current implementation has become challenging to manage and understand.
We should refactor it to simplify and improve.
Detailed overview
Some improvement areas include:
Hint/location:
List the acceptance criteria
Include any additional notes (optional)
No response