Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion cmd/spire-server/cli/agent/agent_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
Indicates that the command will not perform any action, but will print the agents that would be purged.
-expiredFor duration
Amount of time that has passed since the agent's SVID has expired. It is used to determine which agents to purge. (default 720h0m0s)
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

listUsage = `Usage of agent list:
-attestationType string
Filter by attestation type, like join_token or x509pop.
Expand All @@ -22,6 +25,8 @@
Filter based on string received, 'true': agents that can reattest, 'false': agents that can't reattest, other value will return all.
-expiresBefore string
Filter by expiration time (format: "2006-01-02 15:04:05 -0700 -07")
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-matchSelectorsOn string
The match mode used when filtering by selectors. Options: exact, any, superset and subset (default "superset")
-namedPipeName string
Expand All @@ -31,22 +36,29 @@
-selector value
A colon-delimited type:value selector. Can be used more than once
`

banUsage = `Usage of agent ban:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
-spiffeID string
The SPIFFE ID of the agent to ban (agent identity)
`

evictUsage = `Usage of agent evict:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
-spiffeID string
The SPIFFE ID of the agent to evict (agent identity)
`

countUsage = `Usage of agent count:
-attestationType string
Filter by attestation type, like join_token or x509pop.
Expand All @@ -56,6 +68,8 @@
Filter based on string received, 'true': agents that can reattest, 'false': agents that can't reattest, other value will return all.
-expiresBefore string
Filter by expiration time (format: "2006-01-02 15:04:05 -0700 -07")
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-matchSelectorsOn string
The match mode used when filtering by selectors. Options: exact, any, superset and subset (default "superset")
-namedPipeName string
Expand All @@ -65,12 +79,15 @@
-selector value
A colon-delimited type:value selector. Can be used more than once
`

showUsage = `Usage of agent show:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
-spiffeID string
The SPIFFE ID of the agent to show (agent identity)
`
)
)

Check failure on line 93 in cmd/spire-server/cli/agent/agent_windows_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
16 changes: 15 additions & 1 deletion cmd/spire-server/cli/bundle/bundle_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,59 @@
The format of the bundle data. Either "pem" or "spiffe". (default "pem")
-id string
SPIFFE ID of the trust domain
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
-path string
Path to the bundle data
`

showUsage = `Usage of bundle show:
-format string
The format to show the bundle (only pretty output format supports this flag). Either "pem" or "spiffe". (default "pem")
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

countUsage = `Usage of bundle count:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

listUsage = `Usage of bundle list:
-format string
The format to list federated bundles (only pretty output format supports this flag). Either "pem" or "spiffe". (default "pem")
-id string
SPIFFE ID of the trust domain
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

deleteUsage = `Usage of bundle delete:
-id string
SPIFFE ID of the trust domain
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-mode string
Deletion mode: one of restrict, delete, or dissociate (default "restrict")
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`
)
)

Check failure on line 66 in cmd/spire-server/cli/bundle/bundle_windows_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
16 changes: 16 additions & 0 deletions cmd/spire-server/cli/entry/util_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const (
SPIFFE ID of a trust domain to federate with. Can be used more than once
-hint string
The entry hint, used to disambiguate entries with the same SPIFFE ID
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-jwtSVIDTTL int
-jwtSVIDIncludeJTI
` + " \tA boolean value that, when set, includes a unique 'jti' claim in JWT-SVIDs issued for this entry and bypasses the agent JWT-SVID cache\n" + ` -jwtSVIDTTL int
The lifetime, in seconds, for JWT-SVIDs issued based on this registration entry.
Expand All @@ -42,6 +45,7 @@ const (
-x509SVIDTTL int
The lifetime, in seconds, for x509-SVIDs issued based on this registration entry.
`

showUsage = `Usage of entry show:
-downstream
A boolean value that, when set, indicates that the entry describes a downstream SPIRE server
Expand All @@ -51,6 +55,8 @@ const (
SPIFFE ID of a trust domain an entry is federate with. Can be used more than once
-hint string
The Hint of the records to show (optional)
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-matchFederatesWithOn string
The match mode used when filtering by federates with. Options: exact, any, superset and subset (default "superset")
-matchSelectorsOn string
Expand All @@ -66,6 +72,7 @@ const (
-spiffeID string
The SPIFFE ID of the records to show
`

updateUsage = `Usage of entry update:
-admin
If set, the SPIFFE ID in this entry will be granted access to the SPIRE Server's management APIs
Expand All @@ -85,6 +92,9 @@ const (
SPIFFE ID of a trust domain to federate with. Can be used more than once
-hint string
The entry hint, used to disambiguate entries with the same SPIFFE ID
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-jwtSVIDTTL int
-jwtSVIDIncludeJTI
` + " \tA boolean value that, when set, includes a unique 'jti' claim in JWT-SVIDs issued for this entry and bypasses the agent JWT-SVID cache\n" + ` -jwtSVIDTTL int
The lifetime, in seconds, for JWT-SVIDs issued based on this registration entry.
Expand All @@ -103,23 +113,29 @@ const (
-x509SVIDTTL int
The lifetime, in seconds, for x509-SVIDs issued based on this registration entry.
`

deleteUsage = `Usage of entry delete:
-entryID string
The Registration Entry ID of the record to delete.
-file string
Path to a file containing a JSON structure for batch deletion (optional). If set to '-', read from stdin.
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

countUsage = `Usage of entry count:
-downstream
A boolean value that, when set, indicates that the entry describes a downstream SPIRE server
-federatesWith value
SPIFFE ID of a trust domain an entry is federate with. Can be used more than once
-hint string
The Hint of the records to count (optional)
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-matchFederatesWithOn string
The match mode used when filtering by federates with. Options: exact, any, superset and subset (default "superset")
-matchSelectorsOn string
Expand Down
19 changes: 18 additions & 1 deletion cmd/spire-server/cli/federation/util_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
Path to a file containing federation relationships in JSON format (optional). If set to '-', read the JSON from stdin.
-endpointSpiffeID string
SPIFFE ID of the SPIFFE bundle endpoint server. Only used for 'spiffe' profile.
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand All @@ -23,36 +25,49 @@
-trustDomainBundlePath string
Path to the trust domain bundle data (optional).
`

deleteUsage = `Usage of federation delete:
-id string
SPIFFE ID of the trust domain
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

listUsage = `Usage of federation list:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

refreshUsage = `Usage of federation refresh:
-id string
SPIFFE ID of the trust domain
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`

showUsage = `Usage of federation show:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
-trustDomain string
The trust domain name of the federation relationship to show
`

updateUsage = `Usage of federation update:
-bundleEndpointProfile string
Endpoint profile type (either "https_web" or "https_spiffe")
Expand All @@ -62,6 +77,8 @@
Path to a file containing federation relationships in JSON format (optional). If set to '-', read the JSON from stdin.
-endpointSpiffeID string
SPIFFE ID of the SPIFFE bundle endpoint server. Only used for 'spiffe' profile.
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand All @@ -73,4 +90,4 @@
-trustDomainBundlePath string
Path to the trust domain bundle data (optional).
`
)
)

Check failure on line 93 in cmd/spire-server/cli/federation/util_windows_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package healthcheck

var (
healthcheckUsage = `Usage of healthcheck:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-shallow
Expand Down
6 changes: 4 additions & 2 deletions cmd/spire-server/cli/jwt/mint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
-----END PRIVATE KEY-----
`))
availableFormats = []string{"pretty", "json"}
expectedUsage = `Usage of jwt mint:
expectedUsage = `Usage of jwt mint:

Check failure on line 36 in cmd/spire-server/cli/jwt/mint_test.go

View workflow job for this annotation

GitHub Actions / lint (linux)

File is not properly formatted (gofmt)

Check failure on line 36 in cmd/spire-server/cli/jwt/mint_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
-audience value
Audience claim that will be included in the SVID. Can be used more than once.` + clitest.AddrOutputUsage +
Audience claim that will be included in the SVID. Can be used more than once.
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).` + clitest.AddrOutputUsage +
` -spiffeID string
SPIFFE ID of the JWT-SVID
-ttl duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var (
jwtActivateUsage = `Usage of localauthority jwt activate:
-authorityID string
The authority ID of the JWT authority to activate
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

var (
jwtPrepareUsage = `Usage of localauthority jwt prepare:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`
)
)

Check failure on line 14 in cmd/spire-server/cli/localauthority/jwt/jwt_prepare_windows_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
jwtRevokeUsage = `Usage of localauthority jwt revoke:
-authorityID string
The authority ID of the JWT authority to revoke
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Desired output format (pretty, json); default: pretty.
`
)
)

Check failure on line 16 in cmd/spire-server/cli/localauthority/jwt/jwt_revoke_windows_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

File is not properly formatted (gofmt)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package jwt_test

var (
jwtShowUsage = `Usage of localauthority jwt show:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var (
jwtTaintUsage = `Usage of localauthority jwt taint:
-authorityID string
The authority ID of the JWT authority to taint
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var (
x509ActivateUsage = `Usage of localauthority x509 activate:
-authorityID string
The authority ID of the X.509 authority to activate
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package x509_test

var (
x509PrepareUsage = `Usage of localauthority x509 prepare:
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var (
x509RevokeUsage = `Usage of localauthority x509 revoke:
-authorityID string
The authority ID of the X.509 authority to revoke
-instance string
Instance name to substitute into socket templates (env SPIRE_SERVER_PRIVATE_SOCKET_TEMPLATE).
-namedPipeName string
Pipe name of the SPIRE Server API named pipe (default "\\spire-server\\private\\api")
-output value
Expand Down
Loading
Loading