-
Notifications
You must be signed in to change notification settings - Fork 102
support PQC supported ciphers and ECDH curves from envoy #3222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,13 +62,15 @@ services: | |
| # Policy Engine | ||
| - "9002:9002" # Admin API | ||
| - "9003:9003" # Metrics | ||
| - "9004:9004" # Health | ||
| env_file: | ||
| - path: api-platform.env | ||
| required: true | ||
| format: raw | ||
| volumes: | ||
| - ./configs/config.toml:/etc/policy-engine/config.toml:ro | ||
| - ./configs/llm-pricing/model_prices.json:/etc/policy-engine/llm-pricing/model_prices.json:ro | ||
| - ./gateway-controller/listener-certs:/etc/policy-engine/listener-certs:ro | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Cross-check the admin TLS certificate paths in the config templates against the compose mount target.
set -euo pipefail
echo "== admin tls settings in config templates"
fd -t f 'config*.toml' gateway/configs 2>/dev/null | while IFS= read -r f; do
echo "-- $f"
rg -n -A 12 '^\s*\[policy_engine\.admin\.tls\]' "$f" || true
rg -n 'listener-certs|cert_path|key_path' "$f" || true
done
echo "== compose mounts referencing listener-certs"
rg -n 'listener-certs' gateway/docker-compose.yaml
echo "== contents of the source cert directory, if committed"
fd -H . gateway/gateway-controller/listener-certs 2>/dev/null || echo "directory not present in repo"Repository: wso2/api-platform Length of output: 590 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== configuration files"
fd -t f -e toml gateway | sort
echo "== TLS path references"
rg -n -i -C 4 '(\[.*tls.*\]|cert_path|key_path|listener-certs)' gateway -g '*.toml' -g '*.yaml' -g '*.yml'
echo "== relevant compose section"
sed -n '35,80p' gateway/docker-compose.yaml
echo "== certificate directory contents"
find gateway/gateway-controller/listener-certs -maxdepth 2 -type f -printf '%P\n' 2>/dev/null || trueRepository: wso2/api-platform Length of output: 24384 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== active policy-engine configuration"
sed -n '340,370p' gateway/configs/config.toml 2>/dev/null || true
rg -n -C 3 'policy_engine\.admin\.tls|cert_path|key_path' gateway/configs/config.toml gateway/configs/config-template.toml
echo "== gateway-runtime working-directory and command settings"
awk '
/^ gateway-runtime:/ { in_service=1 }
in_service && /^ [A-Za-z0-9_-]+:/ && $0 !~ /^ gateway-runtime:/ { exit }
in_service { print }
' gateway/docker-compose.yaml
echo "== image and container working-directory definitions"
rg -n -i -C 3 '(gateway-runtime|working_dir|workdir|policy-engine|policy_engine)' gateway -g 'Dockerfile*' -g '*.yaml' -g '*.yml' -g '*.toml' | head -200Repository: wso2/api-platform Length of output: 19541 🌐 Web query:
💡 Result: In the WSO2 API Platform project, the gateway-runtime Dockerfile employs a multi-stage build process where the WORKDIR instruction is used strategically to manage build contexts, dependencies, and binary outputs [1][2]. The policy-engine, which serves as the Go-based external processor (ext_proc) for request and response handling, is integrated into the runtime build pipeline [2][3]. Within the build process, the Dockerfile frequently sets the WORKDIR to specific directories such as /api-platform/gateway/gateway-runtime/policy-engine to perform tasks like downloading Go dependencies, copying source files, and executing the gateway-builder tool [1][4]. Key aspects of this configuration include: 1. Build Organization: The use of WORKDIR allows the build stages to isolate the policy-engine source, external SDKs, and configuration files [1][5]. 2. Policy Compilation: The gateway-builder binary is typically executed while the working directory is set to /api-platform. It references the policy-engine source via flags (e.g., -policy-engine-src /api-platform/gateway/gateway-runtime/policy-engine) to compile the final gateway artifacts [1]. 3. Runtime Structure: The final runtime image encapsulates the policy-engine alongside the Envoy proxy and other components, ensuring the necessary gRPC contracts and logic are present for request processing [2][3]. For specific implementation details, refer to the gateway/gateway-runtime/Dockerfile and the associated policy-engine source directory in the official WSO2 API Platform repository [1][2]. Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== runtime Dockerfiles tracked in this checkout"
git ls-files | rg '(^|/)gateway-runtime/(Dockerfile|.*Dockerfile)$|(^|/)policy-engine/' || true
echo "== runtime image metadata from the upstream repository"
curl -fsSL https://raw.githubusercontent.com/wso2/api-platform/main/gateway/gateway-runtime/Dockerfile \
| rg -n -i '^(FROM|WORKDIR|ENTRYPOINT|CMD)|policy-engine|gateway-runtime' || true
echo "== relative certificate path resolution in policy-engine source"
git ls-files | rg 'policy-engine/.*\.(go|mod)$' | head -50
rg -n -C 5 'cert_path|key_path|filepath\.(Join|Abs)|os\.Getwd|WorkingDir|working directory' gateway -g '*.go' || trueRepository: wso2/api-platform Length of output: 50374 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== tracked runtime Dockerfiles"
git ls-files '*Dockerfile*' | rg 'gateway-runtime|policy-engine' || true
echo "== upstream runtime Dockerfile runtime-stage directives"
curl -fsSL https://raw.githubusercontent.com/wso2/api-platform/main/gateway/gateway-runtime/Dockerfile \
| awk '
/^FROM/ || /^WORKDIR/ || /^ENTRYPOINT/ || /^CMD/ || /COPY.*(policy|config|envoy)/ { print }
'
echo "== policy-engine path handling only"
rg -n -C 4 'cert_path|key_path' gateway --glob '*.go' --glob '!**/*_test.go' | head -120Repository: wso2/api-platform Length of output: 14353 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== admin TLS certificate loading"
rg -n -C 8 'Admin\.TLS|TLS\.CertPath|CertPath.*Read|LoadX509KeyPair|Load.*Certificate|tls\.Load' \
gateway/gateway-runtime/policy-engine --glob '*.go' --glob '!**/*_test.go'
echo "== runtime-stage working directory"
curl -fsSL https://raw.githubusercontent.com/wso2/api-platform/main/gateway/gateway-runtime/Dockerfile \
| awk '
/^FROM .* AS production/,/^ENTRYPOINT/ {
if ($0 ~ /^FROM|^WORKDIR|^COPY|^ENTRYPOINT|^CMD/) print
}
'
echo "== entrypoint working-directory changes"
curl -fsSL https://raw.githubusercontent.com/wso2/api-platform/main/gateway/gateway-runtime/docker-entrypoint.sh \
| rg -n -C 3 'cd|exec|policy-engine|WORKDIR' || trueRepository: wso2/api-platform Length of output: 20310 Use an absolute certificate path or set 🤖 Prompt for AI Agents |
||
| networks: | ||
| - gateway-network | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the port comment.
The comment says
# Health. Port 9004 is the policy-engine admin TLS listener, per the defaultadmin.tls.portingateway/gateway-runtime/policy-engine/internal/config/config.goat Line 602. The health endpoint is served on the admin listener at 9002.📝 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents