developer’s or SysOps’ workspace onto an IIS instance. The actual mechanism is well documented in
the ASP.NET community and is out-of-scope for this document, but an overview of this technology
can be found here.
Security best practices call for always encrypting sections of a configuration file which contain
sensitive information, e.g., credentials or other secrets. This improves security by making it difficult for
unauthorized access even if an attacker gains access to your configuration file. The same principle
applies to this application.
The .NET Framework includes two protected built-in configuration providers that can be used to
encrypt sections of a configuration file. The RsaProtectedConfigurationProvider class uses the
RSACryptoServiceProvider to encrypt configuration sections. The
DpapiProtectedConfigurationProvider class uses the Windows Data Protection API (DPAPI) to
encrypt configuration sections. However, given the expense reporting application’s required usage of
integrated security and impersonation, RSACryptoServiceProvider is not a suitable choice as it would
require granting access to the RSA Key Container used for encryption to a large group of users.
Encryption of Sensitive Data as part of Deployment Process
One of the major downsides of using the DpapiProtectedConfigurationProvider is the fact that it’s not
the default Configuration Provider used by Web Deploy, and therefore it is not able to automatically
encrypt sensitive data as part of the deployment process. After a bit of research, the Magenicons
development staff comes up with a solution that will be able to build, deploy and encrypt sensitive
data (on the deployed server) with one single call to MSBuild. The solution calls for leveraging
PowerShell’s Invoke-command cmdlet, which has the ability to run commands on local or remote
computers. Combining this capability with MSBuild’s extensible feature of embedding scripts for
various build and deployment events (in this case, after ‘MSDeployPublish’), the team is able to
optimize the build/deployment process while enhancing the security of the application.
Phase Two
Creating the SQL Server AlwaysOn Availability Groups
Enterprise SQL Server workloads require support for HA and DR. AlwaysOn Availability Groups is
SQL Server’s flagship HA/DR solution. This technology provides hot-standby for the servers and
duplicate data for the database. AlwaysOn can also provide read-only access to one or more
secondary replicas, alleviating load from the primary database in reporting and other read-only
scenario.
For these reasons, Magenicons’ IT staff selects this technology to achieve the project’s HA
requirement. Coincidentally, Google recently added support for SQL Server AlwaysOn Availability
Group on Compute Engine.
In planning for the installation for AlwaysOn Availability Groups, there are several requirements one
needs to pay special attention to.
1. At the current time, AlwaysOn Availability Groups can only be installed and supported in a
GCP subnet network type. It can not be installed in a legacy network. Moreover, the subnet
network must be in custom mode and not the default auto mode (details on the difference in
© 2017 Google Inc. All rights reserved. Google and the Google logo are trademarks of Google Inc. All other company and product names may be trademarks of
the respective companies with which they are associated.
10