-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: allow admin key and admin api cert to be stored in vault #9930
Conversation
62e6bbe
to
09644e4
Compare
the TEST case look good |
28f663e
to
adb98f2
Compare
If you think you can enter the review, or you want to run a CI test first. You can remove the Draft label. Generally, I will conduct code review after CI is completed. |
@rodman10 are you still process this PR ? |
I have removed the draft state and ready for review.@Sn0rt |
PTAL the CI ? |
Ok, I will check it. |
I have looked into the It seems failed in case |
@rodman10 Don't worry, sometimes ci is unstable. Re-run CI to try. |
PTAL the CI https://github.com/apache/apisix/actions/runs/5856541181/job/15966889114?pr=9930 + VAULT_TOKEN=root
+ VAULT_ADDR=http://0.0.0.0:8200/
+ vault kv put kv/apisix/apisix_config admin_ssl_cert=@./t/certs/mtls_server.crt admin_ssl_cert_key=@./t/certs/mtls_server.key admin_ssl_ca_cert=@./t/certs/mtls_ca.crt
./t/cli/test_admin_mtls.sh: line 76: vault: command not found |
I have add |
Can I cooperate? Give me permission |
Ok. |
t/cli/test_admin_mtls.sh
Outdated
fi | ||
|
||
# skip | ||
code=$(curl -i -o /dev/null -s -w %{http_code} -k -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' https://admin.apisix.dev:9180/apisix/admin/routes) |
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.
this test case can't pass
t/cli/test_admin_mtls.sh
Outdated
token: "${{VAULT_TOKEN}}" | ||
' > conf/config.yaml | ||
|
||
VAULT_TOKEN='root' VAULT_ADDR='http://0.0.0.0:8200' vault kv put kv/apisix/apisix_config admin_ssl_cert=@./t/certs/mtls_server.crt admin_ssl_cert_key=@./t/certs/mtls_server.key admin_ssl_ca_cert=@./t/certs/mtls_ca.crt |
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.
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
index 7aa65540..4cde0dfe 100644
--- a/.github/workflows/cli.yml
+++ b/.github/workflows/cli.yml
@@ -53,6 +53,7 @@ jobs:
- name: Linux launch common services
run: |
project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up
+ sudo ./ci/init-common-test-service.sh
Signed-off-by: Sn0rt <[email protected]>
The code is fine with me. But I think it should be noted in the PR description which configuration fields support encryption:
Also, whether in this PR or not, the relevant documentation should also describe this change. |
yep. Because our underlying library can only use the path to pass in the certificate, so avoid the PR being too large. We will support this feature in other PRs. |
I plan to close this PR and continue to improve this feature based on your commit and new proposal. |
Ok. |
Description
Fixes #9915
Checklist