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

docs: add a topic about security #433

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

daniloegea
Copy link
Collaborator

Description

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

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

Thank you, lgtm! (beside some small spelling nitpicks)

But I'd like to see @rkratky's sign-off on this, too.

doc/.wordlist.txt Outdated Show resolved Hide resolved
doc/.wordlist.txt Outdated Show resolved Hide resolved
@slyon slyon requested a review from rkratky January 11, 2024 16:05
Copy link
Contributor

@rkratky rkratky left a comment

Choose a reason for hiding this comment

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

@daniloegea Thank you for the addition of the topic. I left some comments and suggestions.

doc/.wordlist.txt Outdated Show resolved Hide resolved
doc/security.md Outdated
@@ -0,0 +1,45 @@
---
title: "Netplan Security"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: "Netplan Security"
title: "Netplan security"

doc/security.md Outdated

## Storing credentials

Credentials, such as VPN keys and wifi passwords, are stored along with the rest
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Credentials, such as VPN keys and wifi passwords, are stored along with the rest
Credentials, such as VPN keys and Wi-Fi passwords, are stored along with the rest

doc/security.md Outdated
## Storing credentials

Credentials, such as VPN keys and wifi passwords, are stored along with the rest
of the configuration in YAML files. Netplan expects that all your YAML files
Copy link
Contributor

Choose a reason for hiding this comment

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

"Netplan expects" is an anthropomorphism. Let's try to avoid it. In order to reword the sentence, could you please clarify if it is a hard requirement for the YAML files to be owned by root and only readable by root (i.e. would Netplan fail to function properly if this condition was not met)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not a hard requirement. I guess something like The recommended set of permissions is... would be better.

doc/security.md Outdated

Credentials, such as VPN keys and wifi passwords, are stored along with the rest
of the configuration in YAML files. Netplan expects that all your YAML files
will belong to the root user and only have permissions to be read by root (`chmod 600`).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
will belong to the root user and only have permissions to be read by root (`chmod 600`).
belong to the root user and only have permissions to be read by root (`chmod 600`).

Unless there's something really temporal happening, try to avoid using any other tense but present.

doc/security.md Outdated
run unit tests and the Netplan generator against a number of YAML files. This helps
us to detect issues, such as memory leaks and buffer overflows, at runtime using real
configuration as input. When a memory issue is detected the process will crash, letting
us know that some issue was introduced in the change.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
us know that some issue was introduced in the change.
that some issue was introduced in the change.

doc/security.md Outdated
configuration as input. When a memory issue is detected the process will crash, letting
us know that some issue was introduced in the change.

Every time a Pull Request is created or changes are merged to the main branch,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Every time a Pull Request is created or changes are merged to the main branch,
Every time a pull request is created or changes are merged to the main branch,

doc/security.md Outdated
us know that some issue was introduced in the change.

Every time a Pull Request is created or changes are merged to the main branch,
these tests will be executed and, if a crash happens, the workflow will fail.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
these tests will be executed and, if a crash happens, the workflow will fail.
CI executes these tests, and, if a crash happens, the workflow fails.

doc/security.md Outdated
## Binary package hardening

On Ubuntu and Debian, Netplan is built (and in fact most of the binary packages are)
with a number of security flags that will apply some hardening to the resulting binary.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
with a number of security flags that will apply some hardening to the resulting binary.
with a number of security flags that apply some hardening to the resulting binary.

doc/security.md Outdated
On Ubuntu and Debian, Netplan is built (and in fact most of the binary packages are)
with a number of security flags that will apply some hardening to the resulting binary.
That is intended to make the life of attackers harder in case any security issue is
discovered. See `dpkg-buildflags(1)` for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
discovered. See `dpkg-buildflags(1)` for details.
discovered. See the `dpkg-buildflags(1)` manual page for details.

@daniloegea
Copy link
Collaborator Author

Thank you folks. I tried to address all the issues you have found. Please, let me know if there is anything else to improve.

@daniloegea daniloegea merged commit aa9c427 into canonical:main Jan 17, 2024
5 checks passed
@slyon slyon added the documentation Documentation improvements. label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation improvements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants