Class IntrospectionOptions

Namespace
Cratis.Arc.Introspection
Assembly
Cratis.Arc.Core.dll

Controls exposure of the discovery endpoints: the command and query catalogs (/.cratis/commands and /.cratis/queries) and identity discovery (/.cratis/users, /.cratis/tenants and /.cratis/identity-details/schema).

public class IntrospectionOptions
Inheritance
IntrospectionOptions
Inherited Members
Extension Methods

Constructors

IntrospectionOptions()

public IntrospectionOptions()

Properties

Enabled

Gets or sets whether both catalog endpoints are mapped. Defaults to true. Does not control identity discovery.

public bool Enabled { get; set; }

Property Value

bool

IdentityDiscovery

Gets or sets whether users, tenants and the identity details schema discovery endpoints are mapped. Defaults to true.

public bool IdentityDiscovery { get; set; }

Property Value

bool

Remarks

Set this and Enabled to false to remove every discovery endpoint without evaluating authentication enforcement. This does not affect /.cratis/me. Access settings apply only to mapped discovery endpoints; role configuration is still validated when discovery is disabled.

RequireAuthentication

Gets or sets whether callers of the discovery endpoints must be authenticated.

public bool RequireAuthentication { get; set; }

Property Value

bool

Remarks

When not set, the default, the endpoints are anonymous in Development and require an authenticated caller everywhere else. The getter returns false when unset, but only an explicit assignment overrides the environment default. Set it to false to expose them anonymously in every environment, or to true to require authentication in every environment, including Development.

When it is not set and the host has no way to authenticate callers, such as an ASP.NET Core host without a default authentication scheme, the discovery endpoints are not mapped outside Development. When it is true, the same host fails at startup instead.

Authentication enforcement applies only when Enabled or IdentityDiscovery is true. When both are false, access settings are unused, but role configuration is still validated.

Roles

Gets or sets comma-separated roles, any one of which grants access. Roles are trimmed; empty roles are rejected. Setting roles requires an authenticated caller in every environment, and cannot be combined with RequireAuthentication set to false.

public string? Roles { get; set; }

Property Value

string

TrustForwardedIdentityHeaders

Gets or sets whether the host trusts identity headers forwarded by a trusted ingress.

[Obsolete("Use ArcOptions.TrustForwardedIdentityHeaders (Cratis:Arc:TrustForwardedIdentityHeaders), which applies to every request. This setting turns it on and will be removed in a future major version.")]
public bool TrustForwardedIdentityHeaders { get; set; }

Property Value

bool

Remarks

Trust in forwarded identity headers is now a host-wide setting that applies to every request, not only to the catalogs. Setting this to true still turns on TrustForwardedIdentityHeaders.