Skip to content

Commit

Permalink
feat(FN-3163): remove local ssl workaround (#1188)
Browse files Browse the repository at this point in the history
## Introduction ✏️
On local builds, the Salesforce domains needed to create a customer are
not whitelisted on the UKEF VPN, so rejectUnauthorized must be set as
false. This doesn't affect higher environments.

## Resolution ✔️
Remove this setting so local builds will fail, but will replicate the
code running on higher environments more closely.

## Miscellaneous ➕
Remove the same commented-out behaviour from Informatica, this domain IS
whitelisted so works on local builds regardless.

Co-authored-by: Nat Dean-Lewis <ndlewis@ukexportfinance.gov.uk>
  • Loading branch information
natdeanlewissoftwire and Nat Dean-Lewis authored Jan 30, 2025
1 parent a2295b2 commit f65b047
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 50 deletions.
21 changes: 0 additions & 21 deletions src/helpers/is-development.helper.test.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/helpers/is-development.helper.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/modules/informatica/informatica.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ import { InformaticaService } from './informatica.service';
username,
password,
},
// TODO: APIM-471 - cleanup rejectUnauthorized when Informatica SSL issue is resolved
// "rejectUnauthorized: false" is just for local DEV laptop environment, not for DEV/PROD.
// to ignore https issues, enable agent and rejectUnauthorized:false below.
// import https from 'https';
// import crypto from 'crypto';
// httpsAgent: new https.Agent({
// // Allow self signed negotiations
// rejectUnauthorized: false,

// // Allow legacy server
// secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,
// }),
};
},
}),
Expand Down
9 changes: 0 additions & 9 deletions src/modules/salesforce/salesforce.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { KEY as SALESFORCE_CONFIG_KEY, SalesforceConfig } from '@ukef/config/salesforce.config';
import { isDevelopment } from '@ukef/helpers/is-development.helper';
import { HttpModule } from '@ukef/modules/http/http.module';
import https from 'https';

import { SalesforceService } from './salesforce.service';

Expand All @@ -24,13 +22,6 @@ import { SalesforceService } from './salesforce.service';
accessURL: accessUrl,
maxRedirects,
timeout,
// TODO: cleanup rejectUnauthorized when Salesforce SSL issue is resolved
// "rejectUnauthorized: false" is just for local DEV laptop environment, not for DEV/PROD.
// There's a helpdesk ticket pending to whitelist this domain
httpsAgent: new https.Agent({
// Allow self signed negotiations
rejectUnauthorized: !isDevelopment(),
}),
};
},
}),
Expand Down

0 comments on commit f65b047

Please # to comment.