-
-
SOC2
-
- We have a long-standing commitment to customer privacy and data protection, and as
- part of that commitment we have prepared a pre-signed Data Processing Addendum
- ("DPA").
+
+
+
+
+
+
SOC2
+
+ As a database company, being SOC2 compliant is important when handling sensitive
+ customer data. Supabase is currently SOC2 Type 1 compliant and we're also working on
+ getting certified for SOC2 Type 2 and HIPAA next.
+
+
+
+ You can request for our latest SOC 2 document through our{' '}
+ security portal, or by submitting
+ your email here.
+
+
+ {formSubmitted ? (
+
+ Thank you for your submission! A member from the Supabase team will reach out to
+ you shortly!
-
-
You can download the latest DPA document through our security portal.
-
- {message ? (
-
{message}
- ) : (
-
- )}
-
+ ) : (
+
+ )}
-
-
-
- >
+
+
+
+
)
}
-export default DPA
+export default SOC2
diff --git a/apps/www/supabase/functions/hubspot-notification/index.ts b/apps/www/supabase/functions/hubspot-notification/index.ts
index ca145b47410..220cd3258c8 100644
--- a/apps/www/supabase/functions/hubspot-notification/index.ts
+++ b/apps/www/supabase/functions/hubspot-notification/index.ts
@@ -4,6 +4,8 @@ const FUNCTION_SECRET = Deno.env.get('FUNCTION_SECRET')
const HUBSPOT_PORTAL = Deno.env.get('HUBSPOT_PORTAL')
const PARTNER_FORM_ID = Deno.env.get('PARTNER_FORM_ID')
const ENTERPRISE_FORM_ID = Deno.env.get('ENTERPRISE_FORM_ID')
+const DPA_FORM_ID = Deno.env.get('DPA_FORM_ID')
+const SOC2_FORM_ID = Deno.env.get('DPA_FORM_ID')
serve(async (req) => {
const requestSecret = req.headers.get('x-function-secret')
@@ -28,39 +30,29 @@ serve(async (req) => {
const partner_gallery_type = input.record.type
const document = input.document
- let formData: object = {
- email,
- }
+ let formData: object = { email }
- if (input.table === 'partner_contacts') {
- formData = {
- ...formData,
- jobtitle,
- website,
- partner_gallery_type,
- }
- }
-
- if (input.table === 'enterprise_contacts') {
- formData = {
- ...formData,
- supabase_table_id,
- country,
- form_note,
- company,
- company_size,
- email,
- phone,
- lastName,
- firstName,
- }
- }
-
- if (input.table === 'dpa_downloads') {
- formData = {
- ...formData,
- document,
- }
+ switch (input.table) {
+ case 'partner_contacts':
+ formData = { ...formData, jobtitle, website, partner_gallery_type }
+ break
+ case 'enterprise_contacts':
+ formData = {
+ ...formData,
+ supabase_table_id,
+ country,
+ form_note,
+ company,
+ company_size,
+ email,
+ phone,
+ lastName,
+ firstName,
+ }
+ break
+ case 'soc2_downloads':
+ case 'dpa_downloads':
+ formData = { ...formData, document }
}
const fields: { objectTypeId: '0-1'; name: string; value: string }[] = []
From bbecb30aa5a228312e6736eb8d470710e454a7ac Mon Sep 17 00:00:00 2001
From: Joshen Lim
Date: Wed, 12 Oct 2022 19:03:32 +0800
Subject: [PATCH 05/52] Set up DPA and SOC2 pages
---
apps/www/components/SOC2RequestForm.tsx | 197 ++++++++++++++++++
apps/www/pages/legal/dpa.tsx | 7 +-
apps/www/pages/legal/soc2.tsx | 75 +------
.../public/downloads/docs/Supabase+DPA.pdf | Bin 0 -> 202169 bytes
.../functions/hubspot-notification/index.ts | 19 +-
5 files changed, 219 insertions(+), 79 deletions(-)
create mode 100644 apps/www/components/SOC2RequestForm.tsx
create mode 100644 apps/www/public/downloads/docs/Supabase+DPA.pdf
diff --git a/apps/www/components/SOC2RequestForm.tsx b/apps/www/components/SOC2RequestForm.tsx
new file mode 100644
index 00000000000..c0b06486b93
--- /dev/null
+++ b/apps/www/components/SOC2RequestForm.tsx
@@ -0,0 +1,197 @@
+import { Button, Form, Input, Select } from '@supabase/ui'
+import { useState } from 'react'
+import countries from '~/data/Countries.json'
+import supabase from '~/lib/supabase'
+
+const INITIAL_VALUES = {
+ companyName: '',
+ contactFirstName: '',
+ contactLastName: '',
+ contactEmail: '',
+ contactPhone: '',
+ companySize: '',
+ details: '',
+ country: 'US',
+}
+
+const validate = (values: any) => {
+ const errors: any = {}
+
+ if (!values.companyName) {
+ errors.companyName = 'Required'
+ }
+
+ if (!values.contactFirstName) {
+ errors.contactFirstName = 'Required'
+ }
+
+ if (!values.contactLastName) {
+ errors.contactLastName = 'Required'
+ }
+
+ if (!values.contactEmail) {
+ errors.contactEmail = 'Required'
+ } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.contactEmail)) {
+ errors.contactEmail = 'Invalid email address'
+ }
+
+ return errors
+}
+
+const SOC2RequestForm = () => {
+ const [error, setError] = useState()
+ const [formSubmitted, setFormSubmitted] = useState(false)
+
+ const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
+ const { error } = await supabase.from('soc2_requests').insert([
+ {
+ company_name: values.companyName,
+ contact_name: `${values.contactFirstName} ${values.contactLastName}`,
+ contact_first_name: values.contactFirstName,
+ contact_last_name: values.contactLastName,
+ contact_email: values.contactEmail,
+ contact_phone: values.contactPhone,
+ company_size: values.companySize,
+ details: values.details,
+ country: values.country,
+ },
+ ])
+
+ if (!error) {
+ resetForm()
+ setFormSubmitted(true)
+ } else {
+ setError(error.message)
+ }
+ }
+
+ return (
+
+ {formSubmitted ? (
+
+ Thank you for your submission! A member from the Supabase team will reach out to you
+ shortly!
+
+ ) : (
+ <>
+
+ {error &&
Error: {error}
}
+ >
+ )}
+
+ )
+}
+
+export default SOC2RequestForm
diff --git a/apps/www/pages/legal/dpa.tsx b/apps/www/pages/legal/dpa.tsx
index 746aedf0e03..76443ea7637 100644
--- a/apps/www/pages/legal/dpa.tsx
+++ b/apps/www/pages/legal/dpa.tsx
@@ -20,7 +20,6 @@ const DPA = () => {
})
const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
- console.log('handleFormSubmit ran', values)
try {
setError(undefined)
const { error } = await supabase
@@ -31,7 +30,7 @@ const DPA = () => {
resetForm()
setFormSubmitted(true)
- window.open('https://supabase.com/downloads/docs/legal/dpa.pdf', '_blank')
+ window.open('https://supabase.com/downloads/docs/Supabase+DPA.pdf', '_blank')
} catch (error: any) {
setError(error.message)
}
@@ -58,7 +57,8 @@ const DPA = () => {
{formSubmitted ? (
- A new tab should have opened with the DPA document
+ Thank you for your submission! A new tab should have opened with the DPA
+ document
) : (