IIS Deployment Platform Installation
This guide serves as a walkthrough of how to deploy v5 on IIS.
Table of Contents
Table of Contents |
---|
Overview and Prerequisites
Cinchy version 5 on IIS comes bundled with common components such as Connections, Meta Forms, and the Event Listener. This page details the configuration and deployment instructions for the Cinchy Platform, including SSO. Click on the links below to be taken to the appropriate pages for other components:
Ensure that you review the prerequisites listed here prior to performing an IIS Deployment, including downloading all necessary artifacts from the Cinchy Releases Table.
Please contact Cinchy Support if you do not have the credentials required to access the artifacts table.
Step 1 of this guide refers to the SQL Server. Step 2 onwards refers to the Web Server.
1. Create a Database
On your SQL Server 2017+ instance, create a new database named Cinchy (or any other name you prefer).
If you choose an alternate name, in the remaining instructions wherever the database name is referenced, replace the word Cinchy with the name you chose.
A single user account with db_owner privileges is required for the Cinchy application to connect to the database. If you choose to use Windows Authentication instead of SQL Server Authentication, the account that is granted access must be the same account under which the IIS Application Pool runs.
2. Create an IIS Application Pool
On the Windows Server machine, launch an instance of PowerShell as Administrator.
Run the below commands to create the application pool and set its properties.
3. If you chose to use Windows Authentication in the database or want to run the application under a different user account, execute the below commands to change the application pool identity.
You may use an alternate application pool name (i.e. instead of Cinchy) if you prefer.
3. Create the Application Directories
Unzip the "Cinchy vX.X" application package (for the Cinchy Platform) that you downloaded from the Releases Table into your C drive. This will create 2 directories, C:\Cinchy and C:\CinchySSO. Ensure your application pool accounts has read and execute access to these directories (default accounts are IIS AppPool\CinchyWeb and IIS AppPool\CinchySSO).
Run the below commands in the Administrator instance of PowerShell to create directories for the application logs. Ensure your application pool account has write access to these directories.
4. Update the CinchySSO appsettings.json
Open the C:\CinchySSO\appsettings.json file in a text editor and update the values below.
4.1 App Settings
1. Under AppSettings section, update the values outlined in the table.
2. Wherever you see <base url> in the value, replace this with the actual protocol (i.e. http or https) and the domain name (or ip address) you plan to use.
Ex:. if you're using https with the domain app.cinchy.co, then <base url> should be replaced with https://app.cinchy.co
Key | Value |
---|---|
CinchyUri | <base url>/Cinchy |
CertificatePath | Adjust the certificate path to point to the CinchySSO v5 folder. Ex: C:\CinchySSO\\cinchyidentitysrv.pfx |
StsPublicOriginUri | The Base URL used by the .well-known discovery. Ex: <base url>/cinchySSO |
StsPrivateOriginUri | The Private Base URL used by the .well-known discovery. Ex: <base url>/cinchySSO |
CinchyAccessTokenLifetime | The duration for the Cinchy Access Token. This determines how long a user can be inactive until they need to re-enter their credentials. In Cinchy v5.4+ it defaults to "7.00:00:00", i.e. 7 days. |
DB Type | Either "PostgreSQL" or "TSQL" |
4.18.0+ includes session expiration based on the CinchyAccessTokenLifetime. So for the default of "7.00:00:00", this means that if you have been inactive in Cinchy for 7 days, your session will expire and you will need to log in again.
Below values are only required for SSO, otherwise leave them as blank
Key | Value |
---|---|
SAMLClientEntityId | Client Entity Id |
SAMLIDPEntityId | Identity Provider Entity Id |
SAMLMetadataXmlPath | Identity Provider metadata XML file path |
SAMLSSOServiceURL | Configure service endpoint for SAML authentication |
AcsURLModule | This parameter is needs to be configured as per your SAML ACS URL. For example, if your ACS URL looks like this - "https:///CinchySSO/identity/AuthServices/Acs", then the value of this parameter should be "/identity/AuthServices" |
4.2 Connection String
In order for the application to connect to the database, the "SqlServer" value needs to be set.
Find and update the value under the "ConnectionStrings" section:
SQL Server Authentication Example:
SQL Server Windows Authentication Example:
If you are deploying Cinchy v5.4+ on an SQL Server Database, you will need to make an addition to your connectionString. Adding TrustServerCertificate=True will allow you to bypass the certificate chain during validation.
Example:
4.3 External Identity Claim Section
Under the "ExternalIdentityClaimSection" section you'll see the following values.
These values are used for SAML SSO. If you are not using SSO, keep these values as blank
Key | Value |
---|---|
ExternalIdentityClaim > FirstName > ExternalClaimName | |
ExternalIdentityClaim > LastName > ExternalClaimName | |
ExternalIdentityClaim > Email > ExternalClaimName | |
ExternalIdentityClaim -> MemberOf -> ExternalClaimName |
4.4 Serilog
There is a "serilog" property that allows you to configure where it logs to. In the below code, update the following:
"Name" must be set to "File" so it writes to a physical file on the disk.
Set "path" to the file path to where you want it to log.
This configuration makes a log every day (defined by the "rollingInterval" value) and keeps your file count to 30 (defined by the "retainedFileCountLimit" value).
5. Update the Cinchy appsettings.json
Navigate to C:\Cinchy
Navigate to the appsettings.json file and update the following properties:
5.1 AppSettings
Key | Value |
---|---|
StsPrivateAuthorityUri | This should match your private Cinchy SSO URL. Ex: <baseURL>/CinchySSO |
StsPublicAuthorityUri | This should match your public Cinchy SSO URL. Ex: <baseURL>/CinchySSO |
CinchyPrivateUri | This should match your private Cinchy URL. Ex: <baseURL>/Cinchy |
CinchyPublicUri | This should match your public Cinchy URL. Ex: <baseURL>/Cinchy |
UseHttps | This is "true" by default. |
DB Type | Either "PostgreSQL" or "TSQL" |
“MaxRequestBodySize” | This capability was introduced in Cinchy v5.4 This configurable property to allow you to set your own file upload size for the Files API, should you wish. It is defaulted to 1G. |
5.2 Connection String
In order for the application to connect to the database, the "SqlServer" value needs to be set.
Find and update the value under the "ConnectionStrings" section:
SQL Server Authentication Example:
SQL Server Windows Authentication Example:
If you are deploying Cinchy v5.4+ on an SQL Server Database, you will need to make an addition to your connectionString. Adding TrustServerCertificate=True will allow you to bypass the certificate chain during validation.
Example:
5.3 Serilog
There is a "serilog" property that allows you to configure where it logs to. In the below code, update the following:
"Name" must be set to "File" so it writes to a physical file on the disk.
Set "path" to the file path to where you want it to log.
This configuration makes a log every day (defined by the "rollingInterval" value) and keeps your file count to 30 (defined by the "retainedFileCountLimit" value).
6. Create the IIS Applications
Open an administrator instance of PowerShell
Execute the below commands to create the IIS applications and enable anonymous authentication. (This is required in order to allow authentication to be handled by the application)
To enable HTTPS, the server certificate must be loaded and the standard IIS configuration completed at the Web Site level to add the binding.
7. Test the Application
Access the <base url>/Cinchy (e.g. http://app.cinchy.co/Cinchy) through Google Chrome.
Once the login screen appears, enter the credentials:
The default username is admin and the password is cinchy.
You will be prompted to change your password the first time you log in.
To avoid users from having to access the application at a url that contains /Cinchy, you can use a downloadable IIS extension called URL Rewrite to remap requests hitting the <base url> to <base url>/Cinchy. The extension is available here.
8. Next Steps
Navigate to the following sub-pages to deploy the following bundled v5 components:
Last updated