Skip to content

Commit c43868a

Browse files
committed
feat: conditional fips mode
1 parent c6fec60 commit c43868a

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

ee/apps/ddp-streamer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ CMD ["node", "src/service.js"]
130130
FROM rocketchatfips140/dhi-node:22-alpine3.23 AS release-fips
131131
ARG SERVICE
132132
ENV NODE_ENV=production \
133-
PORT=3000
133+
PORT=3000 \
134+
ROCKETCHAT_ENABLE_FIPS=true
134135
COPY --chown=node:node --from=builder /app /app
135136
WORKDIR /app/ee/apps/${SERVICE}
136137
USER node

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
import os from 'os';
2+
import crypto from 'crypto';
3+
4+
// --- CONDITIONAL FIPS ENFORCEMENT ---
5+
if (process.env.ROCKETCHAT_ENABLE_FIPS === 'true') {
6+
crypto.setFips(true); // Force OpenSSL into FIPS mode only if the env var is set
7+
}
8+
9+
console.log('=================================');
10+
console.log('FIPS COMPLIANCE CHECK');
11+
console.log('Is FIPS actively enforced? :', crypto.getFips() ? 'YES' : 'NO');
12+
console.log('=================================');
13+
// ------------------------------------
214

315
import { api, getConnection, getTrashCollection } from '@rocket.chat/core-services';
416
import { InstanceStatus } from '@rocket.chat/instance-status';

0 commit comments

Comments
 (0)