akeyless-agentcore-rta 0.1.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.
- akeyless_agentcore_rta-0.1.0/.env.example +13 -0
- akeyless_agentcore_rta-0.1.0/.github/CODEOWNERS +2 -0
- akeyless_agentcore_rta-0.1.0/.github/pull_request_template.md +23 -0
- akeyless_agentcore_rta-0.1.0/.github/workflows/ci.yml +37 -0
- akeyless_agentcore_rta-0.1.0/.github/workflows/publish.yml +20 -0
- akeyless_agentcore_rta-0.1.0/.gitignore +31 -0
- akeyless_agentcore_rta-0.1.0/CONTRIBUTING.md +17 -0
- akeyless_agentcore_rta-0.1.0/LICENSE +19 -0
- akeyless_agentcore_rta-0.1.0/PKG-INFO +126 -0
- akeyless_agentcore_rta-0.1.0/README.md +96 -0
- akeyless_agentcore_rta-0.1.0/SECURITY.md +21 -0
- akeyless_agentcore_rta-0.1.0/docs/AGENTCORE_DEPLOY.md +43 -0
- akeyless_agentcore_rta-0.1.0/docs/AKEYLESS_SETUP.md +53 -0
- akeyless_agentcore_rta-0.1.0/docs/MAINTAINER.md +74 -0
- akeyless_agentcore_rta-0.1.0/docs/PYPI_PUBLISHING.md +48 -0
- akeyless_agentcore_rta-0.1.0/examples/mcp-server/requirements.txt +1 -0
- akeyless_agentcore_rta-0.1.0/examples/mcp-server/server.py +16 -0
- akeyless_agentcore_rta-0.1.0/pyproject.toml +54 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/__init__.py +13 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/ara.py +223 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/auth.py +181 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/browser_auth.py +191 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/client.py +220 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/config.py +255 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/http_ara.py +210 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/tools/__init__.py +17 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/tools/mcp.py +129 -0
- akeyless_agentcore_rta-0.1.0/src/akeyless_agentcore_rta/tools/service.py +150 -0
- akeyless_agentcore_rta-0.1.0/tests/test_ara.py +84 -0
- akeyless_agentcore_rta-0.1.0/tests/test_browser_auth.py +55 -0
- akeyless_agentcore_rta-0.1.0/tests/test_client.py +167 -0
- akeyless_agentcore_rta-0.1.0/tests/test_config.py +76 -0
- akeyless_agentcore_rta-0.1.0/tests/test_mcp_tools.py +45 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Required: customer / self-hosted Gateway with ARA enabled (NOT api.akeyless.io)
|
|
2
|
+
AKEYLESS_GATEWAY_URL=https://gw.example.com:8000
|
|
3
|
+
|
|
4
|
+
# Auth — production on AgentCore: aws_iam; local: access_key | oidc | saml
|
|
5
|
+
AKEYLESS_ACCESS_TYPE=access_key
|
|
6
|
+
AKEYLESS_ACCESS_ID=p-xxxxx
|
|
7
|
+
AKEYLESS_ACCESS_KEY=
|
|
8
|
+
# OIDC/SAML: set ACCESS_TYPE=oidc (or saml) + ACCESS_ID; browser login opens automatically
|
|
9
|
+
|
|
10
|
+
# Optional
|
|
11
|
+
# AKEYLESS_AGENT_ID=bedrock-agentcore
|
|
12
|
+
# AKEYLESS_MCP_ID=akeyless-agentcore-rta
|
|
13
|
+
# AKEYLESS_DEFAULT_SECRET_NAME=/path/to/secret
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What does this PR change and why? -->
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix
|
|
8
|
+
- [ ] New feature
|
|
9
|
+
- [ ] Documentation
|
|
10
|
+
- [ ] Example / tooling
|
|
11
|
+
|
|
12
|
+
## Checklist
|
|
13
|
+
|
|
14
|
+
- [ ] Tests pass locally (`pytest`)
|
|
15
|
+
- [ ] No credentials, `.env` files, or real secret values committed
|
|
16
|
+
- [ ] Documentation updated if behavior or install steps changed
|
|
17
|
+
- [ ] Tool responses still never include credential values (RTA/ARA invariant)
|
|
18
|
+
|
|
19
|
+
## Notes for reviewers
|
|
20
|
+
|
|
21
|
+
<!-- Anything maintainers should focus on -->
|
|
22
|
+
|
|
23
|
+
> **External contributors:** A member of `@akeyless-community/cs-admin` must approve this PR before it can be merged. CI must pass.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.12"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
|
|
22
|
+
- run: pip install -e ".[dev,mcp]"
|
|
23
|
+
- run: pytest
|
|
24
|
+
|
|
25
|
+
ci-success:
|
|
26
|
+
name: ci-success
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
needs: test
|
|
29
|
+
if: always()
|
|
30
|
+
steps:
|
|
31
|
+
- name: Require all test jobs to pass
|
|
32
|
+
run: |
|
|
33
|
+
if [ "${{ needs.test.result }}" != "success" ]; then
|
|
34
|
+
echo "One or more test jobs failed"
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
echo "All tests passed"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
environment: pypi
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
- run: pip install build
|
|
19
|
+
- run: python -m build
|
|
20
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
.env
|
|
12
|
+
.env.local
|
|
13
|
+
.env.*.local
|
|
14
|
+
|
|
15
|
+
# Testing / tooling
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
|
|
22
|
+
# IDE
|
|
23
|
+
.idea/
|
|
24
|
+
.vscode/
|
|
25
|
+
*.swp
|
|
26
|
+
.DS_Store
|
|
27
|
+
|
|
28
|
+
# AgentCore local artifacts
|
|
29
|
+
agentcore/
|
|
30
|
+
.gateway_config.json
|
|
31
|
+
gateway_config.json
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python3 -m venv .venv
|
|
7
|
+
source .venv/bin/activate
|
|
8
|
+
pip install -e ".[mcp,dev]"
|
|
9
|
+
pytest
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Guidelines
|
|
13
|
+
|
|
14
|
+
- Never log or commit credentials, tokens, or `.env` files.
|
|
15
|
+
- Prefer new tests over changing existing ones.
|
|
16
|
+
- Keep ARA protocol aligned with the Claude/Cursor connectors and Gateway `/config/target_query` contract.
|
|
17
|
+
- Do not add a dependency on `akeyless-agentcore-runtime`; this package stays standalone.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
Copyright 2026 Akeyless Community
|
|
8
|
+
|
|
9
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
you may not use this file except in compliance with the License.
|
|
11
|
+
You may obtain a copy of the License at
|
|
12
|
+
|
|
13
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
|
|
15
|
+
Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
See the License for the specific language governing permissions and
|
|
19
|
+
limitations under the License.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: akeyless-agentcore-rta
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Akeyless Agentic Runtime Authority (RTA/ARA) for AWS Bedrock AgentCore — secretless DB and cloud actions
|
|
5
|
+
Project-URL: Homepage, https://github.com/akeyless-community/bedrock-agentcore-akeyless-rta
|
|
6
|
+
Project-URL: Repository, https://github.com/akeyless-community/bedrock-agentcore-akeyless-rta
|
|
7
|
+
Author: Akeyless Community
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agentcore,akeyless,ara,aws,bedrock,rta,runtime-authority
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: akeyless-cloud-id>=0.3.1
|
|
21
|
+
Requires-Dist: akeyless>=5.0.0
|
|
22
|
+
Provides-Extra: all
|
|
23
|
+
Requires-Dist: mcp<2,>=1.9.0; extra == 'all'
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
27
|
+
Provides-Extra: mcp
|
|
28
|
+
Requires-Dist: mcp<2,>=1.9.0; extra == 'mcp'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# akeyless-agentcore-rta
|
|
32
|
+
|
|
33
|
+
[Akeyless Agentic Runtime Authority (ARA / RTA)](https://docs.akeyless.io/docs/agentic-runtime-authority) for [AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/).
|
|
34
|
+
|
|
35
|
+
Agents call **list-secrets**, **query-db**, **service-execute**, and **list-sub-tools**. Credentials stay on your **Akeyless Gateway** — tool responses contain paths, metadata, and query/action results only.
|
|
36
|
+
|
|
37
|
+
**Not the secrets-fetch library.** For `get_secret()` / pulling secret *values* into the agent, use [`akeyless-agentcore-runtime`](https://github.com/akeyless-community/bedrock-agentcore-akeyless-runtime). You can use both in one architecture (bootstrap via secrets runtime; DB/cloud via this package).
|
|
38
|
+
|
|
39
|
+
| Concern | This package (RTA) | Secrets runtime |
|
|
40
|
+
|---------|-------------------|-----------------|
|
|
41
|
+
| Goal | Do work with secrets | Fetch secret values |
|
|
42
|
+
| Tools | list-secrets, query-db, service-execute, list-sub-tools | list / get secret |
|
|
43
|
+
| Credentials in agent | Never | Yes (values returned) |
|
|
44
|
+
| Gateway | **Required** customer GW with ARA | SaaS API or GW OK |
|
|
45
|
+
|
|
46
|
+
## Requirements
|
|
47
|
+
|
|
48
|
+
- Python 3.10+
|
|
49
|
+
- Akeyless **Gateway with ARA enabled** (not `api.akeyless.io`)
|
|
50
|
+
- Auth method your AgentCore role can use (production: AWS IAM cloud identity)
|
|
51
|
+
|
|
52
|
+
## Install (local)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
cd bedrock-agentcore-akeyless-rta
|
|
56
|
+
python3 -m venv .venv
|
|
57
|
+
source .venv/bin/activate
|
|
58
|
+
pip install -e ".[mcp,dev]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Quick start — client
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from akeyless_agentcore_rta import AkeylessRtaClient
|
|
65
|
+
|
|
66
|
+
client = AkeylessRtaClient() # reads AKEYLESS_* env
|
|
67
|
+
for s in client.list_secrets():
|
|
68
|
+
print(s.name, s.target_type) # never prints credentials
|
|
69
|
+
|
|
70
|
+
rows = client.query_db("SELECT 1", secret_name="/prod/db/readonly")
|
|
71
|
+
print(rows.results)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Quick start — MCP on AgentCore
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# env (required)
|
|
78
|
+
export AKEYLESS_GATEWAY_URL=https://gw.example.com:8000
|
|
79
|
+
export AKEYLESS_ACCESS_ID=p-xxxxx
|
|
80
|
+
export AKEYLESS_ACCESS_TYPE=aws_iam # or access_key locally
|
|
81
|
+
|
|
82
|
+
python examples/mcp-server/server.py
|
|
83
|
+
# AgentCore: protocol MCP → examples/mcp-server/server.py
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Environment
|
|
87
|
+
|
|
88
|
+
| Variable | Required | Notes |
|
|
89
|
+
|----------|----------|-------|
|
|
90
|
+
| `AKEYLESS_GATEWAY_URL` | **Yes** | Customer GW (`https://gw:8000` or `…/api/v2`). Public SaaS rejected. |
|
|
91
|
+
| `AKEYLESS_ACCESS_ID` | Yes* | Auth method access id |
|
|
92
|
+
| `AKEYLESS_ACCESS_TYPE` | No | Default `aws_iam`. Also: `access_key`, `oidc`, `saml`, `jwt`, … |
|
|
93
|
+
| `AKEYLESS_ACCESS_KEY` | For access_key | Local/dev only |
|
|
94
|
+
| (OIDC/SAML) | — | Browser login to Gateway; needs Access ID only |
|
|
95
|
+
| `AKEYLESS_AGENT_ID` | No | Default `bedrock-agentcore` |
|
|
96
|
+
| `AKEYLESS_MCP_ID` | No | Default `akeyless-agentcore-rta` |
|
|
97
|
+
| `AKEYLESS_DEFAULT_SECRET_NAME` | No | Optional default path for execute tools |
|
|
98
|
+
|
|
99
|
+
\* Or `AKEYLESS_TOKEN` for a pre-issued session token.
|
|
100
|
+
|
|
101
|
+
## Docs
|
|
102
|
+
|
|
103
|
+
| Guide | Description |
|
|
104
|
+
|-------|-------------|
|
|
105
|
+
| [Akeyless setup](docs/AKEYLESS_SETUP.md) | Auth method, ARA RBAC, chicken-and-egg IAM bind |
|
|
106
|
+
| [AgentCore deploy](docs/AGENTCORE_DEPLOY.md) | MCP protocol, envVars, invoke |
|
|
107
|
+
| [Security](SECURITY.md) | Checklist |
|
|
108
|
+
| [Maintainer guide](docs/MAINTAINER.md) | Branch protection, approvals, PyPI environment |
|
|
109
|
+
| [Publishing to PyPI](docs/PYPI_PUBLISHING.md) | Trusted publishing setup |
|
|
110
|
+
| [Contributing](CONTRIBUTING.md) | Development setup |
|
|
111
|
+
|
|
112
|
+
**Repository:** [github.com/akeyless-community/bedrock-agentcore-akeyless-rta](https://github.com/akeyless-community/bedrock-agentcore-akeyless-rta)
|
|
113
|
+
|
|
114
|
+
## Development
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install -e ".[mcp,dev]"
|
|
118
|
+
pytest
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Run pytest **inside this package directory** so the workspace root does not collect unrelated tests.
|
|
122
|
+
|
|
123
|
+
## Related
|
|
124
|
+
|
|
125
|
+
- Secrets at runtime (values in agent): [`akeyless-agentcore-runtime`](https://github.com/akeyless-community/bedrock-agentcore-akeyless-runtime)
|
|
126
|
+
- Product docs: [Agentic Runtime Authority](https://docs.akeyless.io/docs/agentic-runtime-authority)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# akeyless-agentcore-rta
|
|
2
|
+
|
|
3
|
+
[Akeyless Agentic Runtime Authority (ARA / RTA)](https://docs.akeyless.io/docs/agentic-runtime-authority) for [AWS Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/).
|
|
4
|
+
|
|
5
|
+
Agents call **list-secrets**, **query-db**, **service-execute**, and **list-sub-tools**. Credentials stay on your **Akeyless Gateway** — tool responses contain paths, metadata, and query/action results only.
|
|
6
|
+
|
|
7
|
+
**Not the secrets-fetch library.** For `get_secret()` / pulling secret *values* into the agent, use [`akeyless-agentcore-runtime`](https://github.com/akeyless-community/bedrock-agentcore-akeyless-runtime). You can use both in one architecture (bootstrap via secrets runtime; DB/cloud via this package).
|
|
8
|
+
|
|
9
|
+
| Concern | This package (RTA) | Secrets runtime |
|
|
10
|
+
|---------|-------------------|-----------------|
|
|
11
|
+
| Goal | Do work with secrets | Fetch secret values |
|
|
12
|
+
| Tools | list-secrets, query-db, service-execute, list-sub-tools | list / get secret |
|
|
13
|
+
| Credentials in agent | Never | Yes (values returned) |
|
|
14
|
+
| Gateway | **Required** customer GW with ARA | SaaS API or GW OK |
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Python 3.10+
|
|
19
|
+
- Akeyless **Gateway with ARA enabled** (not `api.akeyless.io`)
|
|
20
|
+
- Auth method your AgentCore role can use (production: AWS IAM cloud identity)
|
|
21
|
+
|
|
22
|
+
## Install (local)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd bedrock-agentcore-akeyless-rta
|
|
26
|
+
python3 -m venv .venv
|
|
27
|
+
source .venv/bin/activate
|
|
28
|
+
pip install -e ".[mcp,dev]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick start — client
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from akeyless_agentcore_rta import AkeylessRtaClient
|
|
35
|
+
|
|
36
|
+
client = AkeylessRtaClient() # reads AKEYLESS_* env
|
|
37
|
+
for s in client.list_secrets():
|
|
38
|
+
print(s.name, s.target_type) # never prints credentials
|
|
39
|
+
|
|
40
|
+
rows = client.query_db("SELECT 1", secret_name="/prod/db/readonly")
|
|
41
|
+
print(rows.results)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick start — MCP on AgentCore
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# env (required)
|
|
48
|
+
export AKEYLESS_GATEWAY_URL=https://gw.example.com:8000
|
|
49
|
+
export AKEYLESS_ACCESS_ID=p-xxxxx
|
|
50
|
+
export AKEYLESS_ACCESS_TYPE=aws_iam # or access_key locally
|
|
51
|
+
|
|
52
|
+
python examples/mcp-server/server.py
|
|
53
|
+
# AgentCore: protocol MCP → examples/mcp-server/server.py
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Environment
|
|
57
|
+
|
|
58
|
+
| Variable | Required | Notes |
|
|
59
|
+
|----------|----------|-------|
|
|
60
|
+
| `AKEYLESS_GATEWAY_URL` | **Yes** | Customer GW (`https://gw:8000` or `…/api/v2`). Public SaaS rejected. |
|
|
61
|
+
| `AKEYLESS_ACCESS_ID` | Yes* | Auth method access id |
|
|
62
|
+
| `AKEYLESS_ACCESS_TYPE` | No | Default `aws_iam`. Also: `access_key`, `oidc`, `saml`, `jwt`, … |
|
|
63
|
+
| `AKEYLESS_ACCESS_KEY` | For access_key | Local/dev only |
|
|
64
|
+
| (OIDC/SAML) | — | Browser login to Gateway; needs Access ID only |
|
|
65
|
+
| `AKEYLESS_AGENT_ID` | No | Default `bedrock-agentcore` |
|
|
66
|
+
| `AKEYLESS_MCP_ID` | No | Default `akeyless-agentcore-rta` |
|
|
67
|
+
| `AKEYLESS_DEFAULT_SECRET_NAME` | No | Optional default path for execute tools |
|
|
68
|
+
|
|
69
|
+
\* Or `AKEYLESS_TOKEN` for a pre-issued session token.
|
|
70
|
+
|
|
71
|
+
## Docs
|
|
72
|
+
|
|
73
|
+
| Guide | Description |
|
|
74
|
+
|-------|-------------|
|
|
75
|
+
| [Akeyless setup](docs/AKEYLESS_SETUP.md) | Auth method, ARA RBAC, chicken-and-egg IAM bind |
|
|
76
|
+
| [AgentCore deploy](docs/AGENTCORE_DEPLOY.md) | MCP protocol, envVars, invoke |
|
|
77
|
+
| [Security](SECURITY.md) | Checklist |
|
|
78
|
+
| [Maintainer guide](docs/MAINTAINER.md) | Branch protection, approvals, PyPI environment |
|
|
79
|
+
| [Publishing to PyPI](docs/PYPI_PUBLISHING.md) | Trusted publishing setup |
|
|
80
|
+
| [Contributing](CONTRIBUTING.md) | Development setup |
|
|
81
|
+
|
|
82
|
+
**Repository:** [github.com/akeyless-community/bedrock-agentcore-akeyless-rta](https://github.com/akeyless-community/bedrock-agentcore-akeyless-rta)
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install -e ".[mcp,dev]"
|
|
88
|
+
pytest
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Run pytest **inside this package directory** so the workspace root does not collect unrelated tests.
|
|
92
|
+
|
|
93
|
+
## Related
|
|
94
|
+
|
|
95
|
+
- Secrets at runtime (values in agent): [`akeyless-agentcore-runtime`](https://github.com/akeyless-community/bedrock-agentcore-akeyless-runtime)
|
|
96
|
+
- Product docs: [Agentic Runtime Authority](https://docs.akeyless.io/docs/agentic-runtime-authority)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting vulnerabilities
|
|
4
|
+
|
|
5
|
+
Report security issues to [security@akeyless.io](mailto:security@akeyless.io). Do not open public GitHub issues for vulnerabilities.
|
|
6
|
+
|
|
7
|
+
## Design principles
|
|
8
|
+
|
|
9
|
+
1. **Credentials never leave the Gateway** — tools return query/action results and secret metadata only.
|
|
10
|
+
2. **Customer Gateway required** — ARA execute APIs are not available on `api.akeyless.io`; misconfiguration is rejected in config validation.
|
|
11
|
+
3. **Cloud identity by default** — `aws_iam` uses the AgentCore execution role; no long-lived Akeyless access keys in production.
|
|
12
|
+
4. **Never log tokens or secret values** — do not print `Authorization` headers, access keys, or dynamic credential payloads.
|
|
13
|
+
5. **Least privilege** — bind the auth method to the AgentCore role ARN; scope ARA allow-access to needed paths only.
|
|
14
|
+
|
|
15
|
+
## Production checklist
|
|
16
|
+
|
|
17
|
+
- [ ] `AKEYLESS_GATEWAY_URL` points at your org Gateway with ARA enabled
|
|
18
|
+
- [ ] `AKEYLESS_ACCESS_TYPE=aws_iam` (not `access_key`)
|
|
19
|
+
- [ ] Auth method bound to AgentCore execution role ARN
|
|
20
|
+
- [ ] Role has `ara_allow_access` only on intended paths
|
|
21
|
+
- [ ] No secrets or access keys in AgentCore env beyond bootstrap Access ID / Gateway URL
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Deploy RTA MCP on Bedrock AgentCore
|
|
2
|
+
|
|
3
|
+
## Pattern
|
|
4
|
+
|
|
5
|
+
Deploy this package as an AgentCore Runtime with **`protocol: MCP`**. Agents discover tools (`list-secrets`, `query-db`, `service-execute`, `list-sub-tools`) over MCP. The process authenticates to your Akeyless Gateway and executes ARA calls server-side.
|
|
6
|
+
|
|
7
|
+
## Bootstrap envVars
|
|
8
|
+
|
|
9
|
+
Map into `agentcore.json` / Runtime env (no application secrets):
|
|
10
|
+
|
|
11
|
+
| Name | Example |
|
|
12
|
+
|------|---------|
|
|
13
|
+
| `AKEYLESS_GATEWAY_URL` | `https://gw.example.com:8000` |
|
|
14
|
+
| `AKEYLESS_ACCESS_ID` | `p-xxxxx` |
|
|
15
|
+
| `AKEYLESS_ACCESS_TYPE` | `aws_iam` |
|
|
16
|
+
| `AKEYLESS_AGENT_ID` | `my-agent` (optional) |
|
|
17
|
+
|
|
18
|
+
## Entry point
|
|
19
|
+
|
|
20
|
+
Use `examples/mcp-server/server.py`:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
agentcore configure -e examples/mcp-server/server.py --protocol MCP
|
|
24
|
+
agentcore deploy
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Install dependency (once on PyPI, or path/editable for local testing):
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
akeyless-agentcore-rta[mcp]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Until published, vendor the package into the agent image or install from a private index / local path your build allows (AgentCore `uv` may reject `git+https` source builds — prefer a wheel).
|
|
34
|
+
|
|
35
|
+
## After deploy
|
|
36
|
+
|
|
37
|
+
1. Bind the AgentCore execution role ARN on the Akeyless AWS IAM auth method.
|
|
38
|
+
2. Invoke the MCP runtime and call `list-secrets`.
|
|
39
|
+
3. Run a read-only `query-db` only with approval if the payload can change data or incur cost.
|
|
40
|
+
|
|
41
|
+
## Complementary secrets package
|
|
42
|
+
|
|
43
|
+
If the same agent also needs a model API key at startup, use [`akeyless-agentcore-runtime`](https://github.com/akeyless-community/bedrock-agentcore-akeyless-runtime) `get_secret()` in-process — do not add get-secret tools to this RTA server.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Akeyless setup for AgentCore RTA/ARA
|
|
2
|
+
|
|
3
|
+
Do this before deploying the MCP server.
|
|
4
|
+
|
|
5
|
+
## 1. Gateway with ARA
|
|
6
|
+
|
|
7
|
+
You need a **customer or self-hosted Akeyless Gateway** with Agentic Runtime Authority enabled and AI Insights / ARA configured per [product docs](https://docs.akeyless.io/docs/agentic-runtime-authority).
|
|
8
|
+
|
|
9
|
+
Set:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
export AKEYLESS_GATEWAY_URL=https://<your-gateway-host>:8000
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Do **not** use `https://api.akeyless.io` — the public SaaS API does not host ARA execute endpoints. This library rejects that host.
|
|
16
|
+
|
|
17
|
+
## 2. Auth method (AWS IAM for AgentCore)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
akeyless auth-method create aws-iam \
|
|
21
|
+
--name agentcore-rta \
|
|
22
|
+
--bound-aws-account-id <account-id>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
AgentCore creates the execution role ARN on **first deploy**. Start with a broader bind (account / later-tightened role ARN), deploy once, then restrict `--bound-aws-role-arn` to the AgentCore role. Same chicken-and-egg as the secrets runtime package.
|
|
26
|
+
|
|
27
|
+
Local testing can use `access_key` against the same Gateway.
|
|
28
|
+
|
|
29
|
+
## 3. RBAC — ARA allow access
|
|
30
|
+
|
|
31
|
+
Grant the auth method’s associated role:
|
|
32
|
+
|
|
33
|
+
- List / Read on the secret paths you will expose
|
|
34
|
+
- An **Agentic Runtime Authority** rule with **Allow Access** (`ara_allow_access`) on those paths
|
|
35
|
+
|
|
36
|
+
Enable ARA on each dynamic/rotated secret in the Console (or equivalent API).
|
|
37
|
+
|
|
38
|
+
## 4. Secrets
|
|
39
|
+
|
|
40
|
+
Store database and service producers under paths your role can see. Custom MCP static secrets appear as `target_type: custom-mcp` in `list-secrets`.
|
|
41
|
+
|
|
42
|
+
## 5. Verify
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
export AKEYLESS_GATEWAY_URL=https://gw.example.com:8000
|
|
46
|
+
export AKEYLESS_ACCESS_TYPE=access_key
|
|
47
|
+
export AKEYLESS_ACCESS_ID=p-xxxxx
|
|
48
|
+
export AKEYLESS_ACCESS_KEY=...
|
|
49
|
+
|
|
50
|
+
python -c "from akeyless_agentcore_rta import AkeylessRtaClient; print(AkeylessRtaClient().list_secrets())"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You should see secret **names and target types** only — never passwords or keys.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Maintainer guide: repository access controls
|
|
2
|
+
|
|
3
|
+
Settings applied to restrict changes so **people outside the Akeyless org must be reviewed and approved** before code lands on `main` or ships to PyPI.
|
|
4
|
+
|
|
5
|
+
## What is enforced
|
|
6
|
+
|
|
7
|
+
| Control | Effect |
|
|
8
|
+
|---------|--------|
|
|
9
|
+
| **Branch protection on `main`** | No direct pushes; changes only via pull request |
|
|
10
|
+
| **Push restrictions** | Only `@akeyless-community/cs-admin` can push or merge to `main` |
|
|
11
|
+
| **CODEOWNERS** (`@akeyless-community/cs-admin`) | PRs require approval from a `cs-admin` team member |
|
|
12
|
+
| **CI required** | `ci-success` must pass before merge |
|
|
13
|
+
| **Stale review dismissal** | New commits invalidate prior approvals |
|
|
14
|
+
| **Last-push approval** | Re-approval required after new commits |
|
|
15
|
+
| **`pypi` environment** | PyPI publish requires approval from a maintainer |
|
|
16
|
+
|
|
17
|
+
> **Note:** This repo is **public**, so push restrictions are available on **GitHub Free for organizations** and limit merge/push to `main` to `cs-admin`.
|
|
18
|
+
|
|
19
|
+
## Files in this repo
|
|
20
|
+
|
|
21
|
+
- [`.github/CODEOWNERS`](../.github/CODEOWNERS) — routes all paths to `@akeyless-community/cs-admin`
|
|
22
|
+
- [`.github/pull_request_template.md`](../.github/pull_request_template.md) — reminds external contributors about review
|
|
23
|
+
- [`.github/workflows/ci.yml`](../.github/workflows/ci.yml) — `ci-success` gate for branch protection
|
|
24
|
+
- [`.github/workflows/publish.yml`](../.github/workflows/publish.yml) — uses protected `pypi` environment
|
|
25
|
+
|
|
26
|
+
## Org settings (verify in GitHub UI)
|
|
27
|
+
|
|
28
|
+
These are **organization-level** and cannot be stored in the repo. An org admin should confirm:
|
|
29
|
+
|
|
30
|
+
1. **Member privileges → Base permissions** — recommended **Read** for non-maintainers
|
|
31
|
+
2. **Actions → Fork pull request workflows** — require approval for outside collaborators
|
|
32
|
+
3. **Teams → cs-admin** — maintainers who can approve PRs and PyPI releases
|
|
33
|
+
|
|
34
|
+
## Re-applying branch protection
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
gh api \
|
|
38
|
+
--method PUT \
|
|
39
|
+
repos/akeyless-community/bedrock-agentcore-akeyless-rta/branches/main/protection \
|
|
40
|
+
--input - <<'EOF'
|
|
41
|
+
{
|
|
42
|
+
"required_status_checks": {
|
|
43
|
+
"strict": true,
|
|
44
|
+
"checks": [
|
|
45
|
+
{ "context": "ci-success" }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"enforce_admins": true,
|
|
49
|
+
"required_pull_request_reviews": {
|
|
50
|
+
"dismiss_stale_reviews": true,
|
|
51
|
+
"require_code_owner_reviews": true,
|
|
52
|
+
"required_approving_review_count": 1,
|
|
53
|
+
"require_last_push_approval": true
|
|
54
|
+
},
|
|
55
|
+
"restrictions": {
|
|
56
|
+
"users": [],
|
|
57
|
+
"teams": ["cs-admin"],
|
|
58
|
+
"apps": []
|
|
59
|
+
},
|
|
60
|
+
"required_linear_history": true,
|
|
61
|
+
"allow_force_pushes": false,
|
|
62
|
+
"allow_deletions": false,
|
|
63
|
+
"required_conversation_resolution": true
|
|
64
|
+
}
|
|
65
|
+
EOF
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If `restrictions` fails or comes back empty, set **Restrict who can push** to `@akeyless-community/cs-admin` in **Settings → Branches → main**.
|
|
69
|
+
|
|
70
|
+
## PyPI environment
|
|
71
|
+
|
|
72
|
+
**Repository → Settings → Environments → pypi → Required reviewers** from `@akeyless-community/cs-admin`.
|
|
73
|
+
|
|
74
|
+
Also configure **Trusted publishing** on PyPI for project `akeyless-agentcore-rta` (see [PYPI_PUBLISHING.md](PYPI_PUBLISHING.md)). Publishing a GitHub Release starts the workflow; a reviewer must approve the environment deployment.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Publishing to PyPI
|
|
2
|
+
|
|
3
|
+
Publish `akeyless-agentcore-rta` with [trusted publishing](https://docs.pypi.org/trusted-publishers/) (no API tokens in GitHub Secrets).
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Maintainer access to this repo
|
|
8
|
+
- A [PyPI](https://pypi.org) account
|
|
9
|
+
- Package name `akeyless-agentcore-rta` available (first publisher claims it)
|
|
10
|
+
|
|
11
|
+
## Step 1: Register a pending trusted publisher
|
|
12
|
+
|
|
13
|
+
1. Log in to [pypi.org](https://pypi.org)
|
|
14
|
+
2. **Account settings** → **Publishing** → **Add a new pending publisher**
|
|
15
|
+
3. Fill in:
|
|
16
|
+
|
|
17
|
+
| Field | Value |
|
|
18
|
+
|-------|-------|
|
|
19
|
+
| **PyPI Project Name** | `akeyless-agentcore-rta` |
|
|
20
|
+
| **Publisher** | GitHub |
|
|
21
|
+
| **Owner** | `akeyless-community` |
|
|
22
|
+
| **Repository name** | `bedrock-agentcore-akeyless-rta` |
|
|
23
|
+
| **Workflow name** | `publish.yml` |
|
|
24
|
+
| **Environment name** | `pypi` |
|
|
25
|
+
|
|
26
|
+
4. Click **Add**
|
|
27
|
+
|
|
28
|
+
## Step 2: GitHub `pypi` environment
|
|
29
|
+
|
|
30
|
+
**Settings → Environments → New environment → `pypi`**
|
|
31
|
+
|
|
32
|
+
- Required reviewers: members of `@akeyless-community/cs-admin`
|
|
33
|
+
- Workflow already uses `environment: pypi` and `id-token: write`
|
|
34
|
+
|
|
35
|
+
## Step 3: First release
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# bump version in pyproject.toml + __init__.py if needed
|
|
39
|
+
git tag v0.1.0
|
|
40
|
+
git push origin v0.1.0
|
|
41
|
+
gh release create v0.1.0 --title "v0.1.0" --notes "Initial release: ARA client + MCP for Bedrock AgentCore"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Approve the pending `pypi` environment deployment when Actions asks. After success:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install akeyless-agentcore-rta
|
|
48
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
akeyless-agentcore-rta[mcp]>=0.1.0
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Deployable MCP server exposing Akeyless RTA/ARA tools on AgentCore.
|
|
2
|
+
|
|
3
|
+
Deploy with AgentCore CLI:
|
|
4
|
+
agentcore configure -e server.py --protocol MCP
|
|
5
|
+
agentcore deploy
|
|
6
|
+
|
|
7
|
+
Or run locally (requires a Gateway with ARA enabled):
|
|
8
|
+
AKEYLESS_GATEWAY_URL=https://gw.example.com:8000 \\
|
|
9
|
+
AKEYLESS_ACCESS_ID=p-xxxxx AKEYLESS_ACCESS_TYPE=access_key AKEYLESS_ACCESS_KEY=... \\
|
|
10
|
+
python server.py
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from akeyless_agentcore_rta.tools.mcp import run_mcp_server
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
run_mcp_server()
|