Commit graph

8 commits

Author SHA1 Message Date
Eric
4101aa4b36
Website: Add note about using req.body in android proxy endpoints (#41186)
Closes: https://github.com/fleetdm/fleet/issues/39688

Changes:
- Added a note to android proxy endpoints that forward `req.body` to the
Android management API.
2026-03-06 18:06:25 -06:00
Eric
274abc6cb0
Website: update android proxy error handling (#40140)
Related to: https://github.com/fleetdm/fleet/issues/40127

Changes:
- Updated errors logged by Android proxy endpoints to include more
information about the error.
- Added a `deviceNoLongerManaged` exit to the `delete-android-device`
endpoint that is used when the Google API returns a "Device is no longer
being managed" error.
- Added a `policyNotFound` exit to the `modify-android-policies` and
`modify-enterprise-app-policy` endpoints that is used when the Google
API returns a 404 response
- Added a `invalidPolicyName` exit to the `modify-android-device`
endpoint that is used when the Google API returns an error related to
the policy name sent in the request body.
2026-02-19 17:46:41 -06:00
Jahziel Villasana-Espinoza
670f7dbdb5
fail gracefully when profile is invalid (#38899)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #35211 

# Checklist for submitter

- [x] QA'd all new/changed functionality manually
2026-01-28 10:57:27 -05:00
Jahziel Villasana-Espinoza
ff0ba413b7
Android app self service: backend support (#34711)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34389

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
2025-11-13 18:10:24 -05:00
Eric
b2151decda
Website: Add API rate limit alert to Android proxy endpoints (#35637)
Closes: https://github.com/fleetdm/fleet/issues/34358

Changes:
- Updated Android enterprise proxy endpoints to log an additional
warning to alert us if we exceed the Android management API rate limit.
2025-11-12 15:37:21 -06:00
Eric
1799c824b1
Website: Update Android proxy endpoints exits (#34135)
Changes:
- Updated the website's Android proxy endpoints to use action2 exit
signals.
2025-10-10 17:11:42 -05:00
Eric
292c23497f
Website: Update Android Proxy endpoints to return 404 responses if an Android Enterprise are not managed by Fleet (#33816)
Related to: https://github.com/fleetdm/fleet/issues/33266

Changes:
- Added a new helper
`sails.helpers.androidProxy.getIsEnterpriseManagedByFleet`. This helper
returns `true` if a provided Android Enterprise ID is present in the
list of all Android Enterprises managed by Fleet, or `false` if it is
not in the list.
- Updated `create-android-enrollment-token`,
`create-android-signup-url`, and `modify-android-policies` to return a
404 response to the requesting Fleet instance if their Android
Enterprise is not managed by Fleet.
2025-10-06 12:50:42 -05:00
Eric
4272df375a
Website: Add android proxy endpoints (#28267)
Related to: https://github.com/fleetdm/fleet/issues/26270

Changes:
- Added a new database model: `AndroidEnterprise`
- Added one new website dependency: `[email protected]`
- Added `android-proxy/create-android-signup-url`: an endpoint that
returns a signup url used to grant access to Fleet's Android MDM
integration.
- Added `android-proxy/create-android-enterprise`: An endpoint that
creates an Android enterprise for a Fleet server
- Added `android-proxy/create-android-enrollment-token`: An endpoint
that returns an enrollment token for an Android enterprise
- Added `android-proxy/modify-android-policies`: An endpoint used to
update policies of an Android enterprise
- Added `android-proxy/delete-one-android-enterprise`: an endpoint that
deletes an Android enterprise

---------

Co-authored-by: Victor Lyuboslavsky <[email protected]>
2025-06-12 13:23:49 -05:00