cmdbox 0.5.4__py3-none-any.whl → 0.6.0.1__py3-none-any.whl
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.
Potentially problematic release.
This version of cmdbox might be problematic. Click here for more details.
- cmdbox/app/auth/signin.py +463 -303
- cmdbox/app/common.py +51 -3
- cmdbox/app/commons/loghandler.py +62 -13
- cmdbox/app/edge.py +5 -173
- cmdbox/app/edge_tool.py +177 -0
- cmdbox/app/feature.py +10 -9
- cmdbox/app/features/cli/agent_base.py +479 -0
- cmdbox/app/features/cli/audit_base.py +17 -5
- cmdbox/app/features/cli/cmdbox_audit_search.py +24 -1
- cmdbox/app/features/cli/cmdbox_client_file_download.py +1 -1
- cmdbox/app/features/cli/cmdbox_cmd_list.py +105 -0
- cmdbox/app/features/cli/cmdbox_cmd_load.py +104 -0
- cmdbox/app/features/cli/cmdbox_edge_config.py +2 -2
- cmdbox/app/features/cli/cmdbox_edge_start.py +1 -1
- cmdbox/app/features/cli/cmdbox_gui_start.py +9 -132
- cmdbox/app/features/cli/cmdbox_gui_stop.py +4 -21
- cmdbox/app/features/cli/cmdbox_server_start.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_apikey_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_apikey_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_genpass.py +0 -3
- cmdbox/app/features/cli/cmdbox_web_group_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_edit.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_list.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_start.py +120 -104
- cmdbox/app/features/cli/cmdbox_web_stop.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_edit.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
- cmdbox/app/features/web/cmdbox_web_agent.py +262 -0
- cmdbox/app/features/web/cmdbox_web_do_signout.py +3 -3
- cmdbox/app/features/web/cmdbox_web_exec_cmd.py +8 -3
- cmdbox/app/features/web/cmdbox_web_signin.py +5 -4
- cmdbox/app/features/web/cmdbox_web_users.py +2 -0
- cmdbox/app/options.py +62 -9
- cmdbox/app/web.py +139 -15
- cmdbox/extensions/features.yml +18 -0
- cmdbox/extensions/sample_project/sample/app/features/cli/__init__.py +0 -0
- cmdbox/extensions/sample_project/sample/app/features/web/__init__.py +0 -0
- cmdbox/extensions/sample_project/sample/extensions/features.yml +18 -0
- cmdbox/extensions/sample_project/sample/extensions/user_list.yml +2 -1
- cmdbox/extensions/sample_project/sample/logconf_sample.yml +14 -1
- cmdbox/extensions/user_list.yml +1 -0
- cmdbox/licenses/LICENSE.Authlib.1.5.2(BSD License).txt +29 -0
- cmdbox/licenses/LICENSE.Deprecated.1.2.18(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.SQLAlchemy.2.0.40(MIT License).txt +19 -0
- cmdbox/licenses/LICENSE.aiohappyeyeballs.2.6.1(Python Software Foundation License).txt +279 -0
- cmdbox/licenses/LICENSE.aiohttp.3.11.18(Apache Software License).txt +13 -0
- cmdbox/licenses/LICENSE.aiosignal.1.3.2(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.attrs.25.3.0(UNKNOWN).txt +21 -0
- cmdbox/licenses/LICENSE.cachetools.5.5.2(MIT License).txt +20 -0
- cmdbox/licenses/LICENSE.distro.1.9.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.docstring_parser.0.16(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.filelock.3.18.0(The Unlicense (Unlicense)).txt +24 -0
- cmdbox/licenses/LICENSE.frozenlist.1.6.0(Apache-2.0).txt +201 -0
- cmdbox/licenses/LICENSE.fsspec.2025.3.2(BSD License).txt +29 -0
- cmdbox/licenses/LICENSE.google-adk.0.5.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-api-python-client.2.169.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-auth-httplib2.0.2.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-auth.2.40.1(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-cloud-aiplatform.1.92.0(Apache 2.0).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-bigquery.3.31.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-core.2.4.3(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-resource-manager.1.14.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-secret-manager.2.23.3(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-speech.2.32.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-storage.2.19.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-trace.1.16.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-crc32c.1.7.1(Apache 2.0).txt +202 -0
- cmdbox/licenses/LICENSE.google-genai.1.14.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-resumable-media.2.7.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.googleapis-common-protos.1.70.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.graphviz.0.20.3(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.grpc-google-iam-v1.0.14.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.grpcio-status.1.71.0(Apache Software License).txt +610 -0
- cmdbox/licenses/LICENSE.grpcio.1.71.0(Apache Software License).txt +610 -0
- cmdbox/licenses/LICENSE.httpcore.1.0.9(BSD License).txt +27 -0
- cmdbox/licenses/LICENSE.httplib2.0.22.0(MIT License).txt +23 -0
- cmdbox/licenses/LICENSE.httpx-sse.0.4.0(MIT).txt +21 -0
- cmdbox/licenses/LICENSE.httpx.0.28.1(BSD License).txt +12 -0
- cmdbox/licenses/LICENSE.huggingface-hub.0.31.1(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.importlib_metadata.8.6.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.jiter.0.9.0(MIT License).txt +1 -0
- cmdbox/licenses/LICENSE.jsonschema-specifications.2025.4.1(UNKNOWN).txt +19 -0
- cmdbox/licenses/LICENSE.jsonschema.4.23.0(MIT License).txt +19 -0
- cmdbox/licenses/LICENSE.litellm.1.69.0(MIT License).txt +26 -0
- cmdbox/licenses/LICENSE.mcp.1.8.0(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.multidict.6.4.3(Apache Software License).txt +13 -0
- cmdbox/licenses/LICENSE.openai.1.75.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-api.1.33.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-exporter-gcp-trace.1.9.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-resourcedetector-gcp.1.9.0a0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-sdk.1.33.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-semantic-conventions.0.54b0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.propcache.0.3.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.proto-plus.1.26.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.protobuf.5.29.4(3-Clause BSD License).txt +32 -0
- cmdbox/licenses/LICENSE.pyasn1.0.6.1(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.pyasn1_modules.0.4.2(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.pydantic-settings.2.9.1(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.pyparsing.3.2.3(MIT License).txt +18 -0
- cmdbox/licenses/LICENSE.python-dateutil.2.9.0.post0(Apache Software License; BSD License).txt +54 -0
- cmdbox/licenses/LICENSE.referencing.0.36.2(UNKNOWN).txt +19 -0
- cmdbox/licenses/LICENSE.regex.2024.11.6(Apache Software License).txt +208 -0
- cmdbox/licenses/LICENSE.rpds-py.0.24.0(MIT).txt +19 -0
- cmdbox/licenses/LICENSE.rsa.4.9.1(Apache Software License).txt +13 -0
- cmdbox/licenses/LICENSE.shapely.2.1.0(BSD License).txt +29 -0
- cmdbox/licenses/LICENSE.sse-starlette.2.3.4(BSD License).txt +27 -0
- cmdbox/licenses/LICENSE.tiktoken.0.9.0(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.tokenizers.0.21.1(Apache Software License).txt +1 -0
- cmdbox/licenses/LICENSE.tqdm.4.67.1(MIT License; Mozilla Public License 2.0 (MPL 2.0)).txt +49 -0
- cmdbox/licenses/LICENSE.tzlocal.5.3.1(MIT License).txt +19 -0
- cmdbox/licenses/LICENSE.uritemplate.4.1.1(Apache Software License; BSD License).txt +3 -0
- cmdbox/licenses/LICENSE.wrapt.1.17.2(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.yarl.1.20.0(Apache Software License).txt +202 -0
- cmdbox/licenses/files.txt +104 -11
- cmdbox/logconf_audit.yml +16 -3
- cmdbox/logconf_client.yml +16 -3
- cmdbox/logconf_cmdbox.yml +16 -3
- cmdbox/logconf_edge.yml +16 -3
- cmdbox/logconf_gui.yml +15 -2
- cmdbox/logconf_server.yml +15 -2
- cmdbox/logconf_web.yml +15 -2
- cmdbox/version.py +3 -2
- cmdbox/web/agent.html +263 -0
- cmdbox/web/assets/cmdbox/agent.js +338 -0
- cmdbox/web/assets/cmdbox/common.js +1111 -1020
- cmdbox/web/assets/cmdbox/main.js +17 -3
- cmdbox/web/assets/cmdbox/signin.js +4 -4
- cmdbox/web/assets/filer/filer.js +4 -2
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/METADATA +69 -26
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/RECORD +148 -67
- /cmdbox/licenses/{LICENSE.charset-normalizer.3.4.1(MIT License).txt → LICENSE.charset-normalizer.3.4.2(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.click.8.1.8(BSD License).txt → LICENSE.click.8.2.0(UNKNOWN).txt} +0 -0
- /cmdbox/licenses/{LICENSE.cryptography.44.0.2(Apache Software License; BSD License).txt → LICENSE.cryptography.44.0.3(Apache Software License; BSD License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.importlib_metadata.8.7.0(Apache Software License).txt → LICENSE.google-api-core.2.24.2(Apache Software License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.greenlet.3.2.1(MIT AND Python-2.0).txt → LICENSE.greenlet.3.2.2(MIT AND Python-2.0).txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg-binary.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE.psycopg-binary.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE.psycopg.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic.2.11.3(MIT License).txt → LICENSE.pydantic.2.11.4(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic_core.2.33.1(MIT License).txt → LICENSE.pydantic_core.2.33.2(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.redis.5.2.1(MIT License).txt → LICENSE.redis.6.0.0(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.snowballstemmer.2.2.0(BSD License).txt → LICENSE.snowballstemmer.3.0.1(BSD License).txt} +0 -0
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/LICENSE +0 -0
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/WHEEL +0 -0
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.5.4.dist-info → cmdbox-0.6.0.1.dist-info}/top_level.txt +0 -0
cmdbox/web/assets/cmdbox/main.js
CHANGED
|
@@ -19,6 +19,9 @@ $(() => {
|
|
|
19
19
|
cmdbox.init_modal_button();
|
|
20
20
|
cmdbox.gui_callback_reconnectInterval_handler = null;
|
|
21
21
|
cmdbox.gui_callback_ping_handler = null;
|
|
22
|
+
const ping_interval = 5000; // pingの間隔
|
|
23
|
+
const max_reconnect_count = 60000/ping_interval*1; // 最大再接続回数
|
|
24
|
+
cmdbox.callback_reconnect_count = 0; // 再接続回数
|
|
22
25
|
const gui_callback = () => {
|
|
23
26
|
if (cmdbox.gui_callback_reconnectInterval_handler) {
|
|
24
27
|
clearInterval(cmdbox.gui_callback_reconnectInterval_handler);
|
|
@@ -68,8 +71,11 @@ $(() => {
|
|
|
68
71
|
}
|
|
69
72
|
};
|
|
70
73
|
ws.onopen = () => {
|
|
71
|
-
const ping = () => {
|
|
72
|
-
|
|
74
|
+
const ping = () => {
|
|
75
|
+
ws.send('ping');
|
|
76
|
+
cmdbox.callback_reconnect_count = 0;
|
|
77
|
+
};
|
|
78
|
+
cmdbox.gui_callback_ping_handler = setInterval(() => {ping();}, ping_interval);
|
|
73
79
|
};
|
|
74
80
|
ws.onerror = (e) => {
|
|
75
81
|
console.error(`Websocket error: ${e}`);
|
|
@@ -77,9 +83,17 @@ $(() => {
|
|
|
77
83
|
};
|
|
78
84
|
ws.onclose = () => {
|
|
79
85
|
clearInterval(cmdbox.gui_callback_ping_handler);
|
|
86
|
+
if (cmdbox.callback_reconnect_count >= max_reconnect_count) {
|
|
87
|
+
clearInterval(cmdbox.gui_callback_reconnectInterval_handler);
|
|
88
|
+
cmdbox.message({'error':'Connection to the agent has failed for several minutes. Please reload to resume reconnection.'});
|
|
89
|
+
const rand = cmdbox.random_string(8);
|
|
90
|
+
location.href = `../signin${path}?r=${rand}`;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
cmdbox.callback_reconnect_count++;
|
|
80
94
|
cmdbox.gui_callback_reconnectInterval_handler = setInterval(() => {
|
|
81
95
|
gui_callback();
|
|
82
|
-
},
|
|
96
|
+
}, ping_interval);
|
|
83
97
|
};
|
|
84
98
|
};
|
|
85
99
|
gui_callback();
|
|
@@ -62,19 +62,19 @@ $(() => {
|
|
|
62
62
|
const btn_saml_azure = $('.btn-saml-azure');
|
|
63
63
|
btn_google.off('click').on('click', async (event) => {
|
|
64
64
|
const path = window.location.pathname.replace('/signin', '');
|
|
65
|
-
window.location.href = `../oauth2/google${path}?n=${cmdbox.
|
|
65
|
+
window.location.href = `../oauth2/google${path}?n=${cmdbox.random_string(8)}`;
|
|
66
66
|
});
|
|
67
67
|
btn_github.off('click').on('click', async (event) => {
|
|
68
68
|
const path = window.location.pathname.replace('/signin', '');
|
|
69
|
-
window.location.href = `../oauth2/github${path}?n=${cmdbox.
|
|
69
|
+
window.location.href = `../oauth2/github${path}?n=${cmdbox.random_string(8)}`;
|
|
70
70
|
});
|
|
71
71
|
btn_azure.off('click').on('click', async (event) => {
|
|
72
72
|
const path = window.location.pathname.replace('/signin', '');
|
|
73
|
-
window.location.href = `../oauth2/azure${path}?n=${cmdbox.
|
|
73
|
+
window.location.href = `../oauth2/azure${path}?n=${cmdbox.random_string(8)}`;
|
|
74
74
|
});
|
|
75
75
|
btn_saml_azure.off('click').on('click', async (event) => {
|
|
76
76
|
const path = window.location.pathname.replace('/signin', '');
|
|
77
|
-
window.location.href = `../saml/azure${path}?n=${cmdbox.
|
|
77
|
+
window.location.href = `../saml/azure${path}?n=${cmdbox.random_string(8)}`;
|
|
78
78
|
});
|
|
79
79
|
oauth2_enabled().then((res) => {
|
|
80
80
|
if (res.google) btn_google.show();
|
cmdbox/web/assets/filer/filer.js
CHANGED
|
@@ -145,7 +145,8 @@ fsapi.filer = (svpath, is_local) => {
|
|
|
145
145
|
opt['capture_maxsize'] = 1024**3*10;
|
|
146
146
|
//opt['svpath'] = event.originalEvent.dataTransfer.getData('path');
|
|
147
147
|
jobs.push(cmdbox.sv_exec_cmd(opt).then(async res => {
|
|
148
|
-
if(
|
|
148
|
+
if (res && res['success']) res = [res];
|
|
149
|
+
if (!res[0] || !res[0]['success']) {
|
|
149
150
|
fsapi.download_now ++;
|
|
150
151
|
cmdbox.progress(0, list_downloads.length, fsapi.download_now, '', true, false)
|
|
151
152
|
cmdbox.message(res);
|
|
@@ -276,6 +277,7 @@ fsapi.tree = (target, svpath, current_ul_elem, is_local) => {
|
|
|
276
277
|
res[0]['success']['_'] = fsapi.treemem;
|
|
277
278
|
}
|
|
278
279
|
}
|
|
280
|
+
if (res && res['success']) res = [res];
|
|
279
281
|
if(!res[0] || !res[0]['success']) {
|
|
280
282
|
cmdbox.message(res);
|
|
281
283
|
target.find('.file-list').html('');
|
|
@@ -420,7 +422,7 @@ fsapi.tree = (target, svpath, current_ul_elem, is_local) => {
|
|
|
420
422
|
const opt = cmdbox.get_server_opt(false, fsapi.right);
|
|
421
423
|
const thum_size = "0";
|
|
422
424
|
const constr = btoa(`${opt['host']}\t${opt['port']}\t${opt['svname']}\t${opt['password']}\t${encodeURIComponent(_p)}\t${opt['scope']}\t${thum_size}`);
|
|
423
|
-
fsapi.viewer(_p, res['data'], `filer/download/${constr}?r=${cmdbox.
|
|
425
|
+
fsapi.viewer(_p, res['data'], `filer/download/${constr}?r=${cmdbox.random_string(8)}`, _mime);
|
|
424
426
|
}
|
|
425
427
|
}).finally(() => {
|
|
426
428
|
cmdbox.hide_loading();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cmdbox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0.1
|
|
4
4
|
Summary: cmdbox: It is a command line application with a plugin mechanism.
|
|
5
5
|
Home-page: https://github.com/hamacom2004jp/cmdbox
|
|
6
6
|
Download-URL: https://github.com/hamacom2004jp/cmdbox
|
|
@@ -38,6 +38,7 @@ Requires-Dist: pycryptodome
|
|
|
38
38
|
Requires-Dist: questionary
|
|
39
39
|
Requires-Dist: redis
|
|
40
40
|
Requires-Dist: requests
|
|
41
|
+
Requires-Dist: rich
|
|
41
42
|
Requires-Dist: six
|
|
42
43
|
Requires-Dist: tabulate
|
|
43
44
|
Requires-Dist: uvicorn[standard]
|
|
@@ -56,8 +57,10 @@ Requires-Dist: wheel
|
|
|
56
57
|
# Install
|
|
57
58
|
|
|
58
59
|
- Install cmdbox with the following command.
|
|
60
|
+
- Also install the docker version of the redis server.
|
|
59
61
|
|
|
60
62
|
```bash
|
|
63
|
+
docker run -p 6379:6379 --name redis -e REDIS_PASSWORD=password -it ubuntu/redis:latest
|
|
61
64
|
pip install cmdbox
|
|
62
65
|
cmdbox -v
|
|
63
66
|
```
|
|
@@ -68,12 +71,34 @@ pip install xmlsec==1.3.13 python3-saml
|
|
|
68
71
|
apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl build-essential libopencv-dev
|
|
69
72
|
```
|
|
70
73
|
|
|
71
|
-
-
|
|
74
|
+
- When using `--agent use` in web mode, install the modules with dependencies.
|
|
75
|
+
```bash
|
|
76
|
+
pip install google-adk litellm
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
# Run
|
|
80
|
+
|
|
81
|
+
- Run the cmdbox server.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cmdbox -m server -c start &
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- Run the cmdbox web.
|
|
72
88
|
|
|
73
89
|
```bash
|
|
74
|
-
|
|
90
|
+
cmdbox -m web -c start --signin_file .cmdbox/user_list.yml &
|
|
75
91
|
```
|
|
76
92
|
|
|
93
|
+
- Run the cmdbox web with agent.
|
|
94
|
+
- Below is an example of using Google vertexai.
|
|
95
|
+
- Other available options include Azure OpenAI and Ollama.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cmdbox -m web -c start --signin_file .cmdbox/user_list.yml --agent use --llmprov vertexai --llmmodel gemini-2.0-flash --llmlocation us-central1 --llmsvaccountfile <account json file>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
|
|
77
102
|
# Tutorial
|
|
78
103
|
|
|
79
104
|
- Open the ```.sample/sample_project``` folder in the current directory with VSCode.
|
|
@@ -294,29 +319,47 @@ aliases: # Specify the alias for the specified co
|
|
|
294
319
|
# e.g. /{1}_exec
|
|
295
320
|
move: # Specify whether to move the regular expression group of the source to the target.
|
|
296
321
|
# e.g. true
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
agentrule: # Specifies a list of rules that determine which commands the agent can execute.
|
|
323
|
+
policy: deny # Specify the default policy for the rule. The value can be allow or deny.
|
|
324
|
+
rules: # Specify the rules for the commands that the agent can execute according to the group to which the user belongs.
|
|
325
|
+
- mode: audit # Specify the "mode" as the condition for applying the rule.
|
|
326
|
+
cmds: [search, write] # Specify the "cmd" to which the rule applies. Multiple items can be specified in a list.
|
|
327
|
+
rule: allow # Specifies whether the specified command is allowed or not. Values are allow or deny.
|
|
328
|
+
- mode: client
|
|
329
|
+
cmds: [file_copy, file_download, file_list, file_mkdir, file_move, file_remove, file_rmdir, file_upload, server_info]
|
|
330
|
+
rule: allow
|
|
331
|
+
- mode: cmd
|
|
332
|
+
cmds: [list, load]
|
|
333
|
+
rule: allow
|
|
334
|
+
- mode: server
|
|
335
|
+
cmds: [list]
|
|
336
|
+
rule: allow
|
|
337
|
+
- mode: web
|
|
338
|
+
cmds: [gencert, genpass, group_list, user_list]
|
|
339
|
+
rule: allow
|
|
340
|
+
audit:
|
|
341
|
+
enabled: true # Specify whether to enable the audit function.
|
|
342
|
+
write:
|
|
343
|
+
mode: audit # Specify the mode of the feature to be writed.
|
|
344
|
+
cmd: write # Specify the command to be writed.
|
|
345
|
+
search:
|
|
346
|
+
mode: audit # Specify the mode of the feature to be searched.
|
|
347
|
+
cmd: search # Specify the command to be searched.
|
|
348
|
+
options: # Specify the options for the audit function.
|
|
349
|
+
host: localhost # Specify the service host of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
350
|
+
port: 6379 # Specify the service port of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
351
|
+
password: password # Specify the access password of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
352
|
+
svname: cmdbox # Specify the audit service name of the inference server.However, if it is specified as a command line argument, it is ignored.
|
|
353
|
+
retry_count: 3 # Specifies the number of reconnections to the audit Redis server.If less than 0 is specified, reconnection is forever.
|
|
354
|
+
retry_interval: 1 # Specifies the number of seconds before reconnecting to the audit Redis server.
|
|
355
|
+
timeout: 15 # Specify the maximum waiting time until the server responds.
|
|
356
|
+
pg_enabled: False # Specify True if using the postgresql database server.
|
|
357
|
+
pg_host: localhost # Specify the postgresql host.
|
|
358
|
+
pg_port: 5432 # Specify the postgresql port.
|
|
359
|
+
pg_user: postgres # Specify the postgresql user name.
|
|
360
|
+
pg_password: password # Specify the postgresql password.
|
|
361
|
+
pg_dbname: audit # Specify the postgresql database name.
|
|
362
|
+
retention_period_days: 365 # Specify the number of days to retain audit logs.
|
|
320
363
|
|
|
321
364
|
```
|
|
322
365
|
|