cmdbox 0.5.3__tar.gz → 0.5.4__tar.gz
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-0.5.3/cmdbox.egg-info → cmdbox-0.5.4}/PKG-INFO +68 -15
- {cmdbox-0.5.3 → cmdbox-0.5.4}/README.md +67 -14
- cmdbox-0.5.4/cmdbox/app/auth/__init__.py +0 -0
- cmdbox-0.5.4/cmdbox/app/auth/azure_signin.py +38 -0
- cmdbox-0.5.4/cmdbox/app/auth/azure_signin_saml.py +12 -0
- cmdbox-0.5.4/cmdbox/app/auth/github_signin.py +38 -0
- cmdbox-0.5.4/cmdbox/app/auth/google_signin.py +32 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/auth/signin.py +47 -4
- cmdbox-0.5.4/cmdbox/app/auth/signin_saml.py +61 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/edge.py +198 -61
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/feature.py +2 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/audit_base.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_audit_createdb.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_audit_write.py +4 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_copy.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_download.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_list.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_move.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_remove.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_file_upload.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_client_server_info.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_edge_config.py +19 -5
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_gui_start.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_server_start.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_server_stop.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_apikey_add.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_apikey_del.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_group_add.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_group_del.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_group_edit.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_group_list.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_start.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_user_add.py +4 -4
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_user_edit.py +4 -4
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_audit.py +7 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_do_signin.py +79 -103
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_exec_cmd.py +2 -2
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_signin.py +23 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/options.py +9 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/server.py +15 -3
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/web.py +13 -12
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/features.yml +4 -4
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/extensions/features.yml +23 -0
- {cmdbox-0.5.3/cmdbox → cmdbox-0.5.4/cmdbox/extensions/sample_project/sample}/extensions/user_list.yml +35 -5
- {cmdbox-0.5.3/cmdbox/extensions/sample_project/sample → cmdbox-0.5.4/cmdbox}/extensions/user_list.yml +41 -7
- cmdbox-0.5.4/cmdbox/licenses/LICENSE.async-timeout.5.0.1(Apache Software License).txt +13 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/files.txt +10 -9
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/version.py +2 -2
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/audit.js +98 -34
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/signin.js +13 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/users.js +1 -1
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/audit.html +69 -44
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/signin.html +10 -6
- {cmdbox-0.5.3 → cmdbox-0.5.4/cmdbox.egg-info}/PKG-INFO +68 -15
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox.egg-info/SOURCES.txt +16 -9
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox.egg-info/requires.txt +1 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/setup.py +3 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/LICENSE +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/MANIFEST.in +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/__init__.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/__main__.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/__init__.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/app.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/client.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/common.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/commons/convert.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/commons/loghandler.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/commons/module.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/commons/redis_client.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_audit_delete.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_audit_search.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_edge_start.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_gui_stop.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_server_list.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_gencert.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_genpass.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/cli/cmdbox_web_stop.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_assets.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_audit_metrics.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_bbforce_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_copyright.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_del_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_del_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_do_signout.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_exec_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_filer download.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_filer.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_filer_upload.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_get_cmd_choices.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_get_cmds.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_get_modes.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_get_server_opt.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_gui.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_gui_callback.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_list_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_list_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_load_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_load_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_raw_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_raw_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_result.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_save_cmd.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_save_pipe.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_user_data.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_users.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_usesignout.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_versions_cmdbox.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/features/web/cmdbox_web_versions_used.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/app/filer.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/config.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/.vscode/launch.json +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/requirements.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/__init__.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/__main__.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/app/app.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/logconf_sample.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/version.py +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/web/assets/sample/favicon.ico +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/extensions/sample_project/sample/web/assets/sample/icon.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.Jinja2.3.1.6(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.MarkupSafe.3.0.2(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.PyYAML.6.0.2(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.Pygments.2.19.1(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.Sphinx.8.2.3(UNKNOWN).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.alabaster.1.0.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.annotated-types.0.7.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.anyio.4.9.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.argcomplete.3.6.2(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.babel.2.17.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.backports.tarfile.1.2.0(MIT License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.certifi.2025.1.31(Mozilla Public License 2.0 (MPL 2.0)).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.certifi.2025.4.26(Mozilla Public License 2.0 (MPL 2.0)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.cffi.1.17.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.charset-normalizer.3.4.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.click.8.1.8(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.colorama.0.4.6(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.cryptography.44.0.2(Apache Software License; BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.docutils.0.21.2(BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.fastapi.0.115.12(MIT License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.gevent.25.4.1(MIT).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.gevent.25.4.2(MIT).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.greenlet.3.2.0(MIT AND Python-2.0).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.greenlet.3.2.1(MIT AND Python-2.0).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.gunicorn.23.0.0(MIT License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.h11.0.14.0(MIT License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.h11.0.16.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.httptools.0.6.4(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.id.1.5.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.idna.3.10(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.imagesize.1.4.1(MIT License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.importlib_metadata.8.6.1(Apache Software License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.importlib_metadata.8.7.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.itsdangerous.2.2.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.jaraco.classes.3.4.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.jaraco.context.6.0.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.jaraco.functools.4.1.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.keyring.25.6.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.markdown-it-py.3.0.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.mdurl.0.1.2(MIT License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.more-itertools.10.6.0(MIT License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.more-itertools.10.7.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.nh3.0.2.21(MIT).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.numpy.2.2.4(BSD License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.numpy.2.2.5(BSD License).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.packaging.24.2(Apache Software License; BSD License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.packaging.25.0(Apache Software License; BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pillow.11.2.1(UNKNOWN).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pip.24.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.plyer.2.1.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.prettytable.3.16.0(UNKNOWN).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.prompt_toolkit.3.0.51(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.psycopg-binary.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.psycopg.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pycparser.2.22(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pycryptodome.3.22.0(BSD License; Public Domain).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pydantic.2.11.3(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pydantic_core.2.33.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pystray.0.19.5(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.python-dotenv.1.1.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.python-multipart.0.0.20(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.pywin32-ctypes.0.2.3(BSD-3-Clause).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.questionary.2.1.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.readme_renderer.44.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.redis.5.2.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.requests-toolbelt.1.0.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.requests.2.32.3(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.rfc3986.2.0.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.rich.14.0.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.roman-numerals-py.3.1.0(CC0 1.0 Universal (CC0 1.0) Public Domain Dedication; Zero-Clause BSD (0BSD)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.setuptools.65.5.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.six.1.17.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sniffio.1.3.1(Apache Software License; MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.snowballstemmer.2.2.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinx-intl.2.3.1(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinx-rtd-theme.3.0.2(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinx-sitemap.2.6.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinx_fontawesome.0.0.6(GNU General Public License v2 (GPLv2)).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-applehelp.2.0.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-devhelp.2.0.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-htmlhelp.2.1.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-jquery.4.1(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-jsmath.1.0.1(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-qthelp.2.0.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.sphinxcontrib-serializinghtml.2.0.0(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.starlette.0.46.2(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.tabulate.0.9.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.tomli.2.2.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.twine.6.1.0(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.typing-inspection.0.4.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.typing_extensions.4.13.2(UNKNOWN).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.tzdata.2025.2(Apache Software License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.urllib3.2.4.0(UNKNOWN).txt +0 -0
- /cmdbox-0.5.3/cmdbox/licenses/LICENSE.uvicorn.0.34.1(BSD License).txt → /cmdbox-0.5.4/cmdbox/licenses/LICENSE.uvicorn.0.34.2(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.watchfiles.1.0.5(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.wcwidth.0.2.13(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.websockets.15.0.1(BSD License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.wheel.0.45.1(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.zipp.3.21.0(MIT License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.zope.event.5.0(Zope Public License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/licenses/LICENSE.zope.interface.7.2(Zope Public License).txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_audit.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_client.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_cmdbox.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_edge.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_gui.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_server.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/logconf_web.yml +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/apexcharts/apexcharts.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/apexcharts/apexcharts.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/bootstrap/bootstrap.bundle.min.5.3.0.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/bootstrap/bootstrap.min.5.3.0.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/color_mode.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/common.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/favicon.ico +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/filer_modal.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/icon.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/list_cmd.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/list_pipe.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/main.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/open_capture.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/open_output_json.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/result.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/view_raw.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/cmdbox/view_result.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/encodingjs/LICENSE.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/encodingjs/encoding.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/encodingjs/encoding.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/filer/filer.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/filer/main.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/filer/main.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/highlight/default.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/highlight/highlight.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/highlight/styles/tokyo-night-dark.min.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery/jquery.min.3.2.0.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-linedtextarea/README.md +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-linedtextarea/jquery-linedtextarea-license.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-linedtextarea/jquery-linedtextarea.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-linedtextarea/jquery-linedtextarea.html +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-linedtextarea/jquery-linedtextarea.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-resizable/jquery-resizable.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/AUTHORS.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/LICENSE.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/jquery-ui.min.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/jquery-ui.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/jquery-ui.structure.min.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/jquery-ui.theme.min.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/jquery-ui/package.json +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/css/lightbox.min.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/images/close.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/images/loading.gif +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/images/next.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/images/prev.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/lightbox2/js/lightbox.min.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/split-pane/split-pane.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/split-pane/split-pane.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/tree-menu/css/tree-menu.css +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/tree-menu/image/file.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/tree-menu/image/folder-close.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/tree-menu/image/folder-open.png +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets/tree-menu/js/tree-menu.js +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/assets_license_list.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/filer.html +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/gui.html +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/result.html +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox/web/users.html +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox.egg-info/dependency_links.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox.egg-info/entry_points.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/cmdbox.egg-info/top_level.txt +0 -0
- {cmdbox-0.5.3 → cmdbox-0.5.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cmdbox
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -41,6 +41,12 @@ pip install cmdbox
|
|
|
41
41
|
cmdbox -v
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
- When using SAML in web mode, install the modules with dependencies.
|
|
45
|
+
```bash
|
|
46
|
+
pip install xmlsec==1.3.13 python3-saml
|
|
47
|
+
apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl build-essential libopencv-dev
|
|
48
|
+
```
|
|
49
|
+
|
|
44
50
|
- Also install the docker version of the redis server.
|
|
45
51
|
|
|
46
52
|
```bash
|
|
@@ -173,7 +179,7 @@ class ServerTime(feature.Feature):
|
|
|
173
179
|
dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None,
|
|
174
180
|
discription_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
|
|
175
181
|
discription_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
|
|
176
|
-
dict(opt="svname", type=Options.T_STR, default=
|
|
182
|
+
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None,
|
|
177
183
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
178
184
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
179
185
|
dict(opt="timedelta", type=Options.T_INT, default=9, required=False, multi=False, hide=False, choice=None,
|
|
@@ -276,10 +282,10 @@ aliases: # Specify the alias for the specified co
|
|
|
276
282
|
mode: audit # Specify the mode of the feature to be searched.
|
|
277
283
|
cmd: search # Specify the command to be searched.
|
|
278
284
|
options: # Specify the options for the audit function.
|
|
279
|
-
host: localhost # Specify the service host of the audit Redis server.
|
|
280
|
-
port: 6379 # Specify the service port of the audit Redis server.
|
|
281
|
-
password: password # Specify the access password of the audit Redis server.
|
|
282
|
-
svname: server # Specify the audit service name of the inference server.
|
|
285
|
+
host: localhost # Specify the service host of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
286
|
+
port: 6379 # Specify the service port of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
287
|
+
password: password # Specify the access password of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
288
|
+
svname: server # Specify the audit service name of the inference server.However, if it is specified as a command line argument, it is ignored.
|
|
283
289
|
retry_count: 3 # Specifies the number of reconnections to the audit Redis server.If less than 0 is specified, reconnection is forever.
|
|
284
290
|
retry_interval: 1 # Specifies the number of seconds before reconnecting to the audit Redis server.
|
|
285
291
|
timeout: 15 # Specify the maximum waiting time until the server responds.
|
|
@@ -303,25 +309,25 @@ aliases: # Specify the alias for the specified co
|
|
|
303
309
|
users: # A list of users, each of which is a map that contains the following fields.
|
|
304
310
|
- uid: 1 # An ID that identifies a user. No two users can have the same ID.
|
|
305
311
|
name: admin # A name that identifies the user. No two users can have the same name.
|
|
306
|
-
password:
|
|
307
|
-
hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2.
|
|
312
|
+
password: XXXXXXXXXXXXXXXX # The user's password. The value is hashed with the hash function specified in the next hash field.
|
|
313
|
+
hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2, or saml.
|
|
308
314
|
groups: [admin] # A list of groups to which the user belongs, as specified in the groups field.
|
|
309
|
-
email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 field.
|
|
315
|
+
email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 or saml field.
|
|
310
316
|
- uid: 101
|
|
311
317
|
name: user01
|
|
312
|
-
password:
|
|
318
|
+
password: XXXXXXXXXXXXXXXX
|
|
313
319
|
hash: md5
|
|
314
320
|
groups: [user]
|
|
315
321
|
email: user01@aaa.bbb.jp
|
|
316
322
|
- uid: 102
|
|
317
323
|
name: user02
|
|
318
|
-
password:
|
|
324
|
+
password: XXXXXXXXXXXXXXXX
|
|
319
325
|
hash: sha1
|
|
320
326
|
groups: [readonly]
|
|
321
327
|
email: user02@aaa.bbb.jp
|
|
322
328
|
- uid: 103
|
|
323
329
|
name: user03
|
|
324
|
-
password:
|
|
330
|
+
password: XXXXXXXXXXXXXXXX
|
|
325
331
|
hash: sha256
|
|
326
332
|
groups: [editor]
|
|
327
333
|
email: user03@aaa.bbb.jp
|
|
@@ -351,6 +357,10 @@ cmdrule: # A list of command rules, Specify a rule that de
|
|
|
351
357
|
mode: server
|
|
352
358
|
cmds: [list]
|
|
353
359
|
rule: allow
|
|
360
|
+
- groups: [user, guest]
|
|
361
|
+
mode: audit
|
|
362
|
+
cmds: [write]
|
|
363
|
+
rule: allow
|
|
354
364
|
- groups: [user, guest]
|
|
355
365
|
mode: web
|
|
356
366
|
cmds: [genpass]
|
|
@@ -371,7 +381,8 @@ pathrule: # List of RESTAPI rules, rules that determine whe
|
|
|
371
381
|
rule: allow
|
|
372
382
|
- groups: [user]
|
|
373
383
|
paths: [/signin, /assets, /bbforce_cmd, /copyright, /dosignin, /dosignout, /password/change,
|
|
374
|
-
/
|
|
384
|
+
/gui/user_data/load, /gui/user_data/save, /gui/user_data/delete,
|
|
385
|
+
/exec_cmd, /exec_pipe, /filer, /result, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
|
|
375
386
|
rule: allow
|
|
376
387
|
- groups: [readonly]
|
|
377
388
|
paths: [/gui/del_cmd, /gui/del_pipe, /gui/save_cmd, /gui/save_pipe]
|
|
@@ -406,7 +417,8 @@ oauth2: # OAuth2 settings.
|
|
|
406
417
|
client_secret: XXXXXXXXXXX # Specify Google's OAuth2 client secret.
|
|
407
418
|
redirect_uri: https://localhost:8443/oauth2/google/callback # Specify Google's OAuth2 redirect URI.
|
|
408
419
|
scope: ['email'] # Specify the scope you want to retrieve with Google's OAuth2. Usually, just reading the email is sufficient.
|
|
409
|
-
signin_module: # Specify the module name that implements the sign-in.
|
|
420
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
421
|
+
cmdbox.app.auth.google_signin
|
|
410
422
|
note: # Specify a description such as Google's OAuth2 reference site.
|
|
411
423
|
- https://developers.google.com/identity/protocols/oauth2/web-server?hl=ja#httprest
|
|
412
424
|
github: # OAuth2 settings for GitHub.
|
|
@@ -415,9 +427,50 @@ oauth2: # OAuth2 settings.
|
|
|
415
427
|
client_secret: XXXXXXXXXXX # Specify the GitHub OAuth2 client secret.
|
|
416
428
|
redirect_uri: https://localhost:8443/oauth2/github/callback # Specify the OAuth2 redirect URI for GitHub.
|
|
417
429
|
scope: ['user:email'] # Specify the scope you want to get from GitHub's OAuth2. Usually, just reading the email is sufficient.
|
|
418
|
-
signin_module: # Specify the module name that implements the sign-in.
|
|
430
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
431
|
+
cmdbox.app.auth.github_signin
|
|
419
432
|
note: # Specify a description, such as a reference site for OAuth2 on GitHub.
|
|
420
433
|
- https://docs.github.com/ja/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#scopes
|
|
434
|
+
azure: # OAuth2 settings for Azure AD.
|
|
435
|
+
enabled: false # Specify whether to enable OAuth2 for Azure AD.
|
|
436
|
+
tenant_id: XXXXXXXXXXX # Specify the tenant ID for Azure AD.
|
|
437
|
+
client_id: XXXXXXXXXXX # Specify the OAuth2 client ID for Azure AD.
|
|
438
|
+
client_secret: XXXXXXXXXXX # Specify the Azure AD OAuth2 client secret.
|
|
439
|
+
redirect_uri: https://localhost:8443/oauth2/azure/callback # Specify the OAuth2 redirect URI for Azure AD.
|
|
440
|
+
scope: ['openid', 'profile', 'email', 'https://graph.microsoft.com/mail.read']
|
|
441
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
442
|
+
cmdbox.app.auth.azure_signin
|
|
443
|
+
note: # Specify a description, such as a reference site for Azure AD's OAuth2.
|
|
444
|
+
- https://learn.microsoft.com/ja-jp/entra/identity-platform/v2-oauth2-auth-code-flow
|
|
445
|
+
saml: # SAML settings.
|
|
446
|
+
providers: # This is a per-provider setting for OAuth2.
|
|
447
|
+
azure: # SAML settings for Azure AD.
|
|
448
|
+
enabled: false # Specify whether to enable SAML authentication for Azure AD.
|
|
449
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
450
|
+
cmdbox.app.auth.azure_signin_saml # Specify the python3-saml configuration.
|
|
451
|
+
# see) https://github.com/SAML-Toolkits/python3-saml
|
|
452
|
+
sp:
|
|
453
|
+
entityId: https://localhost:8443/
|
|
454
|
+
assertionConsumerService:
|
|
455
|
+
url: https://localhost:8443/saml/azure/callback
|
|
456
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
|
|
457
|
+
attributeConsumingService: {}
|
|
458
|
+
singleLogoutService:
|
|
459
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
|
|
460
|
+
NameIDFormat: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
|
461
|
+
x509cert: ''
|
|
462
|
+
privateKey: ''
|
|
463
|
+
idp:
|
|
464
|
+
entityId: https://sts.windows.net/{tenant-id}/
|
|
465
|
+
singleSignOnService:
|
|
466
|
+
url: https://login.microsoftonline.com/{tenant-id}/saml2
|
|
467
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
|
|
468
|
+
x509cert: XXXXXXXXXXX
|
|
469
|
+
singleLogoutService: {}
|
|
470
|
+
certFingerprint: ''
|
|
471
|
+
certFingerprintAlgorithm: sha1
|
|
472
|
+
|
|
473
|
+
|
|
421
474
|
```
|
|
422
475
|
|
|
423
476
|
- See the documentation for references to each file.
|
|
@@ -17,6 +17,12 @@ pip install cmdbox
|
|
|
17
17
|
cmdbox -v
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
- When using SAML in web mode, install the modules with dependencies.
|
|
21
|
+
```bash
|
|
22
|
+
pip install xmlsec==1.3.13 python3-saml
|
|
23
|
+
apt-get install -y pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl build-essential libopencv-dev
|
|
24
|
+
```
|
|
25
|
+
|
|
20
26
|
- Also install the docker version of the redis server.
|
|
21
27
|
|
|
22
28
|
```bash
|
|
@@ -149,7 +155,7 @@ class ServerTime(feature.Feature):
|
|
|
149
155
|
dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None,
|
|
150
156
|
discription_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
|
|
151
157
|
discription_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
|
|
152
|
-
dict(opt="svname", type=Options.T_STR, default=
|
|
158
|
+
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None,
|
|
153
159
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
154
160
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
155
161
|
dict(opt="timedelta", type=Options.T_INT, default=9, required=False, multi=False, hide=False, choice=None,
|
|
@@ -252,10 +258,10 @@ aliases: # Specify the alias for the specified co
|
|
|
252
258
|
mode: audit # Specify the mode of the feature to be searched.
|
|
253
259
|
cmd: search # Specify the command to be searched.
|
|
254
260
|
options: # Specify the options for the audit function.
|
|
255
|
-
host: localhost # Specify the service host of the audit Redis server.
|
|
256
|
-
port: 6379 # Specify the service port of the audit Redis server.
|
|
257
|
-
password: password # Specify the access password of the audit Redis server.
|
|
258
|
-
svname: server # Specify the audit service name of the inference server.
|
|
261
|
+
host: localhost # Specify the service host of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
262
|
+
port: 6379 # Specify the service port of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
263
|
+
password: password # Specify the access password of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
|
|
264
|
+
svname: server # Specify the audit service name of the inference server.However, if it is specified as a command line argument, it is ignored.
|
|
259
265
|
retry_count: 3 # Specifies the number of reconnections to the audit Redis server.If less than 0 is specified, reconnection is forever.
|
|
260
266
|
retry_interval: 1 # Specifies the number of seconds before reconnecting to the audit Redis server.
|
|
261
267
|
timeout: 15 # Specify the maximum waiting time until the server responds.
|
|
@@ -279,25 +285,25 @@ aliases: # Specify the alias for the specified co
|
|
|
279
285
|
users: # A list of users, each of which is a map that contains the following fields.
|
|
280
286
|
- uid: 1 # An ID that identifies a user. No two users can have the same ID.
|
|
281
287
|
name: admin # A name that identifies the user. No two users can have the same name.
|
|
282
|
-
password:
|
|
283
|
-
hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2.
|
|
288
|
+
password: XXXXXXXXXXXXXXXX # The user's password. The value is hashed with the hash function specified in the next hash field.
|
|
289
|
+
hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2, or saml.
|
|
284
290
|
groups: [admin] # A list of groups to which the user belongs, as specified in the groups field.
|
|
285
|
-
email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 field.
|
|
291
|
+
email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 or saml field.
|
|
286
292
|
- uid: 101
|
|
287
293
|
name: user01
|
|
288
|
-
password:
|
|
294
|
+
password: XXXXXXXXXXXXXXXX
|
|
289
295
|
hash: md5
|
|
290
296
|
groups: [user]
|
|
291
297
|
email: user01@aaa.bbb.jp
|
|
292
298
|
- uid: 102
|
|
293
299
|
name: user02
|
|
294
|
-
password:
|
|
300
|
+
password: XXXXXXXXXXXXXXXX
|
|
295
301
|
hash: sha1
|
|
296
302
|
groups: [readonly]
|
|
297
303
|
email: user02@aaa.bbb.jp
|
|
298
304
|
- uid: 103
|
|
299
305
|
name: user03
|
|
300
|
-
password:
|
|
306
|
+
password: XXXXXXXXXXXXXXXX
|
|
301
307
|
hash: sha256
|
|
302
308
|
groups: [editor]
|
|
303
309
|
email: user03@aaa.bbb.jp
|
|
@@ -327,6 +333,10 @@ cmdrule: # A list of command rules, Specify a rule that de
|
|
|
327
333
|
mode: server
|
|
328
334
|
cmds: [list]
|
|
329
335
|
rule: allow
|
|
336
|
+
- groups: [user, guest]
|
|
337
|
+
mode: audit
|
|
338
|
+
cmds: [write]
|
|
339
|
+
rule: allow
|
|
330
340
|
- groups: [user, guest]
|
|
331
341
|
mode: web
|
|
332
342
|
cmds: [genpass]
|
|
@@ -347,7 +357,8 @@ pathrule: # List of RESTAPI rules, rules that determine whe
|
|
|
347
357
|
rule: allow
|
|
348
358
|
- groups: [user]
|
|
349
359
|
paths: [/signin, /assets, /bbforce_cmd, /copyright, /dosignin, /dosignout, /password/change,
|
|
350
|
-
/
|
|
360
|
+
/gui/user_data/load, /gui/user_data/save, /gui/user_data/delete,
|
|
361
|
+
/exec_cmd, /exec_pipe, /filer, /result, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
|
|
351
362
|
rule: allow
|
|
352
363
|
- groups: [readonly]
|
|
353
364
|
paths: [/gui/del_cmd, /gui/del_pipe, /gui/save_cmd, /gui/save_pipe]
|
|
@@ -382,7 +393,8 @@ oauth2: # OAuth2 settings.
|
|
|
382
393
|
client_secret: XXXXXXXXXXX # Specify Google's OAuth2 client secret.
|
|
383
394
|
redirect_uri: https://localhost:8443/oauth2/google/callback # Specify Google's OAuth2 redirect URI.
|
|
384
395
|
scope: ['email'] # Specify the scope you want to retrieve with Google's OAuth2. Usually, just reading the email is sufficient.
|
|
385
|
-
signin_module: # Specify the module name that implements the sign-in.
|
|
396
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
397
|
+
cmdbox.app.auth.google_signin
|
|
386
398
|
note: # Specify a description such as Google's OAuth2 reference site.
|
|
387
399
|
- https://developers.google.com/identity/protocols/oauth2/web-server?hl=ja#httprest
|
|
388
400
|
github: # OAuth2 settings for GitHub.
|
|
@@ -391,9 +403,50 @@ oauth2: # OAuth2 settings.
|
|
|
391
403
|
client_secret: XXXXXXXXXXX # Specify the GitHub OAuth2 client secret.
|
|
392
404
|
redirect_uri: https://localhost:8443/oauth2/github/callback # Specify the OAuth2 redirect URI for GitHub.
|
|
393
405
|
scope: ['user:email'] # Specify the scope you want to get from GitHub's OAuth2. Usually, just reading the email is sufficient.
|
|
394
|
-
signin_module: # Specify the module name that implements the sign-in.
|
|
406
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
407
|
+
cmdbox.app.auth.github_signin
|
|
395
408
|
note: # Specify a description, such as a reference site for OAuth2 on GitHub.
|
|
396
409
|
- https://docs.github.com/ja/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#scopes
|
|
410
|
+
azure: # OAuth2 settings for Azure AD.
|
|
411
|
+
enabled: false # Specify whether to enable OAuth2 for Azure AD.
|
|
412
|
+
tenant_id: XXXXXXXXXXX # Specify the tenant ID for Azure AD.
|
|
413
|
+
client_id: XXXXXXXXXXX # Specify the OAuth2 client ID for Azure AD.
|
|
414
|
+
client_secret: XXXXXXXXXXX # Specify the Azure AD OAuth2 client secret.
|
|
415
|
+
redirect_uri: https://localhost:8443/oauth2/azure/callback # Specify the OAuth2 redirect URI for Azure AD.
|
|
416
|
+
scope: ['openid', 'profile', 'email', 'https://graph.microsoft.com/mail.read']
|
|
417
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
418
|
+
cmdbox.app.auth.azure_signin
|
|
419
|
+
note: # Specify a description, such as a reference site for Azure AD's OAuth2.
|
|
420
|
+
- https://learn.microsoft.com/ja-jp/entra/identity-platform/v2-oauth2-auth-code-flow
|
|
421
|
+
saml: # SAML settings.
|
|
422
|
+
providers: # This is a per-provider setting for OAuth2.
|
|
423
|
+
azure: # SAML settings for Azure AD.
|
|
424
|
+
enabled: false # Specify whether to enable SAML authentication for Azure AD.
|
|
425
|
+
signin_module: # Specify the module name that implements the sign-in.
|
|
426
|
+
cmdbox.app.auth.azure_signin_saml # Specify the python3-saml configuration.
|
|
427
|
+
# see) https://github.com/SAML-Toolkits/python3-saml
|
|
428
|
+
sp:
|
|
429
|
+
entityId: https://localhost:8443/
|
|
430
|
+
assertionConsumerService:
|
|
431
|
+
url: https://localhost:8443/saml/azure/callback
|
|
432
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
|
|
433
|
+
attributeConsumingService: {}
|
|
434
|
+
singleLogoutService:
|
|
435
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
|
|
436
|
+
NameIDFormat: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
|
437
|
+
x509cert: ''
|
|
438
|
+
privateKey: ''
|
|
439
|
+
idp:
|
|
440
|
+
entityId: https://sts.windows.net/{tenant-id}/
|
|
441
|
+
singleSignOnService:
|
|
442
|
+
url: https://login.microsoftonline.com/{tenant-id}/saml2
|
|
443
|
+
binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
|
|
444
|
+
x509cert: XXXXXXXXXXX
|
|
445
|
+
singleLogoutService: {}
|
|
446
|
+
certFingerprint: ''
|
|
447
|
+
certFingerprintAlgorithm: sha1
|
|
448
|
+
|
|
449
|
+
|
|
397
450
|
```
|
|
398
451
|
|
|
399
452
|
- See the documentation for references to each file.
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from cmdbox.app.auth.signin import Signin
|
|
2
|
+
from fastapi import Request, Response
|
|
3
|
+
from typing import Any, Dict
|
|
4
|
+
import requests
|
|
5
|
+
import urllib
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AzureSignin(Signin):
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_email(cls, data:Any) -> str:
|
|
11
|
+
user_info_resp = requests.get(
|
|
12
|
+
url='https://graph.microsoft.com/v1.0/me',
|
|
13
|
+
#url='https://graph.microsoft.com/v1.0/me/transitiveMemberOf?$Top=999',
|
|
14
|
+
headers={'Authorization': f'Bearer {data}'}
|
|
15
|
+
)
|
|
16
|
+
user_info_resp.raise_for_status()
|
|
17
|
+
user_info_json = user_info_resp.json()
|
|
18
|
+
if isinstance(user_info_json, dict):
|
|
19
|
+
email = user_info_json.get('mail', 'notfound')
|
|
20
|
+
return email
|
|
21
|
+
return 'notfound'
|
|
22
|
+
|
|
23
|
+
def request_access_token(self, conf:Dict, req:Request, res:Response) -> str:
|
|
24
|
+
headers = {'Content-Type': 'application/x-www-form-urlencoded',
|
|
25
|
+
'Accept': 'application/json'}
|
|
26
|
+
data = {'tenant': conf['tenant_id'],
|
|
27
|
+
'code': req.query_params['code'],
|
|
28
|
+
'scope': " ".join(conf['scope']),
|
|
29
|
+
'client_id': conf['client_id'],
|
|
30
|
+
#'client_secret': conf['client_secret'],
|
|
31
|
+
'redirect_uri': conf['redirect_uri'],
|
|
32
|
+
'grant_type': 'authorization_code'}
|
|
33
|
+
query = '&'.join([f'{k}={urllib.parse.quote(v)}' for k, v in data.items()])
|
|
34
|
+
# アクセストークン取得
|
|
35
|
+
token_resp = requests.post(url=f'https://login.microsoftonline.com/{conf["tenant_id"]}/oauth2/v2.0/token', headers=headers, data=query)
|
|
36
|
+
token_resp.raise_for_status()
|
|
37
|
+
token_json = token_resp.json()
|
|
38
|
+
return token_json['access_token']
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from cmdbox.app.auth.signin_saml import SigninSAML
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AzyreSigninSAML(SigninSAML):
|
|
6
|
+
@classmethod
|
|
7
|
+
def get_email(cls, data:Any) -> str:
|
|
8
|
+
user_info_json = data.get_attributes()
|
|
9
|
+
if isinstance(user_info_json, dict):
|
|
10
|
+
email = user_info_json.get('http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress', ['notfound'])
|
|
11
|
+
return email[0] if len(email) > 0 else 'notfound'
|
|
12
|
+
return 'notfound'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from cmdbox.app.auth.signin import Signin
|
|
2
|
+
from fastapi import Request, Response
|
|
3
|
+
from typing import Any, Dict
|
|
4
|
+
import requests
|
|
5
|
+
import urllib.parse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GithubSignin(Signin):
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_email(cls, data:Any) -> str:
|
|
11
|
+
user_info_resp = requests.get(
|
|
12
|
+
url='https://api.github.com/user/emails',
|
|
13
|
+
headers={'Authorization': f'Bearer {data}'}
|
|
14
|
+
)
|
|
15
|
+
user_info_resp.raise_for_status()
|
|
16
|
+
user_info_json = user_info_resp.json()
|
|
17
|
+
if type(user_info_json) == list:
|
|
18
|
+
email = 'notfound'
|
|
19
|
+
for u in user_info_json:
|
|
20
|
+
if u['primary']:
|
|
21
|
+
email = u['email']
|
|
22
|
+
break
|
|
23
|
+
return email
|
|
24
|
+
return 'notfound'
|
|
25
|
+
|
|
26
|
+
def request_access_token(self, conf:Dict, req:Request, res:Response) -> str:
|
|
27
|
+
headers = {'Content-Type': 'application/x-www-form-urlencoded',
|
|
28
|
+
'Accept': 'application/json'}
|
|
29
|
+
data = {'code': req.query_params['code'],
|
|
30
|
+
'client_id': conf['client_id'],
|
|
31
|
+
'client_secret': conf['client_secret'],
|
|
32
|
+
'redirect_uri': conf['redirect_uri']}
|
|
33
|
+
query = '&'.join([f'{k}={urllib.parse.quote(v)}' for k, v in data.items()])
|
|
34
|
+
# アクセストークン取得
|
|
35
|
+
token_resp = requests.post(url='https://github.com/login/oauth/access_token', headers=headers, data=query)
|
|
36
|
+
token_resp.raise_for_status()
|
|
37
|
+
token_json = token_resp.json()
|
|
38
|
+
return token_json['access_token']
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from cmdbox.app.auth.signin import Signin
|
|
2
|
+
from fastapi import Request, Response
|
|
3
|
+
from typing import Any, Dict
|
|
4
|
+
import requests
|
|
5
|
+
import urllib.parse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GoogleSignin(Signin):
|
|
9
|
+
@classmethod
|
|
10
|
+
def get_email(cls, data:Any) -> str:
|
|
11
|
+
user_info_resp = requests.get(
|
|
12
|
+
url='https://www.googleapis.com/oauth2/v1/userinfo',
|
|
13
|
+
headers={'Authorization': f'Bearer {data}'}
|
|
14
|
+
)
|
|
15
|
+
user_info_resp.raise_for_status()
|
|
16
|
+
user_info_json = user_info_resp.json()
|
|
17
|
+
return user_info_json['email'] if 'email' in user_info_json else 'notfound'
|
|
18
|
+
|
|
19
|
+
def request_access_token(self, conf:Dict, req:Request, res:Response) -> str:
|
|
20
|
+
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
|
|
21
|
+
next = req.query_params['state']
|
|
22
|
+
data = {'code': req.query_params['code'],
|
|
23
|
+
'client_id': conf['client_id'],
|
|
24
|
+
'client_secret': conf['client_secret'],
|
|
25
|
+
'redirect_uri': conf['redirect_uri'],
|
|
26
|
+
'grant_type': 'authorization_code'}
|
|
27
|
+
query = '&'.join([f'{k}={urllib.parse.quote(v)}' for k, v in data.items()])
|
|
28
|
+
# アクセストークン取得
|
|
29
|
+
token_resp = requests.post(url='https://oauth2.googleapis.com/token', headers=headers, data=query)
|
|
30
|
+
token_resp.raise_for_status()
|
|
31
|
+
token_json = token_resp.json()
|
|
32
|
+
return token_json['access_token']
|
|
@@ -27,13 +27,12 @@ class Signin(object):
|
|
|
27
27
|
"""
|
|
28
28
|
return self.signin_file_data
|
|
29
29
|
|
|
30
|
-
def jadge(self,
|
|
30
|
+
def jadge(self, email:str) -> Tuple[bool, Dict[str, Any]]:
|
|
31
31
|
"""
|
|
32
32
|
サインインを成功させるかどうかを判定します。
|
|
33
33
|
返すユーザーデータには、uid, name, email, groups, hash が必要です。
|
|
34
34
|
|
|
35
35
|
Args:
|
|
36
|
-
access_token (str): アクセストークン
|
|
37
36
|
email (str): メールアドレス
|
|
38
37
|
|
|
39
38
|
Returns:
|
|
@@ -203,8 +202,8 @@ class Signin(object):
|
|
|
203
202
|
raise HTTPException(status_code=500, detail=f'signin_file format error. "password" not found or empty. ({signin_file})')
|
|
204
203
|
if 'hash' not in user or user['hash'] is None:
|
|
205
204
|
raise HTTPException(status_code=500, detail=f'signin_file format error. "hash" not found or empty. ({signin_file})')
|
|
206
|
-
if user['hash'] not in ['oauth2', 'plain', 'md5', 'sha1', 'sha256']:
|
|
207
|
-
raise HTTPException(status_code=500, detail=f'signin_file format error. Algorithms not supported. ({signin_file}). hash={user["hash"]} "oauth2", "plain", "md5", "sha1", "sha256" only.')
|
|
205
|
+
if user['hash'] not in ['oauth2', 'saml', 'plain', 'md5', 'sha1', 'sha256']:
|
|
206
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. Algorithms not supported. ({signin_file}). hash={user["hash"]} "oauth2", "saml", "plain", "md5", "sha1", "sha256" only.')
|
|
208
207
|
if 'groups' not in user or type(user['groups']) is not list:
|
|
209
208
|
raise HTTPException(status_code=500, detail=f'signin_file format error. "groups" not found or not list type. ({signin_file})')
|
|
210
209
|
if len([ug for ug in user['groups'] if ug not in groups]) > 0:
|
|
@@ -416,6 +415,24 @@ class Signin(object):
|
|
|
416
415
|
raise HTTPException(status_code=500, detail=f'signin_file format error. "scope" not list type in "azure". ({signin_file})')
|
|
417
416
|
if 'signin_module' not in yml['oauth2']['providers']['azure']:
|
|
418
417
|
raise HTTPException(status_code=500, detail=f'signin_file format error. "signin_module" not found in "azure". ({signin_file})')
|
|
418
|
+
# samlのフォーマットチェック
|
|
419
|
+
if 'saml' not in yml:
|
|
420
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "saml" not found. ({signin_file})')
|
|
421
|
+
if 'providers' not in yml['saml']:
|
|
422
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "providers" not found in "saml". ({signin_file})')
|
|
423
|
+
# azure
|
|
424
|
+
if 'azure' not in yml['saml']['providers']:
|
|
425
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "azure" not found in "providers". ({signin_file})')
|
|
426
|
+
if 'enabled' not in yml['saml']['providers']['azure']:
|
|
427
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "enabled" not found in "azure". ({signin_file})')
|
|
428
|
+
if type(yml['saml']['providers']['azure']['enabled']) is not bool:
|
|
429
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "enabled" not bool type in "azure". ({signin_file})')
|
|
430
|
+
if 'signin_module' not in yml['saml']['providers']['azure']:
|
|
431
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "signin_module" not found in "azure". ({signin_file})')
|
|
432
|
+
if 'sp' not in yml['saml']['providers']['azure']:
|
|
433
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "sp" not found in "azure". ({signin_file})')
|
|
434
|
+
if 'idp' not in yml['saml']['providers']['azure']:
|
|
435
|
+
raise HTTPException(status_code=500, detail=f'signin_file format error. "idp" not found in "azure". ({signin_file})')
|
|
419
436
|
# フォーマットチェックOK
|
|
420
437
|
return yml
|
|
421
438
|
|
|
@@ -632,3 +649,29 @@ class Signin(object):
|
|
|
632
649
|
return False, f"Password policy error. not_contain_username=True"
|
|
633
650
|
self.logger.info(f"Password policy OK.")
|
|
634
651
|
return True, "Password policy OK."
|
|
652
|
+
|
|
653
|
+
def request_access_token(self, conf:Dict, req:Request, res:Response) -> str:
|
|
654
|
+
"""
|
|
655
|
+
アクセストークンを取得します
|
|
656
|
+
|
|
657
|
+
Args:
|
|
658
|
+
conf (Dict): サインインモジュールの設定
|
|
659
|
+
req (Request): リクエスト
|
|
660
|
+
res (Response): レスポンス
|
|
661
|
+
|
|
662
|
+
Returns:
|
|
663
|
+
str: アクセストークン
|
|
664
|
+
"""
|
|
665
|
+
raise NotImplementedError("request_access_token() is not implemented.")
|
|
666
|
+
|
|
667
|
+
def get_email(self, data:Any) -> str:
|
|
668
|
+
"""
|
|
669
|
+
アクセストークンからメールアドレスを取得します
|
|
670
|
+
|
|
671
|
+
Args:
|
|
672
|
+
data (str): アクセストークン又は属性データ
|
|
673
|
+
|
|
674
|
+
Returns:
|
|
675
|
+
str: メールアドレス
|
|
676
|
+
"""
|
|
677
|
+
return self.__class__.get_email(data)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from cmdbox.app.auth.signin import Signin
|
|
2
|
+
from fastapi import Request, Response
|
|
3
|
+
from typing import Any, Dict, Tuple
|
|
4
|
+
import copy
|
|
5
|
+
import logging
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SigninSAML(Signin):
|
|
9
|
+
|
|
10
|
+
def jadge(self, email:str) -> Tuple[bool, Dict[str, Any]]:
|
|
11
|
+
"""
|
|
12
|
+
サインインを成功させるかどうかを判定します。
|
|
13
|
+
返すユーザーデータには、uid, name, email, groups, hash が必要です。
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
email (str): メールアドレス
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
Tuple[bool, Dict[str, Any]]: (成功かどうか, ユーザーデータ)
|
|
20
|
+
"""
|
|
21
|
+
copy_signin_data = copy.deepcopy(self.signin_file_data)
|
|
22
|
+
users = [u for u in copy_signin_data['users'] if u['email'] == email and u['hash'] == 'saml']
|
|
23
|
+
return len(users) > 0, users[0] if len(users) > 0 else None
|
|
24
|
+
|
|
25
|
+
async def make_saml(self, prov:str, next:str, form_data:Dict[str, Any], req:Request, res:Response) -> Any:
|
|
26
|
+
"""
|
|
27
|
+
SAML認証のリダイレクトURLを取得する
|
|
28
|
+
Args:
|
|
29
|
+
prov (str): プロバイダ名
|
|
30
|
+
next (str): リダイレクト先のURL
|
|
31
|
+
req (Request): リクエスト
|
|
32
|
+
res (Response): レスポンス
|
|
33
|
+
Returns:
|
|
34
|
+
OneLogin_Saml2_Auth: SAML認証オブジェクト
|
|
35
|
+
"""
|
|
36
|
+
sd = self.get_data()
|
|
37
|
+
saml_settings = dict(
|
|
38
|
+
strict=False,
|
|
39
|
+
debug=self.logger.level==logging.DEBUG,
|
|
40
|
+
idp=sd['saml']['providers'][prov]['idp'],
|
|
41
|
+
sp=sd['saml']['providers'][prov]['sp'])
|
|
42
|
+
# SAML認証のリダイレクトURLを取得
|
|
43
|
+
request_data = dict(
|
|
44
|
+
https='on' if req.url.scheme=='https' else 'off',
|
|
45
|
+
http_host=req.client.host,
|
|
46
|
+
server_port=req.url.port,
|
|
47
|
+
script_name=f'{req.url.path}?next={next}',
|
|
48
|
+
post_data=dict(),
|
|
49
|
+
get_data=dict(),
|
|
50
|
+
)
|
|
51
|
+
if (req.query_params):
|
|
52
|
+
request_data["get_data"] = req.query_params,
|
|
53
|
+
if "SAMLResponse" in form_data:
|
|
54
|
+
SAMLResponse = form_data["SAMLResponse"]
|
|
55
|
+
request_data["post_data"]["SAMLResponse"] = SAMLResponse
|
|
56
|
+
if "RelayState" in form_data:
|
|
57
|
+
RelayState = form_data["RelayState"]
|
|
58
|
+
request_data["post_data"]["RelayState"] = RelayState
|
|
59
|
+
from onelogin.saml2.auth import OneLogin_Saml2_Auth
|
|
60
|
+
auth = OneLogin_Saml2_Auth(request_data=request_data, old_settings=saml_settings)
|
|
61
|
+
return auth
|