Skip to content

[Example Request] gRPC authorization with IdentityServer4 (and roles) #949

@JeepNL

Description

@JeepNL

For my Blazor (3.2.0) WASM project (.NET 5.0 Preview latest) I'm now using IdentityServer4 (default Visual Studio Template) and gRPC (EF Core/SQLite) data services.

I would like to protect the gRPC services against unauthorized access much like the Ticketer example with [Authorize] on the service, and use it with IdentityServer4 roles [Authorize (Roles=Administrator)] See: Microsoft Docs, Secure an ASP.NET Core Blazor WebAssembly hosted app with Identity Server / Name and role claim with API authorization

Maybe it's an idea to add an example to the samples gallery at https://github.com/grpc/grpc-dotnet/tree/master/examples

I tried to figure it out myself, but I'm stuck. I got the two (IdentityServer4 & Ticketer) working separately but I'm stuck combining gRPC authorization with IdentityServer4/Roles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions