Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvements: address feedback

Scott Wilson8fee3c3882ef
diff --git a/docs/internals/permissions/project-permissions.mdx b/docs/internals/permissions/project-permissions.mdx
index c823cf4a73..dbc2e52714 100644
--- a/docs/internals/permissions/project-permissions.mdx
+++ b/docs/internals/permissions/project-permissions.mdx
@@ -135,6 +135,18 @@ Below is a comprehensive list of all available project-level subjects and their
| `edit` | Modify token properties |
| `delete` | Revoke or remove service tokens |
+#### Subject: `app-connections`
+
+Supports conditions and permission inversion
+
+| Action | Description |
+| ------------------------- | ---------------------------------- |
+| `read-app-connections` | View app connection configurations |
+| `create-app-connections` | Create new app connections |
+| `edit-app-connections` | Modify existing app connections |
+| `delete-app-connections` | Remove app connections |
+| `connect-app-connections` | Use app connections |
+
### Secrets Management
#### Subject: `secrets`
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
index 4b05036485..407a473d1e 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
@@ -107,7 +107,7 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
- You do not have access to any ${appName} Connections. Contact an admin to create one.
+ You do not have access to any {appName} Connections. Contact an admin to create one.
</p>
)}
<AddAppConnectionModal
diff --git a/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConnectionField.tsx b/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConnectionField.tsx
index 6b252e55c4..a58908da5a 100644
--- a/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConnectionField.tsx
+++ b/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConnectionField.tsx
@@ -108,7 +108,7 @@ export const SecretScanningDataSourceConnectionField = ({
{!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
- You do not have access to any ${connectionName} Connections. Contact an admin to create
+ You do not have access to any {connectionName} Connections. Contact an admin to create
one.
</p>
)}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
index ffae4ed887..290f36206e 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
@@ -91,7 +91,7 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
{!isPending && !availableConnections?.length && !canCreateConnection && (
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
- You do not have access to any ${appName} Connections. Contact an admin to create one.
+ You do not have access to any {appName} Connections. Contact an admin to create one.
</p>
)}
<AddAppConnectionModal
diff --git a/frontend/src/hooks/api/appConnections/mutations.tsx b/frontend/src/hooks/api/appConnections/mutations.tsx
index 9679df4661..cee433462b 100644
--- a/frontend/src/hooks/api/appConnections/mutations.tsx
+++ b/frontend/src/hooks/api/appConnections/mutations.tsx
@@ -6,7 +6,6 @@ import {
TAppConnectionResponse,
TCreateAppConnectionDTO,
TDeleteAppConnectionDTO,
- TMigrateAppConnectionDTO,
TUpdateAppConnectionDTO
} from "@app/hooks/api/appConnections/types";
@@ -62,21 +61,3 @@ export const useDeleteAppConnection = () => {
}
});
};
-
-export const useMigrateAppConnection = () => {
- const queryClient = useQueryClient();
- return useMutation({
- mutationFn: async ({ connectionId, app }: TMigrateAppConnectionDTO) => {
- const { data } = await apiRequest.post(
- `/api/v1/app-connections/${app}/${connectionId}/migrate`
- );
-
- return data;
- },
- onSuccess: ({ projectId, app }) => {
- queryClient.invalidateQueries({ queryKey: appConnectionKeys.list(projectId) });
- queryClient.invalidateQueries({ queryKey: appConnectionKeys.listAvailable(app, projectId) });
- // queryClient.invalidateQueries({ queryKey: appConnectionKeys.byId(app, connectionId) });
- }
- });
-};
diff --git a/frontend/src/hooks/api/appConnections/types/index.ts b/frontend/src/hooks/api/appConnections/types/index.ts
index 3a5147b928..8c1d86ca3a 100644
--- a/frontend/src/hooks/api/appConnections/types/index.ts
+++ b/frontend/src/hooks/api/appConnections/types/index.ts
@@ -1,5 +1,3 @@
-import { ProjectType } from "@app/hooks/api/workspace/types";
-
import { AppConnection } from "../enums";
import { TOnePassConnection } from "./1password-connection";
import { TAppConnectionOption } from "./app-options";
@@ -196,22 +194,18 @@ export type TDeleteAppConnectionDTO = {
// [AppConnection.Okta]: TOktaConnection;
// };
-export type TMigrateAppConnectionDTO = {
- app: AppConnection;
- connectionId: string;
-};
-
-export type AppConnectionUsage = {
- projects: Array<{
- id: string;
- name: string;
- slug: string;
- type: ProjectType;
- resources: {
- secretSyncs: Array<{ id: string; name: string }>;
- externalCas: Array<{ id: string; name: string }>;
- secretRotations: Array<{ id: string; name: string }>;
- dataSources: Array<{ id: string; name: string }>;
- };
- }>;
-};
+// scott: we will need this once we have individual app connection page
+// export type AppConnectionUsage = {
+// projects: Array<{
+// id: string;
+// name: string;
+// slug: string;
+// type: ProjectType;
+// resources: {
+// secretSyncs: Array<{ id: string; name: string }>;
+// externalCas: Array<{ id: string; name: string }>;
+// secretRotations: Array<{ id: string; name: string }>;
+// dataSources: Array<{ id: string; name: string }>;
+// };
+// }>;
+// };
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
index b88b283dab..bcea6b5300 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AddAppConnectionModal.tsx
@@ -31,7 +31,7 @@ const Content = ({ onComplete, projectId, projectType, app }: ContentProps) => {
return (
<AppConnectionForm
onComplete={onComplete}
- onBack={() => setSelectedApp(null)}
+ onBack={app ? undefined : () => setSelectedApp(null)}
app={(app ?? selectedApp)!}
projectId={projectId}
/>