@lamalibre/create-portlama 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/service-config.js +28 -22
- package/src/tasks/panel.js +9 -1
- package/src/tasks/redeploy.js +10 -1
- package/vendor/panel-client/dist/assets/index-DYc0AT5L.js +689 -0
- package/vendor/panel-client/dist/assets/index-DkI5S9UE.css +1 -0
- package/vendor/panel-client/dist/docs/01-concepts/security-model.md +17 -1
- package/vendor/panel-client/dist/docs/01-concepts/tickets.md +329 -0
- package/vendor/panel-client/dist/docs/02-guides/disaster-recovery.md +51 -2
- package/vendor/panel-client/dist/docs/03-architecture/panel-server.md +109 -15
- package/vendor/panel-client/dist/docs/04-api-reference/overview.md +27 -2
- package/vendor/panel-client/dist/docs/04-api-reference/tickets.md +615 -0
- package/vendor/panel-client/dist/docs/06-reference/config-files.md +128 -0
- package/vendor/panel-client/dist/docs/06-reference/ports-and-services.md +3 -1
- package/vendor/panel-client/dist/docs/_index.json +7 -1
- package/vendor/panel-client/dist/index.html +2 -2
- package/vendor/panel-server/package.json +1 -1
- package/vendor/panel-server/src/index.js +18 -0
- package/vendor/panel-server/src/lib/authelia.js +1 -1
- package/vendor/panel-server/src/lib/certbot.js +9 -4
- package/vendor/panel-server/src/lib/constants.js +8 -0
- package/vendor/panel-server/src/lib/mtls.js +18 -2
- package/vendor/panel-server/src/lib/plugins.js +3 -6
- package/vendor/panel-server/src/lib/tickets.js +1117 -0
- package/vendor/panel-server/src/routes/management/certs.js +4 -8
- package/vendor/panel-server/src/routes/management/tickets.js +437 -0
- package/vendor/panel-server/src/routes/management.js +2 -0
- package/vendor/panel-server/src/routes/plugin-router.js +2 -5
- package/vendor/panel-client/dist/assets/index-7HrKd8Ks.css +0 -1
- package/vendor/panel-client/dist/assets/index-BRwo-lPQ.js +0 -679
package/package.json
CHANGED
|
@@ -74,30 +74,36 @@ portlama ALL=(root) NOPASSWD: /usr/bin/systemctl restart portlama-panel
|
|
|
74
74
|
# --- nginx config test ---
|
|
75
75
|
portlama ALL=(root) NOPASSWD: /usr/sbin/nginx -t
|
|
76
76
|
|
|
77
|
-
# --- certbot: restrict
|
|
78
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/certbot certonly --nginx *
|
|
79
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/certbot renew
|
|
80
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/certbot renew --cert-name *
|
|
81
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/certbot
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -in /etc/
|
|
77
|
+
# --- certbot: restrict to exact flag patterns used by the application ---
|
|
78
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/certbot certonly --nginx -d * --email * --agree-tos --non-interactive
|
|
79
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/certbot renew --non-interactive
|
|
80
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/certbot renew --cert-name * --non-interactive
|
|
81
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/certbot renew --cert-name * --force-renewal --non-interactive
|
|
82
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/certbot certificates --non-interactive
|
|
83
|
+
|
|
84
|
+
# --- openssl: read-only operations (no trailing wildcards) ---
|
|
85
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -in /etc/portlama/pki/* -serial -noout
|
|
86
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -in /etc/portlama/pki/* -enddate -noout
|
|
87
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -checkend 86400 -noout -in /etc/letsencrypt/live/*
|
|
88
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -enddate -noout -in /etc/letsencrypt/live/*
|
|
89
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -in /etc/letsencrypt/live/* -enddate -noout
|
|
90
|
+
# --- openssl: PKI generation and signing (trailing * for variable -subj CN) ---
|
|
91
|
+
# Trust boundary: only @lamalibre/ scoped code runs as portlama user
|
|
86
92
|
portlama ALL=(root) NOPASSWD: /usr/bin/openssl x509 -req -in /etc/portlama/pki/* *
|
|
87
93
|
portlama ALL=(root) NOPASSWD: /usr/bin/openssl genrsa -out /etc/portlama/pki/* *
|
|
88
94
|
portlama ALL=(root) NOPASSWD: /usr/bin/openssl req -new -key /etc/portlama/pki/* *
|
|
89
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/openssl pkcs12 -export
|
|
90
|
-
|
|
91
|
-
# --- mv: restrict source to
|
|
92
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
93
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
94
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
95
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
96
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
97
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
98
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
99
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
100
|
-
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp
|
|
95
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/openssl pkcs12 -export -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -macalg sha1 -out /etc/portlama/pki/*
|
|
96
|
+
|
|
97
|
+
# --- mv: restrict source to known temp-file prefixes (no bare /tmp/*) ---
|
|
98
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/site-index-* /var/www/portlama/*
|
|
99
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/site-upload-* /var/www/portlama/*
|
|
100
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/invite-page-* /var/www/portlama/*
|
|
101
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/nginx-* /etc/nginx/sites-available/*
|
|
102
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/chisel-service-* /etc/systemd/system/chisel.service
|
|
103
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/authelia-service-* /etc/systemd/system/authelia.service
|
|
104
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/chisel-* /usr/local/bin/chisel
|
|
105
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/authelia-* /usr/local/bin/authelia
|
|
106
|
+
portlama ALL=(root) NOPASSWD: /usr/bin/mv /tmp/portlama-authelia-* /etc/authelia/*
|
|
101
107
|
portlama ALL=(root) NOPASSWD: /usr/bin/mv /etc/portlama/pki/*.new /etc/portlama/pki/*
|
|
102
108
|
portlama ALL=(root) NOPASSWD: /usr/bin/mv /etc/nginx/sites-available/*.bak /etc/nginx/sites-available/*
|
|
103
109
|
|
|
@@ -111,7 +117,7 @@ portlama ALL=(root) NOPASSWD: /usr/bin/mkdir -p /etc/authelia/*
|
|
|
111
117
|
portlama ALL=(root) NOPASSWD: /usr/bin/mkdir -p /var/log/authelia
|
|
112
118
|
portlama ALL=(root) NOPASSWD: /usr/bin/mkdir -p /var/log/authelia/*
|
|
113
119
|
portlama ALL=(root) NOPASSWD: /usr/bin/cat /etc/authelia/*
|
|
114
|
-
portlama ALL=(root) NOPASSWD: /usr/local/bin/authelia storage *
|
|
120
|
+
portlama ALL=(root) NOPASSWD: /usr/local/bin/authelia storage user totp generate *
|
|
115
121
|
|
|
116
122
|
# --- Static site file operations under /var/www/portlama/ ---
|
|
117
123
|
portlama ALL=(root) NOPASSWD: /usr/bin/mkdir -p /var/www/portlama/*
|
package/src/tasks/panel.js
CHANGED
|
@@ -83,7 +83,7 @@ export function panelTasks(ctx, task) {
|
|
|
83
83
|
|
|
84
84
|
subtask.output = 'Installing production dependencies...';
|
|
85
85
|
try {
|
|
86
|
-
await execa('npm', ['install', '--production'], {
|
|
86
|
+
await execa('npm', ['install', '--production', '--ignore-scripts'], {
|
|
87
87
|
cwd: serverDest,
|
|
88
88
|
});
|
|
89
89
|
} catch (err) {
|
|
@@ -94,6 +94,14 @@ export function panelTasks(ctx, task) {
|
|
|
94
94
|
|
|
95
95
|
await execa('chown', ['-R', 'portlama:portlama', serverDest]);
|
|
96
96
|
|
|
97
|
+
// Create CLI symlink for portlama-reset-admin
|
|
98
|
+
const resetAdminSrc = join(serverDest, 'src', 'cli', 'reset-admin.js');
|
|
99
|
+
const resetAdminDest = '/usr/local/bin/portlama-reset-admin';
|
|
100
|
+
if (existsSync(resetAdminSrc)) {
|
|
101
|
+
await execa('chmod', ['+x', resetAdminSrc]);
|
|
102
|
+
await execa('ln', ['-sf', resetAdminSrc, resetAdminDest]);
|
|
103
|
+
}
|
|
104
|
+
|
|
97
105
|
subtask.output = 'Panel server deployed';
|
|
98
106
|
},
|
|
99
107
|
rendererOptions: { persistentOutput: true },
|
package/src/tasks/redeploy.js
CHANGED
|
@@ -103,7 +103,7 @@ export function redeployTasks(ctx, task) {
|
|
|
103
103
|
|
|
104
104
|
subtask.output = 'Installing production dependencies...';
|
|
105
105
|
try {
|
|
106
|
-
await execa('npm', ['install', '--production'], {
|
|
106
|
+
await execa('npm', ['install', '--production', '--ignore-scripts'], {
|
|
107
107
|
cwd: serverDest,
|
|
108
108
|
});
|
|
109
109
|
} catch (err) {
|
|
@@ -113,6 +113,15 @@ export function redeployTasks(ctx, task) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
await execa('chown', ['-R', 'portlama:portlama', serverDest]);
|
|
116
|
+
|
|
117
|
+
// Ensure CLI symlink for portlama-reset-admin
|
|
118
|
+
const resetAdminSrc = join(serverDest, 'src', 'cli', 'reset-admin.js');
|
|
119
|
+
const resetAdminDest = '/usr/local/bin/portlama-reset-admin';
|
|
120
|
+
if (existsSync(resetAdminSrc)) {
|
|
121
|
+
await execa('chmod', ['+x', resetAdminSrc]);
|
|
122
|
+
await execa('ln', ['-sf', resetAdminSrc, resetAdminDest]);
|
|
123
|
+
}
|
|
124
|
+
|
|
116
125
|
subtask.output = 'Panel server updated';
|
|
117
126
|
},
|
|
118
127
|
rendererOptions: { persistentOutput: true },
|