Skip to content

return None for identities in FIPS environments where blake2b is unavailable#2717

Open
bujjibabukatta wants to merge 3 commits into
sodadata:mainfrom
bujjibabukatta:fix/#2354-hash
Open

return None for identities in FIPS environments where blake2b is unavailable#2717
bujjibabukatta wants to merge 3 commits into
sodadata:mainfrom
bujjibabukatta:fix/#2354-hash

Conversation

@bujjibabukatta
Copy link
Copy Markdown

Fixes #2354

Problem

In FIPS 140-2 compliant environments (government/finance hardened Linux),
hashlib.blake2b is disabled at the OS level causing ImportError at
startup, making Soda Core completely unusable in these environments.

Approach

Following the maintainer's agreed direction in #2354 — rather than
falling back to a different hash algorithm (which would make identities
environment-dependent), return None when blake2b is unavailable.

Identities are only meaningful for Soda Cloud users. Returning None
is safe and honest for soda-core-only users in FIPS environments.

Changes

Single file change in consistent_hash_builder.py:

  • Wrap blake2b import in try/except ImportError
  • Guard all blake2b calls — skip hashing when unavailable
  • get_hash() already returns None when nothing was hashed — no change needed

Testing

To verify: run in a FIPS-enabled environment or mock the ImportError by
temporarily removing the blake2b import. get_hash() should return None.

bujjibabukatta added 2 commits May 19, 2026 16:43
…to 'soda contract verify' that prints all SQL

queries that would be executed without running them against the data
source. Useful for cost estimation before running expensive queries
(e.g. BigQuery charges per byte scanned).

When --dry-run is passed:
- Queries are built but not executed
- Each SQL query is logged with a [DRY RUN] prefix
- Check results are not evaluated (NOT_EVALUATED)

Fixes sodadata#2473
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


bujjibabukatta seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sonarqubecloud
Copy link
Copy Markdown

@bujjibabukatta
Copy link
Copy Markdown
Author

Hi @CLAassistant can you please approve and merge it

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.

Soda Core fails in FIPS-enabled environments due to use of hashlib.blake2b

2 participants