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

Vula #240

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Vula #240

merged 1 commit into from
Jun 10, 2024

Conversation

yakampe
Copy link
Contributor

@yakampe yakampe commented May 23, 2024

Closes #96

@yakampe
Copy link
Contributor Author

yakampe commented Jun 3, 2024

Update:

As far as we can tell, this seems ready and useful and possibly reliable. We are marking as ready for review; but the only review we would want, at this point, is from the Vula authors.

cc @ioerror @leif

@yakampe yakampe marked this pull request as ready for review June 3, 2024 13:09
@yakampe
Copy link
Contributor Author

yakampe commented Jun 3, 2024

And to be clear we would like the authors review before merging.

@ioerror
Copy link

ioerror commented Jun 3, 2024

If you request me as a reviewer, I will make time this week to review it.

Copy link

@ioerror ioerror left a comment

Choose a reason for hiding this comment

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

I would be happy to further discuss this review and other aspects on Wednesday. Thank you for packaging this software and while there are additional changes to be made, the most important is using the vula altfiles fork as it does what is required and nothing more. The second most important is using the highctidh remote on codeberg. The rest of my comments are minor or otherwise cosmetic issues.

@lorenzleutgeb lorenzleutgeb self-requested a review June 3, 2024 19:51
};
in {
a = recursiveUpdate common {
services.vula.userPrefix = "fula";
Copy link
Member

@lorenzleutgeb lorenzleutgeb Jun 4, 2024

Choose a reason for hiding this comment

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

I suggest something that is more obviously a test value, since "fula" is confusing, as evidenced by discussions in this very PR.

Suggested change
services.vula.userPrefix = "fula";
services.vula.userPrefix = "vula-testuserprefix";

Copy link

Choose a reason for hiding this comment

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

I agree. I was confused and others may also be confused. For example a name that is self-documenting might be a good choice.

Copy link
Member

Choose a reason for hiding this comment

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

Amended.

Copy link
Member

Choose a reason for hiding this comment

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

@lorenzleutgeb I don't like resolving others' concerns.

in {
a = recursiveUpdate common {
services.vula.userPrefix = "fula";
services.vula.systemGroup = "zula";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
services.vula.systemGroup = "zula";
services.vula.systemGroup = "vula-testgroup";

Copy link
Member

Choose a reason for hiding this comment

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

Amended.

Comment on lines 39 to 71
commonServiceAttrs = {
serviceConfig.DevicePolicy = "closed";
serviceConfig.Group = cfg.systemGroup;
serviceConfig.LockPersonality = "yes";
serviceConfig.MemoryDenyWriteExecute = "yes";
serviceConfig.NoNewPrivileges = "yes";
serviceConfig.PrivateDevices = "yes";
serviceConfig.PrivateTmp = "yes";
serviceConfig.ProtectControlGroups = "yes";
serviceConfig.ProtectHome = "read-only";
serviceConfig.ProtectKernelLogs = "yes";
serviceConfig.ProtectKernelModules = "yes";
serviceConfig.ProtectKernelTunables = "yes";
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "5s";
serviceConfig.RestrictNamespaces = "yes";
serviceConfig.RestrictRealtime = "yes";
serviceConfig.RestrictSUIDSGID = "yes";
serviceConfig.Slice = "vula.slice";
serviceConfig.StandardError = "journal";
serviceConfig.StandardOutput = "journal";
serviceConfig.Type = "dbus";
wantedBy = ["multi-user.target"];
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
commonServiceAttrs = {
serviceConfig.DevicePolicy = "closed";
serviceConfig.Group = cfg.systemGroup;
serviceConfig.LockPersonality = "yes";
serviceConfig.MemoryDenyWriteExecute = "yes";
serviceConfig.NoNewPrivileges = "yes";
serviceConfig.PrivateDevices = "yes";
serviceConfig.PrivateTmp = "yes";
serviceConfig.ProtectControlGroups = "yes";
serviceConfig.ProtectHome = "read-only";
serviceConfig.ProtectKernelLogs = "yes";
serviceConfig.ProtectKernelModules = "yes";
serviceConfig.ProtectKernelTunables = "yes";
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "5s";
serviceConfig.RestrictNamespaces = "yes";
serviceConfig.RestrictRealtime = "yes";
serviceConfig.RestrictSUIDSGID = "yes";
serviceConfig.Slice = "vula.slice";
serviceConfig.StandardError = "journal";
serviceConfig.StandardOutput = "journal";
serviceConfig.Type = "dbus";
wantedBy = ["multi-user.target"];
};
commonServiceAttrs = {
serviceConfig = {
DevicePolicy = "closed";
Group = cfg.systemGroup;
LockPersonality = "yes";
MemoryDenyWriteExecute = "yes";
NoNewPrivileges = "yes";
PrivateDevices = "yes";
PrivateTmp = "yes";
ProtectControlGroups = "yes";
ProtectHome = "read-only";
ProtectKernelLogs = "yes";
ProtectKernelModules = "yes";
ProtectKernelTunables = "yes";
Restart = "always";
RestartSec = "5s";
RestrictNamespaces = "yes";
RestrictRealtime = "yes";
RestrictSUIDSGID = "yes";
Slice = "vula.slice";
StandardError = "journal";
StandardOutput = "journal";
Type = "dbus";
};
wantedBy = ["multi-user.target"];
};

Copy link
Member

Choose a reason for hiding this comment

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

It's a feature!

Copy link
Member

Choose a reason for hiding this comment

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

Amended.

@ioerror
Copy link

ioerror commented Jun 4, 2024

What's the justification for adding so many users to the system (looks like one user per service)? Why not use one user for all of them, like before?

  1. https://github.com/ngi-nix/ngipkgs/pull/240/files#diff-4cca03cc74f9020e75e823657c35110b6fbf820f27b87a5976a59e6439e3fd56R166
  2. https://github.com/ngi-nix/ngipkgs/pull/240/files#diff-4cca03cc74f9020e75e823657c35110b6fbf820f27b87a5976a59e6439e3fd56R178
  3. https://github.com/ngi-nix/ngipkgs/pull/240/files#diff-4cca03cc74f9020e75e823657c35110b6fbf820f27b87a5976a59e6439e3fd56R190

The design of vula depends on a separation of concerns. For example: vula-discover should only be able to do exactly what is required to do discovery and to communicate descriptors to vula-organize over dbus.

@ioerror
Copy link

ioerror commented Jun 4, 2024

We would like to add documentation to vula's README to show users how to use and install this nix ngipkgs pkg. We would also be happy to do that with highctidh. Could someone provide us with specific instructions? We can then tag new versions that include that documentation and then the final packages can be based on that tag.

@ioerror
Copy link

ioerror commented Jun 4, 2024

We would also be willing to add a CI test to test building a nix package against git tip for every commit, is there a template or a specific way that is supported for this kind of CI-centric testing?

@lorenzleutgeb
Copy link
Member

lorenzleutgeb commented Jun 4, 2024

The design of vula depends on a separation of concerns. For example: vula-discover should only be able to do exactly what is required to do discovery and to communicate descriptors to vula-organize over dbus.

Could the same be achieved with dynamic users? Can a subset of these users be dynamic?

@ioerror
Copy link

ioerror commented Jun 4, 2024

The design of vula depends on a separation of concerns. For example: vula-discover should only be able to do exactly what is required to do discovery and to communicate descriptors to vula-organize over dbus.

Could the same be achieved with dynamic users? Can a subset of these users be dynamic?

It could be but we would prefer not to use that systemd feature without testing and consideration. Using fixed users and groups has already been analyzed.

Co-authored-by: Adrien Faure <adrien.faure@protonmail.com>
Co-authored-by: Ali Jamadi <jamadi1377@gmail.com>
Co-authored-by: GetPsyched <priyanshu@getpsyched.dev>
Co-authored-by: Robert James Hernandez <rob@sarcasticadmin.com>
Co-authored-by: Shahar "Dawn" Or <mightyiampresence@gmail.com>
Co-authored-by: Yifei Sun <ysun@hey.com>
Co-authored-by: yakampe <yanis.kampe.cv@gmail.com>
@A-jay98 A-jay98 merged commit d53e3a1 into main Jun 10, 2024
72 checks passed
@A-jay98 A-jay98 deleted the mob/vula-test branch June 10, 2024 07:56
@fricklerhandwerk
Copy link
Contributor

@ngi-nix/cake @ngi-nix/magic great job everyone!

@ioerror given the heavy lifting is done, upstreaming only needs a bit of scaffolding on your end. There's a tutorial series for all the moving parts on https://nix.dev if you want to try alone, but we can also make a pull request, such that all you'd have to do in CI is get Nix into the execution environment and run nix-build, or a combination of guidance and writing code - what would you prefer?

@ioerror
Copy link

ioerror commented Jun 11, 2024

@ngi-nix/cake @ngi-nix/magic great job everyone!

@ioerror given the heavy lifting is done, upstreaming only needs a bit of scaffolding on your end. There's a tutorial series for all the moving parts on https://nix.dev if you want to try alone, but we can also make a pull request, such that all you'd have to do in CI is get Nix into the execution environment and run nix-build, or a combination of guidance and writing code - what would you prefer?

We would prefer a pull request - ideally one for highctidh and one for vula, and then we will run those tests for all work performed in either repo in the future.

Also, thank you - this is a lot of work. Ideally the pull request should add a small section about Nix (how to use the packages, and some credit to those who did this work). We'd be happy to have text in our main README.md files for example in a Nix specific section, and in the Acknowledgements section.

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.

Vula
9 participants