Package com.cloudforgeci.api.core.iam
Class PermissionMatrix
java.lang.Object
com.cloudforgeci.api.core.iam.PermissionMatrix
Permission Matrix defining the minimum required permissions for each topology/runtime combination.
This ensures that no unnecessary permissions are granted and follows the principle of least privilege.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordValidation result containing success status and any issues found. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<IAMProfile, List<String>> ALB permissions based on IAM profile.Core permissions required for all Jenkins deployments regardless of topology/runtime.static final Map<IAMProfile, List<String>> EC2-specific permissions based on IAM profile.static final Map<IAMProfile, List<String>> EFS permissions based on IAM profile.static final Map<IAMProfile, List<String>> Fargate-specific permissions based on IAM profile. -
Method Summary
Modifier and TypeMethodDescriptiongetRequiredPermissions(TopologyType topology, RuntimeType runtime, IAMProfile iamProfile) Gets the required permissions for a specific topology/runtime/iam combination.validatePermissions(TopologyType topology, RuntimeType runtime, IAMProfile iamProfile, List<String> providedPermissions) Validates that the provided permissions are appropriate for the given combination.
-
Field Details
-
CORE_PERMISSIONS
Core permissions required for all Jenkins deployments regardless of topology/runtime. -
EC2_PERMISSIONS
EC2-specific permissions based on IAM profile. -
FARGATE_PERMISSIONS
Fargate-specific permissions based on IAM profile. -
EFS_PERMISSIONS
EFS permissions based on IAM profile. -
ALB_PERMISSIONS
ALB permissions based on IAM profile.
-
-
Method Details
-
getRequiredPermissions
public static List<String> getRequiredPermissions(TopologyType topology, RuntimeType runtime, IAMProfile iamProfile) Gets the required permissions for a specific topology/runtime/iam combination.- Parameters:
topology- the topology typeruntime- the runtime typeiamProfile- the IAM profile- Returns:
- list of required permissions
-
validatePermissions
public static PermissionMatrix.ValidationResult validatePermissions(TopologyType topology, RuntimeType runtime, IAMProfile iamProfile, List<String> providedPermissions) Validates that the provided permissions are appropriate for the given combination.- Parameters:
topology- the topology typeruntime- the runtime typeiamProfile- the IAM profileprovidedPermissions- the permissions being granted- Returns:
- validation result with any issues found
-