Skip to content

[pull] main from MaterializeInc:main#1042

Merged
pull[bot] merged 4 commits into
transparencies:mainfrom
MaterializeInc:main
May 30, 2026
Merged

[pull] main from MaterializeInc:main#1042
pull[bot] merged 4 commits into
transparencies:mainfrom
MaterializeInc:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 30, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

materialize-bot and others added 4 commits May 30, 2026 00:00
…efore origin (#36661)

When `source < origin` and `tm_diff` was an exact multiple of the
stride, the unconditional `tm_delta -= stride_ns` shifted the result
back a whole extra bin. Also use `checked_sub` so that the `i64::MIN`
nanosecond boundary surfaces `DateBinOutOfRange` instead of silently
wrapping.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…5858)

## Summary

Infrastructure for FIPS 140-3 compliant SSH tunnels, enabling distroless
container migration for environmentd and clusterd:

- **Static OpenSSH build Dockerfile** (`misc/images/openssh-static/`):
Builds a statically-linked `ssh` client binary (~3-6MB) using
AWS-LC-FIPS as the crypto backend. OpenSSH natively supports AWS-LC — no
patches needed.
- **FIPS SSH algorithm enforcement** (`src/ssh-util/src/tunnel.rs`):
When `MZ_FIPS=1` is set, writes a restrictive SSH config that limits
connections to NIST-approved algorithms only (AES-GCM/CTR, ECDH,
HMAC-SHA2, ECDSA/RSA).

### Background

environmentd and clusterd can't move to distroless containers because
the `openssh` Rust crate shells out to `/usr/bin/ssh`. The `russh`
pure-Rust alternative was evaluated but **cannot be made
FIPS-compliant** (only AEAD ciphers use aws-lc-rs; key exchange,
signing, and HMACs use non-FIPS RustCrypto crates).

Shipping a static OpenSSH binary built against AWS-LC-FIPS is the
pragmatic path: zero code changes to tunnel logic, battle-tested SSH
implementation, and FIPS-validated crypto.

### Follow-up PRs

- CI builder integration to actually build and cache the static ssh
binary
- Migrate environmentd/clusterd Dockerfiles from `prod-base` to
`distroless-prod-base`
- Replace bash entrypoint scripts with static/compiled entrypoints

Part of SEC-236.

## Test plan

- [x] `cargo check -p mz-ssh-util` passes
- [x] `cargo fmt` clean
- [ ] Docker build of `misc/images/openssh-static/` produces working
static binary
- [ ] SSH tunnel tests pass with `MZ_FIPS=1` against a FIPS-compatible
SSH server

---
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Jason Hernandez <7144515+jasonhernandez@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 30, 2026
@pull pull Bot added the ⤵️ pull label May 30, 2026
@pull pull Bot merged commit 1b9cf39 into transparencies:main May 30, 2026
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants