Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Management for APIGW
signature keys
.Refers to: #2403.
Acceptance tests
=== RUN TestSignatureKeyLifecycle
tools.go:72: {
"name": "test_sign_key_2Nz7Q",
"sign_type": "aes",
"sign_key": "etWoMAzS6aYwydgD",
"sign_secret": "7ddwhkMyocfNFpdd",
"sign_algorithm": "aes-128-cfb",
"update_time": "2024-01-18T10:27:20.433961966Z",
"create_time": "2024-01-18T10:27:20Z",
"id": "e8d4927872e84862a8bb471d298464dd"
}
--- PASS: TestSignatureKeyLifecycle (1.09s)
=== RUN TestSignatureKeyList
tools.go:72: []
--- PASS: TestSignatureKeyList (0.50s)
=== RUN TestSignatureKeyBinding
tools.go:72: [
{
"publish_id": "bb7847c7f9d8402e90013a1c1592672c",
"api_id": "3f8b081a45a84c8498afbe35e2f43463",
"api_type": 2,
"api_name": "test_api_n8IOQ",
"api_remark": "test env",
"env_id": "e93fa328459a4da09a0887ea1d3cd877",
"env_name": "test_env_Rw2ia",
"group_name": "apigw_group-tDW",
"name": "",
"sign_type": "aes",
"sign_key": "qdpSh6679jMrkEqrhRYbMldUDNK93yd3",
"sign_secret": "LheVzuvOH1Q7W1wX",
"sign_algorithm": "",
"binding_time": "2024-01-18T10:27:23Z",
"id": "c8d5a77c12be42288cb5f069aa8d1800",
"sign_id": "bb7942bf09c045baa7f09ed44507c2fb",
"sign_name": "test_sign_key_7DEPG"
}
]
tools.go:72: [
{
"publish_id": "bb7847c7f9d8402e90013a1c1592672c",
"api_id": "3f8b081a45a84c8498afbe35e2f43463",
"api_type": 2,
"api_name": "test_api_n8IOQ",
"api_remark": "test env",
"env_id": "e93fa328459a4da09a0887ea1d3cd877",
"env_name": "test_env_Rw2ia",
"group_name": "apigw_group-tDW",
"name": "",
"sign_type": "",
"sign_key": "",
"sign_secret": "",
"sign_algorithm": "",
"binding_time": "2024-01-18T10:27:23Z",
"id": "c8d5a77c12be42288cb5f069aa8d1800",
"sign_id": "bb7942bf09c045baa7f09ed44507c2fb",
"sign_name": "test_sign_key_7DEPG"
}
]
tools.go:72: [
{
"auth_type": "IAM",
"run_env_name": "test_env_Rw2ia",
"group_name": "apigw_group-tDW",
"publish_id": "bb7847c7f9d8402e90013a1c1592672c",
"group_id": "b5dd967189d340909c00f6a9b0631a64",
"name": "test_api_n8IOQ",
"Remark": "test env",
"run_env_id": "e93fa328459a4da09a0887ea1d3cd877",
"id": "3f8b081a45a84c8498afbe35e2f43463",
"req_uri": "/test/http",
"type": 2,
"signature_name": ""
}
]
--- PASS: TestSignatureKeyBinding (4.19s)
PASS
Process finished with the exit code 0