Skip to content

ClientTrust Enum

Whether the server trusts a client's redirect URIs, which decides whether it redirects the user agent there with an authorization error. The vocabulary is that of RFC 9700 section 4.11.2: the authorization server "needs to decide whether or not it can trust the redirection URI", and "SHOULD only automatically redirect the user agent if it trusts the redirection URI".

C#
public enum ClientTrust

Fields

Trusted 0

Somebody answering for the deployment let the client in, so the server trusts its redirect URIs and redirects an authorization error there: RFC 9700 section 4.11.2 has the server "only automatically redirect the user agent if it trusts the redirection URI".

Untrusted 1

The client let itself in, such as one that registered itself while registration is open, so the server does not trust its redirect URIs and answers its authorization errors itself: RFC 9700 section 4.11.2 names an attacker who could "register a client via dynamic client registration" and send an erroneous request, "thus instructing the authorization server to redirect the user agent to its phishing site".

Remarks

Decided once, when the client is created, and kept in its record, so every replica reading the client from a shared store gives the same answer whatever settings it runs with. A client declared in the tenant settings is Trusted unless the host says otherwise; one registered dynamically while registration is open is Untrusted, and one registered while it is closed Trusted. A client resolved from its metadata document is Untrusted unless the host lists the URLs it accepts documents from. A registrant neither sets nor changes it: it is no registration metadata, and an RFC 7592 update keeps it.

A stored record naming no value is Trusted, as every client of a record written before the member existed was treated; a record naming one is read as named, by its member's System.Text.Json.Serialization.JsonStringEnumMemberNameAttribute.