feat: implement license platform business flows and delivery tooling
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

Add admin and customer interfaces, orders, signed activation and leases, protected package delivery, keyring verification, migrations, security controls, tests and deployment documentation.

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
2026-10-09 15:33:22 +08:00
parent 3ab651d3a8
commit 54c318c615
142 changed files with 11105 additions and 178 deletions

22
deploy/nginx/compose.conf Normal file
View File

@@ -0,0 +1,22 @@
server {
listen 8080;
server_name localhost;
client_max_body_size 64m;
root /usr/share/nginx/html;
location /api/ {
proxy_pass http://api:18080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 60s;
}
location /_packages/ {
internal;
alias /srv/license-packages/;
autoindex off;
disable_symlinks on;
add_header Cache-Control "private, no-store" always;
add_header X-Package-SHA256 $upstream_http_x_package_sha256 always;
}
location / { try_files $uri $uri/ /index.html; }
}

View File

@@ -0,0 +1,18 @@
# Isolated development reverse-proxy fragment. Mount PACKAGE_STORAGE_ROOT read-only at /srv/license-packages.
# The upstream application must set X-Accel-Redirect only after authorization and audit commit.
server {
listen 18181;
server_name 127.0.0.1;
location = /_packages { return 404; }
location /_packages/ {
internal;
alias /srv/license-packages/;
autoindex off;
disable_symlinks on;
add_header Cache-Control "private, no-store" always;
add_header X-Package-SHA256 $upstream_http_x_package_sha256 always;
limit_except GET HEAD { deny all; }
}
client_max_body_size 64m;
location / { proxy_pass http://host.docker.internal:18082; }
}

View File

@@ -0,0 +1,30 @@
# Example only. Use certificates issued/managed by your production certificate authority.
# Do not copy a self-signed development certificate into this profile.
# Mount this as a server block and bind /run/tls read-only from the managed certificate path.
server {
listen 443 ssl;
server_name license.example.invalid;
ssl_certificate /run/tls/fullchain.pem;
ssl_certificate_key /run/tls/privatekey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
client_max_body_size 64m;
location /api/ {
proxy_pass http://api:18080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 60s;
}
location /_packages/ {
internal;
alias /srv/license-packages/;
autoindex off;
disable_symlinks on;
add_header Cache-Control "private, no-store" always;
add_header X-Package-SHA256 $upstream_http_x_package_sha256 always;
}
location / { root /usr/share/nginx/html; try_files $uri $uri/ /index.html; }
}
# Restrict listener/network reachability to the actual proxy tier. Configure the API's
# HTTP_TRUSTED_PROXY_CIDRS to exact proxy source CIDRs only when this proxy is in use.