Repository navigation
Show on Home only the apps a member can open - #367
Open
jonathanlaib wants to merge 2 commits into
Open
jonathanlaib wants to merge 2 commits into
jonathanlaib wants to merge 2 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 073407d | Nov 24 2026, 09:27 AM |
Comment on lines
+111
to
+112
| // Pictures of an app follow its listing: they are for the people who can open it. | ||
| return record && opens(record, await readMemberGroups(transaction, principal)) |
There was a problem hiding this comment.
Personal connections lose their icons
readAppIcon now rejects restricted connectors when the member's saved groups do not match. But My connections still lists those connectors, and managing a personal connection deliberately ignores app access groups. Those rows now show the generic fallback instead of the connector's icon.
Preserve icon access for connectors shown in My connections while keeping the new check for published app pictures.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
A company sign-in to Widefleet now keeps the member's groups, read the way app sign-in reads them. Home and an app's page use them: a published app with group rules is shown to members of those groups and to the people who manage it. While a member's groups are unknown, the app is shown as before. Entra names groups only to a sign-in that may read the person's profile, so a company sign-in through Entra requests User.Read, as app sign-in does.
A member's groups are read without the limit of an app's rules, so a member of more than a hundred groups keeps Home. Icons and screenshots follow the listing. The architecture notes say where the groups come from and that they never authorize an app.
jonathanlaib
force-pushed
the
home-access
branch
from
November 24, 2026 09:26
ecb6f81 to
073407d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #366.
This changes company sign-in, including the scopes requested from Microsoft Entra. Please review that part before merging; it could not be checked against a real Entra tenant.
Problem
Home shows every published app to every member, also to the people an app's group rules keep out. They find the app on Home, open it, and are refused at its sign-in. The management pages cannot do better today: a person's company groups are read only when the person signs in to an app, so the pages that list apps do not know them.
Change
Groups from the company sign-in. A company sign-in to Widefleet keeps the member's groups in a new table,
member_groups, per member and organization. They are read with the function app sign-in uses, so both agree on a person's groups: from the claim for OIDC, from Microsoft Graph for Entra, from Cloud Identity for Google Workspace when its scope is configured. Each company sign-in replaces them. A sign-in whose groups cannot be read removes them and still succeeds.Home, an app's page and its pictures. A published app with group rules is shown to members of one of its groups, and to the people who manage it. An app without group rules is shown to everyone, as before. While a member's groups are unknown, because they have not signed in through company SSO since this change or the directory refused, a published app is shown as before, so nobody loses an app they can open.
Entra. Entra names a person's groups only to a sign-in that may read their profile. A company sign-in through an Entra connection therefore requests
User.Readin addition to the saved scopes, as app sign-in already does with the same client. Other providers request what they requested before.Wording. The switch on an app's Access section says that the people who can use the app find it on Home.
Why groups from the sign-in
Taking a person's groups at sign-in and keeping them until the next one is the usual first step for showing things by company group, and it is what app sign-in does. A directory that sends its users and groups continuously, through SCIM, would give every part of the platform one source and changes within minutes. That is a larger step of its own. The architecture notes record that the stored groups only decide what is listed and never authorize an app.
Consequences to know
User.Readand has not granted it for this client would refuse the company sign-in to Widefleet. The same tenant already grants it for app sign-in, which uses this client, so this should not occur where apps are in use.Not included
How to check the Entra part
This needs a tenant, an Entra SSO connection and a published app whose allowed groups name one Entra group.
member_groups, both members have a row with their Entra group IDs, also the nested ones.Verification
pnpm typecheck,pnpm format:check,pnpm lintpnpm exec vitest run apps/control-plane/testsagainst local Postgres and object storage, 1,020 tests. New cases: a published app with group rules is listed, has a page and serves its icon and screenshots for a member of the group, not for a member of another group, always for the people who manage it, and for everyone while groups are unknown; a member of 150 groups keeps Home; a company sign-in through a synthetic OIDC provider keeps the groups of its claim, and an empty list for a provider that names none; a sign-in through an Entra connection requestsUser.Readand an OIDC connection does not.tests/e2e/auth.spec.ts,organization-writes.spec.ts,oidc.spec.ts,self-hosted-sso.spec.tsanddomain-join.spec.ts, all 67 tests.Documentation: #351 (draft, blocked until a release contains this change).


Confidence Score: 5/5
The PR appears safe to merge, with the previously reported personal-connector icon issue remaining non-blocking.Findings
Summary
Company sign-in saves a member's groups so Home, app pages and pictures can follow app access rules.
No new findings were accepted. The earlier, unnumbered finding about large group lists is fixed:
readMemberGroupsno longer applies the 100-group limit for app rules.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR SSO["Company sign-in"] --> Lookup["Read company groups"] Lookup -->|Success| Save["Save groups per member and organization"] Lookup -->|Failure| Clear["Remove saved groups"] Save --> Listing["Filter Home, app pages and pictures"] Clear --> Unknown["Keep previous listing behavior"] Listing --> AppSSO["App sign-in still decides access"] Unknown --> AppSSOReviews (3) · Last reviewed commit: "Show an app's pictures to the people who..." · Reviewed by Greptile