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

Conversation

GROwen
Copy link
Contributor

@GROwen GROwen commented Aug 13, 2024

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated.
  • Changelog entry has been written

Explain the details for making this change. What existing problem does the pull request solve?

Changelog Entry

Improvement - Sets default file permissions in the keys directory to be less permissive.

@GROwen GROwen self-assigned this Aug 13, 2024
@@ -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.

@GROwen GROwen requested a review from nicksantamaria August 13, 2024 06:10
@@ -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

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.

@GROwen GROwen merged commit fcb56f1 into 6.x Aug 13, 2024
1 check passed
@GROwen GROwen deleted the feature/DDS-1993--fix-key-dir-permissions branch August 13, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants