Posts

Showing posts from 2021

OpenID Connect Overview

Image
OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It enables Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner.  The OpenID Connect protocol, in abstract, follows the following steps. The RP (Client) sends a request to the OpenID Provider (OP). The OP authenticates the End-User and obtains authorization. The OP responds with an ID Token and usually an Access Token. The RP can send a request with the Access Token to the UserInfo Endpoint. The UserInfo Endpoint returns Claims about the End-User. These steps are illustrated in the following diagram: The primary extension that OpenID Connect makes to OAuth 2.0 to enable End-Users to be Authenticated is the ID Token data structure. The ID Token is a security token that contains Claims about the Authentication of an End-User by an Authorization

Introduction of OpenID Connect

Image
OpenID Connect (OIDC) is an open authentication protocol that profiles and extends OAuth 2.0 to add an identity layer. OIDC allows clients to confirm an end user’s identity using authentication by an authorization server. Implementing OIDC on top of OAuth 2.0 creates a single framework that promises to secure APIs, mobile native applications and browser applications in a single, cohesive architecture. What is OAuth 2.0 and how does OAuth 2.0 work? OAuth 2.0 is an authorization framework that delegates user authentication to the service provider that hosts the user account, and authorizes third-party applications to access the user account. OAuth 2.0 provides authorization flows for web applications, desktop applications and mobile devices. By introducing an authorization layer, OAuth 2.0 separates the role of the client from the resource owner, or end user. If the client requests access to resources controlled by the end user and hosted by the resource server, instead of using the end

Roslyn Analyzer

Image
Roslyn analyzers provide a live static analysis of you code. They can detect wrong usages of APIs, security issues, performance issues etc.. Many of the code editor functionalities are implemented using Roslyn public APIs such as automatic code formatting and coloring, IntelliSense, code navigation, and refactoring. Microsoft wanted to make the C# and VB compiler useful in other scenarios such as diagnostics, static analysis, source code transformation, etc. To achieve that, Microsoft created a compiler that not only converts source code into binaries but also acts as a service, that provides a public API for understanding the code. In this post, we will understand what is Roslyn Analyzer and how it set it up in your system. Table of Contents What is Roslyn Analyzer? Roslyn public API Setting up Roslyn Wrapping Up WHAT IS ROSLYN ANALYZER? Project Roslyn is a part of the .NET Foundation along with other projects like .NET Runtime. Roslyn is an open-source provider of C# and Visual Basic

Understanding of Dockerfile and its commands?

Image
We have used Docker images to create containers and we pull the images from Docker Hub to create containers. But in this article,  we will see how docker images are creating and what commands are using as part of this process. Docker can build images automatically by reading the instructions from a Dockerfile . A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Think of it as a shellscript. It gathered multiple commands into a single document to fulfill a single task. build command is used to create an image from the Dockerfile.   $ docker build   You can name your image as well.   $ docker build -t my-image  If your Dockerfile is placed in another path,   $ docker build -f /path/to/a/Dockerfile  Let's first look at below Dockerfile and see those commands. FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src COPY MyMicroservice.csproj . RUN dotnet restore COPY . . RUN dotnet publish -c release -o /app FR

The storage location of Docker images and containers?

  A Docker container consists of network settings, volumes, and images. The location of Docker files depends on your operating system. Here is an overview for the most used operating systems: Ubuntu:  /var/lib/docker/ Fedora:  /var/lib/docker/ Debian:  /var/lib/docker/ Windows:  C:\ProgramData\DockerDesktop MacOS:  ~/Library/Containers/com.docker.docker/Data/vms/0/ In macOS and Windows, Docker runs Linux containers in a virtual environment. Therefore, there are some additional things to know. Docker for Mac Docker is not natively compatible with macOS, so  Hyperkit  is used to run a virtual image. Its virtual image data is located in:   ~/Library/Containers/com.docker.docker/Data/vms/0 Within the virtual image, the path is the default Docker path  /var/lib/docker . You can investigate your Docker root directory by creating a shell in the virtual environment: $ screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty You can kill this session by pressing  Ctrl+a , followed by pressi

How To Set Up an IIS Web Site on Windows Server Docker Containers?

Image
  When you think of containers, it's easy to think of Linux first. Most containers and container workflows are built on Linux, and for obvious reasons. Linux starts faster, takes up less space on disk and doesn't have any licensing costs. However, while Linux containers are the most popular, they are not the only kind of containers out there. Wouldn't it be cool to run Internet Information Services (IIS) in a container, as well? Windows containers Windows containers come in a few different varieties, the most popular being Nano Server and Server Core. Nano Server is the smallest version of Windows available, clocking in at just 256MB. This is a stripped-down version of Windows that has only the essentials necessary to run the operating system. Server Core is significantly larger at about 5GB, but has more tools and capabilities, including the IIS Web server feature. Windows containers run through  Docker for Windows , and are well-suited for migrating legacy systems and Web