Provision certificates to Microsoft SQL Server¶
Provision a certificate from Certificate Manager - SaaS to a Windows server that runs Microsoft SQL Server. Certificate Manager - SaaS installs the certificate in the server's Personal certificate store, and it can also set the certificate as the network certificate of one or all SQL Server instances on the server.
Before you begin¶
- A Microsoft SQL Server machine that you created and whose status is Verified.
- The certificate to provision in the Certificate Manager - SaaS inventory, with its private key.
- The System Administrator or PKI Administrator role, or the Resource Owner role and membership in the machine's owning team.
- To apply the certificate to a SQL Server instance, the dbatools PowerShell module installed on the server.
To provision a certificate to Microsoft SQL Server¶
- Sign in to Certificate Manager - SaaS.
- Click Installations > Machines.
- Click the more options button at the end of the machine's row, and then select Provision.
-
In Search a certificate by name, expiration or fingerprint, enter part of the certificate's name, expiration date, or fingerprint, and then select the certificate from the results. Confirm that it's the right certificate by checking Subject DN, Validity, and Certificate SHA1 Fingerprint.
The rest of the Provision a certificate dialog appears after you select a certificate.
-
Under Certificate Information, leave CAPI Store set to Personal. It's the only option.
- In Friendly Name, enter the name the certificate shows in Windows. You can use letters, numbers, spaces, hyphens (-), underscores (_), periods (.), asterisks (*), and parentheses.
- (Optional) To let the private key be exported from the server after installation, enable Allow Private Key to be Exported. By default, the private key isn't exportable.
- (Optional) To apply the certificate to SQL Server, under Installation Endpoint, enable Sets the network certificate for SQL Server instance. It's disabled by default. If you leave it disabled, Certificate Manager - SaaS installs the certificate in the certificate store only.
-
If you enabled the SQL Server option, in SQL Server instance, enter the instance to apply the certificate to:
COMPUTERNAME\INSTANCEapplies it to that instance only.COMPUTERNAME, or the default,localhost, applies it to every SQL Server instance that Certificate Manager - SaaS finds on the server.
-
(Optional) To skip restarting SQL Server, disable Restart the SQL Server instance. It's enabled by default. When you name an instance, Certificate Manager - SaaS restarts only that instance's service. Otherwise, it restarts every SQL Server service on the server that isn't disabled.
Note
SQL Server starts using the new certificate only after the instance restarts.
-
(Optional) To save the installation without pushing the certificate now, disable Push certificate on save.
-
Click Save. To save and then provision another certificate, click Save & New.
Does your organization enforce PowerShell script signing?
Certificate Manager - SaaS installs certificates on the server by running PowerShell scripts over WinRM. The scripts are signed with the Palo Alto Networks code signing certificate. If your organization requires signed PowerShell scripts, add this certificate to the Trusted Publishers store on the server. Your Active Directory administrators typically distribute trusted publisher certificates through Group Policy.
The certificate in PEM format:
-----BEGIN CERTIFICATE----- MIIHkjCCBXqgAwIBAgIQBgA2T7ITSsnbtRYegJ4l6DANBgkqhkiG9w0BAQsFADBp MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xQTA/BgNVBAMT OERpZ2lDZXJ0IFRydXN0ZWQgRzQgQ29kZSBTaWduaW5nIFJTQTQwOTYgU0hBMzg0 IDIwMjEgQ0ExMB4XDTI2MDkyNDAwMDAwMFoXDTI3MDkyMzIzNTk1OVowgZkxCzAJ BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRQwEgYDVQQHEwtTYW50YSBD bGFyYTEhMB8GA1UEChMYUGFsbyBBbHRvIE5ldHdvcmtzLCBJbmMuMRkwFwYDVQQL ExBFbmdpbmVlcmluZyBWYWFTMSEwHwYDVQQDExhQYWxvIEFsdG8gTmV0d29ya3Ms IEluYy4wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXEoMfbTbxsvVa m0u6eml6k/yHeA9r0yUamSW0LSOUuLzGpuq0lvuzolkMYGRqlPFXDDdOKali4HyH sq/xTll1UqUXfETXD/c3OMcZHStIwaWAlo5KhvffZs9qHvZ5WHB0gSoDJjUY7nM2 TgAG6T+9xAdUFRVREMzgjFLV3LoILx4LCDhQwQndk+dMY8ngrkrE//N/G2ad15kn G6MEIsOTORUqXMs/9LTEkr65tUamAFOPkszlcnAQ1xmRzkCSFxw4N2LVSCWIxmrZ 0im9/pVTXwR4XaG7R1QyzIX/wMN/cYrglJgOVt+6IbIG/S68NGZH9g5LYL2EcTP4 Ki/3x3zEEi8UJ6IJ82tfv5e/Yr7hFg9Exzaau6rmIylr+IrjIcT0SJPX95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5n9BGoXdrD6gJgKXJVYYsAVZpe+S3V0XDqi5N5PgR lw74Jr5IbPSQfrgWgL9hkMzBMoIT4R9YsAQ0lQFREgexuZhVnZXViWc7WwpSBs62 1j+kE3E7zhCFiibnXvMjgVuAXls6SlikGuvdD/Pex7ZECz3IsS7Pf6CbqYbznTTf 9dXIKGPyMoZDLGmedDvCQWeubqS1k9lUIv06knKZw6EY/LXENSb15kzrkF6/MfHE aGDpxUsLGL8DIK0kAjl2brwBWrhdVc6OPJp4SZXqjm9+/ZhC6dQQclVTb29BToug nN3IRBXtqHdXDkj0IEUYVuwLCx9P1IpMqOoXsDZp+CwCi6jy6jIflWpDv/5NRnZs iXKTbddsJLlrO21uNJusmhZcKFkq0prIoFuL6/yImG8DJ/UQGxISoGpfeURHI9JA V64jCRaJuydeeVENS6wm429WfgQ/fARxFg7YPRTwbHwurGQzHT/03Z2eiNgRnoi2 xmApiycAIEu1bOdBGYZ9nUHRuoVRnESYAiNCqW3c7DqIIRpPAoCSYsBx8mPWknX8 nXJHUFzFKDNH/j86tS43wmCgKPDW+zdarepfEmrg+lpUE3OhIHBnrB0qRxEU4N0Y fX7EDfCAv7velGAWDsLxrAPmCcoGhA== -----END CERTIFICATE-----
After you save, an installation appears on the machine's Installations tab. Certificate Manager - SaaS installs the certificate in the Personal store and its issuing chain in the server's intermediate and trusted root certificate stores. If the certificate is already in the store, Certificate Manager - SaaS updates its friendly name. If you enabled the SQL Server option, Certificate Manager - SaaS then sets the certificate as the network certificate of the instances you chose and restarts them if Restart the SQL Server instance is enabled. If dbatools isn't installed, provisioning fails after the certificate is installed in the store. To provision on a schedule instead of right away, set up a machine provisioning schedule.