Skip to content
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

[DDS-1993] Updated keys dir default file perms. #273

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions images/node/entrypoints/100-kms-decrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ warning() { echoerr "[WARNING] $*" ; }
error() { echoerr "[ERROR] $*" ; }
fatal() { echoerr "[FATAL] $*" ; exit 1 ; }

info "set umask to least permissive for SSH keys by default"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did initially set this in a separate entrypoint script but because the change directly relates to the files generated by this entrypoint script I see no reason to abstract it further.

Another observation is that the umask value doesn't persist beyond the execution of this script. Instead the value set by the Lagoon entrypoint script 00-umask.sh does.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've POC'd this out and it does appear that umask is scoped to the current shell session, so subshells and scripts have their own scope.

if [ -d "/app/keys" ]; then
umask 0177
fi

info "decrypting files"

encrypted_files=""
Expand Down
Loading