test_case_id: "proxy_auth_missing_when_required_001"
description: "Tests proxy behavior when downstream requires auth but none configured"
tags: ["all", "proxy", "auth"]
skip_intermediate_events: true

# Configure downstream agent to require authentication
downstream_agent_auth:
  enabled: true
  type: "bearer"
  expected_value: "any_valid_token"

# Configure proxy with NO authentication
proxy_auth_config:
  agent_name: "TestAgent_Proxied"
  # Intentionally empty - no authentication configured

gateway_input:
  target_agent_name: "TestAgent_Proxied"
  user_identity: "missing_auth_tester@example.com"
  parts:
    - type: "text"
      text: "This request should fail due to missing authentication"
  external_context:
    a2a_session_id: "session_missing_auth_001"

# No successful downstream responses
expected_gateway_output:
  - type: "error"
    error_code: -32603  # InternalError
    # No error_message_contains - just verify we got an InternalError

# Assert request was made without auth header
assert_downstream_auth:
  - request_index: 0
    authorization_header:
      exact: ""  # No auth header should be present
