Skip to content

WARNING: Security bypass in multi threaded environments #2

@ST-DDT

Description

@ST-DDT

According to SO each grpc callback can be triggered by a different thread, thus setting and clearing the security context only in the interceptor's startCall may lead to other threads picking up the security contexts. grpc avoided the issue for their contexts with this interceptor

I could observe rare / random security exceptions with an interceptor that works similar to the ones used in this repository. The likelihood of these exceptions increased by running more requests (both authenticated and non-authenticated) in parallel and running on slower/busier CPUs.

Is the SO overflow answer wrong or is this demo affected by this?

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