Closed mritunjaysharma394 closed 1 month ago
Hey @mritunjaysharma394 - Thanks for the PR! So we can better understand, what exactly are the security benefits of using Sha256 over Md5 for an idempotency token? Idempotency tokens are not secure or sensitive information, so its not immediately clear to me.
Thanks!
Hey @divyansh-gupta , thanks for your reply and review! While, idempotency tokens are not secure or sensitive information, using MD5 in this may make it non-FIPS compliant by most FIPS verification check tests due to it. Thus when this is run in environments which are strict FIPS compliant, it may fail to run or show unwarranted behaviours. Using sha256 may save us from that. Thanks!
Hi @mritunjaysharma394, the tests are failing because the idempotency token has a max length of 36 https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html#privateca-IssueCertificate-request-IdempotencyToken
operation error ACM PCA: IssueCertificate, https response error StatusCode: 400, RequestID: 807f511a-b6ef-4432-999d-f6d41f7e4c8b, api error ValidationException: 1 validation error detected: Value '6a2bccd1c8ba53886ab3f8a2b235fd416cdf508aa351d0ebd48b3e5740e8b96c' at 'idempotencyToken' failed to satisfy constraint: Member must have length less than or equal to 36
Thanks so much @ndbhat for the review, apologies for not knowing that, I attempted a fix, let me know if it will work, thanks so much again!
Looks like testing is passing now, would you mind squashing these commits into one first? We'll get it merged after that
Thanks @ARichman555 , sure I can do that and will do it right now
Hi @ARichman555 @ndbhat, squashed the commits, lmk if it looks good now, thanks!
[APPROVALNOTIFIER] This PR is APPROVED
Approval requirements bypassed by manually added approval.
This pull-request has been approved by:
The full list of commands accepted by this bot can be found here.
The pull request process is described here
As of now we use a bit less secure md5 for idempotency token, I think we should prefer to use more secure sha256sum for it and this PR aims to do that, thanks!