How to Manage 4 Eye Principle
What is this guide about?
This guide explains how the 4 eye principle handles user binding requests in meshStack. This flow ensures that role assignments require explicit approval from at least two different workspace managers, providing transparency and compliance with the 4 eye principle.
Prerequisites
- The 4 eye principle must be enabled in your meshStack environment. If it is not enabled, please contact support at support@meshcloud.io.
Role Request Flow with 4 Eye Principle
-
Initiating a Role Request
- A workspace manager starts a new project role request.
- If the 4 eye principle is enabled, a popup prompts the inviting user to provide additional information (e.g., reason for the role and duration).
- This information is attached to the request and visible to other workspace managers.
-
Approval Process
- The workspace manager who initiates the request automatically registers the first approval.
- Each workspace manager can only register one approval per request.
- A second, different workspace manager must provide the additional approval for the request to proceed.
-
Notifications
- Workspace managers receive email notifications about pending approvals.
- The affected user is informed via email when their role request is approved or rejected.
- For workspace user groups, all group members are notified.
-
Request Outcome
- If any workspace manager declines the request, it is immediately cancelled.
- If the number of workspace managers is less than the configured
minApprovalCount, the request is automatically approved when all managers have registered their approval. - The meshPanel can be configured to display a warning in this scenario.
-
Role Removal
- Removal of role bindings does not require approval and is effective immediately.
- Approval requirements cannot be configured for role removals.
-
Role Requests Through the meshObject API
- When you create a workspace or project binding through the meshObject API, for example with Terraform or the meshStack CLI, meshStack turns it into a role request, just like in meshPanel.
- The API key or API user that creates the request counts as the first approval, like a person who creates a role request in meshPanel. Every further approval comes from a person in meshPanel. API keys cannot approve role requests.
- As in meshPanel, a request needs fewer approvals when the workspace has fewer approvers than
minApprovalCount. - As for an admin in meshPanel, a binding that an admin API key or API user creates in a workspace other than the admin workspace needs no approval. Admin permissions do not apply to the admin workspace, as in meshPanel: a request with them gets a 403. There, an API key needs the normal binding permissions of the admin workspace itself, and a new binding always needs approval.
- While the request waits for approval, the API returns the binding with
status.approvalset toPENDING, and the binding gives no access yet. After the approval, the binding isASSIGNEDunder the name you chose. - Deleting a pending binding withdraws the request. A change of the expiry date only does not need approval.
- Terraform replaces a binding when you change its role. The old binding is removed at once, and the new role takes effect only after approval.
- A person who requests a role through an API key and then approves it in meshPanel would count twice. So while four-eyes approval is on, only an Organization Admin can give an API key the permission to create workspace or project bindings. API keys that already have this permission keep it, so review them regularly.