Skip to content

ClientSecretEncryptionSettings Class

The key the client secrets a tenant issues on dynamic registration are encrypted with. The encrypted copy is what the client configuration endpoint returns a client when it reads its registration (RFC 7592 section 3 and Appendix A.1), and what the secret of a client_secret_jwt client is read from, as the key its assertion is verified with and the key a JWT is encrypted to it with. Every other method is verified against the secret's hash.

C#
public record ClientSecretEncryptionSettings : System.IEquatable<Abblix.Oidc.Server.Features.ClientInformation.ClientSecretEncryptionSettings>

Inheritance System.Object → ClientSecretEncryptionSettings

Implements System.IEquatable<ClientSecretEncryptionSettings>

Remarks

The secret is sealed the way pairwise subject identifiers are, by a deterministic authenticated encryption keyed by Key, and bound to the tenant and the client, so a value moved to another client opens nowhere. A server serving dynamic client registration refuses a tenant without these settings. A client registered before the tenant had a key holds only the hash of its secret, so a read of its registration answers without the secret. Replacing the key, or HashAlgorithm, is allowed, and then every secret encrypted under the former one opens to nothing: a client_secret_jwt client that keeps its secret only encrypted can no longer authenticate, nor be sent a JWT encrypted with a key derived from its secret, a client verified against its hash still authenticates, and a read of the registration answers without the secret, with a warning in the log. A host's own client store must keep EncryptedValue as it was given, and a server node running a version that reads only Value cannot authenticate such a client.

Properties

ClientSecretEncryptionSettings.HashAlgorithm Property

The name of the hash the HKDF key derivation of the encryption uses: SHA256, SHA384 or SHA512, SHA256 when the setting is absent, while a setting with no value is refused. Changing it is changing the key.

C#
public string HashAlgorithm { get; init; }

Property Value

System.String

ClientSecretEncryptionSettings.Key Property

A base64-encoded key of at least 32 bytes (256 bits) before encoding, kept secret. Use a key of its own rather than the pairwise salt.

C#
public string Key { get; init; }

Property Value

System.String

Remarks

Judged when the tenant declaring it enters the server, by the check of the tenant list, rather than on assignment, for the reason given on Salt.