Files
teleport/lib/aws
Trent Clarke 9e0a7d0f49 Write AWS config files with stricter permissions (#66825)
Prior to this patch `tctl` would create new AWS config files with filemode `0666`
globally readable). In most cases this is not a security issue as Teleport would
create the file's destinaton directory with `0700` (only readable by the owner).

This becomes an issue in the rare case where the destination directory already
exists AND has weak permissions; in this case the AWS config files may be read
by other users on the owner's machine.

This change bypasses the ini file library's `SaveTo` method and writes the file
with known permissions.
2026-05-21 00:14:03 +00:00
..