Skip to content

Commit 4af0269

Browse files
committed
fix: allow sha-1 for ws handshake
1 parent f2f6b9d commit 4af0269

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

ee/apps/ddp-streamer/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,13 @@ FROM rocketchatfips140/dhi-node:22-alpine3.23 AS release-fips
123123
ARG SERVICE
124124
ENV NODE_ENV=production \
125125
PORT=3000
126+
127+
# Keep provider behavior explicit for auditing: enable FIPS provider while allowing
128+
# fallback to default provider for legacy algorithms required by dependencies.
129+
COPY ./ee/apps/ddp-streamer/openssl-ddp-streamer-fips.cnf /etc/ssl/openssl-ddp-streamer-fips.cnf
130+
126131
COPY --chown=node:node --from=builder /app /app
127132
WORKDIR /app/ee/apps/${SERVICE}
128133
USER node
129134
EXPOSE 3000 9458
130-
CMD ["node", "--require", "./src/fips.js", "src/service.js"]
135+
CMD ["node", "--openssl-config=/etc/ssl/openssl-ddp-streamer-fips.cnf", "--openssl-shared-config", "--require", "./src/fips.js", "src/service.js"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
openssl_conf = openssl_init
2+
3+
[openssl_init]
4+
providers = provider_sect
5+
6+
[provider_sect]
7+
fips = fips_sect
8+
default = default_sect
9+
10+
[fips_sect]
11+
activate = 1
12+
13+
[default_sect]
14+
activate = 1

ee/apps/ddp-streamer/src/fips.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import crypto from 'crypto';
22

3-
crypto.setFips(true);
3+
const OPENSSL_CONFIG_PATH = '/etc/ssl/openssl-ddp-streamer-fips.cnf';
4+
const hasOpenSSLConfigFlag = process.execArgv.some((arg) => arg.startsWith('--openssl-config='));
5+
const hasOpenSSLSharedConfigFlag = process.execArgv.includes('--openssl-shared-config');
46

57
console.log('=========================================');
6-
console.log('FIPS COMPLIANCE CHECK: YES');
8+
console.log(`Node FIPS Mode Flag: ${crypto.getFips() === 1 ? 'ENABLED' : 'DISABLED'}`);
9+
console.log(`OpenSSL Config Path: ${OPENSSL_CONFIG_PATH}`);
10+
console.log(`OpenSSL Config Flag Present: ${hasOpenSSLConfigFlag ? 'YES' : 'NO'}`);
11+
console.log(`OpenSSL Shared Config Flag Present: ${hasOpenSSLSharedConfigFlag ? 'YES' : 'NO'}`);
12+
console.log('OpenSSL provider policy expected: fips + default fallback.');
713
console.log('=========================================');

0 commit comments

Comments
 (0)