webex / webex-js-sdk

JavaScript SDK for Webex
https://webex.github.io/webex-js-sdk/
Other
167 stars 334 forks source link

feat(fedramp): only add domains if commercial #3634

Closed robstax closed 1 week ago

robstax commented 3 weeks ago

COMPLETES https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-531900

This pull request addresses

in fedramp, it's important that clients do not send auth token to resources outside of the "fedramp" boundary. therefore, we should only send auth headers in the following cases

  1. the resource is in the u2c catalog
  2. the resource is in the list of allowed domains

by making the following changes

i changed the allowedDomains to be empty in FedRAMP by default. if the user wants more domains in fedramp, they can pass them through config or by setAllowedDomains(). in commercial, we keep the existing list of allowedDomains. the reason webex.com cannot be a default allowedDomain in fedramp is because there are commercial sites, like cisco.webex.com and we don't want fedramp users sending their auth tokens to arbitrary commercial *.webex sites

Change Type

The following scenarios where tested

  1. manually tested with config value fedramp: false
  2. manually tested with config value fedramp: true
  3. ran web client automated playwright E2E tests with config value fedramp: false
  4. ran web client automated playwright E2E tests with config value fedramp: true
  5. in commercial make request to cisco.webex.com (request added auth headers since within *.webex allowed domains
  6. in commercial make request to cisco.webex.com (SDK does not add auth header) since it's not within catalog/not allowed domain

I certified that


Make sure to have followed the contributing guidelines before submitting.

aws-amplify-us-east-2[bot] commented 3 weeks ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3634.d3m3l2kee0btzx.amplifyapp.com

robstax commented 1 week ago

i addressed all comments. thanks for reviews!