-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Team ID filter should not be required in "List Fleet-maintained apps" endpoint #24509
Comments
Looked at this endpoint while fixing #23305. We need the team here because the list query filters out apps for which an installer already exists for that team, which is what the UI for adding FMAs needs. The endpoint could be tweaked to skip the "where installer doesn't exist" part of the DB query if team ID isn't specified, though this would require tweaks to auth so team-specific maintainers/owners could hit the endpoint with either no team query or a team query matching a team they're part of. Either way, this seems like a FR rather than a bug? |
Per design review, this will stay as a bug. Fix is to, when the team ID query parameter is not supplied, drop the "available" filter while maintaining existing functionality when the team ID is supplied. Doing the fix that way ensures the fix respects BC and as a result is backend-only. |
Hey @rachaelshaw, I think @eashaw and @mikermcneil are trying to ship Fleet-maintained apps on the website ASAP. Can you please check if this bug is blocking them? If this is blocking, can you please add a |
…g a team ID (#24595) For #24509 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
…g a team ID (#24595) For #24509 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
QA Notes: Verified team_id is not longer required. Tested all steps outlined in "New functionality" and "Regression testing" above. |
Apps list now unfurls, |
Fleet version: 4.60.1
💥 Actual behavior
API users are only able to get a list of Fleet-maintained apps if they have a team ID. This makes it so the endpoint can't be used in situations where users may just want to get a complete list of what's available.
🧑💻 Steps to reproduce
Attempt to access the GET /fleet_maintained_apps endpoint in the API (the frontend doesn't do this) without team_id set.
🛠️ To fix
Display all available FMAs (regardless of whether they've been added as installers anywhere) when calling the FMA list endpoint with no team param.
Test Plan
No special instance setup required. The associated PR's auth tests may be helpful here.
New functionality:
/api/v1/fleet/software/fleet_maintained_apps
works with no query paramsRegression testing:
/api/v1/fleet/software/fleet_maintained_apps
with team specified fails auth for a team-specific admin/maintainer on the wrong teamThe text was updated successfully, but these errors were encountered: