Course Overview
You will learn how to secure microservices with using standalone Identity Server 4 and backing with Ocelot API Gateway. We’re going to protect our ASP.NET Web MVC and API applications with using OAuth 2 and OpenID Connect in IdentityServer4. Securing your web application and API with tokens, working with claims, authentication and authorization middlewares and applying policies, and so on.
This course will led you get started securing your ASP.NET based microservices applications with IdentityServer4 using OAuth 2 and OpenID Connect on distributed microservices architecture. And Also you’ll learn how to secure protected APIs backing with Ocelot API Gateway in a microservices architecture.
Check the overall picture
You can see that we will have 4 Aspnet core microservices project which we are going to develop one by one and together.
Movies.API
First of all, we are going to develop Movies.API project and protect this API resources with IdentityServer4 OAuth 2.0 implementation. Generate JWT Token with client_credentials from IdentityServer4 and will use this token for securing Movies.API protected resources.
Movies.MVC
After that, we are going to develop Movies.MVC Asp.Net project for Interactive Client of our application. This Interactive Movies.MVC Client application will be secured with OpenID Connect in IdentityServer4. Our client application pass credentials with logging to an Identity Server and receive back a JSON Web Token (JWT).
Identity Server
Also, we are going to develop centralized standalone Authentication Server and Identity Provider with implementing IdentityServer4 package and the name of microservice is Identity Server.
Identity Server4 is an open source framework which implements OpenId Connect and OAuth2 protocols for .Net Core.
With Identity Server, we can provide authentication and access control for our web applications or Web APIs from a single point between applications or on a user basis.
Ocelot API Gateway
Lastly, we are going to develop Ocelot API Gateway and make secure protected API resources over the Ocelot API Gateway with transferring JWT web tokens. Once the client has a bearer token it will call the API endpoint which is fronted by Ocelot. Ocelot is working as a reverse proxy.
After Ocelot re-routes the request to the internal API, it will present the token to Identity Server in the authorization pipeline. If the client is authorized the request will be processed and a list of movies will be sent back to the client.
Also over these overall picture, we have also apply the Claim based authentications.
By the end of this course, you will have a practical understanding of how to secure .Net Microservices with IdentityServer4 using OAuth2, OpenID Connect and Ocelot Api Gateway.
Secure Existing Microservices Architecture
In the last section, we will give an assignment for security operations with identity server integration for an existing microservices reference application. We had developed run-aspnetcore-microservices reference application before this course. We will extend this application with IdentityServer OAuth 2.0 and OpenId Connect features with adding new Identity Server Microservice.
Is this course for you?
This course is very practical, about 90%+ of the lessons will involve you coding along with me on this project. If you are the type of person who gets the most out of learning by doing, then this course is definitely for you.
Tools you need for this course
In this course all the lessons are demonstrated using Visual Studio 2019 as a code editor. You can of course use any code editor you like and any Operating system you like as long as it's Windows or Mac.
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction 14 bài · 26 phút
- Introduction Học thử 5:50
- Prerequisites and Source Code Học thử 1:17
- What is JWT (Token) ? Học thử 1:03
-
JWT Example Scenario 0:56
-
JWT(JSON Web Tokens) Structure 2:36
-
What is OAuth2 ? 1:32
-
OAuth2 Authorization Types and Flows 2:10
-
What is OpenId Connect ? 1:18
- OpenID Connect Endoints Học thử 1:07
-
OpenID Connect Authentication Flows 1:47
-
What is Identity Server 4 ? 1:38
- Identity Server 4 Terminologies Học thử 2:21
-
Identity Server 4 in Microservices World 2:12
-
Microservices Security Quiz
Chương 2 Building API Resource - Movie.API Asp.Net Web API Project 8 bài · 25 phút
- Introduction Học thử 0:55
-
Create Visual Studio Solution For Microservice Security Application 0:42
-
Create Asp.Net Core Web API Project For Movies.API Microservice 2:53
-
Create Asp.Net Core Web API Project For Movies.API Microservice Part 2 1:38
- Create Controller Class for Movie Model Học thử 4:03
-
Use In-Memory Database for Entity Framework Core MoviesAPIContext 3:41
-
Seeding In-Memory Database with Entity Framework Core 5:02
-
Test CRUD with Postman to our Movies.API Asp.Net Web API Project 5:56
Chương 3 Building IdentityServer4 Authentication Microservice 7 bài · 15 phút
-
Introduction 1:02
-
Create IdentityServer4 Asp.Net Web Application 2:49
-
Install IdentityServer4 Nuget Package and Configure Startup.cs 2:06
-
Configure IdentityServer4 with Clients, Resources, Scopes and TestUsers 3:10
-
IdentityServer4 What is Clients, Resources, Scopes and TestUsers 2:18
-
Adding Config Class for Clients, Resources, Scopes and TestUsers 3:54
-
IdentityServer4 Quiz
Chương 4 Protecting Movie.API with Using IdentityServer4 OAuth 2.0 and JWT Token 6 bài · 33 phút
-
Introduction 0:58
-
Protecting Movie API using Client Credentials 4:26
-
Get Token from Identity Server with client_credentials grant_type 5:22
-
Securing Movies.API with JWT Bearer Token Authentication 5:08
-
Test Secured Movies.API with JWT Bearer Token Authentication 6:26
-
Claim Based Authentication with client_id Claim Restriction 10:52
Chương 5 Building MVC Client Application For Consuming API Resource - Movies.Client App 5 bài · 28 phút
-
Introduction 0:36
-
Create Asp.Net Core MVC Web Project For Movies.Client Microservice 3:05
-
Adding Model Class into MVC Application 1:36
-
Create Controller Class for Movie Model 7:02
-
Convert Movies.Client MVC Web Application with Consume Movies.API project 15:29
Chương 6 OpenID Connect with IdentityServer4 For Interactive MVC Movie.Client Project 5 bài · 22 phút
-
Introduction 0:38
-
Adding the UI for OpenID Connect Login, logout, consent and error 4:09
-
Set DI Registiration and Pipeline of IS4 MVC UI Pages 6:01
-
Update Config.cs for IS4 OpenID Connect with MVC Interactive Client and TestUser 8:28
-
Register OpenID Connect Client and TestUsers into Asp.Net DI 3:12
Chương 7 IS4 OpenID Connect Integration For Movie.Client MVC Interactive Client App 7 bài · 34 phút
-
Introduction 1:04
-
Build OpenId Connect Interactive Client for Movies.Client MVC Application 7:25
-
Authorize Movies Page 2:47
-
See Token into Output Window When OpenId Connect Get Token from IS4 2:53
-
Run All Projects Discover Open Id Connect From MVC Client opens Login Window 8:22
-
Developing Logout Button For Signout from IS4 5:27
-
Post Logout Redirect Uri Options 5:46
Chương 8 Consume Protected Movie.API with HttpClientFactory From Movie.Client 5 bài · 49 phút
-
Introduction 1:05
-
Consume Protected API with Getting Token from IS4 17:25
-
Refactor Consume Operation with IHttpClientFactory 10:10
-
Developing HttpHandler for Getting Token from IDPClient 17:37
-
ASSIGNMENT - DEVELOP CRUD OPERATIONS FROM API 2:39
Chương 9 Hybrid Flow of IdentityServer4 Secure Interactive Mvc.Client (OpenID) 4 bài · 26 phút
-
Introduction 3:59
-
Using Hybrid Flow For Getting Token and Combine Scopes for Interactive Channel 6:57
-
Why We Are Getting Token When We Had OpenID Connect ? 5:32
-
Login With OpenID Connect on Hybrid Flow and Extend Claim Based Authorization 9:41
Chương 10 Claim Based Authorization in IdentityServer4 Secure Interactive MVC Client 9 bài · 43 phút
-
Introduction 0:51
-
Adding Test Users with Email and Address Claims 2:45
-
Carry your Claims when Login The System 5:13
-
Create Role Claims For Using Role Based Authorization 3:34
-
Create Role Claims For Using Role Based Authorization Part 2 8:20
-
Use Role Claims For Authorization Admin Page 4:06
-
Developing Only Admin Page with Get User Info From IdentityServer 15:02
-
ASSIGNMENT - ACCESS DENIED PAGE 1:26
-
ASSIGNMENT - EF CORE INTEGRATION REAL DB 1:13
Chương 11 Ocelot API Gateway Impl for Movies.MVC Client to Interact w/ IdentityServer4 6 bài · 28 phút
-
Introduction 1:00
-
Adding Ocelot Api Gateway Microservices 5:47
-
Building Ocelot API Gateway Microservice 3:02
-
Securing Ocelot API Gateway with Bearer Token 4:33
-
Change Movie.Client Consume Url to Api Gateway with Bearer Token 11:20
-
ASSIGNMENT - FILTER MOVIES AS PER GIVEN NAME CLAIM with OWNER ID FROM MOVIE CLAS 2:28
Chương 12 Secure Existing Microservices Reference Application w/ Adding IS4 Integration 1 bài · 2 phút
-
Introduction and Assignment 2:24
Chương 13 Thanks 1 bài
-
Bonus Lecture
Requirment
-
C# knowledge
-
Aspnet core basics knowledge
Outcomes
-
Building IdentityServer4 Authentication Microservice
-
Get Token from Identity Server with client_credentials grant_type
-
Protecting API with Using IdentityServer4 OAuth 2.0 and JWT Token
-
OpenID Connect with IdentityServer4 For Interactive MVC Client Micorservice
-
IdentityServer4 OpenID Connect Integration For Client MVC Interactive Client Application
-
Consume Protected API with HttpClientFactory From Client Application
-
Adding the UI for OpenID Connect Login, logout, consent and error
-
Hybrid Flow of IdentityServer4 Secure Interactive Mvc Client (OpenID) and Api Resources (OAuth2)
-
Claim Based Authorization in IdentityServer4 Secure Interactive MVC Client (OpenID) and API Resources (OAuth2)
-
Ocelot API Gateway Implementation for MVC Client to Interact w/ IdentityServer4 and Carry Token
-
Secure Existing Microservices Reference Application w/ Adding IS4 Integration onto Ocelot and APIs
-
Claim Based Authentication with client_id Claim Restriction
-
Securing API with JWT Bearer Token Authentication
-
Build OpenId Connect Interactive Client for Client MVC Application
-
Developing HttpHandler for Getting Token from IDPClient with IHttpClientFactory
-
Securing Ocelot API Gateway with Bearer Token
0 Student
12 Courses
0 review