Skip to content

Migrate file upload digest algorithm from MD5 to SHA-384 (FIPS 140-3 + NCS) - #1884

Open
vkalapov wants to merge 1 commit into
masterfrom
fips-file-digest-sha256
Open

Migrate file upload digest algorithm from MD5 to SHA-384 (FIPS 140-3 + NCS)#1884
vkalapov wants to merge 1 commit into
masterfrom
fips-file-digest-sha256

Conversation

@vkalapov

Copy link
Copy Markdown
Contributor

What

Change Constants.DIGEST_ALGORITHM from "MD5" to "SHA-384" and update all test fixtures accordingly.

Why

SHA-384 satisfies both FIPS 140-3 (FIPS 180-4) and NCS MODERATE requirements. MD5 and SHA-256 are not approved at NCS MODERATE level.

Compatibility

Backward compatible — no breaking change.

The server always computes and stores its own digest on upload (DatabaseFileServiceSqlFileQueryProvider). No client-sent digest is ever read or verified on the server side.

  • Old CLI users: isFileAlreadyUploaded will hit "Unsupported digest algorithm" for the SHA-384 entries returned by GET /files, re-upload on every retry instead of skipping — deploys complete successfully.
  • First deploy after DS restart: UploadAppStep detects mismatch between freshly computed SHA-384 and the MD5 value stored in the CF app environment → one-time forced re-upload of every app binary. Self-heals on the second deploy.

LMCROSSITXSADEPLOY-3224

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant