STS Test Signing Service
Document reference: D.03.07.00012
The following document describes how to configure the .Net-based Test Signing Service. After completing this guide, the .Net-based Test Signing Service will be configured.
It is assumed that the reader is a .Net-developer knowledgeable in the technologies used to develop this .Net-based sample, including:
- C#
- Microsoft.Net framework v4.5
- Microsoft Windows Server Operating System
- Microsoft Internet Information Systems (IIS)
- HTTP and HTTPS
- X509v3 Certificates
To use this sample do the following:
- Either clone the repository https://github.com/Safewhere/STSTestSigningService.git to
C:\STSTestSigningService, or unpack the provided zip-fileSTSTestSigningService.ziptoC:\STSTestSigningService. - Open
C:\STSTestSigningService\Kombit.Samples.STSTestSigningService.slnin Visual Studio, and build the solution. - Make sure an SSL certificate that covers the DNS name
ststestsigningservice.projekt-stoettesystemerne.dkis present inLocalMachine\Mycertificate store. - Open the Hosts-file, and map the DNS name
ststestsigningservice.projekt-stoettesystemerne.dkto127.0.0.1. - Create a new IIS web application:
- The
Site nameshould beststestsigningservice.projekt-stoettesystemerne.dk - The
Physical pathshould beC:\STSTestSigningService\Kombit.Samples.STSTestSigningService - The
Binding typeshould beHTTPS - The
Host nameshould beststestsigningservice.projekt-stoettesystemerne.dk - Select an appropriate SSL certificate, that matches the host name chosen in the previous step
- The
- Grant the application pool identity for the web application read and execute permissions to
C:\STSTestSigningService\ - Import the certificate
C:\STSTestSigningService\Certificates\certificate.p12toLocalMachine\My. - Assign the application pool identity for the web application read permissions to the private key for the certificate imported in the previous step.
- Open a browser and point it to https://ststestsigningservice.projekt-stoettesystemerne.dk
A few properties in the configuration file, web.config, for STSTestSigningService may need to be updated. The configuration file is located in C:\STSTestSigningService\Kombit.Samples.STSTestSigningService\web.config.
The following parameters can be changed:
SigningCertificateThumbprintThe thumbprint of a certificate with private key that is used to sign the updated token. The certificate must exist inLocalMachine\My.serilog:minimum-levelSpecifies the level of logging. Log files are stored in theLogs\folder.owin:AutomaticAppStartupTell the application that it should use OWIN middleware when hosting under IIS. This setting should be true.
This service supports an interactive API documentation based on Swagger 2.0 (Open API) specification.
After setting up the application, open the file Content\api-docs.json file and change the "basePath": /{application endpoint}/api setting to /api/