From 729ca7b6d67fe80bb8cb9d313f608ad534766e6d Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Fri, 19 Jul 2024 17:19:06 -0400 Subject: [PATCH] small nits for bypass pr --- .../secret-approval-request-service.ts | 2 +- .../accessSecretRequestBypassed.handlebars | 25 +++++++------------ .../access-controls/access-requests.mdx | 10 +++++--- docs/documentation/platform/pr-workflows.mdx | 10 +++----- .../SecretApprovalRequestAction.tsx | 2 +- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts index 56a61d429..68e0271d2 100644 --- a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts +++ b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts @@ -515,7 +515,7 @@ export const secretApprovalRequestServiceFactory = ({ await smtpService.sendMail({ recipients: approverUsers.filter((approver) => approver.email).map((approver) => approver.email!), - subjectLine: "Secret Request Bypassed", + subjectLine: "Infisical Secret Change Policy Bypassed", substitutions: { projectName: project.name, diff --git a/backend/src/services/smtp/templates/accessSecretRequestBypassed.handlebars b/backend/src/services/smtp/templates/accessSecretRequestBypassed.handlebars index 1986d8ef0..3313d352f 100644 --- a/backend/src/services/smtp/templates/accessSecretRequestBypassed.handlebars +++ b/backend/src/services/smtp/templates/accessSecretRequestBypassed.handlebars @@ -1,35 +1,28 @@ - - - Secret Approval Request Bypassed + Secret Approval Request Policy Bypassed -

Infisical

-

A secret approval request has been bypassed

-

A secret approval request has been merged without approval in project "{{projectName}}".

+

Infisical

+

Secret Approval Request Bypassed

+

A secret approval request has been bypassed in the project "{{projectName}}".

- {{requesterFullName}} - ({{requesterEmail}}) has merged - a secret to - {{secretPath}} - in the - {{environment}} - environment. + {{requesterFullName}} ({{requesterEmail}}) has merged + a secret to environment {{environment}} at secret path {{secretPath}} + without obtaining the required approvals.

- The following reason was provided: + The following reason was provided for bypassing the policy: {{bypassReason}}

- Go to the request panel + To review this action, please visit the request panel here.

- \ No newline at end of file diff --git a/docs/documentation/platform/access-controls/access-requests.mdx b/docs/documentation/platform/access-controls/access-requests.mdx index fe8dfb06b..76cc4b74e 100644 --- a/docs/documentation/platform/access-controls/access-requests.mdx +++ b/docs/documentation/platform/access-controls/access-requests.mdx @@ -14,12 +14,14 @@ This functionality works in the following way: ![Access Request Create](/images/platform/access-controls/request-access.png) ![Access Request Dashboard](/images/platform/access-controls/access-requests-pending.png) -3. If the access request matches woth a policy that has a **Soft** enforcement level, the requester could bypass the policy and get access to the resource without approval. +4. An eligible approver can approve or reject the access request. +{/* ![Access Request Review](/images/platform/access-controls/review-access-request.png) */} ![Access Request Bypass](/images/platform/access-controls/access-request-bypass.png) -4. An eligible approver can approve or reject the access request. -![Access Request Review](/images/platform/access-controls/review-access-request.png) + + If the access request matches with a policy that has a **Soft** enforcement level, the requester may bypass the policy and get access to the resource without full approval. + -4. As soon as the request is approved, developer is able to access the sought resources. +5. As soon as the request is approved, developer is able to access the sought resources. ![Access Request Dashboard](/images/platform/access-controls/access-requests-completed.png) diff --git a/docs/documentation/platform/pr-workflows.mdx b/docs/documentation/platform/pr-workflows.mdx index af764d876..d582c838b 100644 --- a/docs/documentation/platform/pr-workflows.mdx +++ b/docs/documentation/platform/pr-workflows.mdx @@ -22,15 +22,13 @@ First, you would need to create a set of policies for a certain environment. In ![create secret update policy](../../images/platform/pr-workflows/secret-update-policy.png) -### Defining enforcement level +### Policy enforcement levels -The enforcement level determines how strict the policy is. A **Hard** enforcement level means that any change that matches the policy will need approval prior merging. A **Soft** enforcement level means that a change requests that matches the policy could be bypassed if the requester provides a reason for the bypass. If a change request is bypassed, the approvers will be notified via email. - -Take into account that a **Soft** enforcement level is more flexible and allows for more flexibility in the approval process but it's more prone to human error. +The enforcement level determines how strict the policy is. A **Hard** enforcement level means that any change that matches the policy will need full approval prior merging. A **Soft** enforcement level allows for break glass functionality on the request. If a change request is bypassed, the approvers will be notified via email. ### Example of creating a change policy -When creating a policy, you can choce the type of policy you want to create. In this case, we will be creating a `Change Policy`. Other types of policies include `Access Policy` that creates policies for **[Access Requests](/documentation/platform/access-controls/access-requests)**. +When creating a policy, you can choose the type of policy you want to create. In this case, we will be creating a `Change Policy`. Other types of policies include `Access Policy` that creates policies for **[Access Requests](/documentation/platform/access-controls/access-requests)**. ![create panel secret update policy](../../images/platform/pr-workflows/create-change-policy.png) @@ -40,6 +38,6 @@ When a user submits a change to an enviropnment that is under a particular polic ![secret update change requests](../../images/platform/pr-workflows/secret-update-request.png) -An approver is notified by email and/or Slack as soon as the request is initiated. In the Infisical Dashboard, they will be able to `approve` and `merge` (or `deny`) a request for a change in a particular environment. After that, depending on the workflows setup, the change will be automatically propagated to the right applications (e.g., using [Infisical Kubernetes Operator](https://infisical.com/docs/integrations/platforms/kubernetes)). +Approvers are notified by email and/or Slack as soon as the request is initiated. In the Infisical Dashboard, they will be able to `approve` and `merge` (or `deny`) a request for a change in a particular environment. After that, depending on the workflows setup, the change will be automatically propagated to the right applications (e.g., using [Infisical Kubernetes Operator](https://infisical.com/docs/integrations/platforms/kubernetes)). ![secrets update pull request](../../images/platform/pr-workflows/secret-update-pr.png) \ No newline at end of file diff --git a/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx b/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx index 5948d2578..9e2400d2d 100644 --- a/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx +++ b/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx @@ -127,7 +127,7 @@ export const SecretApprovalRequestAction = ({ {byPassApproval && (