Origam uses two certificates to protect authentication tokens from version 2026.9: one for signing token payloads and ID tokens, and one for encrypting access-token, refresh-token, and authorization-code payloads.
Use separate RSA certificates containing their private keys. Self-signed certificates are suitable; these are separate from HTTPS certificates and from the ASP.NET Core Data Protection keys used for cookies and password-reset links. See OpenIddict’s certificate guidance.
All settings below belong to OpenIddictConfig in appsettings.json. Choose either both thumbprints or both file paths; they cannot be combined. If neither is supplied, FallbackGeneratedCertificateDirectory is used when configured.
Keep backups and plan certificate renewal before expiration. Losing or replacing the keys makes existing protected tokens unusable, so users may need to sign in again. Automatic overlapping key rotation is not currently configurable in Origam.
IIS
Recommended: Windows certificate store
Use the Local Computer → Personal certificate store, as recommended by OpenIddict for IIS. Windows manages private-key permissions, and keys can be imported as non-exportable. Origam can use the keys without keeping a PFX file or its password in the application configuration. This makes it more difficult for a potential attacker to steal the certificates.
-
Prepare signing and encryption PFX files containing their private keys. On Windows, copy Origam’s
backend/scripts/create-token-certificates.ps1to a private working directory and run it there (Windows PowerShell 5.1 with .NET Framework 4.7.2 or later, or PowerShell 7):.\create-token-certificates.ps1This creates two certificates valid for two years and saves
signing.pfx,encryption.pfx,signing-password.txt, andencryption-password.txtin the current directory. It does not add certificates to a store; import them separately as described below. -
Run
certlm.mscas administrator. Right-click Personal → Certificates, choose All Tasks → Import, and import each PFX using its password. Select Personal as the destination. Do not check Mark this key as exportable. -
For each imported certificate, choose All Tasks → Manage Private Keys and grant Read access to the application-pool identity, for example
IIS AppPool\Origam. If the pool uses a custom account, grant access to that account. -
Open each certificate’s Details tab and copy its Thumbprint, removing spaces. Configure:
{ "OpenIddictConfig": { "SigningCertificateThumbprint": "<signing-thumbprint>", "EncryptionCertificateThumbprint": "<encryption-thumbprint>", "CertificateStoreLocation": "LocalMachine", "CertificateStoreName": "My" } } -
Leave both certificate paths unset and restart Origam. Check the
Origam.Server.TokenCertificatesstartup message for the source, thumbprints, and expiration dates.
LocalMachine and My are the defaults; My means Personal. Store loading does not use the certificate-password settings or require the IIS user profile. Keep secure backups of the PFX files and passwords, then remove unnecessary working copies from the server.
Alternative: certificate files
Keep PFX files outside web-served folders and application deployment directories, for example under C:\ProgramData\Origam\MyProject\certificates. Restrict access to administrators and the application identity; Origam only needs read access. Keep certificates and passwords out of source control.
{
"OpenIddictConfig": {
"SigningCertificatePath": "C:\\ProgramData\\Origam\\MyProject\\certificates\\signing.pfx",
"EncryptionCertificatePath": "C:\\ProgramData\\Origam\\MyProject\\certificates\\encryption.pfx"
}
}
Leave both thumbprints unset. Paths may also be relative to the server’s content root. For password-protected files, supply SigningCertificatePassword and EncryptionCertificatePassword, preferably through deployment secrets or environment variables named OpenIddictConfig__SigningCertificatePassword and OpenIddictConfig__EncryptionCertificatePassword. Not including the passwords in appsettings.json makes it less likely that they will be stolen along with the files should there ever be a security incident. Omit them for passwordless files; file permissions remain essential.
Each restart reloads the same files, so the keys remain unchanged.
Docker
Recommended: externally supplied files
Mount the certificate directory read-only and configure both paths inside the container. This works on Linux and Windows. Origam also supports the Windows certificate store in Windows containers; Linux deployments use files.
For example, mount a host directory at /run/origam-certificates, then set these values in your Docker .env configuration, ensuring they are passed to the container:
OpenIddictConfig__SigningCertificatePath=/run/origam-certificates/signing.pfx
OpenIddictConfig__EncryptionCertificatePath=/run/origam-certificates/encryption.pfx
OpenIddictConfig__SigningCertificatePassword=<signing-password>
OpenIddictConfig__EncryptionCertificatePassword=<encryption-password>
Omit the password entries for passwordless files. On Windows, use the corresponding Windows mount paths. Restrict host-file access and allow the container’s application account to read them. Replicas of the same application must use the same certificate pair.
Automatically generated fallback certificates
When no paths or thumbprints are supplied, Origam’s Docker images use FallbackGeneratedCertificateDirectory: /home/origam/certificates on Linux or C:\home\origam\certificates on Windows. You can override it, for example:
OpenIddictConfig__FallbackGeneratedCertificateDirectory=/run/origam-generated-certificates
Origam reuses signing.pfx and encryption.pfx in this directory. If neither exists, it generates two self-signed RSA certificates valid for two years. Configured certificate passwords are used when generating the files; otherwise the files are passwordless. Runtime generation does not generate passwords. The application needs write access when creating the files.
Files survive a restart of the same container but they will be regenerated if the container is replaced. Existing files are never renewed or overwritten automatically; an incomplete or invalid pair causes startup to fail. Generation and reuse are logged as warnings.
Azure App Service
App Service can deliver certificates as files, so Origam needs no direct Key Vault integration or separate certificate volume for this option. This feature requires Basic tier or higher. See Microsoft’s container certificate documentation.
-
In your App Service, open Settings → Certificates → Bring your own certificates (.pfx) and add both password-protected PFX files. Alternatively, create exportable RSA certificates in Key Vault and import them into App Service. Set key usage to
DigitalSignaturefor signing andKeyEnciphermentfor encryption. The free App Service managed HTTPS certificate is not suitable for this purpose. -
Add these App Service environment variables, replacing the placeholders with the uploaded certificates’ thumbprints:
WEBSITE_LOAD_CERTIFICATES=<signing-thumbprint>,<encryption-thumbprint> OpenIddictConfig__SigningCertificatePath=/var/ssl/private/<signing-thumbprint>.p12 OpenIddictConfig__EncryptionCertificatePath=/var/ssl/private/<encryption-thumbprint>.p12This example is for Linux containers. Windows private files are under
C:\appservice\certificates\private; inspect the injected filenames and theWEBSITE_PRIVATE_CERTS_PATHdirectory. Origam requires complete paths, without environment-variable placeholders. Set Origam’s password entries only if the delivered files require passwords. -
Restart the app. Explicit paths bypass fallback generation. After renewal, update the thumbprint-based paths and certificate selection, then restart again.