Skip to content

Return deterministic empty .cratis identity introspection payloads when providers are absent#2254

Merged
einari merged 2 commits into
mainfrom
copilot/return-empty-for-users-tenants-identity-details
May 27, 2026
Merged

Return deterministic empty .cratis identity introspection payloads when providers are absent#2254
einari merged 2 commits into
mainfrom
copilot/return-empty-for-users-tenants-identity-details

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

Summary

Arc now maps the .cratis identity introspection endpoints even when identity/user/tenant providers are not configured, and returns deterministic empty payloads instead of falling through to host defaults (often index.html).

Added

  • Added no-provider specs for identity schema, users, and tenants endpoint responses.
  • Added assertions that provider-missing mapping still registers /.cratis/identity-details/schema, /.cratis/users, and /.cratis/tenants.

Changed

  • Changed IdentityEndpointMapper to always map:
    • /.cratis/identity-details/schema
    • /.cratis/users
    • /.cratis/tenants
  • Changed schema resolution to return {} when no IProvideIdentityDetails is registered.
  • Changed users/tenants handlers to return [] when no provider instances are available.
  • Updated identity endpoint handler test fixture to capture only the /.cratis/me handler, preserving existing identity request test behavior.
  • Updated introspection docs to reflect always-mapped schema endpoint and empty-schema fallback.
var identityDetailsProvider = context.RequestServices.GetService<IProvideIdentityDetails>();
if (identityDetailsProvider is null)
{
    await context.WriteResponseAsJson(new JsonObject(), typeof(JsonObject), context.RequestAborted);
    return;
}

Fixed

  • Fixed .cratis users/tenants/schema endpoints not being present in no-provider setups.
  • Fixed no-provider responses to be explicit and machine-consumable ([] / {}) rather than implicit host fallback content.

Removed

  • None.

Security

  • None.

Deprecated

  • None.

Copilot AI changed the title [WIP] Return empty for users, tenants and identity details if none is configured Return deterministic empty .cratis identity introspection payloads when providers are absent May 27, 2026
Copilot finished work on behalf of einari May 27, 2026 07:46
Copilot AI requested a review from einari May 27, 2026 07:46
@einari einari marked this pull request as ready for review May 27, 2026 08:01
@einari einari added the patch label May 27, 2026
@einari einari merged commit 50626d0 into main May 27, 2026
52 of 55 checks passed
@einari einari deleted the copilot/return-empty-for-users-tenants-identity-details branch May 27, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return empty for users, tenants and identity details - if none is configured

2 participants