Posts

Showing posts with the label IIS

Hashicorp Vault behind IIS

Image
Hashicorp Vault behind IIS Last week I talked about Hashicorp Vault and how it could be used to store secrets . Today I will continue on the same line and show how we can host Vault behind IIS and use what we learnt in the previous post to retrieve secrets from ASP.NET Core. Setup Vault Read secrets from Vault from ASP.NET Core 1. Setup Vault Vault is a webserver which comes with a complete API. In this example, we will show how to setup Vault and proxy calls from IIS to Vault. 1.1 Boot Vault To begin with, we can follow the same steps described in my previous post - Hashicorp Vault and how it could be used to store secrets . As a quick overview, here are the steps to be executed inside Windows Server: download Vault create the config.hcl file run the command vault.exe server -config=config.hcl In config.hcl, we configured Vault to listen on http://localhost:8200 so the next thing to do is to proxy calls from IIS to Vault process. 1.2 Configure IIS to direct calls to...

Let’s Encrypt for ASP.NET Core application on IIS

Image
Let’s Encrypt for ASP.NET Core application on IIS Few weeks ago we saw how we could generate a SSL cert for free using a browser based ACME implementation . While doing that, we had some manual process for the verification to happen, either by changing the DNS settings or making a key available on an endpoint and at the end we were handling the key to upload it to our server. Today we will see how we can achieve that with an automated verification process and without manual handling of the secrets using IIS and win-acme . Register application on IIS Setup SSL with win-acme 1. Register application on IIS ASP.NET Core runs on top of Kestrel. Kestrel was designed to be fast and lightweight therefore does not have all the functionalities that other application servers provide like IIS, Apache or nginx. Therefore for Windows Server, it is recommended to place Kestrel behind IIS. For example, one of the reason why is that only one application can listen to the HTTP port at a time on ...