Skip to content
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

fix(secret): support aws secret name contains a slash / #11655

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuanXin-Chen
Copy link
Contributor

Description

Currently, AWS Secrets Manager supports secret names that contain "/".

Fixes #11647

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Oct 15, 2024
@HuanXin-Chen
Copy link
Contributor Author

@kayx23 It has been fixed; check if it meets your expectations.

@kayx23 kayx23 requested a review from bzp2010 October 16, 2024 04:08
@HuanXin-Chen
Copy link
Contributor Author

My Thoughts:

AWS differs from others like Vault in that it can not only store JSON text but also String types.

Therefore, for instance, when referencing: APISIX/JSON/JACK

  • If it's a JSON type, then the main_key would be APISIX/JSON, and the sub_key would be JACK.
  • If it's a String type, both the main_key and the key should be APISIX/JSON/JACK.

You cannot differentiate solely based on APISIX/JSON/JACK, so you need to try both scenarios.

  • When main_key == key, it is definitely a String type.
  • When main_key != key, it could be either JSON or String.

If the JSON does not meet the requirements, then it's a String type.

Other Issues:

I noticed some errors in CI, but upon initial inspection, they do not seem to be related to my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: failed to retrtive data from aws secret manager when the secret name contains a slash /
1 participant