cmdbox 0.5.3__py3-none-any.whl → 0.5.4__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.

Files changed (86) hide show
  1. cmdbox/app/auth/__init__.py +0 -0
  2. cmdbox/app/auth/azure_signin.py +38 -0
  3. cmdbox/app/auth/azure_signin_saml.py +12 -0
  4. cmdbox/app/auth/github_signin.py +38 -0
  5. cmdbox/app/auth/google_signin.py +32 -0
  6. cmdbox/app/auth/signin.py +47 -4
  7. cmdbox/app/auth/signin_saml.py +61 -0
  8. cmdbox/app/edge.py +198 -61
  9. cmdbox/app/feature.py +2 -1
  10. cmdbox/app/features/cli/audit_base.py +1 -1
  11. cmdbox/app/features/cli/cmdbox_audit_createdb.py +1 -1
  12. cmdbox/app/features/cli/cmdbox_audit_write.py +4 -0
  13. cmdbox/app/features/cli/cmdbox_client_file_copy.py +1 -1
  14. cmdbox/app/features/cli/cmdbox_client_file_download.py +1 -1
  15. cmdbox/app/features/cli/cmdbox_client_file_list.py +1 -1
  16. cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +1 -1
  17. cmdbox/app/features/cli/cmdbox_client_file_move.py +1 -1
  18. cmdbox/app/features/cli/cmdbox_client_file_remove.py +1 -1
  19. cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +1 -1
  20. cmdbox/app/features/cli/cmdbox_client_file_upload.py +1 -1
  21. cmdbox/app/features/cli/cmdbox_client_server_info.py +1 -1
  22. cmdbox/app/features/cli/cmdbox_edge_config.py +19 -5
  23. cmdbox/app/features/cli/cmdbox_gui_start.py +1 -1
  24. cmdbox/app/features/cli/cmdbox_server_start.py +1 -1
  25. cmdbox/app/features/cli/cmdbox_server_stop.py +1 -1
  26. cmdbox/app/features/cli/cmdbox_web_apikey_add.py +1 -1
  27. cmdbox/app/features/cli/cmdbox_web_apikey_del.py +1 -1
  28. cmdbox/app/features/cli/cmdbox_web_group_add.py +1 -1
  29. cmdbox/app/features/cli/cmdbox_web_group_del.py +1 -1
  30. cmdbox/app/features/cli/cmdbox_web_group_edit.py +1 -1
  31. cmdbox/app/features/cli/cmdbox_web_group_list.py +1 -1
  32. cmdbox/app/features/cli/cmdbox_web_start.py +1 -1
  33. cmdbox/app/features/cli/cmdbox_web_user_add.py +4 -4
  34. cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
  35. cmdbox/app/features/cli/cmdbox_web_user_edit.py +4 -4
  36. cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
  37. cmdbox/app/features/web/cmdbox_web_audit.py +7 -1
  38. cmdbox/app/features/web/cmdbox_web_do_signin.py +79 -103
  39. cmdbox/app/features/web/cmdbox_web_exec_cmd.py +2 -2
  40. cmdbox/app/features/web/cmdbox_web_signin.py +23 -1
  41. cmdbox/app/options.py +9 -0
  42. cmdbox/app/server.py +15 -3
  43. cmdbox/app/web.py +13 -12
  44. cmdbox/extensions/features.yml +4 -4
  45. cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +1 -1
  46. cmdbox/extensions/sample_project/sample/extensions/features.yml +23 -0
  47. cmdbox/extensions/sample_project/sample/extensions/user_list.yml +40 -6
  48. cmdbox/extensions/user_list.yml +36 -6
  49. cmdbox/licenses/LICENSE.async-timeout.5.0.1(Apache Software License).txt +13 -0
  50. cmdbox/licenses/files.txt +10 -9
  51. cmdbox/version.py +2 -2
  52. cmdbox/web/assets/cmdbox/audit.js +98 -34
  53. cmdbox/web/assets/cmdbox/signin.js +13 -0
  54. cmdbox/web/assets/cmdbox/users.js +1 -1
  55. cmdbox/web/audit.html +69 -44
  56. cmdbox/web/signin.html +10 -6
  57. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/METADATA +69 -15
  58. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/RECORD +71 -79
  59. cmdbox/app/features/web/cmdbox_web_load_pin.py +0 -43
  60. cmdbox/app/features/web/cmdbox_web_save_pin.py +0 -42
  61. cmdbox/licenses/LICENSE.argcomplete.3.6.1(Apache Software License).txt +0 -177
  62. cmdbox/licenses/LICENSE.gevent.25.4.1(MIT).txt +0 -25
  63. cmdbox/licenses/LICENSE.greenlet.3.2.0(MIT AND Python-2.0).txt +0 -30
  64. cmdbox/licenses/LICENSE.pillow.11.1.0(CMU License (MIT-CMU)).txt +0 -1213
  65. cmdbox/licenses/LICENSE.prompt_toolkit.3.0.50(BSD License).txt +0 -27
  66. cmdbox/licenses/LICENSE.psycopg-pool.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -165
  67. cmdbox/licenses/LICENSE.pydantic.2.11.1(MIT License).txt +0 -21
  68. cmdbox/licenses/LICENSE.pydantic_core.2.33.0(MIT License).txt +0 -21
  69. cmdbox/licenses/LICENSE.starlette.0.46.1(BSD License).txt +0 -27
  70. cmdbox/licenses/LICENSE.typing_extensions.4.13.0(UNKNOWN).txt +0 -279
  71. cmdbox/licenses/LICENSE.urllib3.2.3.0(MIT License).txt +0 -21
  72. cmdbox/licenses/LICENSE.uvicorn.0.34.1(BSD License).txt +0 -27
  73. cmdbox/licenses/LICENSE.watchfiles.1.0.4(MIT License).txt +0 -21
  74. /cmdbox/licenses/{LICENSE.certifi.2025.1.31(Mozilla Public License 2.0 (MPL 2.0)).txt → LICENSE.certifi.2025.4.26(Mozilla Public License 2.0 (MPL 2.0)).txt} +0 -0
  75. /cmdbox/licenses/{LICENSE.gevent.24.11.1(MIT License).txt → LICENSE.gevent.25.4.2(MIT).txt} +0 -0
  76. /cmdbox/licenses/{LICENSE.greenlet.3.1.1(MIT License).txt → LICENSE.greenlet.3.2.1(MIT AND Python-2.0).txt} +0 -0
  77. /cmdbox/licenses/{LICENSE.h11.0.14.0(MIT License).txt → LICENSE.h11.0.16.0(MIT License).txt} +0 -0
  78. /cmdbox/licenses/{LICENSE.importlib_metadata.8.6.1(Apache Software License).txt → LICENSE.importlib_metadata.8.7.0(Apache Software License).txt} +0 -0
  79. /cmdbox/licenses/{LICENSE.more-itertools.10.6.0(MIT License).txt → LICENSE.more-itertools.10.7.0(MIT License).txt} +0 -0
  80. /cmdbox/licenses/{LICENSE.numpy.2.2.4(BSD License).txt → LICENSE.numpy.2.2.5(BSD License).txt} +0 -0
  81. /cmdbox/licenses/{LICENSE.packaging.24.2(Apache Software License; BSD License).txt → LICENSE.packaging.25.0(Apache Software License; BSD License).txt} +0 -0
  82. /cmdbox/licenses/{LICENSE.uvicorn.0.34.0(BSD License).txt → LICENSE.uvicorn.0.34.2(BSD License).txt} +0 -0
  83. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/LICENSE +0 -0
  84. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/WHEEL +0 -0
  85. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/entry_points.txt +0 -0
  86. {cmdbox-0.5.3.dist-info → cmdbox-0.5.4.dist-info}/top_level.txt +0 -0
cmdbox/app/web.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from cmdbox.app import common, options
2
- from cmdbox.app.auth.signin import Signin
2
+ from cmdbox.app.auth import signin, signin_saml
3
3
  from cmdbox.app.commons import module
4
4
  from fastapi import FastAPI, Request, Response, HTTPException
5
5
  from fastapi.responses import RedirectResponse
@@ -116,8 +116,9 @@ class Web:
116
116
  self.cb_queue = queue.Queue(1000)
117
117
  self.options = options.Options.getInstance()
118
118
  self.webcap_client = requests.Session()
119
- signin_file_data = Signin.load_signin_file(self.signin_file)
120
- self.signin = Signin(self.logger, self.signin_file, signin_file_data, self.appcls, self.ver)
119
+ signin_file_data = signin.Signin.load_signin_file(self.signin_file)
120
+ self.signin = signin.Signin(self.logger, self.signin_file, signin_file_data, self.appcls, self.ver)
121
+ self.signin_saml = signin_saml.SigninSAML(self.logger, self.signin_file, signin_file_data, self.appcls, self.ver)
121
122
 
122
123
  if self.logger.level == logging.DEBUG:
123
124
  self.logger.debug(f"web init parameter: data={self.data} -> {self.data.absolute() if self.data is not None else None}")
@@ -348,12 +349,12 @@ class Web:
348
349
  if 'hash' not in user or user['hash'] == '':
349
350
  raise ValueError(f"User hash is not found or empty. ({user})")
350
351
  hash = user['hash']
351
- if hash!='oauth2' and ('password' not in user or user['password'] == ''):
352
+ if hash!='oauth2' and hash!='saml' and ('password' not in user or user['password'] == ''):
352
353
  raise ValueError(f"User password is not found or empty. ({user})")
353
354
  if 'email' not in user:
354
355
  raise ValueError(f"User email is not found. ({user})")
355
- if hash=='oauth2' and (user['email'] is None or user['email']==''):
356
- raise ValueError(f"Required when `email` is `oauth2`. ({user})")
356
+ if (hash=='oauth2' or hash=='saml') and (user['email'] is None or user['email']==''):
357
+ raise ValueError(f"Required when `email` is `oauth2` or `saml`. ({user})")
357
358
  if 'groups' not in user or type(user['groups']) is not list:
358
359
  raise ValueError(f"User groups is not found or empty. ({user})")
359
360
  for gn in user['groups']:
@@ -363,13 +364,13 @@ class Web:
363
364
  raise ValueError(f"User uid is already exists. ({user})")
364
365
  if len([u for u in signin_data['users'] if u['name'] == user['name']]) > 0:
365
366
  raise ValueError(f"User name is already exists. ({user})")
366
- if hash not in ['oauth2', 'plain', 'md5', 'sha1', 'sha256']:
367
+ if hash not in ['oauth2', 'saml', 'plain', 'md5', 'sha1', 'sha256']:
367
368
  raise ValueError(f"User hash is not supported. ({user})")
368
369
  jadge, msg = self.signin.check_password_policy(user['name'], '', user['password'])
369
370
  if not jadge:
370
371
  raise ValueError(msg)
371
372
  if hash != 'plain':
372
- user['password'] = common.hash_password(user['password'], hash if hash != 'oauth2' else 'sha1')
373
+ user['password'] = common.hash_password(user['password'], hash if hash != 'oauth2' and hash != 'saml' else 'sha1')
373
374
  else:
374
375
  user['password'] = user['password']
375
376
  signin_data['users'].append(user)
@@ -405,8 +406,8 @@ class Web:
405
406
  if 'email' not in user:
406
407
  raise ValueError(f"User email is not found. ({user})")
407
408
  hash = user['hash']
408
- if hash=='oauth2' and (user['email'] is None or user['email']==''):
409
- raise ValueError(f"Required when `email` is `oauth2`. ({user})")
409
+ if (hash=='oauth2' or hash=='saml') and (user['email'] is None or user['email']==''):
410
+ raise ValueError(f"Required when `email` is `oauth2` or `saml`. ({user})")
410
411
  if 'groups' not in user or type(user['groups']) is not list:
411
412
  raise ValueError(f"User groups is not found or empty. ({user})")
412
413
  for gn in user['groups']:
@@ -416,7 +417,7 @@ class Web:
416
417
  raise ValueError(f"User uid is not found. ({user})")
417
418
  if len([u for u in signin_data['users'] if u['name'] == user['name']]) <= 0:
418
419
  raise ValueError(f"User name is not found. ({user})")
419
- if hash not in ['oauth2', 'plain', 'md5', 'sha1', 'sha256']:
420
+ if hash not in ['oauth2', 'saml', 'plain', 'md5', 'sha1', 'sha256']:
420
421
  raise ValueError(f"User hash is not supported. ({user})")
421
422
  for u in signin_data['users']:
422
423
  if u['uid'] == user['uid']:
@@ -426,7 +427,7 @@ class Web:
426
427
  if not jadge:
427
428
  raise ValueError(msg)
428
429
  if hash != 'plain':
429
- u['password'] = common.hash_password(user['password'], hash if hash != 'oauth2' else 'sha1')
430
+ u['password'] = common.hash_password(user['password'], hash if hash != 'oauth2' and hash != 'saml' else 'sha1')
430
431
  else:
431
432
  u['password'] = user['password']
432
433
  # パスワード更新日時の保存
@@ -46,10 +46,10 @@ audit:
46
46
  mode: audit # Specify the mode of the feature to be searched.
47
47
  cmd: search # Specify the command to be searched.
48
48
  options: # Specify the options for the audit function.
49
- host: localhost # Specify the service host of the audit Redis server.
50
- port: 6379 # Specify the service port of the audit Redis server.
51
- password: password # Specify the access password of the audit Redis server.
52
- svname: server # Specify the audit service name of the inference server.
49
+ host: localhost # Specify the service host of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
50
+ port: 6379 # Specify the service port of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
51
+ password: password # Specify the access password of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
52
+ svname: cmdbox # Specify the audit service name of the inference server.However, if it is specified as a command line argument, it is ignored.
53
53
  retry_count: 3 # Specifies the number of reconnections to the audit Redis server.If less than 0 is specified, reconnection is forever.
54
54
  retry_interval: 1 # Specifies the number of seconds before reconnecting to the audit Redis server.
55
55
  timeout: 15 # Specify the maximum waiting time until the server responds.
@@ -48,7 +48,7 @@ class ServerTime(feature.Feature):
48
48
  dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None,
49
49
  discription_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
50
50
  discription_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
