Skip to content

Add development users/tenants discovery endpoints on /.cratis#2250

Merged
einari merged 5 commits into
mainfrom
copilot/add-users-tenants-provider
May 26, 2026
Merged

Add development users/tenants discovery endpoints on /.cratis#2250
einari merged 5 commits into
mainfrom
copilot/add-users-tenants-provider

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

Summary

Adds development-only provider discovery for suggested users and tenants, exposed as /.cratis/users and /.cratis/tenants for tooling integration.

Added

  • ICanProvideUsers and User (MicrosoftIdentity: ClientPrincipal, Details: object) in Cratis.Arc.Identity.
  • ICanProvideTenants, Tenant (Id: TenantId, Name: TenantName), and TenantName concept in Cratis.Arc.Tenancy.

Changed

  • IdentityEndpointMapper now discovers ICanProvideUsers / ICanProvideTenants implementations via ITypes.
  • Maps /.cratis/users and /.cratis/tenants only when corresponding providers are present.
  • Aggregates results across all discovered providers before writing JSON response.
public interface ICanProvideUsers
{
    Task<IEnumerable<User>> Provide();
}

public interface ICanProvideTenants
{
    Task<IEnumerable<Tenant>> Provide();
}

Fixed

  • Arc now exposes explicit development endpoints for available users and tenants, matching the required /.cratis contract for downstream tooling.

Removed

  • None.

Security

  • No auth model changes to existing identity flow; new endpoints are discovery-driven and only exposed when providers are implemented.

Deprecated

  • None.

Copilot AI linked an issue May 26, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add users and tenants provider for development purposes Add development users/tenants discovery endpoints on /.cratis May 26, 2026
Copilot finished work on behalf of einari May 26, 2026 04:29
Copilot AI requested a review from einari May 26, 2026 04:29
@einari
Copy link
Copy Markdown
Contributor

einari commented May 26, 2026

@copilot drop the cancellationtoken as part of the interfaces

@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.19-pr2250.fa3d32e

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot drop the cancellationtoken as part of the interfaces

Fixed in d9a339e — removed CancellationToken from ICanProvideUsers and ICanProvideTenants, and updated endpoint mapper/spec provider implementations accordingly.

Copilot finished work on behalf of einari May 26, 2026 05:52
@einari
Copy link
Copy Markdown
Contributor

einari commented May 26, 2026

@copilot Leverage the IInstancesOf<> for discovery, rather than using the ITypes interface directly.

@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.19-pr2250.d9a339e

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot Leverage the IInstancesOf<> for discovery, rather than using the ITypes interface directly.

Done in 9fec480 — switched users/tenants discovery to IInstancesOf<> and updated the IdentityEndpointMapper specs accordingly.

Copilot finished work on behalf of einari May 26, 2026 07:15
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.19-pr2250.9fec480

@einari
Copy link
Copy Markdown
Contributor

einari commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot There is a regression: https://github.com/Cratis/Arc/actions/runs/26438008872/job/77841851283?pr=2250

Addressed in 4787d75. I fixed a race condition in XmlDocumentation by synchronizing access to the static XML document cache, which stabilizes the failing ProxyGenerator XML documentation spec in CI.

Copilot finished work on behalf of einari May 26, 2026 09:26
Comment on lines +128 to +131
catch
{
return null;
}
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.26.19-pr2250.4787d75

@einari einari marked this pull request as ready for review May 26, 2026 09:43
@einari einari merged commit a6cffa3 into main May 26, 2026
52 checks passed
@einari einari deleted the copilot/add-users-tenants-provider branch May 26, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users & Tenants provider for development purposes

2 participants