openapi: 3.1.0 info: title: Dexwize License Authority version: 1.0.0 description: > Offline licences for customer-hosted and air-gapped installations (ADR-0035). An installation exports a signed activation request; NewTurn (platform operators) or a partner submits it here; the authority signs the licence with its Ed25519 key held in OpenBao transit. Partners never sign: a partner request draws from the partner entitlement pool in partner-service first. Usage reports exported by installations are verified here for true-up. servers: - url: https://api.dexwize.example security: - bearer: [] paths: /v1/licensing/trust: get: summary: Authority public keys embedded in releases for offline verification operationId: getTrustKeys security: [] responses: '200': description: Public keys content: application/json: schema: type: array items: { $ref: '#/components/schemas/TrustKey' } /v1/licensing/editions: get: summary: Editions, features and term limits (configuration data) operationId: getEditions responses: '200': description: Policy content: application/json: schema: { $ref: '#/components/schemas/IssuancePolicy' } /v1/licensing/licenses: get: summary: Licences visible to the caller (operators see all; partners see those they issued) operationId: listLicenses responses: '200': description: Licences content: application/json: schema: type: array items: { $ref: '#/components/schemas/License' } '403': description: Not a platform operator or partner admin post: summary: Issue a licence from a signed activation request operationId: issueLicense requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/IssueLicenseRequest' } responses: '201': description: Issued content: application/json: schema: { $ref: '#/components/schemas/License' } '400': description: Invalid activation request or terms outside policy '403': description: Caller may not issue licences '404': description: Partner caller does not own the customer tenant '409': description: Insufficient partner entitlement /v1/licensing/licenses/{id}: get: operationId: getLicense parameters: [{ $ref: '#/components/parameters/Id' }] responses: '200': description: Licence content: application/json: schema: { $ref: '#/components/schemas/License' } '404': description: Not found or not visible /v1/licensing/licenses/{id}/file: get: summary: The signed licence file the customer imports offline (download is audited) operationId: downloadLicense parameters: [{ $ref: '#/components/parameters/Id' }] responses: '200': description: Signed licence document content: application/json: schema: { $ref: '#/components/schemas/SignedDocument' } '404': description: Not found or not visible /v1/licensing/licenses/{id}/usage-reports: get: operationId: listUsageReports parameters: [{ $ref: '#/components/parameters/Id' }] responses: '200': description: Verified true-up summaries content: application/json: schema: type: array items: { $ref: '#/components/schemas/TrueUpSummary' } '404': description: Not found or not visible post: summary: Verify a signed, hash-chained usage report chain for true-up operationId: submitUsageReports parameters: [{ $ref: '#/components/parameters/Id' }] requestBody: required: true content: application/json: schema: type: object required: [reports] properties: reports: type: array minItems: 1 maxItems: 120 items: { $ref: '#/components/schemas/SignedDocument' } responses: '200': description: Verified content: application/json: schema: { $ref: '#/components/schemas/TrueUpSummary' } '400': description: Signature, chain or licence mismatch '404': description: Not found or not visible components: securitySchemes: bearer: type: http scheme: bearer bearerFormat: JWT parameters: Id: name: id in: path required: true schema: { type: string, format: uuid } schemas: SignedDocument: type: object required: [key_id, signature, document] properties: key_id: { type: string } signature: { type: string, contentEncoding: base64 } document: { type: string, contentEncoding: base64 } TrustKey: type: object required: [keyId, publicKey, algorithm] properties: keyId: { type: string } publicKey: { type: string, contentEncoding: base64 } algorithm: { type: string, const: ed25519 } IssuancePolicy: type: object properties: maxTermDays: { type: integer } maxGraceDays: { type: integer } defaultGraceDays: { type: integer } maxTolerancePercent: { type: integer } defaultTolerancePercent: { type: integer } editions: type: object additionalProperties: type: array items: { type: string } IssueLicenseRequest: type: object required: [activationRequest, tenantId, termDays] properties: activationRequest: { $ref: '#/components/schemas/SignedDocument' } tenantId: { type: string, format: uuid } termDays: { type: integer, minimum: 1, maximum: 395 } devices: { type: [integer, 'null'], minimum: 1 } graceDays: { type: [integer, 'null'], minimum: 0 } tolerancePercent: { type: [integer, 'null'], minimum: 0 } License: type: object required: [licenseId, tenantId, installationId, edition, features, deviceCap, validFrom, validTo, graceDays, keyId] properties: licenseId: { type: string, format: uuid } tenantId: { type: string, format: uuid } installationId: { type: string } edition: { type: string } features: type: array items: { type: string } deviceCap: { type: integer } tolerancePercent: { type: integer } validFrom: { type: string, format: date-time } validTo: { type: string, format: date-time } graceDays: { type: integer } issuingPartnerId: { type: [string, 'null'], format: uuid } issuedAt: { type: string, format: date-time } keyId: { type: string } TrueUpSummary: type: object required: [licenseId, reports, peakDevices, deviceCap, devicesOverCap, clockTamperReported, coveredFrom, coveredTo] properties: licenseId: { type: string, format: uuid } reports: { type: integer } peakDevices: { type: integer } deviceCap: { type: integer } devicesOverCap: { type: integer } clockTamperReported: { type: boolean } coveredFrom: { type: string, format: date-time } coveredTo: { type: string, format: date-time }