Refactor SPIRE Integration and Optimize Spire Memory Footprint#1837
Refactor SPIRE Integration and Optimize Spire Memory Footprint#1837gngram wants to merge 7 commits intotiiuae:mainfrom
Conversation
|
These issues should be fixed and the code reviewed before we start manual testing. |
|
As a general note, is there some overlapping functionality with what NixOS/nixpkgs#481447 introduced recently? Maybe we could reduce the footprint of the module(s) on our side if we can re-use some of the upstream |
kajusnau
left a comment
There was a problem hiding this comment.
Some basic comments, also suggest using getExe throughout the patch, since it's already used in some places but not all.
| From c00cf4f1dd5a3fedd7dc701828d476efe1f09e4a Mon Sep 17 00:00:00 2001 | ||
| From: Ganga Ram <Ganga.Ram@tii.ae> | ||
| Date: Tue, 17 Feb 2026 12:46:42 +0400 | ||
| Subject: [PATCH] removed cloud infra to reduce memory footprint |
There was a problem hiding this comment.
Can we can try to push this patch to upstream?
There was a problem hiding this comment.
It's hack basically to remove some builtin plugins. I thought to create a upstream patch but it requires major restructuring. They have used common files in different modules to manage plugins but since Go doesn't provides conditional compilation of code segments within a file, so I will have to split those files for each plugin in order to use Go tags. Which is least likely they will accept also there will be so many tags manage.
There was a problem hiding this comment.
Have you compared the memory footprint difference after applying this patch? If it's a hacky patch, then at least an upstream issue could be created to gather ideas and suggestions for improvement.
Could we also consider creating minimal profile files that exclude the required plugins?
@kajusnau Thanks, pointing to this, server and agent configurations we can use from this. |
58b371e to
49eba96
Compare
|
Rebased, and now using spire services from nixpkgs |
49eba96 to
bbbbc0f
Compare
722dd76 to
13bf900
Compare
…s Publish bundle/join-tokens and allow non-root Workload API access via /run/spire tmpfiles. Co-authored-by: shamma-alblooshi1 <shamma.alblooshi@tii.ae> Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
- Binary size reduced by 40% - Also reduces memory footprint Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
- spire server gets following information from the VMs using the common config 1) list of VMs running spire agents 2) workloads per vm 3) node attestation method per vm - also server address and port information is shared thorugh common config. Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
- all cloud related and other unused modules stripped Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
- using spire agent and server services from nixpkgs
- per vm workload registration
- fine grained spire server and agent configuration
- generic agent registartion based on node attestation method
- agent and server synchronization
- spiffe module renamed to spire
Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
13bf900 to
c824c63
Compare
| security = { | ||
| fail2ban.enable = globalConfig.development.ssh.daemon.enable or false; | ||
| audit.enable = lib.mkDefault (globalConfig.security.audit.enable or false); | ||
|
|
There was a problem hiding this comment.
In the case that the admin-vm will also have workloads, shouldn't it have an spire agent as well?
Description of Changes
This PR refactors SPIRE (formerly referred as SPIFFE module) server and agent implementation and reduces reduces the memory footprint of the SPIRE binaries.
Type of Change
Related Issues / Tickets
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify: