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

Log and config file generation as 0640 root:adm #1182

Merged
merged 5 commits into from
Feb 14, 2022

Conversation

dbungert
Copy link
Collaborator

  • Implement file mode 0640, owner root:adm for log files and config files that will be copied to the target system and may contain sensitive information.
  • Centralize on subiquity-specific write_file & helper funtions rather than a mix of curtin / cloud-init / subiquity versions

Copy link
Member

@ogayot ogayot left a comment

Choose a reason for hiding this comment

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

I don't have much context to lean on. But I think we want to keep more restrictive permissions for /autoinstall.yaml

subiquitycore/log.py Outdated Show resolved Hide resolved
subiquity/server/server.py Show resolved Hide resolved
subiquity/server/controllers/install.py Show resolved Hide resolved
@dbungert dbungert force-pushed the log-visibility branch 2 times, most recently from 8443b75 to fe67168 Compare February 11, 2022 23:30
Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

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

Just a couple of comments. Sorry for the slow review!

subiquitycore/file_util.py Outdated Show resolved Hide resolved
subiquitycore/file_util.py Outdated Show resolved Hide resolved
Create open_perms context manager for custom or multiple writes.
Create generate_config for a small removal of redundancy.
0640 root:adm the resulting files.
The two usages of generate_config were both for yaml, so make that
simpler.
omode used to be in use, but has been standardized to 'w'.
copy_mode was unused.  Remove both.
@dbungert dbungert merged commit eab1758 into canonical:main Feb 14, 2022
@dbungert dbungert deleted the log-visibility branch February 14, 2022 18:40
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.

3 participants