-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
Don't store username in x-amz-meta-s3cmd-attrs header #67
Comments
Use --no-preserve to prevent storing of these informations. See s3cmd --help: -p, --preserve Preserve filesystem attributes (mode, ownership, timestamps). Default for [sync] command. Hope that helps. M. |
Shame on me for not finding that. RTFM put nicely. Keep up the great work! This utility makes my life so much easier. :) |
I am shocked that publishing my username to the world is the default with this utility. If I hadn't carefully poured over each entry in the headers, I would never have even noticed this was happening. This is a violation of secure by default. RTFM is not an acceptable solution to this issue. |
@mastef By default, s3cmd backup your files to aws s3 in "private" not as "public" or as a "cloudfront" website. I'm not sure of what can be done to improve this without reducing the default behavior that is useful to some. Maybe at least this can be added to the documentation i guess. |
@fviard as @thejoshwolfe mentioned this does kind of break "secure by default". A default use-case is to upload files to S3 with a certain ACL, and then have CloudFront serve them. That includes meta tags, since you need the Content-Type etc. This is a standard use-case of the system we're all working with here. So although I understand your point that the S3/CF defaults could be better, we have to abide by/work with those defaults when creating tools for that system. The s3cmd meta tags are extra information, and in this case contain privileged details. This fact is kind of hidden. With hidden I mean it's not mentioned in the
and it's not mentioned in the "how to sync" guide. The
So, this is a dangerous default and a bad surprise ( as you can see when people google for this ). If somebody needs this behaviour, they would actively look for it in the documentation, and then add |
Sorry, but the main usage of "sync" is to synchronise storage like for a backup. Also to be noted that, even if we can consider it to be sensitive, the only annoying thing is the name of user and group, and that is not in itself enough to cause a breach to a system. Good idea that "preserve default behavior" could also be added to the "sync" command description. But I don't agree with you on:
It is clearly written:
Maybe you are not familiar with linux/unix and good improvemnt could be to replace that by "owner id, group id"? |
@fviard Please read my comment carefully. The documentation doesn't mention that it's stored in the meta data. Uid, username and group knowledge combined with another exploit like heartbleed are a vulnerability. If you scroll up you can see how people feel about this - if you google it you can also see that people classify is as a vulnerability. Everything that needed to be said has been said, and it's up to you to make a decision. Security first, or convenience for a small user-base that needs this particular feature? Your decision. |
8 years later and developers like me are still appalled by this default. Say what you like, but sharing your local username and file permissions publicly is a terrible default. If the user is using the |
Sync by default preserves the file permissions, uid, gid and username in the `x-amz-meta-s3cmd-attrs` meta data field. This change documents that. Especially since a lot of people are surprised by this default. There was some discussion about this in: s3tools#67
The It resulted in write errors when syncing the s3 bucket to another host. Could there also be information added on how to remove the |
By accident I stumbled over this too. It should be more prominent in the docs to warn users. Since I'm using s3 with an nginx reverse proxy I added this line to keep the meta data but not send it over the wire:
|
I find the The storing and setting of the user and group name causes errors when syncing to hosts that don't have the same users. I still want to keep the other attributes, like modified date and permissions, but not sync the user and group names. Since the default behavior of
...etc |
I'm a fan of not declaring the credentials my application is running as, however I cannot help but notice that it is placed in x-amz-meta-s3cmd-attrs.
This means anyone getting said files from CloudFront now has an edge on hacking my servers. Is there a reason this value is needed?
From S3:
Thanks.
The text was updated successfully, but these errors were encountered: