-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from amartinezfayo/generalize-envoy-support
Make the Sidecar generic
- Loading branch information
Showing
12 changed files
with
234 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,36 @@ | ||
# SPIRE Sidecar | ||
|
||
The SPIRE sidecar is a simple utility for fetching certificates from the SPIRE Workload API and signaling Ghostunnel to reload them. | ||
The SPIRE Sidecar is a simple utility for fetching X.509 SVID certificates from the SPIRE Workload API, launch a process that makes use of the certificates and continuosly get new certificates before they expire. The launched process is signaled to reload the certificates when is needed. | ||
|
||
### Usage | ||
`$ sidecar -config <config_file>` | ||
|
||
`<config_file>`: file path to the configuration file. | ||
|
||
If `-config` is not specified, the default value `sidecar_config.hcl` is assumed. | ||
|
||
### Configuration | ||
The configuration file is an [HCL](https://github.com/hashicorp/hcl) formatted file that defines the following configurations: | ||
|
||
|Configuration | Description | Example Value | | ||
|---------------------|------------------------------------------------------------------------------------------------| ------------- | | ||
|`agentAddress` | Socket address of SPIRE Agent. | `"/tmp/agent.sock"` | | ||
|`cmd` | The path to the process to launch. | `"ghostunnel"` | | ||
|`cmdArgs` | The arguments of the process to launch. | `"server --listen localhost:8002 --target localhost:8001--keystore certs/svid_key.pem --cacert certs/svid_bundle.pem --allow-uri-san spiffe://example.org/Database"` | | ||
|`certDir` | Directory name to store the fetched certificates. This directory must be created previously. | `"certs"` | | ||
|`renewSignal` | The signal that the process to be launched expects to reload the certificates. | `"SIGUSR1"` | | ||
|`svidFileName` | File name to be used to store the X.509 SVID public certificate in PEM format. | `"svid.pem"` | | ||
|`svidKeyFileName` | File name to be used to store the X.509 SVID private key and public certificate in PEM format. | `"svid_key.pem"` | | ||
|`svidBundleFileName` | File name to be used to store the X.509 SVID Bundle in PEM format. | `"svid_bundle.pem"` | | ||
|
||
#### Configuration example | ||
``` | ||
agentAddress = "/tmp/agent.sock" | ||
cmd = "ghostunnel" | ||
cmdArgs = "server --listen localhost:8002 --target localhost:8001 --keystore certs/svid_key.pem --cacert certs/svid_bundle.pem --allow-uri-san spiffe://example.org/Database" | ||
certDir = "certs" | ||
renewSignal = "SIGUSR1" | ||
svidFileName = "svid.pem" | ||
svidKeyFileName = "svid_key.pem" | ||
svidBundleFileName = "svid_bundle.pem" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
package: github.com/spiffe/sidecar | ||
import: | ||
- package: github.com/golang/protobuf | ||
subpackages: | ||
- proto | ||
- package: github.com/hashicorp/hcl | ||
- package: golang.org/x/net | ||
subpackages: | ||
- context | ||
- package: google.golang.org/grpc | ||
version: ^1.6.0 | ||
testImport: | ||
- package: github.com/spiffe/spiffe-example | ||
subpackages: | ||
- rosemary/build/tools/sidecar/wlapi | ||
- package: github.com/spiffe/spire/proto/api/workload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.