Skip to content

Improve OAuth application administration - #2544

Merged
ejsmith merged 4 commits into
mainfrom
feature/oauth-applications-management
Aug 29, 2026
Merged

ejsmith merged 4 commits into
mainfrom
feature/oauth-applications-management

Conversation

@ejsmith

@ejsmith ejsmith commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • move OAuth application creation and editing to dedicated pages
  • replace the large application list with a compact, server-paged table and application/organization filters
  • record authorized organization associations during consent and display organization names in the admin list
  • backfill existing application associations from OAuth tokens with a resumable migration

API and behavior

  • add paging and filtering parameters to the global-admin OAuth applications list
  • add a global-admin OAuth application detail endpoint for the edit page
  • preserve the existing list response body shape while adding standard pagination headers
  • no breaking public API changes

Verification

  • dotnet build tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-restore
  • OAuthApplicationEndpointTests — 9 passed
  • PopulateOAuthApplicationOrganizationIdsMigrationTests — 1 passed
  • MigrationRegistrationTests — 3 passed
  • focused OAuth consent organization-association test — 1 passed
  • EndpointManifestTests — 1 passed
  • npm run check
  • npm run lint
  • npm run build
  • local Aspire UI/API smoke testing with paged synthetic OAuth applications and organization filters

Breaking changes

None.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-29T20:39:29.974649Z 1885d7c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

return ViewOAuthApplication.FromApplication(application);

P2 Badge Populate organization names in the update response

When updating an application that already has organization associations, this calls FromApplication without the name dictionary, whose fallback sets every organization's Name to its ID. Consequently, the PUT response disagrees with the list and detail responses and exposes incorrect display names; map the updated application through MapApplicationsAsync before returning it.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c949baffe7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ejsmith
ejsmith merged commit c2b5f3a into main Aug 29, 2026
7 checks passed
@ejsmith
ejsmith deleted the feature/oauth-applications-management branch August 29, 2026 20:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review


P2 Badge Add a stable tiebreaker to application paging

When multiple OAuth applications have the same name, the new offset-paged endpoint sorts only by that non-unique field. Elasticsearch may order tied documents differently between page requests, particularly across shards or replicas, causing applications to be duplicated or skipped as an administrator pages through the table. Append a stable secondary sort such as Id.


var results = await organizationRepository.FindAsync(query => query
.FieldOr(group => group
.FieldEquals(item => item.Id, criteria)
.FieldContains(item => item.Name, criteria))
.SortAscending(item => item.Name), options => options.SearchAfterPaging().PageLimit(Pagination.MaximumLimit));

P2 Badge Include soft-deleted organizations in historical filters

When an application retains an association to a subsequently deleted organization, filtering by that organization's exact ID returns no applications because this lookup uses the repository's default active-only soft-delete mode. The association remains on the OAuth application and is still displayed as its ID, so the documented historical administration data becomes unsearchable; resolve IDs with soft deletes included or pass an exact object ID directly to the application query.


.SortAscending(item => item.Name), options => options.SearchAfterPaging().PageLimit(Pagination.MaximumLimit));

P2 Badge Use a unique sort for organization search-after paging

When more than one page of matching organizations crosses a group that shares the same name, search-after cannot resume reliably from this non-unique sort value and can skip the remaining organizations with that name, making associated OAuth applications disappear from the filter results. The current all-page fix still sorts only by non-unique Name; append Id as a stable secondary sort.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Insulation 37% 35% 286 ❌
Exceptionless.Core 76% 68% 10366 ✔
Exceptionless.Web 85% 70% 8037 ✔
Exceptionless.AppHost 38% 41% 147 ❌
Summary 79% (25901 / 32853) 68% (12094 / 17829) 18836 ✔

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.

1 participant

⌂ 换网址