laravel-bridge icon indicating copy to clipboard operation
laravel-bridge copied to clipboard

Option to not update configs with AWS tokens

Open mchristie opened this issue 1 year ago • 2 comments

Although it's recommended to use AWS roles that's not always possible.

If the application is setting AWS keys and secrets with credentials which do not need an AWS token, adding the token in from the function role will cause the credentials to become invalid.

This PR adds a config option which disables updating the AWS configs with AWS_SESSION_TOKEN

mchristie avatar Jun 20 '23 11:06 mchristie

My take on this is that the behavior of the adapter is to casually adjust Laravel's default installation for a quick drop-in replacement for Lambda. If you're deploying your project into Lambda it's an opportunity to replace secret keys with IAM Roles. However, if you have reasons to stick with access key / secret key, all you'd have to do is change the name of the driver / connection you're using. E.g. if instead of using the s3 disk on your filesystems config, you could just name it something else like bucket or storage or the business meaning behind the files that get stored there. Anything that is not the default laravel installation configuration wouldn't be touched by the Bridge and you'd be free to configure it however you feel like it. It seems like a low effort on the user's part and one less configuration that Bref would have to maintain.

deleugpn avatar Jul 02 '23 00:07 deleugpn

Yeah, I'd tend to agree with @deleugpn as this is a niche use case. I'm not against merging this, but I'm not especially pushing for it. I'll let you guys decide.

mnapoli avatar Jul 02 '23 14:07 mnapoli