Skip to content

Commit cc6299c

Browse files
committed
fix(csp): fixed csp policy to allow for google drive picker, s3, atlassian
1 parent 815bb5f commit cc6299c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

sim/app/w/[id]/components/workflow-block/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const SCOPE_DESCRIPTIONS: Record<string, string> = {
7272
'read:jira-user': 'Read your Jira user',
7373
'read:jira-work': 'Read your Jira work',
7474
'write:jira-work': 'Write to your Jira work',
75+
'read:issue-event:jira': 'Read your Jira issue events',
7576
'write:issue:jira': 'Write to your Jira issues',
7677
'read:project:jira': 'Read your Jira projects',
7778
'read:issue-type:jira': 'Read your Jira issue types',

sim/lib/oauth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,11 @@ export async function refreshOAuthToken(
408408
clientId = process.env.CONFLUENCE_CLIENT_ID
409409
clientSecret = process.env.CONFLUENCE_CLIENT_SECRET
410410
break
411+
case 'jira':
412+
tokenEndpoint = 'https://auth.atlassian.com/oauth/token'
413+
clientId = process.env.JIRA_CLIENT_ID
414+
clientSecret = process.env.JIRA_CLIENT_SECRET
415+
break
411416
case 'airtable':
412417
tokenEndpoint = 'https://airtable.com/oauth2/v1/token'
413418
clientId = process.env.AIRTABLE_CLIENT_ID

sim/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const nextConfig: NextConfig = {
8484
},
8585
{
8686
key: 'Content-Security-Policy',
87-
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'; connect-src 'self' http://localhost:11434 http://host.docker.internal:11434; frame-ancestors 'self'; frame-ancestors 'self'; form-action 'self'; base-uri 'self'; object-src 'none'",
87+
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.google.com https://apis.google.com https://*.vercel-insights.com https://vercel.live https://*.vercel.live; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.googleusercontent.com https://*.google.com https://*.atlassian.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' http://localhost:11434 http://host.docker.internal:11434 https://*.googleapis.com https://*.amazonaws.com https://*.s3.amazonaws.com https://s3.*.amazonaws.com https://*.vercel-insights.com https://*.atlassian.com https://vercel.live https://*.vercel.live; frame-src https://drive.google.com https://*.google.com; frame-ancestors 'self'; form-action 'self'; base-uri 'self'; object-src 'none'",
8888
},
8989
],
9090
},

0 commit comments

Comments
 (0)