diff --git a/backend/src/services/app-connection/aws/aws-connection-fns.ts b/backend/src/services/app-connection/aws/aws-connection-fns.ts index d81421529..887729502 100644 --- a/backend/src/services/app-connection/aws/aws-connection-fns.ts +++ b/backend/src/services/app-connection/aws/aws-connection-fns.ts @@ -81,11 +81,14 @@ export const getAwsConnectionConfig = async (appConnection: TAwsConnectionConfig }; export const validateAwsConnectionCredentials = async (appConnection: TAwsConnectionConfig) => { - const awsConfig = await getAwsConnectionConfig(appConnection); - const sts = new AWS.STS(awsConfig); - let resp: Awaited["promise"]>>; + let resp: AWS.STS.GetCallerIdentityResponse & { + $response: AWS.Response; + }; try { + const awsConfig = await getAwsConnectionConfig(appConnection); + const sts = new AWS.STS(awsConfig); + resp = await sts.getCallerIdentity().promise(); } catch (e: unknown) { throw new BadRequestError({ @@ -93,7 +96,7 @@ export const validateAwsConnectionCredentials = async (appConnection: TAwsConnec }); } - if (resp.$response.httpResponse.statusCode !== 200) + if (resp?.$response.httpResponse.statusCode !== 200) throw new InternalServerError({ message: `Unable to validate credentials: ${ resp.$response.error?.message ?? diff --git a/docs/images/app-connections/aws/access-key-create-policy.png b/docs/images/app-connections/aws/access-key-create-policy.png new file mode 100644 index 000000000..adfc2eaad Binary files /dev/null and b/docs/images/app-connections/aws/access-key-create-policy.png differ diff --git a/docs/images/app-connections/aws/assume-role-create-policy.png b/docs/images/app-connections/aws/assume-role-create-policy.png new file mode 100644 index 000000000..fdcb15bb4 Binary files /dev/null and b/docs/images/app-connections/aws/assume-role-create-policy.png differ diff --git a/docs/integrations/app-connections/aws.mdx b/docs/integrations/app-connections/aws.mdx index 176847764..27b2ff623 100644 --- a/docs/integrations/app-connections/aws.mdx +++ b/docs/integrations/app-connections/aws.mdx @@ -9,10 +9,6 @@ Infisical supports two methods for connecting to AWS. Infisical will assume the provided role in your AWS account securely, without the need to share any credentials. - **Prerequisites:** - - - Set up and add envars to [Infisical Cloud](https://app.infisical.com) - To connect your self-hosted Infisical instance with AWS, you need to set up an AWS IAM User account that can assume the configured AWS IAM Role. @@ -47,8 +43,8 @@ Infisical supports two methods for connecting to AWS. ![Access Key Step 3](/images/integrations/aws/integrations-aws-access-key-3.png) - 1. Set the access key as **INF_APP_CONNECTION_AWS_CLIENT_ID**. - 2. Set the secret key as **INF_APP_CONNECTION_AWS_CLIENT_SECRET**. + 1. Set the access key as **INF_APP_CONNECTION_AWS_ACCESS_KEY_ID**. + 2. Set the secret key as **INF_APP_CONNECTION_AWS_SECRET_ACCESS_KEY**. @@ -63,7 +59,11 @@ Infisical supports two methods for connecting to AWS. 4. Optionally, enable **Require external ID** and enter your **Organization ID** to further enhance security. - + + Navigate to your IAM role permissions and click **Create Inline Policy**. + + ![IAM Role Create Policy](/images/app-connections/aws/assume-role-create-policy.png) + Depending on your use case, add one or more of the following policies to your IAM Role: @@ -199,22 +199,13 @@ Infisical supports two methods for connecting to AWS. Infisical will use the provided **Access Key ID** and **Secret Key** to connect to your AWS instance. - **Prerequisites:** - - - Set up and add envars to [Infisical Cloud](https://app.infisical.com) - - - 1. Navigate to the [Create IAM Role](https://console.aws.amazon.com/iamv2/home#/roles/create?step=selectEntities) page in your AWS Console. - ![IAM Role Creation](/images/integrations/aws/integration-aws-iam-assume-role.png) + + Navigate to your IAM user permissions and click **Create Inline Policy**. - 2. Select **AWS Account** as the **Trusted Entity Type**. - 3. Choose **Another AWS Account** and enter **381492033652** (Infisical AWS Account ID). This restricts the role to be assumed only by Infisical. If self-hosting, provide your AWS account number instead. - 4. Optionally, enable **Require external ID** and enter your **Organization ID** to further enhance security. - + ![User IAM Create Policy](/images/app-connections/aws/access-key-create-policy.png) - - Depending on your use case, add one or more of the following policies to your IAM Role: + Depending on your use case, add one or more of the following policies to your user: diff --git a/docs/integrations/app-connections/github.mdx b/docs/integrations/app-connections/github.mdx index 5d33bad58..1b97d3162 100644 --- a/docs/integrations/app-connections/github.mdx +++ b/docs/integrations/app-connections/github.mdx @@ -9,10 +9,6 @@ Infisical supports two methods for connecting to GitHub. Infisical will use a GitHub App with finely grained permissions to connect to GitHub. - **Prerequisites:** - - - Set up and add envars to [Infisical Cloud](https://app.infisical.com) - Using the GitHub integration with app authentication on a self-hosted instance of Infisical requires configuring an application on GitHub and registering your instance with it. @@ -61,9 +57,9 @@ Infisical supports two methods for connecting to GitHub. - `INF_APP_CONNECTION_GITHUB_APP_CLIENT_ID`: The **Client ID** of your GitHub application. - `INF_APP_CONNECTION_GITHUB_APP_CLIENT_SECRET`: The **Client Secret** of your GitHub application. - - `INF_APP_CONNECTION_GITHUB_APP_CLIENT_SLUG`: The **Slug** of your GitHub application. This is the one found in the URL. - - `INF_APP_CONNECTION_GITHUB_APP_CLIENT_APP_ID`: The **App ID** of your GitHub application. - - `INF_APP_CONNECTION_GITHUB_APP_CLIENT_PRIVATE_KEY`: The **Private Key** of your GitHub application. + - `INF_APP_CONNECTION_GITHUB_APP_SLUG`: The **Slug** of your GitHub application. This is the one found in the URL. + - `INF_APP_CONNECTION_GITHUB_APP_ID`: The **App ID** of your GitHub application. + - `INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY`: The **Private Key** of your GitHub application. Once added, restart your Infisical instance and use the GitHub integration via app authentication. @@ -100,10 +96,6 @@ Infisical supports two methods for connecting to GitHub. Infisical will use an OAuth App to connect to GitHub. - **Prerequisites:** - - - Set up and add envars to [Infisical Cloud](https://app.infisical.com) - Using the GitHub integration on a self-hosted instance of Infisical requires configuring an OAuth application in GitHub and registering your instance with it. diff --git a/docs/mint.json b/docs/mint.json index 23b10f579..2fc9f515c 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -347,16 +347,26 @@ "group": "App Connections", "pages": [ "integrations/app-connections/overview", - "integrations/app-connections/aws", - "integrations/app-connections/github" + { + "group": "Connections", + "pages": [ + "integrations/app-connections/aws", + "integrations/app-connections/github" + ] + } ] }, { "group": "Secret Syncs", "pages": [ "integrations/secret-syncs/overview", - "integrations/secret-syncs/aws-parameter-store", - "integrations/secret-syncs/github" + { + "group": "Syncs", + "pages": [ + "integrations/secret-syncs/aws-parameter-store", + "integrations/secret-syncs/github" + ] + } ] }, { diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx index a5e7d270d..fefb1ad41 100644 --- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx +++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx @@ -289,34 +289,36 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => { Status - {Object.values(SecretSyncStatus).map((status) => ( - { - e.preventDefault(); - setFilters((prev) => ({ - ...prev, - status: prev.status.includes(status) - ? prev.status.filter((s) => s !== status) - : [...prev.status, status] - })); - }} - key={status} - icon={ - filters.status.includes(status) && ( - - ) - } - iconPos="right" - > -
- - {STATUS_ICON_MAP[status].name} -
-
- ))} + {[SecretSyncStatus.Running, SecretSyncStatus.Succeeded, SecretSyncStatus.Failed].map( + (status) => ( + { + e.preventDefault(); + setFilters((prev) => ({ + ...prev, + status: prev.status.includes(status) + ? prev.status.filter((s) => s !== status) + : [...prev.status, status] + })); + }} + key={status} + icon={ + filters.status.includes(status) && ( + + ) + } + iconPos="right" + > +
+ + {STATUS_ICON_MAP[status].name} +
+
+ ) + )} Service {secretSyncs.length ? ( [...new Set(secretSyncs.map(({ destination }) => destination))].map((destination) => { diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx index 5491d53ab..609780362 100644 --- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx +++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx @@ -4,7 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { format } from "date-fns"; import { ProjectPermissionCan } from "@app/components/permissions"; -import { SecretSyncLabel } from "@app/components/secret-syncs"; +import { SecretSyncLabel, SecretSyncStatusBadge } from "@app/components/secret-syncs"; import { IconButton } from "@app/components/v2"; import { ProjectPermissionSub } from "@app/context"; import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types"; @@ -57,6 +57,11 @@ export const SecretSyncDetailsSection = ({ secretSync, onEditDetails }: Props) =
{name} {description} + {syncStatus && ( + + + + )} {lastSyncedAt && ( {format(new Date(lastSyncedAt), "yyyy-MM-dd, hh:mm aaa")}