abap-accelerator 1.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.
- abap_accelerator-1.0.0/.github/workflows/publish.yml +33 -0
- abap_accelerator-1.0.0/.gitignore +30 -0
- abap_accelerator-1.0.0/CODE_OF_CONDUCT.md +4 -0
- abap_accelerator-1.0.0/CONTRIBUTING.md +59 -0
- abap_accelerator-1.0.0/Dockerfile.simple +67 -0
- abap_accelerator-1.0.0/LICENSE +16 -0
- abap_accelerator-1.0.0/PKG-INFO +1255 -0
- abap_accelerator-1.0.0/README.md +1213 -0
- abap_accelerator-1.0.0/pyproject.toml +58 -0
- abap_accelerator-1.0.0/requirements.txt +73 -0
- abap_accelerator-1.0.0/src/abap_accelerator/__init__.py +2 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/__init__.py +27 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/iam_identity_validator.py +274 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/integration.py +191 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/keychain_manager.py +586 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/mcp_tools.py +312 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/multi_system_manager.py +176 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/principal_propagation.py +380 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/principal_propagation_middleware.py +188 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/base.py +98 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/basic_auth.py +273 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/certificate_auth.py +304 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/certificate_auth_provider.py +380 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/reentrance_ticket_auth.py +403 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/providers/saml_sso.py +284 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/rbac_manager.py +0 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/sap_auth_helper.py +322 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/sap_client_factory.py +116 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/session_manager.py +343 -0
- abap_accelerator-1.0.0/src/abap_accelerator/auth/types.py +60 -0
- abap_accelerator-1.0.0/src/abap_accelerator/config/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/config/settings.py +206 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise/__init__.py +19 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise/context_manager.py +205 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise/middleware.py +442 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise/sap_client_factory.py +187 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise/usage_tracker.py +317 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise_main.py +617 -0
- abap_accelerator-1.0.0/src/abap_accelerator/enterprise_main_tools.py +735 -0
- abap_accelerator-1.0.0/src/abap_accelerator/health_check.py +79 -0
- abap_accelerator-1.0.0/src/abap_accelerator/main.py +47 -0
- abap_accelerator-1.0.0/src/abap_accelerator/py.typed +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/behavior_definition_handler.py +179 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/cds_handler.py +1171 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/class_handler.py +471 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/core/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/core/activation_manager.py +0 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/core/connection.py +247 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/core/object_manager.py +514 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/core/source_manager.py +283 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/sap_client.py +7821 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/service_binding_handler.py +298 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap/service_definition_handler.py +410 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap_types/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/sap_types/sap_types.py +826 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/fastmcp_oauth_integration.py +618 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/fastmcp_server.py +393 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/health.py +75 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/middleware.py +140 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/oauth_callback.py +202 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/oauth_helpers.py +83 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/oauth_manager.py +175 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/oidc_discovery.py +280 -0
- abap_accelerator-1.0.0/src/abap_accelerator/server/tool_handlers.py +1653 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/__init__.py +1 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/host_credential_manager.py +159 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/logger.py +264 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/response_optimizer.py +276 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/secret_reader.py +73 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/security.py +216 -0
- abap_accelerator-1.0.0/src/abap_accelerator/utils/xml_utils.py +494 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.12"
|
|
15
|
+
- run: pip install build
|
|
16
|
+
- run: python -m build
|
|
17
|
+
- uses: actions/upload-artifact@v4
|
|
18
|
+
with:
|
|
19
|
+
name: dist
|
|
20
|
+
path: dist/
|
|
21
|
+
|
|
22
|
+
publish:
|
|
23
|
+
needs: build
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
environment: pypi
|
|
26
|
+
permissions:
|
|
27
|
+
id-token: write
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/download-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
### vsCode ###
|
|
2
|
+
.vscode
|
|
3
|
+
|
|
4
|
+
### macOS ###
|
|
5
|
+
# General
|
|
6
|
+
.DS_Store
|
|
7
|
+
.AppleDouble
|
|
8
|
+
.LSOverride
|
|
9
|
+
# Files that might appear in the root of a volume
|
|
10
|
+
.DocumentRevisions-V100
|
|
11
|
+
.fseventsd
|
|
12
|
+
.Spotlight-V100
|
|
13
|
+
.TemporaryItems
|
|
14
|
+
.Trashes
|
|
15
|
+
.VolumeIcon.icns
|
|
16
|
+
.com.apple.timemachine.donotpresent
|
|
17
|
+
|
|
18
|
+
**/node_modules
|
|
19
|
+
**/dist
|
|
20
|
+
**/build
|
|
21
|
+
**/.DS_Store
|
|
22
|
+
**/.angular
|
|
23
|
+
**/.idea
|
|
24
|
+
cdk.out
|
|
25
|
+
**/data/**.csv
|
|
26
|
+
|
|
27
|
+
.env
|
|
28
|
+
.venv/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
__pycache__/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
## Code of Conduct
|
|
2
|
+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
|
3
|
+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
|
4
|
+
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Contributing Guidelines
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
|
|
4
|
+
documentation, we greatly value feedback and contributions from our community.
|
|
5
|
+
|
|
6
|
+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
|
|
7
|
+
information to effectively respond to your bug report or contribution.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Reporting Bugs/Feature Requests
|
|
11
|
+
|
|
12
|
+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
|
|
13
|
+
|
|
14
|
+
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
|
|
15
|
+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
|
|
16
|
+
|
|
17
|
+
* A reproducible test case or series of steps
|
|
18
|
+
* The version of our code being used
|
|
19
|
+
* Any modifications you've made relevant to the bug
|
|
20
|
+
* Anything unusual about your environment or deployment
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Contributing via Pull Requests
|
|
24
|
+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
|
|
25
|
+
|
|
26
|
+
1. You are working against the latest source on the *main* branch.
|
|
27
|
+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
|
|
28
|
+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
|
|
29
|
+
|
|
30
|
+
To send us a pull request, please:
|
|
31
|
+
|
|
32
|
+
1. Fork the repository.
|
|
33
|
+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
|
|
34
|
+
3. Ensure local tests pass.
|
|
35
|
+
4. Commit to your fork using clear commit messages.
|
|
36
|
+
5. Send us a pull request, answering any default questions in the pull request interface.
|
|
37
|
+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
|
|
38
|
+
|
|
39
|
+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
|
|
40
|
+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Finding contributions to work on
|
|
44
|
+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Code of Conduct
|
|
48
|
+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
|
49
|
+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
|
50
|
+
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Security issue notifications
|
|
54
|
+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Licensing
|
|
58
|
+
|
|
59
|
+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Dockerfile for ABAP-Accelerator MCP Server
|
|
2
|
+
# Simple production-ready image without obfuscation
|
|
3
|
+
# Supports both AMD64 and ARM64 architectures
|
|
4
|
+
|
|
5
|
+
# Official Python image from Docker Hub
|
|
6
|
+
# ECR Public mirror (public.ecr.aws/docker/library/python) can also be used
|
|
7
|
+
FROM python:3.12-slim
|
|
8
|
+
|
|
9
|
+
# Set environment variables
|
|
10
|
+
ENV PYTHONUNBUFFERED=1 \
|
|
11
|
+
PYTHONDONTWRITEBYTECODE=1 \
|
|
12
|
+
PYTHONPATH=/app \
|
|
13
|
+
PIP_NO_CACHE_DIR=1 \
|
|
14
|
+
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
15
|
+
ENABLE_ENTERPRISE_MODE=true \
|
|
16
|
+
SERVER_HOST=0.0.0.0 \
|
|
17
|
+
SERVER_PORT=8000 \
|
|
18
|
+
DOCKER_CONTAINER=true
|
|
19
|
+
|
|
20
|
+
# Install runtime dependencies
|
|
21
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
22
|
+
ca-certificates \
|
|
23
|
+
procps \
|
|
24
|
+
&& apt-get upgrade -y \
|
|
25
|
+
&& rm -rf /var/lib/apt/lists/* \
|
|
26
|
+
&& apt-get clean
|
|
27
|
+
|
|
28
|
+
# Create non-root user for security
|
|
29
|
+
RUN groupadd -r appuser && \
|
|
30
|
+
useradd -r -g appuser -d /home/appuser -s /bin/bash -m appuser
|
|
31
|
+
|
|
32
|
+
# Set working directory
|
|
33
|
+
WORKDIR /app
|
|
34
|
+
|
|
35
|
+
# Copy and install Python dependencies
|
|
36
|
+
COPY requirements.txt ./
|
|
37
|
+
RUN pip install --no-cache-dir --upgrade pip && \
|
|
38
|
+
pip install --no-cache-dir -r requirements.txt && \
|
|
39
|
+
rm -rf /root/.cache /tmp/* /var/tmp/*
|
|
40
|
+
|
|
41
|
+
# Copy application source code
|
|
42
|
+
COPY src/ ./src/
|
|
43
|
+
COPY .env.example ./
|
|
44
|
+
|
|
45
|
+
# Create application directories
|
|
46
|
+
RUN mkdir -p /app/logs /app/tmp && \
|
|
47
|
+
chown -R appuser:appuser /app && \
|
|
48
|
+
chmod -R 755 /app && \
|
|
49
|
+
chmod 777 /app/logs
|
|
50
|
+
|
|
51
|
+
# Switch to non-root user
|
|
52
|
+
USER appuser
|
|
53
|
+
|
|
54
|
+
# Expose server port
|
|
55
|
+
EXPOSE 8000
|
|
56
|
+
|
|
57
|
+
# Labels
|
|
58
|
+
LABEL maintainer="SAP ABAP-Accelerator Team" \
|
|
59
|
+
version="1.0.0" \
|
|
60
|
+
description="MCP Server for SAP ABAP development"
|
|
61
|
+
|
|
62
|
+
# Health check
|
|
63
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
|
64
|
+
CMD python /app/src/abap_accelerator/health_check.py || exit 1
|
|
65
|
+
|
|
66
|
+
# Start the server
|
|
67
|
+
CMD ["python", "src/abap_accelerator/enterprise_main.py"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
MIT No Attribution
|
|
2
|
+
|
|
3
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
13
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
14
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
15
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
16
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|