Skip to content

feat: write cached auth files with 600 POSIX perms#1877

Open
ianbotsf wants to merge 9 commits intomainfrom
feat-cached-auth-files-600
Open

feat: write cached auth files with 600 POSIX perms#1877
ianbotsf wants to merge 9 commits intomainfrom
feat-cached-auth-files-600

Conversation

@ianbotsf
Copy link
Copy Markdown
Collaborator

Description of changes

This change begins writing cached auth token files with permissions 600—user read/write—on POSIX OSes (e.g., Linux and Mac).

This is a behavioral change so a new configuration property is added (AWS_CACHED_AUTH_FILE_PERMISSIONS et al.) allowing users to opt back into the old behavior (i.e., OS_DEFAULT—use OS-default permissions for new files in the given directory). Otherwise, the default behavior is USER_READ_WRITE.

Upstream PR: smithy-lang/smithy-kotlin#1578

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link
Copy Markdown

A new generated diff is ready to view.


/**
* Identifies a set of permissions to apply when writing cached auth files (e.g., during cache token refresh for SSO or
* AWS Login credentials). These values have no effect on Windows.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: How permission is provided for windows? or We know that cashed auth files won't never be used in window

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users on Windows get OS-default permissions. This was an intentional choice by the specification.

Copy link
Copy Markdown
Collaborator

@luigi617 luigi617 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave a question in the comment to understand the context, but it looks good to me

@ianbotsf ianbotsf added the ready-for-release Overrides failing "release-readiness" check, when you're sure this PR is ready for release. label Apr 28, 2026
@github-actions
Copy link
Copy Markdown

A new generated diff is ready to view.

@github-actions
Copy link
Copy Markdown

A new generated diff is ready to view.

@github-actions
Copy link
Copy Markdown

A new generated diff is ready to view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-release Overrides failing "release-readiness" check, when you're sure this PR is ready for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants