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

Add systemd example #64

Merged
merged 13 commits into from
Jul 17, 2024
Merged

Add systemd example #64

merged 13 commits into from
Jul 17, 2024

Conversation

kfox1111
Copy link
Contributor

@kfox1111 kfox1111 commented Apr 7, 2024

No description provided.

kfox1111 added 9 commits April 7, 2024 16:07
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
examples/systemd/Makefile Outdated Show resolved Hide resolved
Enable the main server:

```
systemctl enable spire-server@main
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the "@main" have any benefit here? I'd keep it simple and not have these parameterized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. It lets you have multiple servers/agents. Either for nesting or redundancy. I do plan on using both.

Comment on lines +23 to +24

Enable the main agent:
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also specify how to fetch the join token and how to pass it to the service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Comment on lines +25 to +27
WorkloadAttestor "systemd" {
plugin_data {}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could also use the unix attestore here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I think systemd is a better plugin then unix as a default suggestion. Many different services run as root (ssh, apache, kubelet, etc). But each would probably want its own identity. The systemd attestor can tell them apart.

examples/systemd/system/spire-agent@.service Outdated Show resolved Hide resolved
examples/systemd/system/spire-server.target Outdated Show resolved Hide resolved
examples/systemd/system/spire-server@.service Outdated Show resolved Hide resolved
# simple testing/evaluation purposes.
insecure_bootstrap = true

join_token = "cdf1885a-1db8-4a83-aa16-ad8c84761fa8"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the best, but I imagine you want to wait for something like that dns/http pop attestor being available, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, that would be a better default once its available.

This is just an example config file really. Its expected an end user will need to update it to use it properly.

Co-authored-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
Copy link
Member

@amartinezfayo amartinezfayo 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 @kfox1111 for this contribution, it looks great!
Can we update the README.md file in the root folder to include a link with this example along with a short description as we have for the other examples?

@@ -0,0 +1,46 @@
To install, download the newest spire-server and spire-agent binaries from the SPIRE website and place in /bin
Copy link
Member

Choose a reason for hiding this comment

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

I think that it would be nice to have a title for this document.

Signed-off-by: Kevin Fox <Kevin.Fox@pnnl.gov>
@kfox1111
Copy link
Contributor Author

Is the test failure related?

@amartinezfayo
Copy link
Member

Is the test failure related?

No, the failure is in the Envoy example.

@amartinezfayo amartinezfayo merged commit a60ceaa into spiffe:main Jul 17, 2024
1 of 2 checks passed
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