fix: omit static Stream header when HTTP auth is supplied - #758
fix: omit static Stream header when HTTP auth is supplied#758manana2520 wants to merge 2 commits into
Conversation
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
Verdict: needs_human (risk 3/5) · profile keboola-mcp-server
placeholder
Concerns:
src/keboola_agent_cli/stream_client.py: Bearer-path requests now omit X-StorageApi-Token — auth-surface behavior change
|
Follow-up docs correction pushed as The bundled Stream gotcha said no master-token requirement. The current authoritative tutorial explicitly requires the personal master token of a project user with role Admin for Stream writes: A read-only investigation through native kbagent and token verification found an important distinction: Docs-only validation: |
Summary
Omit
X-StorageApi-TokeninStreamClientwhen the caller explicitly supplieshttp_auth, matching the existing Storage client contract. Previously StreamClient added the static header even in bearer mode, including empty/sentinel/stale-token values; a competing header could cause HTTP401 while the bearer credential itself was valid.One constructor guard fixes direct StreamClient calls and the KeboolaClient stream sub-client. Static-token behavior and default CLI/facade session guards remain unchanged; no new session-support surface or version bump.
Evidence
make checkpassed: 6574 passed,12 skipped; lint,format,typecheck and repository gates green. Existing warnings retained.git diff --checkpassed.The configured static token's independent rejection is not fixed/hidden by this change. Explicit bearer auth remains caller-supplied, never an implicit auth fallback.
Plugin sync: no command/signature/permission changes; added a vNEXT low-level auth gotcha, explicitly retaining CLI/public facade guards. No release/changelog edits.
Self-review: main-agent code/test/call-site review completed.
/kbagent:reviewplugin review skipped: unavailable in this Pi session; no independent-review claim. No live E2E mutation suite run against the user's project.