
Securing the OAS/Swagger endpoint in dotnet
OpenAPI 3.0 lets you describe how your APIs are protected using various security schemes and their security requirements.
OpenAPI 3.0 lets you describe how your APIs are protected using various security schemes and their security requirements.
The Open API Specification is used to define the contract between the API consumers and the API providers. The specification is based on the JSON schema and is a standard format for describing the data exchanged between the API consumers and the API providers.
This post is a follow up on the Terraform 101 sessions for the Sunshine Coast dotnet user group. The slides and the code from the session are below. Slides Terraform 101 from Pradeep Loganathan Creating a Windows Virtual Machine provider "azurerm" { version = "=2.8.0" features {} } #create the resource group resource "azurerm_resource_group" "rg" { name = "ateam-resource-group" location = "australiaeast" } #create the virtual network resource "azurerm_virtual_network" "vnet1" { resource_group_name = azurerm_resource_group.rg.name location = "australiaeast" name = "dev" address_space = ["10.0.0.0/16"] } #create a subnet within the virtual network resource "azurerm_subnet" "subnet1" { resource_group_name = azurerm_resource_group.rg.name virtual_network_name = azurerm_virtual_network.vnet1.name name = "devsubnet" address_prefixes = ["10.0.0.0/24"] } ##create the network interface for the VM resource "azurerm_public_ip" "pub_ip" { name = "vmpubip" location = "australiaeast" resource_group_name = azurerm_resource_group.rg.name allocation_method = "Dynamic" } resource "azurerm_network_interface" "vmnic" { location = "australiaeast" resource_group_name = azurerm_resource_group.rg.name name = "vmnic1" ip_configuration { name = "vmnic1-ipconf" subnet_id = azurerm_subnet.subnet1.id private_ip_address_allocation = "Dynamic" public_ip_address_id = azurerm_public_ip.pub_ip.id } } ##end creating network interface for the VM ##create the actual VM resource "azurerm_windows_virtual_machine" "devvm" { name = "development-vm" location = "australiaeast" size = "Standard_A1_v2" admin_username = "pradeep" admin_password = "kq7UciQluJt%3dtj" resource_group_name = azurerm_resource_group.rg.name network_interface_ids = [azurerm_network_interface.vmnic.id] os_disk { caching = "ReadWrite" storage_account_type = "Standard_LRS" } source_image_reference { publisher = "MicrosoftWindowsServer" offer = "WindowsServer" sku = "2016-Datacenter" version = "latest" } } ##end creating VM The above code is not at all production ready and was used as part of a live coding exercise to use Terraform to create a Windows VM. The above code creates the VM password as plain text which is not ideal. The password can be generated and printed as an output if necessary. ...
In asp.net core https is enabled by default. The HttpsRedirection middleware class provides the necessary functionality to enforce redirection from http to https.
Dependency injection enables an application to use a key design principle called Loose coupling. Loose coupling enables us to write highly maintainable
GIT branching strategies are conventions, or a set of rules, that describes when branches are created. Choosing the right branching strategy is key to empower development teams to collaborate effectively.
DynamoDb from AWS is a major player in the cloud NoSQL database market. It can scale globally and is blazing fast when used appropriately. There are a bunch of reasons to use Dynamodb locally, the primary ones being development cost and integration testing. DynamoDB does not have a desktop install, however thankfully, AWS has created a Docker image to enable running DynamoDb locally. To run DynamoDb locally pull the docker image using the command ...
Adding configuration to a .Net core Console application to read configuration from a json file, or environmental variables or command line arguments.
HTTPS is a network protocol used to serve up web pages. HTTPS, or HTTP Secure, was designed to secure communications between a client and the HTTP server. It is a protocol that uses a secure connection to transfer data over the internet.
Many moons ago I was working on an online eCommerce platform. The platform used to undergo massive traffic spikes periodically. I was trying to implement a distributed counter. I was using a distributed counter because I wanted to be able to increment the counter on multiple servers. CAP Theorem The CAP theorem was proposed by Eric Brewer. CRDT CRDT stands for conflict-free replicated datatype. Conflict-free replicated datatype describe data-types that can be replicated across multiple computation units or nodes, they can be updated concurrently without any coordination, and then merged to get a consistent state. It doesn’t matter in which order you execute operations on the data type or if you repeat operations the result is eventually correct. Each node in a distributed system has its own replica of the CRDT. Each replica can resolve queries in isolation and can also process commands that immediately alter its state. CRDTs they can be concurrently updated across nodes and any conflicts can be resolved sensibly. CRDTs always have a merge function that can take many data entries living on different nodes and merge these automatically into one consistent view of the data, without any coordination between the nodes. CRDTs allow two conflicting updates to be merged. All replicas will converge to the same state when all updates have been delivered. The most important properties of the merge function are that it is symmetric and monotonic. The issue that CRDTs address is conflict resolution when different versions of the structure appear due to network partitions and their eventual repair. For a general data structure, if there are two conflicting versions, the solution is either to choose one (according to some general rules, like take the random one or the latest one, or application-specific logic) or to keep both versions and defer conflict resolution to the client code. CRDTs are conflict-free, that is, the structures are devised so that any conflict is resolved automatically in a way that doesn’t bring any data loss or corruption. ...