Update certificate metadata for AuthServices
The appsettings configuration schema for AuthServices was changed in 7.11 to enable obtaining self-signed certificates from the Windows Certificate Store or invalid certificates from third-party vendors. Due to this change, the certificate metadata in the appsettings.json file must be modified after deployment.
You can still obtain the certificate from the Windows Certificate Store or from a disk. Set the ValidCertsOnly parameter to false to obtain self-signed and invalid certificates.
- Obtain a valid certificate.
- Import the valid certificate to the WINDOWS local store.
- Open the certificate file and capture the Thumbprint and Passcode.
- Open theappsettings.jsonfile found atAtHocENS\wwwroot\AuthServices\Auth\appsettings.json.It is possible to add multiple certificate files, but you should add only one certificate file.
- Update theappsettings.jsonfile with one of the following:
- To configure the certificate from a file system, use the following text:{"Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Error", // Trace, Debug, Information, Warning, Error, Critical, None "System": "Information", "Microsoft": "Information" } }, "Certificates": [ { "CertificateLocation": "FileSystem", // Location: FileSystem, CertificateStore "RelativeFilePath": ".\\wwwroot\\Certificates\\TokenSigningCertificate.pfx", "Passcode": "<passcode>" }, ], "AllowedHosts": "*"}
- To configure the certificate from the Windows Certificate Store, use the following text:{"Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Error", // Trace, Debug, Information, Warning, Error, Critical, None "System": "Information", "Microsoft": "Information" } }, "Certificates": [ { "CertificateLocation": "CertificateStore", "StoreName": "Root", // My (Personal), Root (Trusted Root), AddressBook, AuthRoot, CertificateAuthority, TrustedPeople, TrustedPublisher, Disallowed "StoreLocation": "LocalMachine", // CurrentUser, LocalMachine "Thumbprint": "<thumbprint>", "Passcode": "<passcode>", "ValidCertsOnly": true // for getting debug or development certificates } ], "AllowedHosts": "*"}
- Update the values for Thumbprint and Passcode with the values you captured in Step 3.
- Save and close theappsettings.jsonfile.