Skip to content

fix(bedrock_agentcore_starter_toolkit): oauth2 callback server logs sensitive session_id to console output #521

Description

Description

The session_id from the OAuth2 callback query parameter is logged directly to console
via console.print(f"Handling 3LO callback for workload_user_id={user_id} | session_id={session_id}").
In OAuth2 flows, session identifiers can be sensitive authentication state that may be
correlated with tokens or authorization grants. Console output may be captured in CI/CD logs,
shared terminal sessions, log aggregation services, or crash reports, leading to unintended
exposure of authentication session data.

Severity: medium
File: src/bedrock_agentcore_starter_toolkit/operations/identity/oauth2_callback_server.py

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions