How to create machine keys over IIS? - iis

I have created machine key over IIS for some purpose. However I am worried what happens if I push new build over server.
Will my machine keys be removed as I have created them on server directly?
Also, I have created machine key on the server name directly. I think if you do this machine keys will be applied to all the websites created under server. If not then what is right way.
My settings are as follows.
Machine key settings on server
Please help.

If you have created machine key for a website, it would be added under system.web section in your web.config. After pushing new built will remove your old machine key as your web.config file will also replace. You can backup your machine key and use later.
Machine key contains below sections:
Encryption Method
Decryption Method
Validation Key
Decryption Key
After replacing you built you can create machine key again using same protocols and keys (from backed-up machine key) with GUI or simply copy past under system.web section in your web.config.

Related

Signing files with Azure Key Vault + AzureSignTool

I have a program (.msi file) that is being built on a remote machine that I have no physical access to. The program is supposed to be distributed to users with Windows machines, however, in order to prevent the Smart Defender popup, I need to sign the installer with EV Code Signing certificate.
In order to implement the code signing on the remote machine that I am using right now, I was thinking about using Azure Key Vault along with AzureSignTool.exe, however, I am not sure whether this setup is reasonable. Is there anybody who had any experience with such a setup and could let me know how well it works?
I have also seen that in the Azure Key Vault there is a Managed HSM Pool option, however, I couldn't find much information on what that is. Am I ever going to need that or can I just simply ignore it?

MSSQL_CERTIFICATE_STORE Operation is not supported on this platform

I'm working with a .NET Core 3.1 application (C#) and facing the error message like this when I sent requests to a docker container insides ubuntu server:
"Failed to decrypt a column encryption key using key store provider: 'MSSQL_CERTIFICATE_STORE'. The last 10 bytes of the encrypted column encryption key are: 'xx-xx-xx-xx-xx-xx-xx-xx-xx-xx'.\nOperation is not supported on this platform."
According to this link (https://learn.microsoft.com/en-us/sql/connect/odbc/using-always-encrypted-with-the-odbc-driver?view=sql-server-ver15), it seems like Linux doesn't contain MSSQL_CERTIFICATE_STORE and force me to use Azure Key Vault Store.
My question is 'Is it possible to integrate MSSQL_CERTIFICATE_STORE and Linux environment without using the Azure Key Vault Store?'
If you want to still use Windows Certificate Store in Linux environment, we need to configure it on Windows machine, export the certificate and install it on the Linux machine. For more details, please refer to the article
Meanwhile, for Linux client application, we can use Azure Key Vault Store with ODBC driver. Besides, if you do not want to use Azure Key Vault Store, you can use Custom store providers with ODBC driver. For more details, please refer to the document and the document

Publishing a database project with Always On Encryption and Azure Key Vault

I have an existing SQLAzure database. We are developing a new feature and need to have column level encryption. I am researching how to set this up.
We currently push changes to our local and to production via a database project. A simple right click > publish.
When I do this in my local environment after setting up the column encryption with the key stored in the Azure Key Vault, I receive the following error.
Cannot proceed as Key Vault support is not present in the current
application. For Key Vault support during deployment, install
DacFramework.msi and run SqlPackage.exe from its install location.
I've done that and still receive the same error.
Is it possible to maintain the right click publish functionality with the column level encryption or will I need to create an external script to set this up from now on?
It is possible that the newly updated hosted agent has a newer version of the DAC framework installed which is taking precedence over the full version that was installed separately, or else there is some other sort of discrepancy between the two and your system is trying to use the older version of the framework. It is also possible that some of your VMs have the framework and others do not, and this is causing that error.
There is a known issue with that error message that the product team is working on. See also, the user voice item.
Can you provide any of your error logs for further troubleshooting?
I would also recommend sending an email with your subscription ID to AzCommunity#microsoft.com so that I can open a support case for you. It will be easier to diagnose with more insight into your environment.

How to create TenantEncryptionCert in IIS on Azure VM?

I want to create TenantEncryptionCert in IIS's Server Certificates.
I want to know the create step by step.
As Rossano Vitulli-MSFT says in this answer. The TenantEncryptionCert certificates are used by the Azure Guest Agent (GA) & extensions.
The certificate is automatically created and managed by the GA.GA checks for the presence of certificate on startup / update. If you delete it, or if it’s not there for other reasons, then it’ll create a new one.

Windows Azure Web Role PublishSettings file purpose

As part of deployment we need to create publish settting file or self signed certificate.
Could someone please help me understand why we need this? To encrypt every request from given machine or any machine?
To publish a deployment from a tool (Visual Studio, PowerShell, or custom using the Service Management API), you will need to authorize that tool to work with Windows Azure. If you deploy via the Windows Azure management portal, this isn't needed because it knows you (via your authenticated Microsoft Account).
That authorization comes in the form of an X509 certificate. Like you mentioned, you can create it yourself, or you can have Windows Azure create one for you in the form of a .publishsettings file. That file contains an encoded X509 certificate. When you import that file into a tool like Visual Studio or the PowerShell cmdlets, the certificate is installed to your local certificate store. Then it can be used to authenticate requests between your machine and Windows Azure.
As for how to manage the certs, I typically prefer to have at least one per machine. I think it makes it easier to remove a cert if I need to, and not impact other machines I'm using. But, that's really up to you.
I always assumed the certificate was needed to authenticate the right to publish
(you don't want just anybody being able to deploy to your site)

Resources