@forge/csp 5.1.1 → 5.2.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 5.2.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 5403345: Adding FOS to connect-src CSP
8
+
9
+ ## 5.1.2-next.0
10
+
11
+ ### Patch Changes
12
+
13
+ - 94243f1: Split development and contribution guidelines
14
+
3
15
  ## 5.1.1
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAEvD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,aAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AAEF,aAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAiH1D,eAAO,MAAM,qBAAqB,cAAe,iBAAiB,cAAc,SAAS,KAAG,MAAM,EAUjG,CAAC;AAMF,eAAO,MAAM,kCAAkC,UAAiE,CAAC;AAEjH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IA2BrB,OAAO,CAAC,iBAAiB;IAiDlB,gBAAgB;4BAQD,UAAU;mBACnB,iBAAiB;;;;;UAK1B,MAAM,EAAE,CAkEV;CACH"}
1
+ {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAEvD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,aAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AAEF,aAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AA0H1D,eAAO,MAAM,qBAAqB,cAAe,iBAAiB,cAAc,SAAS,KAAG,MAAM,EAUjG,CAAC;AAMF,eAAO,MAAM,kCAAkC,UAAiE,CAAC;AAEjH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,iBAAiB;IAiDlB,gBAAgB;4BAQD,UAAU;mBACnB,iBAAiB;;;;;UAK1B,MAAM,EAAE,CAkEV;CACH"}
@@ -73,6 +73,14 @@ const ATLASSIAN_HOST = {
73
73
  'fedramp-stg': '',
74
74
  'fedramp-prod': '',
75
75
  ...makeICHosts((env, icOptions) => '')
76
+ },
77
+ ATLASSIAN_FOS_HOST: {
78
+ dev: 'https://tdp-os.dev.services.atlassian.com',
79
+ stg: 'https://tdp-os.stg.services.atlassian.com',
80
+ prod: 'https://tdp-os.services.atlassian.com',
81
+ 'fedramp-stg': 'https://tdp-os.stg.services.atlassian-us-gov-mod.com',
82
+ 'fedramp-prod': 'https://tdp-os.services.atlassian-us-gov-mod.com',
83
+ ...makeICHosts((env, icOptions) => `https://tdp-os.services.${getICDomain(env, icOptions)}`)
76
84
  }
77
85
  };
78
86
  const getAtlassianHost = (hostType, microsEnv, icOptions) => {
@@ -200,6 +208,15 @@ class CSPInjectionService {
200
208
  if (fopGeHost) {
201
209
  allowed.push(fopGeHost);
202
210
  }
211
+ const fosHost = getAtlassianHost('ATLASSIAN_FOS_HOST', microsEnv, icOptions);
212
+ if (fosHost) {
213
+ allowed.push(`${fosHost}/fos-eap/upload/*/`);
214
+ allowed.push(`${fosHost}/fos-eap/download/*/`);
215
+ allowed.push(`${fosHost}/fop/app/upload/*/`);
216
+ allowed.push(`${fosHost}/fop/app/download/*/`);
217
+ allowed.push(`${fosHost}/fop/cdn/upload/*/`);
218
+ allowed.push(`${fosHost}/fop/cdn/download/*/`);
219
+ }
203
220
  return allowed;
204
221
  }
205
222
  getFrameAncestors(microsEnv, hostname, icOptions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "5.1.1",
3
+ "version": "5.2.0-next.1",
4
4
  "description": "Contains the CSP configuration for Custom UI resources in Forge",
5
5
  "main": "out/index.js",
6
6
  "author": "Atlassian",
@@ -11,8 +11,8 @@
11
11
  "clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
12
12
  },
13
13
  "devDependencies": {
14
- "@forge/cli-shared": "8.8.0",
15
- "@forge/manifest": "10.7.0",
14
+ "@forge/cli-shared": "8.8.1-next.1",
15
+ "@forge/manifest": "10.8.0-next.1",
16
16
  "@types/jest": "^29.5.14",
17
17
  "@types/node": "20.19.1",
18
18
  "cheerio": "^1.1.0"