Skip to content

Commit fc0cced

Browse files
Simplify Compose control-plane authentication (#38)
## Summary `bb apps` previously exchanged the normal opaque bbidentity session for a Compose-specific purpose token, then cached, refreshed, and retried requests with that token. The new contract moves that exchange to public ingress: while the request is paused, ingress sends the bbidentity session to the authorizer and replaces it with a short-lived Compose JWT before forwarding. The CLI now sends `Authorization: BBIdentity <credential>` only to the exact staging and production Compose control-plane hosts over HTTPS. Redirects stay disabled, cookies and legacy identity headers are omitted, and reflected credentials are redacted from errors. Apps commands require an already-valid stored session in every mode; otherwise they fail promptly with `auth_required` and direct the caller to explicit `bb auth login`. Only the explicit auth command owns the browser login flow. The old exchange, cache, refresh, and retry machinery is removed. The staging infrastructure still needs to be activated before this can be smoke-tested end to end. Merging this PR also does not update an installed `bb` binary: Berd ships the CLI through its normal pinned release process. ### Related issue N/A. This replaces auth work from the archived pre-OSS repository. ### Testing - `cd bb-cli && source ./bin/activate-hermit && just check` - `cd bb-cli && source ./bin/activate-hermit && just build-bb-release`
1 parent 9fefd79 commit fc0cced

11 files changed

Lines changed: 1449 additions & 1635 deletions

File tree

bb-cli/Cargo.lock

Lines changed: 0 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bb-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ anyhow = "1"
1919
builderbot-auth = { path = "../crates/builderbot-auth", features = ["blocking-client"] }
2020
clap = { version = "4.5", features = ["env"] }
2121
clap_complete = "4.5"
22-
fs2 = "0.4"
2322
pbjson = "0.9"
2423
pbjson-types = "0.9"
2524
prost = "0.14"

bb-cli/Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ lint: fmt-check
104104
cargo clippy --locked --all-targets --all-features -- -D warnings
105105

106106
test:
107-
cargo test --locked
107+
cargo test --locked --all-features
108108

109109
package-smoke: build-sq
110110
./sqbin/{{BIN_NAME}}.exoskeleton --version

0 commit comments

Comments
 (0)