We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
jwe-decrypt
Current doc: https://apisix.apache.org/docs/apisix/plugins/jwe-decrypt/
Specifically, it mentions the Authorization header with payload in plaintext should show up:
However in actual testing, the Authorization header doesn't show up at all:
Confirm first if something is wrong with the code or with the doc. Eventually the doc should match up with the actual outcome.
Need APISIX 3.8.0.
Expose endpoint:
curl "http://127.0.0.1:9180/apisix/admin/routes/jwe-encrypt-api" -X PUT \ -H "X-API-KEY: ${ADMIN_API_KEY}" \ -d '{ "uri": "/apisix/plugin/jwe/encrypt", "plugins": { "public-api": {} } }'
Create a consumer:
curl "http://127.0.0.1:9180/apisix/admin/consumers" -X PUT \ -H "X-API-KEY: ${ADMIN_API_KEY}" \ -d '{ "username": "jack", "plugins": { "jwe-decrypt": { "key": "jack-key", "secret": "key-length-should-be-32-chars123" } } }'
Create route:
curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \ -H "X-API-KEY: ${ADMIN_API_KEY}" \ -d '{ "id": "jwe-decrypt-route", "uri": "/anything/jwe", "plugins": { "jwe-decrypt": { "header": "Authorization", "forward_header": "Authorization" } }, "upstream": { "type": "roundrobin", "nodes": { "httpbin.org:80": 1 } } }'
Encrypt:
curl -G --data-urlencode 'payload={"uid":10000,"uname":"test"}' 'http://127.0.0.1:9080/apisix/plugin/jwe/encrypt?key=jack-key'
You should get the JWE encrypted data.
Send a request to the route with the JWE encrypted data in the Authorization header:
curl "http://127.0.0.1:9080/anything/jwe" -H 'Authorization: <YOUR_TOKEN>'
apisix version
The text was updated successfully, but these errors were encountered:
@kayx23 , I have find root cause , and then i will submit a PR for fix it .
Sorry, something went wrong.
@hanqingwu cool! Thanks.
@kayx23 hi! pls help him assign and move to to InProgress backlog~~
hanqingwu
Successfully merging a pull request may close this issue.
Current Behavior
Current doc: https://apisix.apache.org/docs/apisix/plugins/jwe-decrypt/
Specifically, it mentions the Authorization header with payload in plaintext should show up:
However in actual testing, the Authorization header doesn't show up at all:
Expected Behavior
Confirm first if something is wrong with the code or with the doc. Eventually the doc should match up with the actual outcome.
Steps to Reproduce
Need APISIX 3.8.0.
Expose endpoint:
Create a consumer:
Create route:
Encrypt:
You should get the JWE encrypted data.
Send a request to the route with the JWE encrypted data in the Authorization header:
Environment
apisix version
): 3.8.0The text was updated successfully, but these errors were encountered: