-
Notifications
You must be signed in to change notification settings - Fork 496
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
SVIDStore disk
plugin
#2647
SVIDStore disk
plugin
#2647
Changes from 8 commits
eb457e7
adabc13
4a450b4
a3e4091
1ed9fce
f85e6cf
81c022d
b159137
bbfab82
9c2c400
331f5dd
22f659b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Agent plugin: SVIDStore "disk" | ||
|
||
The `disk` plugin stores in disk the resulting X509-SVIDs of the entries that the agent is entitled to. | ||
|
||
### Format | ||
|
||
The plugin stores the SVID in three different PEM encoded files: one for the certificate chain, one for the certificate key and one for the trust domain bundle. The file paths are specified through [selectors](#selectors). | ||
|
||
_Note: federated bundles are not stored by this plugin._ | ||
|
||
### Configuration | ||
|
||
| Configuration | Description | DEFAULT | | ||
| -------------------- | ----------- | -------------- | | ||
| directory | Base directory that is used to store the SVIDs. All stored files are under this path. | | | ||
|
||
A sample configuration: | ||
|
||
``` | ||
SVIDStore "disk" { | ||
plugin_data { | ||
directory = "/path/to/svids" | ||
} | ||
} | ||
``` | ||
|
||
### Selectors | ||
|
||
Selectors are used on `storable` entries to describre metadata that is needed by the `disk` plugin in order to store the SVIDs on disk. In case that a required selector is not provided, the plugin will return an error at execution time. | ||
|
||
| Selector | Example | Required | Description | | ||
| ----------------------------- | ------------------------------------------ | -------- | -------------------------------------------- | | ||
| `disk:certchainfile` | `disk:certchainfile:tls.crt` | x | The file path relative to the base directory where the SVID certificate chain will be stored. Must be in the same directory as `keyfile` and `bundlefile`. | | ||
| `disk:keyfile` | `disk:keyfile:key.crt` | x | The file path relative to the base directory where the SVID certificate key will be stored. Must be in the same directory as `certchainfile` and `bundlefile`. | | ||
| `disk:bundlefile` | `disk:bundlefile:ca.crt` | x | The file path relative to the base directory where the CA certificates belonging to the Trust Domain of the SVID will be stored. Must be in the same directory as `certchainfile` and `keyfile`. | | ||
| `disk:group` | `disk:group:my-workload` | x (if `gid` is not specified) | The group name that is set to the files written to disk. If set, `gid` cannot be specified. | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. disk:group and disk:gid is confusing, may we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good. I like |
||
| `disk:gid` | `disk:group:my-workload` | x (if `group` is not specified) | The group ID that is set to the files written to disk. If set, `group` cannot be specified. | | ||
|
||
### Required permissions | ||
|
||
In order to be able to set proper ownership of the written files, this plugin requires that the user that runs SPIRE Agent is a member of the group specified through the `disk:group` or `disk:gid` selectors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about setting path in each selector, we are forced to set all selectors with paths and make sure all paths are the same.
What do you think about creating a selector to set a folder in a single place?
that will allow us to have "default" file names, so entries will be easier, and we can have other selectors to set file names.
example using default names:
example changing a single file name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this and I didn't like the idea of adding a new selector.
Now that I think it more, this also has the benefit of being able to have default file names and end up with a less number of required selectors. I'll make the change to implement it in the suggested way.