Umbraco Package
Block compromised passwords and logins for Umbraco members and backoffice users
Overview
DarkStrata Credential Check for Umbraco stops compromised credentials being used on your Umbraco site. When a member or backoffice user logs in or sets a password, the email and password pair is hashed locally and checked against the DarkStrata breach corpus using k-anonymity: only the first five characters of a SHA-256 hash ever leave your server. No personal data is sent: the email, username and password never leave your server, and the fragment cannot be reversed to identify anyone.
It is a single NuGet install with no backoffice UI and no database changes. Supports Umbraco 13 LTS, 15, 16 and 17 LTS. Running Laravel? Use the Laravel integration instead.
What it does:
| Hook | Behaviour |
|---|---|
| Password set, change or reset (members and backoffice users) | Rejected with identity error code DarkStrataCompromised when the email and password pair is in the breach corpus. |
| Member and backoffice login | A compromised pair is denied as a wrong password, counting towards Umbraco's lockout threshold (default), or allowed with a warning. |
| Any hit | Publishes CompromisedCredentialDetectedNotification so you can run your own workflow. |
| Health check | Settings > Health Check > Security shows API key and connectivity status. |
Requirements
| Umbraco | .NET |
|---|---|
| 13 LTS (13.5.3+) | .NET 8 |
| 15 / 16 (15.1.2+) | .NET 9 |
| 17 LTS (17.0.0+) | .NET 10 |
You will also need:
- A free DarkStrata account and an API key with the
credential_check:readscope - no paid plan required - Outbound HTTPS connectivity to
api.darkstrata.io(port 443)
Installation
Install from NuGet into your Umbraco web project:
dotnet add package DarkStrata.CredentialCheck.UmbracoThe package registers itself through an Umbraco composer, so there is nothing to wire up in code. Rebuild and run.
Configuration
1. Create an API key
In app.darkstrata.io go to Integrations > API keys > Create key and tick the credential_check:read scope. Copy the key (it starts with ds_live_); it is shown once.
Free accounts get 500 checks per month. The package caches results, so repeated passwords do not each cost a check and a small site will sit well inside that. Basic raises it to 2,500, Pro to 20,000, the Customer Protection add-on to 100,000 or more, and Enterprise is uncapped. If you exceed the quota the API returns 429 and the package treats the check as skipped - sign-in continues to work, it is simply not screened until the quota resets at the start of the month.
Free keys are licensed for internal, non-commercial use - checking sign-ins on sites you operate. If you are an agency or vendor shipping this package as part of a product you sell, you need a partner licence instead.
2. Give the key to the site
The package reads the standard ASP.NET Core configuration section DarkStrata:CredentialCheck, so use whichever configuration source your hosting already uses. Pick one:
Environment variable (recommended for production, Umbraco Cloud, Azure App Service, Docker):
DarkStrata__CredentialCheck__ApiKey=ds_live_...User secrets (local development, keeps the key out of git):
dotnet user-secrets set "DarkStrata:CredentialCheck:ApiKey" "ds_live_..."appsettings.json (simplest, but the key is then committed with your site):
{
"DarkStrata": {
"CredentialCheck": {
"ApiKey": "ds_live_...",
"ValidatePasswords": true,
"CheckLogins": true,
"LoginAction": "Deny",
"FailOpen": true
}
}
}Azure Key Vault, AWS Parameter Store and similar work through their normal configuration providers. Changes are picked up without a restart where the provider supports reload.
3. Check it is working
Open Settings > Health Check > Security in the backoffice. DarkStrata Credential Check is green when the key is configured and accepted by the API, and red with a message when the key is missing or rejected.
There is no backoffice settings screen for the key. It is a secret, so it lives in configuration, not in the CMS database.
All settings
| Setting | Default | Meaning |
|---|---|---|
ApiKey | - | Required. With no key every check is skipped and a warning is logged at startup. |
ValidatePasswords | true | Reject compromised passwords when they are set or changed. |
CheckLogins | true | Check member and backoffice logins. |
LoginAction | Deny | Deny rejects the login like a wrong password (lockout rules apply). Warn allows it, logs a warning and publishes the notification. |
FailOpen | true | If the DarkStrata API is unreachable, allow the operation. Set false to reject instead. |
React to a hit
Every compromised credential publishes CompromisedCredentialDetectedNotification. Handle it like any other Umbraco notification to email your security team, lock the member or open a ticket:
using DarkStrata.CredentialCheck.Umbraco;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Events;
public class CompromisedCredentialHandler
: INotificationAsyncHandler<CompromisedCredentialDetectedNotification>
{
public Task HandleAsync(CompromisedCredentialDetectedNotification n, CancellationToken ct)
{
// n.Source: MemberPassword | BackOfficePassword | MemberLogin | BackOfficeLogin
// n.Email, n.UserId
return Task.CompletedTask;
}
}
public class MyComposer : IComposer
{
public void Compose(IUmbracoBuilder builder) =>
builder.AddNotificationAsyncHandler<CompromisedCredentialDetectedNotification, CompromisedCredentialHandler>();
}Failure behaviour
| State | Behaviour |
|---|---|
| No key configured | One warning is logged at startup. Every check is skipped; logins and password changes behave as if the package were not installed. |
| Key rejected (401) or API unreachable | With FailOpen: true (default) the operation is allowed and a warning is logged. With FailOpen: false the login or password change is refused. |
Pause or uninstall
Pause without uninstalling. Remove or blank the API key and every check is skipped. To switch off only part of it, set CheckLogins or ValidatePasswords to false. Setting LoginAction to Warn keeps the checks running but stops them blocking anyone, which is useful for a trial period.
Uninstall.
dotnet remove package DarkStrata.CredentialCheck.UmbracoRebuild and redeploy. The package writes nothing to the Umbraco database and adds no content types, data types, tables or backoffice files, so there is nothing else to clean up. The DarkStrata configuration section is harmless if left behind.
Resources & support
The package is open source under the Apache-2.0 licence. For the full API reference and other integrations, see the developer documentation. If you need a hand, our team is happy to help.