-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Strip key, secret and token from root config options on aws clients #44979
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
Strip key, secret and token from root config options on aws clients #44979
Conversation
I'm super scared that this will break apps on older versions of the AWS PHP SDK. Is there any way we can verify this on a range of AWS PHP SDK versions? |
AFAIK the credentials have always only been inside the So unless the SDK ever used |
Hi there :) |
@SamRemis how big is the chance that |
Thanks @SamRemis. If there's also no reason to keep them then we might be able to just accept the entire PR. Thanks @georgeboot for looking into it. |
@driesvints revert last commit if you want |
Any services I've not included that should be? |
Here in the V2 docs of the SDK you can see it as a nested array, and that's quite old. It doesn't look like it would have accepted those keys on the top level of the array. I can look into the history of it later today to confirm, but it'll take some time. If it is, then we can definitely push out something to fix this.
The only use case I can see for this is if for some reason customers start asking for it. There's no reason I can think of that either of these would become a valid base level config value, but I don't have a crystal ball. |
We only allow v3 in Laravel v9 so that should be okay. |
f3ae9a7
to
ef5d573
Compare
@SamRemis just found another issue with the token PR on aws php sdk. Left a comment on it: aws/aws-sdk-php#2517 |
I am experiencing the same issue as described and fixed here for Laravel v9 but in v8 running:
Does there need to be a similar patch made in L8? Thanks |
@icreatestuff Laravel v8 isn't maintained anymore. Best that you upgrade as soon as you can. |
Would be nice to have a patch for V8. For live production systems running serverless we're not going to constantly be upgrading our major Laravel version, but still might want to do updates to pull in security or bugfixes across libraries. |
There's no need to upgrade constantly. Laravel 8 security fixes were supported 2-3 years. Big fixes ended half a year ago. |
@georgeboot I'm experiencing this issue using the DynamoDB Cache driver - which I note when I look at the
I could be reading this wrong, but I believe that 'token' should be removed from this array? for ref: I'm on Laravel v9.52.10 edit: I also note if I remove 'key' and 'secret' from my dynamodb config under |
Hey @mmehmet I tried removing key and secret from cache config for dynamodb and Im still getting the same error. Did you had to do anything more to make it work ? |
@anuragnandan sorry I should have clarified, this was for an AWS instance - so authentication happens via IAM and credentials are unused/ignored, within the AWS-to-AWS ecosystem if you actually do need to authenticate using credentials (eg from an instance running on a dev machine and not within AWS) then this will not work - since you do actually need a key and secret... in that case, I would recommend building your own client, which extends the above or at least also extends an
|
did you only remove because the code will try to use that if it finds one
|
Yes, I tried removing just key and secret first and then key, secret and token from config and have the same issue. |
@mmehmet Nothing seem to work on Lambda, Im applying below patch to make it work for now. Let me know if I can try anything else.
|
Fixes #44977
Related to aws/aws-sdk-php#2567