Table of Contents

Class UserPasswordPolicy

Namespace
MailFathom.Application.Access.Credentials
Assembly
MailFathom.Application.dll

What a password has to be before this deployment will store one.

public static class UserPasswordPolicy
Inheritance
UserPasswordPolicy
Inherited Members

Remarks

Two bounds and one refusal, and deliberately nothing else. Composition rules — a digit, a capital, a symbol — make a password harder to remember without making it harder to guess, which is why current guidance drops them in favour of length; what is kept is the floor that makes a guessed password expensive and the ceiling that keeps an adaptive hash from being handed a megabyte of work by whoever can reach the administrative surface.

Neither bound is configurable. A deployment that could lower the floor would be a deployment whose weakest credential is decided by whoever edited a file, and the whole reason this method exists beside the stronger ones is that it is the simple choice rather than the weak one.

The refusal of a control character is about what can be presented rather than about strength: RFC 7617 carries the credential as one line of an HTTP header, and a carriage return or a line feed inside one is a value no client can send whole. Refusing it at provisioning is what stops a password being stored that could never be used.

Fields

MaximumLength

The longest password this deployment stores.

MinimumLength

The shortest password this deployment stores.

Methods

FindRefusal(ReadOnlySpan<char>)

Reports why a password cannot be stored, or that it can.