Files
fleet/website/api/models/FleetInstanceUsingVpp.js
T
EricandIan Littman b3bd4686a3 Website: Add VPP metadata proxy (#37997)
For https://github.com/fleetdm/fleet/issues/37261

Changes:
- Added a new database model: `FleetInstanceUsingVpp`
- Added `/api/vpp/v1/register`: An API endpoint that validates provided
Fleet license keys, creates a database record for the proxy
registration, and returns a generated secret used to authenticate
requests to the other VPP proxy endpoint
- Added `/api/vpp/v1/metadata/:storeRegion`: An API endpoint that
forwards requests to the
`https://api.ent.apple.com/v1/catalog/${storeRegion}/stoken-authenticated-apps`
Apple API with a token generated using Fleet's Apple developer
credentials.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2026-01-08 11:29:53 -06:00

40 lines
1.3 KiB
JavaScript
Vendored

/**
* InstanceUsingVpp.js// TODO: better name.
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
fleetInstanceUrl: {
type: 'string',
required: true,
description: 'The URL of a Fleet instance that is using the fleet website VPP proxy.'
},
fleetServerSecret: {
type: 'string',
required: true,
description: 'A generated secret used to autheticate & identify requests from a particular Fleet instance.'
},
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
},
};