fleet/website/api/models/AndroidEnterprise.js
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

64 lines
2.3 KiB
JavaScript
Vendored

/**
* AndroidEnterprise.js
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
fleetServerUrl: {
type: 'string',
description: 'The URL of the Fleet server that this Android enterprise exists on.',
unique: true,
required: true,
},
fleetLicenseKey: {
type: 'string',
description: 'The license key set on the Fleet server that this Android enterprise exists on.',
},
fleetServerSecret: {
type: 'string',
description: 'A secret randomly generated by the fleet website used to authenticate requests to the website for the other Android proxy endpoints after initial setup.',
required: true,
},
androidEnterpriseId: {
type: 'string',
description: 'Google\'s ID for this Android enterprise.',
unique: true,
required: true,
},
pubsubTopicName: {
type: 'string',
description: 'The pubsub topic name for this Android enterprise generated by fleetdm.com',
extendedDescription: 'This value is saved so we can delete the created pubsub topic if this Android enterprise is deleted.',
},
pubsubSubscriptionName: {
type: 'string',
description: 'The pubsub subscription name for the topic associated with this Android enterprise generated by fleetdm.com',
extendedDescription: 'This value is saved so we can delete the created pubsub subscription if this Android enterprise is deleted.',
},
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
},
};