Skip to content

Spring Security annotations are ignored on generated ImplBase classes #7

@cengdall-blaze

Description

@cengdall-blaze

Adding spring-security annotations such as @PreAuthorize to the generated ImplBase classes has no effect.

While grpc-spring supports spring-security, and these annotations work with output generated by grpc-java, when added to the wire generated classes the annotations are ignored.

There are comments in grpc-spring that outline the issue:

// The #bindService() method uses a reference to 'this', which will be used to invoke the methods.
// If the method is not final it will delegate to the original instance and thus it will bypass any security layer that
// you intend to add, unless you re-implement the #bindService() method on the outermost layer (which Spring does not).

This issue is related to the current open PR:
#5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions