aixtools 0.2.10__py3-none-any.whl → 0.2.12__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 aixtools might be problematic. Click here for more details.
- aixtools/_version.py +2 -2
- aixtools/auth/auth.py +11 -2
- aixtools/utils/config.py +4 -1
- {aixtools-0.2.10.dist-info → aixtools-0.2.12.dist-info}/METADATA +1 -1
- {aixtools-0.2.10.dist-info → aixtools-0.2.12.dist-info}/RECORD +8 -8
- {aixtools-0.2.10.dist-info → aixtools-0.2.12.dist-info}/WHEEL +0 -0
- {aixtools-0.2.10.dist-info → aixtools-0.2.12.dist-info}/entry_points.txt +0 -0
- {aixtools-0.2.10.dist-info → aixtools-0.2.12.dist-info}/top_level.txt +0 -0
aixtools/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.12'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 12)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
aixtools/auth/auth.py
CHANGED
|
@@ -16,6 +16,7 @@ from mcp.server.auth.provider import (
|
|
|
16
16
|
from aixtools.utils import config
|
|
17
17
|
|
|
18
18
|
logger = logging.getLogger(__name__)
|
|
19
|
+
TEST_CLIENT = "test-client"
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class AuthTokenErrorCode(str, enum.Enum):
|
|
@@ -159,14 +160,22 @@ class AccessTokenAuthProvider(AuthProvider):
|
|
|
159
160
|
def __init__(self) -> None:
|
|
160
161
|
super().__init__()
|
|
161
162
|
self.token_verifier = AccessTokenVerifier()
|
|
163
|
+
self.app_scope = config.APP_DEFAULT_SCOPE
|
|
162
164
|
|
|
163
165
|
async def verify_token(self, token: str) -> AccessToken:
|
|
164
166
|
"""Verify the access token and return an AccessToken object."""
|
|
165
|
-
|
|
166
167
|
logger.info("Received verify token request")
|
|
168
|
+
test_token = config.AUTH_TEST_TOKEN
|
|
169
|
+
|
|
170
|
+
# check if the token is a test token
|
|
171
|
+
# this is used for integration test run
|
|
172
|
+
if test_token and token == test_token:
|
|
173
|
+
logger.info("Using test token:%s", test_token)
|
|
174
|
+
return AccessToken(token=token, client_id=TEST_CLIENT, scopes=[], expires_at=None)
|
|
175
|
+
|
|
167
176
|
claims = self.token_verifier.verify(token)
|
|
168
177
|
scopes = claims.get("scp", "")
|
|
169
|
-
self.token_verifier.authorize_claims(claims,
|
|
178
|
+
self.token_verifier.authorize_claims(claims, self.app_scope)
|
|
170
179
|
|
|
171
180
|
scopes_arr = []
|
|
172
181
|
if scopes:
|
aixtools/utils/config.py
CHANGED
|
@@ -124,7 +124,7 @@ GOOGLE_CLOUD_LOCATION = get_variable_env("GOOGLE_CLOUD_LOCATION", True)
|
|
|
124
124
|
# vault parameters.
|
|
125
125
|
VAULT_ADDRESS = get_variable_env("VAULT_ADDRESS", default="http://localhost:8200")
|
|
126
126
|
VAULT_TOKEN = get_variable_env("VAULT_TOKEN", allow_empty=True)
|
|
127
|
-
VAULT_ENV = get_variable_env("
|
|
127
|
+
VAULT_ENV = get_variable_env("VAULT_ENV", allow_empty=True)
|
|
128
128
|
VAULT_MOUNT_POINT = get_variable_env("VAULT_MOUNT_POINT", allow_empty=True)
|
|
129
129
|
VAULT_PATH_PREFIX = get_variable_env("VAULT_PATH_PREFIX", allow_empty=True)
|
|
130
130
|
|
|
@@ -141,3 +141,6 @@ APP_AUTHORIZED_GROUPS = get_variable_env("APP_AUTHORIZED_GROUPS", allow_empty=Tr
|
|
|
141
141
|
|
|
142
142
|
# used to skip authorization in local tests if required.
|
|
143
143
|
SKIP_MCP_AUTHORIZATION = str2bool(get_variable_env("SKIP_MCP_AUTHORIZATION", True, False))
|
|
144
|
+
APP_DEFAULT_SCOPE = get_variable_env("APP_DEFAULT_SCOPE", allow_empty=True)
|
|
145
|
+
|
|
146
|
+
AUTH_TEST_TOKEN = get_variable_env("AUTH_TEST_TOKEN", allow_empty=True)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
aixtools/__init__.py,sha256=9NGHm7LjsQmsvjTZvw6QFJexSvAU4bCoN_KBk9SCa00,260
|
|
2
|
-
aixtools/_version.py,sha256=
|
|
2
|
+
aixtools/_version.py,sha256=kUi3MrWsIVQiHrXbB13_ffDrVNg8qWHnVa_kbLjcxME,706
|
|
3
3
|
aixtools/app.py,sha256=JzQ0nrv_bjDQokllIlGHOV0HEb-V8N6k_nGQH-TEsVU,5227
|
|
4
4
|
aixtools/chainlit.md,sha256=yC37Ly57vjKyiIvK4oUvf4DYxZCwH7iocTlx7bLeGLU,761
|
|
5
5
|
aixtools/context.py,sha256=I_MD40ZnvRm5WPKAKqBUAdXIf8YaurkYUUHSVVy-QvU,598
|
|
@@ -30,7 +30,7 @@ aixtools/agents/agent_batch.py,sha256=0Zu9yNCRPAQZPjXQ-dIUAmP1uGTVbxVt7xvnMpoJMj
|
|
|
30
30
|
aixtools/agents/print_nodes.py,sha256=wVTngNfqM0As845WTRz6G3Rei_Gr3HuBlvu-G_eXuig,1665
|
|
31
31
|
aixtools/agents/prompt.py,sha256=p9OYnyJ4-MyGXwHPrQeJBhZ2a3RV2HqhtdUUCrTMsAQ,3361
|
|
32
32
|
aixtools/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
aixtools/auth/auth.py,sha256=
|
|
33
|
+
aixtools/auth/auth.py,sha256=gooviMSsfvAn9BulJLD5My2B45qsAR4ZT6JgIS3uSLQ,7467
|
|
34
34
|
aixtools/compliance/__init__.py,sha256=vnw0zEdySIJWvDAJ8DCRRaWmY_agEOz1qlpAdhmtiuo,191
|
|
35
35
|
aixtools/compliance/private_data.py,sha256=OOM9mIp3_w0fNgj3VAEWBl7-jrPc19_Ls1pC5dfF5UY,5323
|
|
36
36
|
aixtools/db/__init__.py,sha256=b8vRhme3egV-aUZbAntnOaDkSXB8UT0Xy5oqQhU_z0Q,399
|
|
@@ -78,7 +78,7 @@ aixtools/tools/doctor/mcp_tool_doctor.py,sha256=sX2q5GfNkmUYxnXrqMpeGIwGfeL1LpYJ
|
|
|
78
78
|
aixtools/tools/doctor/tool_doctor.py,sha256=EY1pshjLGLD0j6cc1ZFtbc0G19I5IbOZwHFDqypE49Q,2661
|
|
79
79
|
aixtools/tools/doctor/tool_recommendation.py,sha256=LYyVOSXdAorWiY4P-ucSA1vLlV5BTEfX4GzBXNE_X0M,1569
|
|
80
80
|
aixtools/utils/__init__.py,sha256=xT6almZBQYMfj4h7Hq9QXDHyVXbOOTxqLsmJsxYYnSw,757
|
|
81
|
-
aixtools/utils/config.py,sha256=
|
|
81
|
+
aixtools/utils/config.py,sha256=e6gzGfo9c21V4ImuthLMP1RmF2-2FbBnsirMmve3ZWE,5491
|
|
82
82
|
aixtools/utils/config_util.py,sha256=3Ya4Qqhj1RJ1qtTTykQ6iayf5uxlpigPXgEJlTi1wn4,2229
|
|
83
83
|
aixtools/utils/enum_with_description.py,sha256=zjSzWxG74eR4x7dpmb74pLTYCWNSMvauHd7_9LpDYIw,1088
|
|
84
84
|
aixtools/utils/files.py,sha256=8JnxwHJRJcjWCdFpjzWmo0po2fRg8esj4H7sOxElYXU,517
|
|
@@ -88,8 +88,8 @@ aixtools/utils/chainlit/cl_agent_show.py,sha256=vaRuowp4BRvhxEr5hw0zHEJ7iaSF_5bo
|
|
|
88
88
|
aixtools/utils/chainlit/cl_utils.py,sha256=fxaxdkcZg6uHdM8uztxdPowg3a2f7VR7B26VPY4t-3c,5738
|
|
89
89
|
aixtools/vault/__init__.py,sha256=fsr_NuX3GZ9WZ7dGfe0gp_5-z3URxAfwVRXw7Xyc0dU,141
|
|
90
90
|
aixtools/vault/vault.py,sha256=9dZLWdZQk9qN_Q9Djkofw9LUKnJqnrX5H0fGusVLBhA,6037
|
|
91
|
-
aixtools-0.2.
|
|
92
|
-
aixtools-0.2.
|
|
93
|
-
aixtools-0.2.
|
|
94
|
-
aixtools-0.2.
|
|
95
|
-
aixtools-0.2.
|
|
91
|
+
aixtools-0.2.12.dist-info/METADATA,sha256=KnSz22SzcgaKB4P39ouB8gy-efFU3ZlhBpGJohIfoRw,27230
|
|
92
|
+
aixtools-0.2.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
93
|
+
aixtools-0.2.12.dist-info/entry_points.txt,sha256=q8412TG4T0S8K0SKeWp2vkVPIDYQs0jNoHqcQ7qxOiA,155
|
|
94
|
+
aixtools-0.2.12.dist-info/top_level.txt,sha256=wBn-rw9bCtxrR4AYEYgjilNCUVmKY0LWby9Zan2PRJM,9
|
|
95
|
+
aixtools-0.2.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|