Class LicenseDocument
LICENSE-V2-DESIGN.md section 2.2): the parsed payload with typed accessors, constructed only by LicenseVerifier.verify(byte[], UUID, PublicKey) after steps 1 and 2 of 2.5 accepted the bytes, so an instance is always a document signed by a key a pinned root certified. Step 5 is the document's own verdict: isExpired() tells whether expires had passed by the verifier's clock; an expired document is returned, never refused (2.5, 8).The payload (2.2, ruling LV-1 (a)) is UTF-8 text, one key=value per line, every line terminated by LF, keys ascending in String order, each key once, no blank line, no comment, no byte-order mark, no carriage return or other control character, no empty value: one byte form of a given content, so the verifier verifies the bytes it received and only then parses them, and never canonicalises. The keys:
v-2. Required.lic- the licence UUID, lower case. Required.product-1iiziGo,2iiziServer development,3iiziServer standard,4container;5is retired (LV-22) and refused. Required.acct- the account's uid on the MLS. Required.acctName- its e-mail.ikey- the installation's Ed25519 public key, base64url of its 32 bytes (2.3). Required.iid- the hardware-bound installation ID.ent,entName- the entitlement's UUID and display name.state-active,trial,deactivatedorrevoked(LicenseState). Required.validFrom,validTo- the entitlement's validity, epoch milliseconds UTC; absent = unbounded.trialUntil- the end of a trial, epoch milliseconds.maxUsers- concurrent signed-in users of the entitlement;-1unlimited.maxServers- members of one hub holding the entitlement;-1unlimited.devID,groupID- the Developer ID and Developer Group ID.issued- the MLS's clock at issue, epoch milliseconds. Required.refreshAfter- when the installation should ask for a new document (issued plus 7 days, LV-6). Required.expires- when this document stops being valid, whatever the entitlement says (issued plus 30 days, LV-6). Required.rn- the request nonce of the request that produced the document, base64url of 32 bytes (5.1).
A number is canonical decimal, a UUID lower case, an instant its epoch milliseconds, a byte string base64url without padding; every other spelling is refused, and so is an unknown key (a new key means a new v). Which optional keys a consumer needs is the consumer's check: a server needs ent and maxUsers, iiziGo does not. The document carries no secret and no personal data beyond the account's e-mail; a client may show all of it.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe payload key "acct": the account's uid on the MLS.static final StringThe payload key "acctName": the account's e-mail.static final StringThe payload key "devID": the Developer ID.static final StringThe payload key "ent": the entitlement's UUID.static final StringThe payload key "entName": the entitlement's display name.static final StringThe payload key "expires": when the document stops being valid, epoch milliseconds.static final StringThe payload key "groupID": the Developer Group ID.static final StringThe header line of the envelope: "IIZI-LICENSE/2".static final StringThe payload key "iid": the hardware-bound installation ID.static final StringThe payload key "ikey": the installation's Ed25519 public key, base64url.static final StringThe payload key "issued": the MLS's clock at issue, epoch milliseconds.Every key of the format.static final StringThe payload key "lic": the licence UUID.static final StringThe payload key "maxServers": the members of one hub allowed,UNLIMITEDfor no limit.static final StringThe payload key "maxUsers": the concurrent signed-in users allowed,UNLIMITEDfor no limit.static final StringThe payload key "product": the product,PRODUCT_IIZIGOtoPRODUCT_CONTAINER_SERVER.static final intThe product 4: iiziServer container (JakartaEE or other).static final intThe product 2: iiziServer development (inside iiziGo).static final intThe product 1: iiziGo.static final intThe product 3: iiziServer standard.static final StringThe payload key "refreshAfter": when to ask for a new document, epoch milliseconds.The required keys, in the order a missing one is reported.static final StringThe payload key "rn": the request nonce, base64url of 32 bytes.static final StringThe payload key "state": the state, aLicenseStatetoken.static final StringThe payload key "trialUntil": the end of a trial, epoch milliseconds.static final intThe limit value -1 ofmaxUsersandmaxServers: no limit.static final StringThe payload key "v": the format version,VERSION.static final StringThe payload key "validFrom": the start of the entitlement's validity, epoch milliseconds.static final StringThe payload key "validTo": the end of the entitlement's validity, epoch milliseconds.static final intThe format version: 2.Method Summary
Modifier and TypeMethodDescriptionasMap()Gets the payload as written, in key order.Gets a value as written.Gets the account's e-mail,acctName.longGets the account's uid on the MLS,acct.byte[]getBytes()Gets the document bytes, the envelope exactly as received: what a client stores and what a member sends the hub principal.Gets the signing key's certificate, which verified under a pinned root.Gets the Developer Group ID,groupID.Gets the Developer ID,devID.Gets the entitlement's display name,entName.Gets the entitlement's UUID,ent.Gets when the document stops being valid,expires.Gets the installation's public key,ikey.byte[]Gets the installation's public key as its 32 bytes.Gets the installation's public key as text,ikeyas written.Gets the hardware-bound installation ID,iid.Gets the MLS's clock at issue,issued.getKeyID()Gets the signing key's ID, the envelope'skid.Gets the licence UUID,lic.Gets the members of one hub allowed,maxServers.Gets the concurrent signed-in users allowed,maxUsers.intGets the product,product.Gets when the installation should ask for a new document,refreshAfter.byte[]Gets the request nonce,rn.getState()Gets the state,state.Gets the end of a trial,trialUntil.Gets the start of the entitlement's validity,validFrom.Gets the end of the entitlement's validity,validTo.Gets the verifier's clock when the document was verified.intGets the format version.booleanTells whether the document had expired when it was verified: step 5 of 2.5, by the verifier's clock.booleanTells whether the document has expired at an instant.toString()The licence UUID, the product, the state and the expiry.
Field Details
HEADER
VERSION
public static final int VERSIONThe format version: 2.- See Also:
V
LIC
PRODUCT
The payload key "product": the product,PRODUCT_IIZIGOtoPRODUCT_CONTAINER_SERVER.- See Also:
ACCT
ACCT_NAME
IKEY
The payload key "ikey": the installation's Ed25519 public key, base64url.- See Also:
IID
ENT
ENT_NAME
The payload key "entName": the entitlement's display name.- See Also:
STATE
VALID_FROM
The payload key "validFrom": the start of the entitlement's validity, epoch milliseconds.- See Also:
VALID_TO
The payload key "validTo": the end of the entitlement's validity, epoch milliseconds.- See Also:
TRIAL_UNTIL
The payload key "trialUntil": the end of a trial, epoch milliseconds.- See Also:
MAX_USERS
MAX_SERVERS
DEV_ID
GROUP_ID
ISSUED
The payload key "issued": the MLS's clock at issue, epoch milliseconds.- See Also:
REFRESH_AFTER
The payload key "refreshAfter": when to ask for a new document, epoch milliseconds.- See Also:
EXPIRES
The payload key "expires": when the document stops being valid, epoch milliseconds.- See Also:
RN
The payload key "rn": the request nonce, base64url of 32 bytes.- See Also:
REQUIRED
KEYS
PRODUCT_IIZIGO
public static final int PRODUCT_IIZIGOThe product 1: iiziGo.- See Also:
PRODUCT_DEVELOPMENT_SERVER
public static final int PRODUCT_DEVELOPMENT_SERVERThe product 2: iiziServer development (inside iiziGo).- See Also:
PRODUCT_STANDARD_SERVER
public static final int PRODUCT_STANDARD_SERVERThe product 3: iiziServer standard.- See Also:
PRODUCT_CONTAINER_SERVER
public static final int PRODUCT_CONTAINER_SERVERThe product 4: iiziServer container (JakartaEE or other).- See Also:
UNLIMITED
public static final int UNLIMITEDThe limit value -1 ofmaxUsersandmaxServers: no limit.- See Also:
Method Details
getBytes
public byte[] getBytes()Gets the document bytes, the envelope exactly as received: what a client stores and what a member sends the hub principal.- Returns:
- A copy of the bytes.
getKeyID
getCertificate
Gets the signing key's certificate, which verified under a pinned root.- Returns:
- The certificate.
getVerifiedAt
Gets the verifier's clock when the document was verified.- Returns:
- The instant.
isExpired
public boolean isExpired()Tells whether the document had expired when it was verified: step 5 of 2.5, by the verifier's clock.- Returns:
- true when
expireswas not in the future.
isExpired
Tells whether the document has expired at an instant.- Parameters:
now- The instant.- Returns:
- true when
expiresis not after it.
getVersion
getLicenseUUID
getProduct
public int getProduct()Gets the product,product.- Returns:
PRODUCT_IIZIGOtoPRODUCT_CONTAINER_SERVER.
getAccountUID
public long getAccountUID()Gets the account's uid on the MLS,acct.- Returns:
- The uid.
getAccountName
Gets the account's e-mail,acctName.- Returns:
- The e-mail, or null when absent.
getInstallationKey
Gets the installation's public key,ikey.- Returns:
- The Ed25519 public key.
getInstallationKeyBytes
public byte[] getInstallationKeyBytes()Gets the installation's public key as its 32 bytes.- Returns:
- A copy of the bytes.
getInstallationKeyText
Gets the installation's public key as text,ikeyas written.- Returns:
- The key, base64url.
getInstallID
Gets the hardware-bound installation ID,iid.- Returns:
- The ID, or null when absent.
getEntitlementUUID
Gets the entitlement's UUID,ent.- Returns:
- The UUID, or null when absent.
getEntitlementName
Gets the entitlement's display name,entName.- Returns:
- The name, or null when absent.
getState
getValidFrom
Gets the start of the entitlement's validity,validFrom.- Returns:
- The instant, or null when unbounded.
getValidTo
Gets the end of the entitlement's validity,validTo.- Returns:
- The instant, or null when unbounded.
getTrialUntil
Gets the end of a trial,trialUntil.- Returns:
- The instant, or null when absent.
getMaxUsers
getMaxServers
getDeveloperID
getDeveloperGroupID
Gets the Developer Group ID,groupID.- Returns:
- The ID, or null when absent.
getIssued
getRefreshAfter
Gets when the installation should ask for a new document,refreshAfter.- Returns:
- The instant.
getExpires
getRequestNonce
public byte[] getRequestNonce()Gets the request nonce,rn.- Returns:
- A copy of the 32 bytes, or null when absent.
get
asMap
toString