License Server
Represent a license lifecycle with explicit rules.
Activation, expiry and revocation rules were inspected. State is still in memory; durable storage and commercial production operation are not demonstrated.
Problem and service contract
License Server explores an API for software-license activation, validation and revocation. It represents states and refusal reasons so clients can distinguish missing keys, expiration and binding to another machine.
FastAPI exposes HTTP operations and Pydantic models requests and responses. It is a personal business-rule and contract project, not a proven commercial licensing infrastructure.
Activation and machine binding
Activation looks up keys by hash, checks state and expiration, compares machines and applies activation-count rules. Responses include success, reason, identifier and validity when available.
Code binds licenses to a client-provided identifier. This is a binding rule, not proof of physical machine identity or complete fraud protection; identifier integrity depends on the client protocol.
Validation, expiration and revocation
Validation distinguishes active, revoked, expired and not-yet-activated licenses. Timezone-aware timestamps support UTC validity checks. Revocation is an administrative operation separate from client validation.
Explicit states make errors explainable. Reactivation and concurrency still need testing: activation counters can change on repeated calls, and the protocol must clearly define a new activation.
Data and persistence boundaries
Seed keys come from configuration and are represented with SHA3-256 hashes. Runtime records and changes remain in memory; load/save functions organize process-local state.
This path has no persistent database. A restart may lose in-memory activations and revocations. Transactional storage is necessary before relying on the service for durable access decisions.
Administration and security surface
FastAPI dependencies protect administrative operations with a configured key sent in a header. Listing and statistics expose state without returning original license keys.
Implementation still needs CORS policy, attempt controls, stronger administrator authentication and data minimization. Key hashing is not a digital license signature or encryption of all state.
Skills and next steps
The project demonstrates state modeling, payload validation, separation of client and administrator operations and expiration handling. Health checks complete its diagnostic surface.
Review inspected code without activating licenses. Next steps are persistence, idempotency, rule and concurrency tests and machine-binding review before commercial operation.
Private repositories. Authorized summaries; source code is not distributed here.