51
- dict(opt="svname", type=Options.T_STR, default="server", required=True, multi=False, hide=True, choice=None,
51
+ dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None,
52
52
  discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
53
53
  discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
54
54
  dict(opt="timedelta", type=Options.T_INT, default=9, required=False, multi=False, hide=False, choice=None,
@@ -46,3 +46,26 @@ aliases: # Specify the alias for the specified co
46
46
  # e.g. /{1}_exec
47
47
  move: # Specify whether to move the regular expression group of the source to the target.
48
48
  # e.g. true
49
+ audit:
50
+ enabled: true # Specify whether to enable the audit function.
51
+ write:
52
+ mode: audit # Specify the mode of the feature to be writed.
53
+ cmd: write # Specify the command to be writed.
54
+ search:
55
+ mode: audit # Specify the mode of the feature to be searched.
56
+ cmd: search # Specify the command to be searched.
57
+ options: # Specify the options for the audit function.
58
+ host: localhost # Specify the service host of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
59
+ port: 6379 # Specify the service port of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
60
+ password: password # Specify the access password of the audit Redis server.However, if it is specified as a command line argument, it is ignored.
61
+ svname: cmdbox # Specify the audit service name of the inference server.However, if it is specified as a command line argument, it is ignored.
62
+ retry_count: 3 # Specifies the number of reconnections to the audit Redis server.If less than 0 is specified, reconnection is forever.
63
+ retry_interval: 1 # Specifies the number of seconds before reconnecting to the audit Redis server.
64
+ timeout: 15 # Specify the maximum waiting time until the server responds.
65
+ pg_enabled: False # Specify True if using the postgresql database server.
66
+ pg_host: localhost # Specify the postgresql host.
67
+ pg_port: 5432 # Specify the postgresql port.
68
+ pg_user: postgres # Specify the postgresql user name.
69
+ pg_password: password # Specify the postgresql password.
70
+ pg_dbname: audit # Specify the postgresql database name.
71
+ retention_period_days: 365 # Specify the number of days to retain audit logs.
@@ -2,9 +2,9 @@ users: # A list of users, each of which is a map that co
2
2
  - uid: 1 # An ID that identifies a user. No two users can have the same ID.
3
3
  name: admin # A name that identifies the user. No two users can have the same name.
4
4
  password: admin # The user's password. The value is hashed with the hash function specified in the next hash field.
5
- hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2.
5
+ hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2, or saml.
6
6
  groups: [admin] # A list of groups to which the user belongs, as specified in the groups field.
7
- email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 field.
7
+ email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 or saml field.
8
8
  - uid: 101
9
9
  name: user01
10
10
  password: b75705d7e35e7014521a46b532236ec3
@@ -36,7 +36,6 @@ groups: # A list of groups, each of which is a map that c
36
36
  - gid: 103
37
37
  name: editor
38
38
  parent: user
39
-
40
39
  cmdrule: # A list of command rules, Specify a rule that determines whether or not a command is executable when executed by a user in web mode.
41
40
  policy: deny # Specify the default policy for the rule. The value can be allow or deny.
42
41
  rules: # Specify rules to allow or deny execution of the command, depending on the group the user belongs to.
@@ -50,6 +49,10 @@ cmdrule: # A list of command rules, Specify a rule that de
50
49
  mode: server
51
50
  cmds: [list]
52
51
  rule: allow
52
+ - groups: [user, guest]
53
+ mode: audit
54
+ cmds: [write]
55
+ rule: allow
53
56
  - groups: [user, guest]
54
57
  mode: web
55
58
  cmds: [genpass]
@@ -70,6 +73,7 @@ pathrule: # List of RESTAPI rules, rules that determine whe
70
73
  rule: allow
71
74
  - groups: [user]
72
75
  paths: [/signin, /assets, /bbforce_cmd, /copyright, /dosignin, /dosignout, /password/change,
76
+ /gui/user_data/load, /gui/user_data/save, /gui/user_data/delete,
73
77
  /exec_cmd, /exec_pipe, /filer, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
74
78
  rule: allow
75
79
  - groups: [readonly]
@@ -105,7 +109,8 @@ oauth2: # OAuth2 settings.
105
109
  client_secret: XXXXXXXXXXX # Specify Google's OAuth2 client secret.
106
110
  redirect_uri: https://localhost:8443/oauth2/google/callback # Specify Google's OAuth2 redirect URI.
107
111
  scope: ['email'] # Specify the scope you want to retrieve with Google's OAuth2. Usually, just reading the email is sufficient.
108
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
112
+ signin_module: # Specify the module name that implements the sign-in.
113
+ cmdbox.app.auth.google_signin
109
114
  note: # Specify a description such as Google's OAuth2 reference site.
110
115
  - https://developers.google.com/identity/protocols/oauth2/web-server?hl=ja#httprest
111
116
  github: # OAuth2 settings for GitHub.
@@ -114,7 +119,8 @@ oauth2: # OAuth2 settings.
114
119
  client_secret: XXXXXXXXXXX # Specify the GitHub OAuth2 client secret.
115
120
  redirect_uri: https://localhost:8443/oauth2/github/callback # Specify the OAuth2 redirect URI for GitHub.
116
121
  scope: ['user:email'] # Specify the scope you want to get from GitHub's OAuth2. Usually, just reading the email is sufficient.
117
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
122
+ signin_module: # Specify the module name that implements the sign-in.
123
+ cmdbox.app.auth.github_signin
118
124
  note: # Specify a description, such as a reference site for OAuth2 on GitHub.
119
125
  - https://docs.github.com/ja/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#scopes
120
126
  azure: # OAuth2 settings for Azure AD.
@@ -124,6 +130,34 @@ oauth2: # OAuth2 settings.
124
130
  client_secret: XXXXXXXXXXX # Specify the Azure AD OAuth2 client secret.
125
131
  redirect_uri: https://localhost:8443/oauth2/azure/callback # Specify the OAuth2 redirect URI for Azure AD.
126
132
  scope: ['openid', 'profile', 'email', 'https://graph.microsoft.com/mail.read']
127
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
133
+ signin_module: # Specify the module name that implements the sign-in.
134
+ cmdbox.app.auth.azure_signin
128
135
  note: # Specify a description, such as a reference site for Azure AD's OAuth2.
129
136
  - https://learn.microsoft.com/ja-jp/entra/identity-platform/v2-oauth2-auth-code-flow
137
+ saml: # SAML settings.
138
+ providers: # This is a per-provider setting for OAuth2.
139
+ azure: # SAML settings for Azure AD.
140
+ enabled: false # Specify whether to enable SAML authentication for Azure AD.
141
+ signin_module: # Specify the module name that implements the sign-in.
142
+ cmdbox.app.auth.azure_signin_saml # Specify the python3-saml configuration.
143
+ # see) https://github.com/SAML-Toolkits/python3-saml
144
+ sp:
145
+ entityId: https://localhost:8443/
146
+ assertionConsumerService:
147
+ url: https://localhost:8443/saml/azure/callback
148
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
149
+ attributeConsumingService: {}
150
+ singleLogoutService:
151
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
152
+ NameIDFormat: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
153
+ x509cert: ''
154
+ privateKey: ''
155
+ idp:
156
+ entityId: https://sts.windows.net/{tenant-id}/
157
+ singleSignOnService:
158
+ url: https://login.microsoftonline.com/{tenant-id}/saml2
159
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
160
+ x509cert: XXXXXXXXXXX
161
+ singleLogoutService: {}
162
+ certFingerprint: ''
163
+ certFingerprintAlgorithm: sha1
@@ -2,9 +2,9 @@ users: # A list of users, each of which is a map that co
2
2
  - uid: 1 # An ID that identifies a user. No two users can have the same ID.
3
3
  name: admin # A name that identifies the user. No two users can have the same name.
4
4
  password: admin # The user's password. The value is hashed with the hash function specified in the next hash field.
5
- hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2.
5
+ hash: plain # The hash function used to hash the password, which can be plain, md5, sha1, or sha256, or oauth2, or saml.
6
6
  groups: [admin] # A list of groups to which the user belongs, as specified in the groups field.
7
- email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 field.
7
+ email: admin@aaa.bbb.jp # The email address of the user, used when authenticating using the provider specified in the oauth2 or saml field.
8
8
  - uid: 101
9
9
  name: user01
10
10
  password: b75705d7e35e7014521a46b532236ec3
@@ -74,7 +74,7 @@ pathrule: # List of RESTAPI rules, rules that determine whe
74
74
  - groups: [user]
75
75
  paths: [/signin, /assets, /bbforce_cmd, /copyright, /dosignin, /dosignout, /password/change,
76
76
  /gui/user_data/load, /gui/user_data/save, /gui/user_data/delete,
77
- /exec_cmd, /exec_pipe, /filer, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
77
+ /exec_cmd, /exec_pipe, /filer, /result, /gui, /get_server_opt, /usesignout, /versions_cmdbox, /versions_used]
78
78
  rule: allow
79
79
  - groups: [readonly]
80
80
  paths: [/gui/del_cmd, /gui/del_pipe, /gui/save_cmd, /gui/save_pipe]
@@ -109,7 +109,8 @@ oauth2: # OAuth2 settings.
109
109
  client_secret: XXXXXXXXXXX # Specify Google's OAuth2 client secret.
110
110
  redirect_uri: https://localhost:8443/oauth2/google/callback # Specify Google's OAuth2 redirect URI.
111
111
  scope: ['email'] # Specify the scope you want to retrieve with Google's OAuth2. Usually, just reading the email is sufficient.
112
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
112
+ signin_module: # Specify the module name that implements the sign-in.
113
+ cmdbox.app.auth.google_signin
113
114
  note: # Specify a description such as Google's OAuth2 reference site.
114
115
  - https://developers.google.com/identity/protocols/oauth2/web-server?hl=ja#httprest
115
116
  github: # OAuth2 settings for GitHub.
@@ -118,7 +119,8 @@ oauth2: # OAuth2 settings.
118
119
  client_secret: XXXXXXXXXXX # Specify the GitHub OAuth2 client secret.
119
120
  redirect_uri: https://localhost:8443/oauth2/github/callback # Specify the OAuth2 redirect URI for GitHub.
120
121
  scope: ['user:email'] # Specify the scope you want to get from GitHub's OAuth2. Usually, just reading the email is sufficient.
121
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
122
+ signin_module: # Specify the module name that implements the sign-in.
123
+ cmdbox.app.auth.github_signin
122
124
  note: # Specify a description, such as a reference site for OAuth2 on GitHub.
123
125
  - https://docs.github.com/ja/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#scopes
124
126
  azure: # OAuth2 settings for Azure AD.
@@ -128,6 +130,34 @@ oauth2: # OAuth2 settings.
128
130
  client_secret: XXXXXXXXXXX # Specify the Azure AD OAuth2 client secret.
129
131
  redirect_uri: https://localhost:8443/oauth2/azure/callback # Specify the OAuth2 redirect URI for Azure AD.
130
132
  scope: ['openid', 'profile', 'email', 'https://graph.microsoft.com/mail.read']
131
- signin_module: # Specify the module name that implements the sign-in. see, cmdbox.app.signin.SignIn
133
+ signin_module: # Specify the module name that implements the sign-in.
134
+ cmdbox.app.auth.azure_signin
132
135
  note: # Specify a description, such as a reference site for Azure AD's OAuth2.
133
136
  - https://learn.microsoft.com/ja-jp/entra/identity-platform/v2-oauth2-auth-code-flow
137
+ saml: # SAML settings.
138
+ providers: # This is a per-provider setting for OAuth2.
139
+ azure: # SAML settings for Azure AD.
140
+ enabled: false # Specify whether to enable SAML authentication for Azure AD.
141
+ signin_module: # Specify the module name that implements the sign-in.
142
+ cmdbox.app.auth.azure_signin_saml # Specify the python3-saml configuration.
143
+ # see) https://github.com/SAML-Toolkits/python3-saml
144
+ sp:
145
+ entityId: https://localhost:8443/
146
+ assertionConsumerService:
147
+ url: https://localhost:8443/saml/azure/callback
148
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
149
+ attributeConsumingService: {}
150
+ singleLogoutService:
151
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
152
+ NameIDFormat: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
153
+ x509cert: ''
154
+ privateKey: ''
155
+ idp:
156
+ entityId: https://sts.windows.net/{tenant-id}/
157
+ singleSignOnService:
158
+ url: https://login.microsoftonline.com/{tenant-id}/saml2
159
+ binding: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
160
+ x509cert: XXXXXXXXXXX
161
+ singleLogoutService: {}
162
+ certFingerprint: ''
163
+ certFingerprintAlgorithm: sha1
@@ -0,0 +1,13 @@
1
+ Copyright 2016-2020 aio-libs collaboration.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
cmdbox/licenses/files.txt CHANGED
@@ -8,9 +8,10 @@ UNKNOWN BSD License alabaster https://alabaster.readthedocs.io/ 1.0.0 cmdbox\lic
8
8
  Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>, Samuel Colvin <s@muelcolvin.com>, Zac Hatfield-Dodds <zac@zhd.dev> MIT License annotated-types https://github.com/annotated-types/annotated-types 0.7.0 cmdbox\licenses\LICENSE.annotated-types.0.7.0(MIT License).txt
9
9
  Alex Grönholm <alex.gronholm@nextday.fi> MIT License anyio https://anyio.readthedocs.io/en/stable/versionhistory.html 4.9.0 cmdbox\licenses\LICENSE.anyio.4.9.0(MIT License).txt
10
10
  Andrey Kislyuk Apache Software License argcomplete https://github.com/kislyuk/argcomplete 3.6.2 cmdbox\licenses\LICENSE.argcomplete.3.6.2(Apache Software License).txt
11
+ Andrew Svetlov <andrew.svetlov@gmail.com> Apache Software License async-timeout https://github.com/aio-libs/async-timeout 5.0.1 cmdbox\licenses\LICENSE.async-timeout.5.0.1(Apache Software License).txt
11
12
  Armin Ronacher BSD License babel https://babel.pocoo.org/ 2.17.0 cmdbox\licenses\LICENSE.babel.2.17.0(BSD License).txt
12
13
  "Jason R. Coombs" <jaraco@jaraco.com> MIT License backports.tarfile https://github.com/jaraco/backports.tarfile 1.2.0 cmdbox\licenses\LICENSE.backports.tarfile.1.2.0(MIT License).txt
13
- Kenneth Reitz Mozilla Public License 2.0 (MPL 2.0) certifi https://github.com/certifi/python-certifi 2025.1.31 cmdbox\licenses\LICENSE.certifi.2025.1.31(Mozilla Public License 2.0 (MPL 2.0)).txt
14
+ Kenneth Reitz Mozilla Public License 2.0 (MPL 2.0) certifi https://github.com/certifi/python-certifi 2025.4.26 cmdbox\licenses\LICENSE.certifi.2025.4.26(Mozilla Public License 2.0 (MPL 2.0)).txt
14
15
  Armin Rigo, Maciej Fijalkowski MIT License cffi http://cffi.readthedocs.org 1.17.1 cmdbox\licenses\LICENSE.cffi.1.17.1(MIT License).txt
15
16
  "Ahmed R. TAHRI" <tahri.ahmed@proton.me> MIT License charset-normalizer https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md 3.4.1 cmdbox\licenses\LICENSE.charset-normalizer.3.4.1(MIT License).txt
16
17
  UNKNOWN BSD License click https://github.com/pallets/click/ 8.1.8 cmdbox\licenses\LICENSE.click.8.1.8(BSD License).txt
@@ -18,15 +19,15 @@ Jonathan Hartley <tartley@tartley.com> BSD License colorama https://github.com/t
18
19
  The cryptography developers <cryptography-dev@python.org> Apache Software License; BSD License cryptography https://github.com/pyca/cryptography 44.0.2 cmdbox\licenses\LICENSE.cryptography.44.0.2(Apache Software License; BSD License).txt
19
20
  David Goodger <goodger@python.org> BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License docutils https://docutils.sourceforge.io 0.21.2 cmdbox\licenses\LICENSE.docutils.0.21.2(BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License).txt
20
21
  =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com> MIT License fastapi https://github.com/fastapi/fastapi 0.115.12 cmdbox\licenses\LICENSE.fastapi.0.115.12(MIT License).txt
21
- Denis Bilenko MIT gevent http://www.gevent.org/ 25.4.1 cmdbox\licenses\LICENSE.gevent.25.4.1(MIT).txt
22
- Alexey Borzenkov MIT AND Python-2.0 greenlet https://greenlet.readthedocs.io/ 3.2.0 cmdbox\licenses\LICENSE.greenlet.3.2.0(MIT AND Python-2.0).txt
22
+ Denis Bilenko MIT gevent http://www.gevent.org/ 25.4.2 cmdbox\licenses\LICENSE.gevent.25.4.2(MIT).txt
23
+ Alexey Borzenkov MIT AND Python-2.0 greenlet https://greenlet.readthedocs.io/ 3.2.1 cmdbox\licenses\LICENSE.greenlet.3.2.1(MIT AND Python-2.0).txt
23
24
  Benoit Chesneau <benoitc@gunicorn.org> MIT License gunicorn https://gunicorn.org 23.0.0 cmdbox\licenses\LICENSE.gunicorn.23.0.0(MIT License).txt
24
- Nathaniel J. Smith MIT License h11 https://github.com/python-hyper/h11 0.14.0 cmdbox\licenses\LICENSE.h11.0.14.0(MIT License).txt
25
+ Nathaniel J. Smith MIT License h11 https://github.com/python-hyper/h11 0.16.0 cmdbox\licenses\LICENSE.h11.0.16.0(MIT License).txt
25
26
  Yury Selivanov MIT License httptools https://github.com/MagicStack/httptools 0.6.4 cmdbox\licenses\LICENSE.httptools.0.6.4(MIT License).txt
26
27
  UNKNOWN Apache Software License id https://pypi.org/project/id/ 1.5.0 cmdbox\licenses\LICENSE.id.1.5.0(Apache Software License).txt
27
28
  Kim Davies <kim+pypi@gumleaf.org> BSD License idna https://github.com/kjd/idna 3.10 cmdbox\licenses\LICENSE.idna.3.10(BSD License).txt
28
29
  Yoshiki Shibukawa MIT License imagesize https://github.com/shibukawa/imagesize_py 1.4.1 cmdbox\licenses\LICENSE.imagesize.1.4.1(MIT License).txt
29
- "Jason R. Coombs" <jaraco@jaraco.com> Apache Software License importlib_metadata https://github.com/python/importlib_metadata 8.6.1 cmdbox\licenses\LICENSE.importlib_metadata.8.6.1(Apache Software License).txt
30
+ "Jason R. Coombs" <jaraco@jaraco.com> Apache Software License importlib_metadata https://github.com/python/importlib_metadata 8.7.0 cmdbox\licenses\LICENSE.importlib_metadata.8.7.0(Apache Software License).txt
30
31
  UNKNOWN BSD License itsdangerous https://github.com/pallets/itsdangerous/ 2.2.0 cmdbox\licenses\LICENSE.itsdangerous.2.2.0(BSD License).txt
31
32
  Jason R. Coombs MIT License jaraco.classes https://github.com/jaraco/jaraco.classes 3.4.0 cmdbox\licenses\LICENSE.jaraco.classes.3.4.0(MIT License).txt
32
33
  "Jason R. Coombs" <jaraco@jaraco.com> MIT License jaraco.context https://github.com/jaraco/jaraco.context 6.0.1 cmdbox\licenses\LICENSE.jaraco.context.6.0.1(MIT License).txt
@@ -34,10 +35,10 @@ Jason R. Coombs MIT License jaraco.classes https://github.com/jaraco/jaraco.clas
34
35
  Kang Zhang <jobo.zh@gmail.com> MIT License keyring https://github.com/jaraco/keyring 25.6.0 cmdbox\licenses\LICENSE.keyring.25.6.0(MIT License).txt
35
36
  Chris Sewell <chrisj_sewell@hotmail.com> MIT License markdown-it-py https://github.com/executablebooks/markdown-it-py 3.0.0 cmdbox\licenses\LICENSE.markdown-it-py.3.0.0(MIT License).txt
36
37
  Taneli Hukkinen <hukkin@users.noreply.github.com> MIT License mdurl https://github.com/executablebooks/mdurl 0.1.2 cmdbox\licenses\LICENSE.mdurl.0.1.2(MIT License).txt
37
- Erik Rose <erikrose@grinchcentral.com> MIT License more-itertools https://github.com/more-itertools/more-itertools 10.6.0 cmdbox\licenses\LICENSE.more-itertools.10.6.0(MIT License).txt
38
+ Erik Rose <erikrose@grinchcentral.com> MIT License more-itertools https://github.com/more-itertools/more-itertools 10.7.0 cmdbox\licenses\LICENSE.more-itertools.10.7.0(MIT License).txt
38
39
  messense <messense@icloud.com> MIT nh3 UNKNOWN 0.2.21 cmdbox\licenses\LICENSE.nh3.0.2.21(MIT).txt
39
- Travis E. Oliphant et al. BSD License numpy https://numpy.org 2.2.4 cmdbox\licenses\LICENSE.numpy.2.2.4(BSD License).txt
40
- Donald Stufft <donald@stufft.io> Apache Software License; BSD License packaging https://github.com/pypa/packaging 24.2 cmdbox\licenses\LICENSE.packaging.24.2(Apache Software License; BSD License).txt
40
+ Travis E. Oliphant et al. BSD License numpy https://numpy.org 2.2.5 cmdbox\licenses\LICENSE.numpy.2.2.5(BSD License).txt
41
+ Donald Stufft <donald@stufft.io> Apache Software License; BSD License packaging https://github.com/pypa/packaging 25.0 cmdbox\licenses\LICENSE.packaging.25.0(Apache Software License; BSD License).txt
41
42
  "Jeffrey A. Clark" <aclark@aclark.net> UNKNOWN pillow https://python-pillow.github.io 11.2.1 cmdbox\licenses\LICENSE.pillow.11.2.1(UNKNOWN).txt
42
43
  The pip developers <distutils-sig@python.org> MIT License pip https://pip.pypa.io/ 24.0 cmdbox\licenses\LICENSE.pip.24.0(MIT License).txt
43
44
  Kivy team MIT License plyer https://plyer.readthedocs.org/en/latest/ 2.1.0 cmdbox\licenses\LICENSE.plyer.2.1.0(MIT License).txt
@@ -84,7 +85,7 @@ Victorien Plot <contact@vctrn.dev> MIT License typing-inspection https://github.
84
85
  "Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee" <levkivskyi@gmail.com> UNKNOWN typing_extensions https://github.com/python/typing_extensions 4.13.2 cmdbox\licenses\LICENSE.typing_extensions.4.13.2(UNKNOWN).txt
85
86
  Python Software Foundation Apache Software License tzdata https://github.com/python/tzdata 2025.2 cmdbox\licenses\LICENSE.tzdata.2025.2(Apache Software License).txt
86
87
  Andrey Petrov <andrey.petrov@shazow.net> UNKNOWN urllib3 https://github.com/urllib3/urllib3/blob/main/CHANGES.rst 2.4.0 cmdbox\licenses\LICENSE.urllib3.2.4.0(UNKNOWN).txt
87
- Tom Christie <tom@tomchristie.com>, Marcelo Trylesinski <marcelotryle@gmail.com> BSD License uvicorn https://www.uvicorn.org/ 0.34.1 cmdbox\licenses\LICENSE.uvicorn.0.34.1(BSD License).txt
88
+ Tom Christie <tom@tomchristie.com>, Marcelo Trylesinski <marcelotryle@gmail.com> BSD License uvicorn https://www.uvicorn.org/ 0.34.2 cmdbox\licenses\LICENSE.uvicorn.0.34.2(BSD License).txt
88
89
  Samuel Colvin <s@muelcolvin.com> MIT License watchfiles https://github.com/samuelcolvin/watchfiles 1.0.5 cmdbox\licenses\LICENSE.watchfiles.1.0.5(MIT License).txt
89
90
  Jeff Quast MIT License wcwidth https://github.com/jquast/wcwidth 0.2.13 cmdbox\licenses\LICENSE.wcwidth.0.2.13(MIT License).txt
90
91
  Aymeric Augustin <aymeric.augustin@m4x.org> BSD License websockets https://github.com/python-websockets/websockets 15.0.1 cmdbox\licenses\LICENSE.websockets.15.0.1(BSD License).txt
cmdbox/version.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import datetime
2
2
 
3
- dt_now = datetime.datetime(2025, 4, 18)
3
+ dt_now = datetime.datetime(2025, 4, 29)
4
4
  __appid__ = 'cmdbox'
5
5
  __title__ = 'cmdbox (Command Development Application)'
6
- __version__ = '0.5.3'
6
+ __version__ = '0.5.4'
7
7
  __copyright__ = f'Copyright © 2023-{dt_now.strftime("%Y")} hamacom2004jp'
8
8
  __pypiurl__ = 'https://pypi.org/project/cmdbox/'
9
9
  __srcurl__ = 'https://github.com/hamacom2004jp/cmdbox'