Skip to content

Conversation

@sokn-sys
Copy link
Contributor

@sokn-sys sokn-sys commented Nov 21, 2025

COMPLETES #< https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-735619>

This pull request addresses

Add FedRAMP government compliance support to CallSettings client with dynamic URL switching, authorization headers, and async initialization pattern.
Add comprehensive unit tests for FedRAMP functionality

by making the following changes

This enables CallSettings to work in FedRAMP/government environments by:

  • Using https://api-usgov.webex.com for FedRAMP vs https://webexapis.com for production
  • Automatically adding Authorization headers when FedRAMP is detected
  • Supporting async initialization for proper authentication setup
  • Maintaining backward compatibility with existing implementations
Screenshot 2025-11-21 at 11 49 26 AM Screenshot 2025-11-21 at 11 49 44 AM

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@sokn-sys sokn-sys requested a review from a team as a code owner November 21, 2025 06:39
@akulakum akulakum added the validated If the pull request is validated for automation. label Nov 21, 2025
@rsarika
Copy link
Contributor

rsarika commented Nov 28, 2025

As discussed please add sample app changes to call this init in sample app

@sokn-sys
Copy link
Contributor Author

As discussed please add sample app changes to call this init in sample app
Added CallSettings client initialization in app.js file

async function getCallForwardAlwaysSetting() {
if (window.callSettings === undefined) {
callSettings = window.callSettings = CreateCallSettingsClient(webex, logger, enableProd);
await callSettings.init();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is required. CreateCallSettingsClient does everything.

Comment on lines +83 to +85
public async init(): Promise<void> {
// No initialization required for WxCall backend
return Promise.resolve();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seem redundant

* Initialize the connector by setting up auth headers.
*/
public async init() {
this.authHeaders = await this.getAuthHeaders();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done where we are using this authHeaders, introducing a new init method just for this seems an overkill

/**
* Initializes the call settings service.
*/
public async init(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can avoid doing this.

  1. in UcmBackeendConnector you can get the authHeader when we call the method
  2. in WxCallBackendConncetor init is an empty resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants