OpenID Connect server
OpenID Connect server allows to authenticate users in the Axidian Certiflow web applications using the OpenID Connect protocol.
It is mandatory for Axidian Certiflow Linux installations and optional for Windows installations. Install the OpenID Connect server before you install the Axidian Certiflow server.
OpenID Connect (OIDC) is an authentication and authorization protocol built on OAuth 2.0, which adds an identity layer to the OAuth framework. It enables applications to verify a user's identity and obtain basic profile information about them from an Identity Provider (IdP).
Follow the instructions for the operating system of the workstation where you plan to install the Axidian CertiFlow server.
- Windows
- Linux
- To install the OIDC server, run the AxidianCertiFlow.Oidc.Server-<version number>.x64.en-us.msi file.
- Install the Axidian CertiFlow server and select the OpenID Connect Authentication access control method in the server installation wizard.
- Prepare a JWT signing certificate by following the instructions below.
- Configure the OIDC server settings in the Configuration Wizard (Access Control → OpenID Connect).
- Apply the settings on the Axidian CertiFlow server.
Prepare a JWT signing certificate
Use the web server certificate as the signing certificate.
To prepare the signing certificate:
- Install the signing certificate in the Local Computer – Personal store.
- Grant the IIS full access to the signing certificate's private key.
- Open the Certificates snap-in on the workstation where the OIDC server is installed.
- Right-click the certificate, select All tasks → Manage Private Keys... and click Add.
- In the Location menu, specify the server.
- In the Enter the object names to select field, specify the local group IIS_IUSRS, click Check Names, and OK.
- Set the permissions to Full Control and Read.
- Click Apply.
Edit database settings
By default, the OIDC server writes data to a local SQLite database. The SQLite database is intended for installations with a single Axidian CertiFlow server. The OIDC server's data is stored in the C:\inetpub\wwwroot\certiflow\oidc\data catalog.
Other than SQLite, you can use a Microsoft SQL or PostgreSQL database. To configure the connection to Microsoft SQL or PostgreSQL, edit the OIDC server's configuration file appsettings.json.
- Microsoft SQL
- PostgreSQL
- Create a database in SQL Server Management Studio.
- Open the OIDC server's configuration file appsettings.json and edit the
defaultConnectionandprovidersections. The following example uses SQL authentication for the database connection."defaultConnection": "Data Source=0;Initial Catalog=oidcdb;Persist Security Info=True;User ID=servicesql;Password=p@ssw0rd;TrustServerCertificate=True""provider": "mssql"
- Restart the Axidian CertiFlow OIDC application pool to apply the changes.
- Open the Internet Information Services (IIS) Manager and select Application Pools in the left menu.
- Select the Axidian CertiFlow OIDC application and click Recycle in the right menu.
Example parameters for connecting to Microsoft SQL
"connectionStrings": {
"defaultConnection": "Data Source=0;Initial Catalog=oidcdb;Persist Security Info=True;User ID=servicesql;Password=p@ssw0rd;TrustServerCertificate=True"
},
"database": {
"provider": "mssql"
},
- Create a database in PostgreSQL.
- Open the OIDC server's configuration file appsettings.json and edit the
defaultConnectionandprovidersections. If you are using a .pgpass file, do not include thePassworddirective in the connection string."defaultConnection": "Host=172.17.0.11;Port=5432;Database=oidcdb;Username=servicepg;Password=p@ssw0rd""provider": "pgsql"
- Restart the Axidian CertiFlow OIDC application pool to apply the changes.
- Open the Internet Information Services (IIS) Manager and select Application Pools in the left menu.
- Select the Axidian CertiFlow OIDC application and click Recycle in the right menu.
Example parameters for connecting to PostgreSQL
"connectionStrings": {
"defaultConnection": "Host=172.17.0.11;Port=5432;Database=oidcdb;Username=servicepg;Password=p@ssw0rd"
},
"database": {
"provider": "pgsql"
},
- Install the Axidian CertiFlow server. The OIDC server is part of the Axidian CertiFlow server.
- Prepare a JWT signing certificate by following the instructions below.
- Configure the OIDC server settings in the Configuration Wizard (Access Control).
- Apply the settings on the Axidian CertiFlow server.
Prepare a JWT signing certificate
Use the web server certificate as the signing certificate.
To prepare the signing certificate:
Create a subcatalog in the home catalog of the user account configured to run the OIDC server (www-data by default).
sudo mkdir -p /var/www/.dotnet/corefx/cryptography/x509stores/my/How to check if the www-data user exists
To check if the www-data user exists, run the following command:
/etc/passwd | grep www-dataExample output if the www-data user existswww-data:x:33:33:www-data:/var/www:/usr/sbin/nologinIf the www-data user does not exist, you can create it or change the user for running the Axidian CertiFlow services.
To create the www-data user and log in, run the following command:
sudo useradd -m -d /var/www -s /usr/sbin/nologin www-data
sudo su -s /bin/sh www-dataTo log in as any other user, run the following command and specify the username in the
Userdirective./etc/systemd/system/certiflow-<service name>.service
Merge the certificate file and the key file into a PFX file. Place the PFX file in a subcatalog of the user's home catalog.
cautionWhen you run the command, the openssl utility prompts you to set a password for the PFX file. Leave the PFX file without a password: press Enter twice.
sudo openssl pkcs12 -export -out /var/www/.dotnet/corefx/cryptography/x509stores/my/PFXFILE.pfx -inkey SSL.key -in SSL.crtSet the 600 permission for the PFX file.
sudo chmod 600 /var/www/.dotnet/corefx/cryptography/x509stores/my/PFXFILE.pfxObtain the signing certificate's thumbprint.
sudo openssl x509 -fingerprint -in SSL.crt -noout | tr -d ':'Example of a certificate thumbprint output:SHA1 Fingerprint=ADB613EC1A1692310D83C81F269C098A3DBD4EE0
Edit database settings
By default, the OIDC server writes data to a local SQLite database. The SQLite database is intended for installations with a single Axidian CertiFlow server. The OIDC server's data is stored in the /opt/axidian/certiflow/oidc/data catalog.
Other than SQLite, you can use a Microsoft SQL or PostgreSQL database. To configure the connection to Microsoft SQL or PostgreSQL, edit the OIDC server's configuration file appsettings.json.
- Microsoft SQL
- PostgreSQL
Create a database in SQL Server Management Studio.
Open the OIDC server's configuration file appsettings.json and edit the
defaultConnectionandprovidersections. The following example uses SQL authentication for the database connection."defaultConnection": "Data Source=0;Initial Catalog=oidcdb;Persist Security Info=True;User ID=servicesql;Password=p@ssw0rd;TrustServerCertificate=True""provider": "mssql"
Restart the OIDC service to apply the changes.
sudo systemctl restart certiflow-oidc.service
Example parameters for connecting to Microsoft SQL
"connectionStrings": {
"defaultConnection": "Host=0;Port=5432;Database=oidcdb;Username=servicesql;Password=p@ssw0rd"
},
"database": {
"provider": "mssql"
},
Create a database in PostgreSQL.
Open the OIDC server's configuration file appsettings.json and edit the
defaultConnectionandprovidersections. If you are using a .pgpass file, do not include thePassworddirective in the connection string."defaultConnection": "Host=172.17.0.11;Port=5432;Database=oidcdb;Username=servicepg;Password=p@ssw0rd""provider": "pgsql"
Restart the OIDC service to apply the changes.
sudo systemctl restart certiflow-oidc.service
Example parameters for connecting to PostgreSQL
"connectionStrings": {
"defaultConnection": "Host=172.17.0.11;Port=5432;Database=oidcdb;Username=servicepsql;Password=p@ssw0rd"
},
"database": {
"provider": "pgsql"
},