Skip to content

gRPC e-book Chapter 6 - #14307

Merged
mairaw merged 14 commits into
dotnet:grpc-ebookfrom
RendleLabs:grpc-ebook-chapter6
Sep 21, 2019
Merged

mairaw merged 14 commits into
dotnet:grpc-ebookfrom
RendleLabs:grpc-ebook-chapter6

Conversation

@ThatRendle

Copy link
Copy Markdown
Contributor

Authentication, authorization and security

@ThatRendle

Copy link
Copy Markdown
Contributor Author

Ready for review. cc @glennc @saurabh500 @mconnew @JamesNK @JunTaoLuo @mairaw

@mairaw mairaw added this to the September 2019 milestone Sep 16, 2019

@mairaw mairaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy edit is done. Left just one more comment.


## JWT Bearer tokens

The [JSON Web Token](https://jwt.io) standard provides a way to encode information about a user and their claims in an encoded string, and to sign that token in such a way that the consumer can verify the integrity of the token using public key cryptography. You can use various services, such as IdentityServer4, to authenticate users and generate OpenID Connect (OIDC) tokens to use with gRPC and HTTP APIs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to identity server?


// Display portfolio
}
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO add a tip that Grpc.Core.CallCredentials can be configured on a channel to centralize setting authentication metadata on calls.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you show CallCredentials in other places. I still think a tip would be useful here for devs who don't read from beginning to end.


gRPC leaves secure networking to the underlying HTTP/2 protocol, which can be secured using regular TLS certificates.

Web browsers insist on using TLS connections for HTTP/2, but most programmatic clients, including .NET's `HttpClient`, can use HTTP/2 over unencrypted connections. `HttpClient` *does* require encryption by default, but you can override this using an <xref:System.AppContext> switch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that this switch must be set before the HttpClient/HttpClientHandler (or GrpcChannel if no HttpClient is explicitly specified) is created.

@JamesNK
JamesNK requested a review from blowdart September 20, 2019 22:44
@mairaw
mairaw merged commit b073aae into dotnet:grpc-ebook Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants