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

Support fileb:// for nested objects #8013

Closed
2 tasks
NukaCody opened this issue Jun 29, 2023 · 3 comments
Closed
2 tasks

Support fileb:// for nested objects #8013

NukaCody opened this issue Jun 29, 2023 · 3 comments
Labels
feature-request A feature should be added or improved. needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue

Comments

@NukaCody
Copy link

NukaCody commented Jun 29, 2023

Describe the feature

Looks like fileb:// works fine for simple arguments "--file fileb://some-local-file.txt" but it does not work for items that have an embedded file options. For example:

aws rolesanywhere create-trust-anchor --name MyCompanyTrustAnchorImported \
  --source sourceData={x509CertificateData=fileb://root-ca.crt},sourceType="CERTIFICATE_BUNDLE"  \
  --enabled

Does not work as intended. After running with --debug, I see the request gets wrapped as a string "fileb://root-ca.crt" instead of it filling in with the file contents

Use Case

PEM encoded certificates can get quite long and it's not practical to copy it manually at the command line as a "string"

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

aws-cli/2.12.2 Python/3.11.4 Linux/4.14.255-314-253.539.amzn2.x86_64 exec-env/CloudShell exe/x86_64.amzn.2 prompt/off

Environment details (OS name and version, etc.)

Amazon Linux 2 / Cloudshell

@NukaCody NukaCody added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 29, 2023
@tim-finnigan
Copy link
Contributor

Thanks for the feature request — I'll mark this for further review by the team. In the meantime others can 👍 the issue and comment here to share any additional use cases.

@tim-finnigan tim-finnigan added needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2023
@aemous aemous closed this as completed Nov 12, 2024
@aemous aemous reopened this Nov 12, 2024
@aemous
Copy link
Contributor

aemous commented Nov 12, 2024

Feature is released in v2 2.20.0. The usage of the command in the request would be

aws rolesanywhere create-trust-anchor --name MyCompanyTrustAnchorImported \
  --source sourceData={x509CertificateData@=file://root-ca.crt},sourceType="CERTIFICATE_BUNDLE"  \
  --enabled

The only difference from the request is the need for the @= operator. Similarly, fileb:// can be used the same way. However, for this particular API create-trust-anchor, source.sourceData. x509CertificateData must be of type string, not bytes.

@aemous aemous closed this as completed Nov 12, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@aws aws deleted a comment from github-actions bot Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants