aimarket-tee 2.0.0__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.
- aimarket_tee-2.0.0/LICENSE +21 -0
- aimarket_tee-2.0.0/PKG-INFO +71 -0
- aimarket_tee-2.0.0/README.md +58 -0
- aimarket_tee-2.0.0/aimarket_tee/__init__.py +1 -0
- aimarket_tee-2.0.0/aimarket_tee/plugin.py +17 -0
- aimarket_tee-2.0.0/aimarket_tee/tee_attestation.py +3 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/PKG-INFO +71 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/SOURCES.txt +12 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/dependency_links.txt +1 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/entry_points.txt +2 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/requires.txt +4 -0
- aimarket_tee-2.0.0/aimarket_tee.egg-info/top_level.txt +1 -0
- aimarket_tee-2.0.0/pyproject.toml +21 -0
- aimarket_tee-2.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AI-Factory Project Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aimarket-tee
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: TEE-attested execution (AWS Nitro Enclaves / Intel TDX)
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: aimarket-hub>=3.0.0
|
|
10
|
+
Provides-Extra: dev
|
|
11
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# aimarket-tee
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
| Document | Description |
|
|
19
|
+
|----------|-------------|
|
|
20
|
+
| [User guide](docs/user-guide.md) | Install, configure, verify plugin is loaded |
|
|
21
|
+
| [User cases](docs/user-cases.md) | Personas and cross-plugin workflows |
|
|
22
|
+
| [SDK integration](docs/sdk-integration.md) | Code examples and hook behavior |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
**TEE-attested execution for AI capabilities. AWS Nitro Enclaves / Intel TDX.**
|
|
27
|
+
Before invoke, the server sends a cryptographic attestation report: "this code runs in an encrypted hardware enclave. I physically cannot see your input." Receipts are signed by the enclave key. Unlocks enterprise, legal, medical, and finance verticals.
|
|
28
|
+
|
|
29
|
+
## When to Use
|
|
30
|
+
- **Confidential AI processing** — consumer sends sensitive data (PII, legal docs, medical records), provider can't see it
|
|
31
|
+
- **Enterprise compliance (GDPR/HIPAA/FedRAMP)** — attestation report proves code integrity and data isolation
|
|
32
|
+
- **Third-party model hosting** — model owner deploys to enclave, hub operator can't extract weights
|
|
33
|
+
- **Regulated industries** — prove to auditors that execution happened in certified hardware
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
```bash
|
|
37
|
+
pip install aimarket-tee
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## API Endpoints
|
|
41
|
+
No additional API endpoints. Activated automatically via invoke flow — attestation is attached to every invocation response.
|
|
42
|
+
|
|
43
|
+
## End-to-End Example
|
|
44
|
+
```python
|
|
45
|
+
from aimarket_tee.tee_attestation import TEEAttestationService, EnclavePlatform
|
|
46
|
+
|
|
47
|
+
service = TEEAttestationService(platform=EnclavePlatform.AWS_NITRO)
|
|
48
|
+
|
|
49
|
+
# Execute capability inside enclave — provider sees only hashes
|
|
50
|
+
result = service.execute_with_attestation(
|
|
51
|
+
capability_id="legal.review@v1",
|
|
52
|
+
product_id="prod-legal",
|
|
53
|
+
input_payload={"documents": {"nda": "CONFIDENTIAL: review this NDA..."}},
|
|
54
|
+
code_identifier="legal-review-v2.0.0-githash-abc123",
|
|
55
|
+
price_usd=5.00
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
print(result["attestation"]["platform"]) # aws_nitro
|
|
59
|
+
print(result["attestation"]["code_hash"]) # sha256 of code
|
|
60
|
+
print(result["receipt"]["input_hash"]) # sha256 of input (provider never sees plaintext)
|
|
61
|
+
print(result["enterprise_compliance"]["gdpr"]) # "Input never leaves enclave in plaintext"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Security
|
|
65
|
+
- **Code hash verification** — consumer verifies the exact code running in enclave
|
|
66
|
+
- **Input confidentiality** — provider sees only SHA-256(input), never plaintext
|
|
67
|
+
- **Output signed by enclave key** — verifiable proof of correct execution
|
|
68
|
+
- **Attestation TTL** — 5 minutes by default, prevents replay attacks
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
MIT · Maintained by AI-Factory
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# aimarket-tee
|
|
2
|
+
|
|
3
|
+
## Documentation
|
|
4
|
+
|
|
5
|
+
| Document | Description |
|
|
6
|
+
|----------|-------------|
|
|
7
|
+
| [User guide](docs/user-guide.md) | Install, configure, verify plugin is loaded |
|
|
8
|
+
| [User cases](docs/user-cases.md) | Personas and cross-plugin workflows |
|
|
9
|
+
| [SDK integration](docs/sdk-integration.md) | Code examples and hook behavior |
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
**TEE-attested execution for AI capabilities. AWS Nitro Enclaves / Intel TDX.**
|
|
14
|
+
Before invoke, the server sends a cryptographic attestation report: "this code runs in an encrypted hardware enclave. I physically cannot see your input." Receipts are signed by the enclave key. Unlocks enterprise, legal, medical, and finance verticals.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
- **Confidential AI processing** — consumer sends sensitive data (PII, legal docs, medical records), provider can't see it
|
|
18
|
+
- **Enterprise compliance (GDPR/HIPAA/FedRAMP)** — attestation report proves code integrity and data isolation
|
|
19
|
+
- **Third-party model hosting** — model owner deploys to enclave, hub operator can't extract weights
|
|
20
|
+
- **Regulated industries** — prove to auditors that execution happened in certified hardware
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
```bash
|
|
24
|
+
pip install aimarket-tee
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## API Endpoints
|
|
28
|
+
No additional API endpoints. Activated automatically via invoke flow — attestation is attached to every invocation response.
|
|
29
|
+
|
|
30
|
+
## End-to-End Example
|
|
31
|
+
```python
|
|
32
|
+
from aimarket_tee.tee_attestation import TEEAttestationService, EnclavePlatform
|
|
33
|
+
|
|
34
|
+
service = TEEAttestationService(platform=EnclavePlatform.AWS_NITRO)
|
|
35
|
+
|
|
36
|
+
# Execute capability inside enclave — provider sees only hashes
|
|
37
|
+
result = service.execute_with_attestation(
|
|
38
|
+
capability_id="legal.review@v1",
|
|
39
|
+
product_id="prod-legal",
|
|
40
|
+
input_payload={"documents": {"nda": "CONFIDENTIAL: review this NDA..."}},
|
|
41
|
+
code_identifier="legal-review-v2.0.0-githash-abc123",
|
|
42
|
+
price_usd=5.00
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
print(result["attestation"]["platform"]) # aws_nitro
|
|
46
|
+
print(result["attestation"]["code_hash"]) # sha256 of code
|
|
47
|
+
print(result["receipt"]["input_hash"]) # sha256 of input (provider never sees plaintext)
|
|
48
|
+
print(result["enterprise_compliance"]["gdpr"]) # "Input never leaves enclave in plaintext"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Security
|
|
52
|
+
- **Code hash verification** — consumer verifies the exact code running in enclave
|
|
53
|
+
- **Input confidentiality** — provider sees only SHA-256(input), never plaintext
|
|
54
|
+
- **Output signed by enclave key** — verifiable proof of correct execution
|
|
55
|
+
- **Attestation TTL** — 5 minutes by default, prevents replay attacks
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
MIT · Maintained by AI-Factory
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# aimarket-tee plugin
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""tee plugin for AIMarket Hub."""
|
|
2
|
+
|
|
3
|
+
from aimarket_hub.plugin import HubPlugin
|
|
4
|
+
from aimarket_tee.tee_attestation import *
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TEEPlugin(HubPlugin):
|
|
8
|
+
name = "aimarket-tee"
|
|
9
|
+
version = "2.0.0"
|
|
10
|
+
description = "tee attestation"
|
|
11
|
+
homepage = "https://github.com/ai-factory/aimarket-tee"
|
|
12
|
+
category = "security"
|
|
13
|
+
|
|
14
|
+
def register_routes(self, router):
|
|
15
|
+
from fastapi import APIRouter as _AR
|
|
16
|
+
# Plugin-specific routes will be registered here
|
|
17
|
+
pass
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aimarket-tee
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: TEE-attested execution (AWS Nitro Enclaves / Intel TDX)
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: aimarket-hub>=3.0.0
|
|
10
|
+
Provides-Extra: dev
|
|
11
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# aimarket-tee
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
| Document | Description |
|
|
19
|
+
|----------|-------------|
|
|
20
|
+
| [User guide](docs/user-guide.md) | Install, configure, verify plugin is loaded |
|
|
21
|
+
| [User cases](docs/user-cases.md) | Personas and cross-plugin workflows |
|
|
22
|
+
| [SDK integration](docs/sdk-integration.md) | Code examples and hook behavior |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
**TEE-attested execution for AI capabilities. AWS Nitro Enclaves / Intel TDX.**
|
|
27
|
+
Before invoke, the server sends a cryptographic attestation report: "this code runs in an encrypted hardware enclave. I physically cannot see your input." Receipts are signed by the enclave key. Unlocks enterprise, legal, medical, and finance verticals.
|
|
28
|
+
|
|
29
|
+
## When to Use
|
|
30
|
+
- **Confidential AI processing** — consumer sends sensitive data (PII, legal docs, medical records), provider can't see it
|
|
31
|
+
- **Enterprise compliance (GDPR/HIPAA/FedRAMP)** — attestation report proves code integrity and data isolation
|
|
32
|
+
- **Third-party model hosting** — model owner deploys to enclave, hub operator can't extract weights
|
|
33
|
+
- **Regulated industries** — prove to auditors that execution happened in certified hardware
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
```bash
|
|
37
|
+
pip install aimarket-tee
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## API Endpoints
|
|
41
|
+
No additional API endpoints. Activated automatically via invoke flow — attestation is attached to every invocation response.
|
|
42
|
+
|
|
43
|
+
## End-to-End Example
|
|
44
|
+
```python
|
|
45
|
+
from aimarket_tee.tee_attestation import TEEAttestationService, EnclavePlatform
|
|
46
|
+
|
|
47
|
+
service = TEEAttestationService(platform=EnclavePlatform.AWS_NITRO)
|
|
48
|
+
|
|
49
|
+
# Execute capability inside enclave — provider sees only hashes
|
|
50
|
+
result = service.execute_with_attestation(
|
|
51
|
+
capability_id="legal.review@v1",
|
|
52
|
+
product_id="prod-legal",
|
|
53
|
+
input_payload={"documents": {"nda": "CONFIDENTIAL: review this NDA..."}},
|
|
54
|
+
code_identifier="legal-review-v2.0.0-githash-abc123",
|
|
55
|
+
price_usd=5.00
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
print(result["attestation"]["platform"]) # aws_nitro
|
|
59
|
+
print(result["attestation"]["code_hash"]) # sha256 of code
|
|
60
|
+
print(result["receipt"]["input_hash"]) # sha256 of input (provider never sees plaintext)
|
|
61
|
+
print(result["enterprise_compliance"]["gdpr"]) # "Input never leaves enclave in plaintext"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Security
|
|
65
|
+
- **Code hash verification** — consumer verifies the exact code running in enclave
|
|
66
|
+
- **Input confidentiality** — provider sees only SHA-256(input), never plaintext
|
|
67
|
+
- **Output signed by enclave key** — verifiable proof of correct execution
|
|
68
|
+
- **Attestation TTL** — 5 minutes by default, prevents replay attacks
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
MIT · Maintained by AI-Factory
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
aimarket_tee/__init__.py
|
|
5
|
+
aimarket_tee/plugin.py
|
|
6
|
+
aimarket_tee/tee_attestation.py
|
|
7
|
+
aimarket_tee.egg-info/PKG-INFO
|
|
8
|
+
aimarket_tee.egg-info/SOURCES.txt
|
|
9
|
+
aimarket_tee.egg-info/dependency_links.txt
|
|
10
|
+
aimarket_tee.egg-info/entry_points.txt
|
|
11
|
+
aimarket_tee.egg-info/requires.txt
|
|
12
|
+
aimarket_tee.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aimarket_tee
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=75", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "aimarket-tee"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "TEE-attested execution (AWS Nitro Enclaves / Intel TDX)"
|
|
9
|
+
license = {text = "MIT"}
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
dependencies = ["aimarket-hub>=3.0.0"]
|
|
13
|
+
|
|
14
|
+
[project.optional-dependencies]
|
|
15
|
+
dev = ["pytest>=8"]
|
|
16
|
+
|
|
17
|
+
[project.entry-points."aimarket.plugins"]
|
|
18
|
+
tee = "aimarket_tee.plugin:TEEPlugin"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
include = ["aimarket_tee*"]
|