The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Remove vault keys (#35148)
Terry Suttona60dc311d8d7
diff --git a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsxindex 76fd804bd7a..a642e87976d 100644--- a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx+++ b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx@@ -187,10 +187,6 @@ const supabaseIntegrations: IntegrationDefinition[] = [route: 'overview',label: 'Overview',},- {- route: 'keys',- label: 'Keys',- },{route: 'secrets',label: 'Secrets',diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsxindex 4b005caa51e..2337b5b9ffb 100644--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/AddNewSecretModal.tsx@@ -24,22 +24,22 @@ const AddNewSecretModal = ({ visible, onClose }: AddNewSecretModalProps) => {const { mutateAsync: addKeyMutation } = usePgSodiumKeyCreateMutation()const { mutateAsync: addSecret } = useVaultSecretCreateMutation()- const { data: keys, isLoading } = usePgSodiumKeysQuery(- {- projectRef: project?.ref,- connectionString: project?.connectionString,- },- {- enabled: visible,- }- )+ // const { data: keys, isLoading } = usePgSodiumKeysQuery(+ // {+ // projectRef: project?.ref,+ // connectionString: project?.connectionString,+ // },+ // {+ // enabled: visible,+ // }+ // )- useEffect(() => {- if (visible && keys) {- setShowSecretValue(false)- setSelectedKeyId(keys[0]?.id ?? 'create-new')- }- }, [visible, keys])+ // useEffect(() => {+ // if (visible && keys) {+ // setShowSecretValue(false)+ // setSelectedKeyId(keys[0]?.id ?? 'create-new')+ // }+ // }, [visible, keys])const validate = (values: any) => {const errors: any = {}@@ -86,81 +86,82 @@ const AddNewSecretModal = ({ visible, onClose }: AddNewSecretModalProps) => {return (<Modal hideFooter size="medium" visible={visible} onCancel={onClose} header="Add new secret">- {isLoading ? (+ {/* {isLoading ? (<Modal.Content><GenericSkeletonLoader /></Modal.Content>- ) : (- <Form- id="add-new-secret-form"- initialValues={{ name: '', description: '', secret: '', keyId: '', keyName: '' }}- validate={validate}- validateOnBlur={false}- onSubmit={onAddNewSecret}- >- {({ isSubmitting }: any) => {- return (- <>- <Modal.Content className="space-y-4">- <Input id="name" label="Name" />- <Input id="description" label="Description" labelOptional="Optional" />- <Input- id="secret"- type={showSecretValue ? 'text' : 'password'}- label="Secret value"- actions={- <div className="mr-1">- <Button- type="default"- icon={showSecretValue ? <EyeOff /> : <Eye />}- onClick={() => setShowSecretValue(!showSecretValue)}- />- </div>- }- />- </Modal.Content>- <Modal.Separator />- <Modal.Content className="space-y-4">- <EncryptionKeySelector+ ) : ( */}+ <Form+ id="add-new-secret-form"+ initialValues={{ name: '', description: '', secret: '' }}+ validate={validate}+ validateOnBlur={false}+ onSubmit={onAddNewSecret}+ >+ {({ isSubmitting }: any) => {+ return (+ <>+ <Modal.Content className="space-y-4">+ <Input id="name" label="Name" />+ <Input id="description" label="Description" labelOptional="Optional" />+ <Input+ id="secret"+ type={showSecretValue ? 'text' : 'password'}+ label="Secret value"+ actions={+ <div className="mr-1">+ <Button+ type="default"+ icon={showSecretValue ? <EyeOff /> : <Eye />}+ onClick={() => setShowSecretValue(!showSecretValue)}+ />+ </div>+ }+ />+ </Modal.Content>+ <Modal.Separator />+ <Modal.Content className="space-y-4">+ <></>+ {/* <EncryptionKeySelectornameId="keyName"label="Select a key to encrypt your secret with"labelOptional="Optional"selectedKeyId={selectedKeyId}onSelectKey={setSelectedKeyId}- />- <InformationBox- icon={<HelpCircle size={18} strokeWidth={2} />}- url="https://github.com/supabase/vault"- urlLabel="Vault documentation"- title="What is a key?"- description={- <div className="space-y-2">- <p>- Keys are used to encrypt data inside your database, and every secret in- the Vault is encrypted with a key.- </p>- <p>- You may create different keys for different purposes, such as one for- encrypting user data, and another for application data.- </p>- </div>- }- />- </Modal.Content>- <Modal.Separator />- <Modal.Content className="flex items-center justify-end space-x-2">- <Button type="default" disabled={isSubmitting} onClick={onClose}>- Cancel- </Button>- <Button htmlType="submit" disabled={isSubmitting} loading={isSubmitting}>- Add secret- </Button>- </Modal.Content>- </>- )- }}- </Form>- )}+ /> */}+ {/* <InformationBox+ icon={<HelpCircle size={18} strokeWidth={2} />}+ url="https://github.com/supabase/vault"+ urlLabel="Vault documentation"+ title="What is a key?"+ description={+ <div className="space-y-2">+ <p>+ Keys are used to encrypt data inside your database, and every secret in the+ Vault is encrypted with a key.+ </p>+ <p>+ You may create different keys for different purposes, such as one for+ encrypting user data, and another for application data.+ </p>+ </div>+ }+ /> */}+ </Modal.Content>+ <Modal.Separator />+ <Modal.Content className="flex items-center justify-end space-x-2">+ <Button type="default" disabled={isSubmitting} onClick={onClose}>+ Cancel+ </Button>+ <Button htmlType="submit" disabled={isSubmitting} loading={isSubmitting}>+ Add secret+ </Button>+ </Modal.Content>+ </>+ )+ }}+ </Form>+ {/* )} */}</Modal>)}diff --git a/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx b/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsxindex f0ffbcf03f8..aa3104c5e4b 100644--- a/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx+++ b/apps/studio/components/interfaces/Integrations/Vault/Secrets/EditSecretModal.tsx@@ -161,6 +161,7 @@ const EditSecretModal = ({ selectedSecret, onClose }: EditSecretModalProps) => {}/></Modal.Content>+ {/*<Modal.Separator /><Modal.Content className="space-y-4"><EncryptionKeySelector@@ -170,7 +171,7 @@ const EditSecretModal = ({ selectedSecret, onClose }: EditSecretModalProps) => {selectedKeyId={selectedKeyId}onSelectKey={setSelectedKeyId}/>- </Modal.Content>+ </Modal.Content> */}<Modal.Separator /><Modal.Content className="flex items-center justify-end space-x-2"><Button type="default" disabled={isSubmitting} onClick={() => onClose()}>