Skip to content

Commit 6b3d4b3

Browse files
committed
Convey argument placeholder names in usage
1 parent c4328d2 commit 6b3d4b3

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,32 @@ Provides a SAML SP authentication proxy for backend web services
77
## Usage
88

99
```text
10-
--attribute-header-mappings value
10+
-attribute-header-mappings attribute=header
1111
Comma separated list of attribute=header pairs mapping SAML IdP response attributes to forwarded request header [SAML_PROXY_ATTRIBUTE_HEADER_MAPPINGS]
12-
--authorize-attribute string
12+
-authorize-attribute attribute
1313
Enables authorization and specifies the attribute to check for authorized values [SAML_PROXY_AUTHORIZE_ATTRIBUTE]
14-
--authorize-values value
15-
Specifies the possible values that must be present in the authorize attribute [SAML_PROXY_AUTHORIZE_VALUES]
16-
--backend-url string
14+
-authorize-values values
15+
If enabled, comma separated list of values that must be present in the authorize attribute [SAML_PROXY_AUTHORIZE_VALUES]
16+
-backend-url URL
1717
URL of the backend being proxied [SAML_PROXY_BACKEND_URL]
18-
--base-url string
18+
-base-url URL
1919
External URL of this proxy [SAML_PROXY_BASE_URL]
20-
--bind string
20+
-bind host:port
2121
host:port to bind for serving HTTP [SAML_PROXY_BIND] (default ":8080")
22-
--idp-ca-path string
22+
-idp-ca-path path
2323
Optional path to a CA certificate PEM file for the IdP [SAML_PROXY_IDP_CA_PATH]
24-
--idp-metadata-url string
24+
-idp-metadata-url URL
2525
URL of the IdP's metadata XML [SAML_PROXY_IDP_METADATA_URL]
26-
--name-id-format string
26+
-name-id-format string
2727
One of unspecified, transient (default), email, or persistent to use a standard format or give a full URN of the name ID format [SAML_PROXY_NAME_ID_FORMAT]
28-
--name-id-mapping string
28+
-name-id-mapping header
2929
Name of the request header to convey the SAML nameID/subject [SAML_PROXY_NAME_ID_MAPPING]
30-
--new-auth-webhook-url string
30+
-new-auth-webhook-url URL
3131
URL of webhook that will get POST'ed when a new authentication is processed [SAML_PROXY_NEW_AUTH_WEBHOOK_URL]
32-
--sp-cert-path string
33-
Path to the X509 public certificate PEM file for this SP [SAML_PROXY_SP_CERT_PATH] (default "saml-auth-proxy.cert")
34-
--sp-key-path string
35-
Path to the X509 private key PEM file for this SP [SAML_PROXY_SP_KEY_PATH] (default "saml-auth-proxy.key")
36-
--version
37-
show version and exit [SAML_PROXY_VERSION]
32+
-sp-cert-path path
33+
The path to the X509 public certificate PEM file for this SP [SAML_PROXY_SP_CERT_PATH] (default "saml-auth-proxy.cert")
34+
-sp-key-path path
35+
The path to the X509 private key PEM file for this SP [SAML_PROXY_SP_KEY_PATH] (default "saml-auth-proxy.key")
3836
```
3937

4038
The snake-case values, such as `SAML_PROXY_BACKEND_URL`, are the equivalent environment variables

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require (
55
github.com/crewjam/saml v0.0.0-20190521120225-344d075952c9
66
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
77
github.com/inconshreveable/mousetrap v1.0.0 // indirect
8-
github.com/itzg/go-flagsfiller v1.1.0
8+
github.com/itzg/go-flagsfiller v1.2.0
99
github.com/jamiealquiza/envy v1.1.0
1010
github.com/jonboulle/clockwork v0.1.0 // indirect
1111
github.com/kr/pretty v0.1.0 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
1212
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
1313
github.com/itzg/go-flagsfiller v1.1.0 h1:QwG9LMAaGizSQCJ56BV4Q1Tu8AgMBGuNkveLAiMyZEU=
1414
github.com/itzg/go-flagsfiller v1.1.0/go.mod h1:mfQgTahSs4OHn8PYev2Wwi1LJXUiYiGuZVCpBLxzbYs=
15+
github.com/itzg/go-flagsfiller v1.2.0 h1:MaDdUhy1cVfzbEVAWXJ41XRg/DFxe6HeFtH5hZGh2Nk=
16+
github.com/itzg/go-flagsfiller v1.2.0/go.mod h1:mfQgTahSs4OHn8PYev2Wwi1LJXUiYiGuZVCpBLxzbYs=
1517
github.com/jamiealquiza/envy v1.1.0 h1:Nwh4wqTZ28gDA8zB+wFkhnUpz3CEcO12zotjeqqRoKE=
1618
github.com/jamiealquiza/envy v1.1.0/go.mod h1:MP36BriGCLwEHhi1OU8E9569JNZrjWfCvzG7RsPnHus=
1719
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=

server/server.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ import (
1515

1616
type Config struct {
1717
Version bool `usage:"show version and exit"`
18-
Bind string `default:":8080" usage:"host:port to bind for serving HTTP"`
19-
BaseUrl string `usage:"External URL of this proxy"`
20-
BackendUrl string `usage:"URL of the backend being proxied"`
21-
IdpMetadataUrl string `usage:"URL of the IdP's metadata XML"`
22-
IdpCaPath string `usage:"Optional path to a CA certificate PEM file for the IdP"`
18+
Bind string `default:":8080" usage:"[host:port] to bind for serving HTTP"`
19+
BaseUrl string `usage:"External [URL] of this proxy"`
20+
BackendUrl string `usage:"[URL] of the backend being proxied"`
21+
IdpMetadataUrl string `usage:"[URL] of the IdP's metadata XML"`
22+
IdpCaPath string `usage:"Optional [path] to a CA certificate PEM file for the IdP"`
2323
NameIdFormat string `usage:"One of unspecified, transient (default), email, or persistent to use a standard format or give a full URN of the name ID format"`
24-
SpKeyPath string `default:"saml-auth-proxy.key" usage:"Path to the X509 private key PEM file for this SP"`
25-
SpCertPath string `default:"saml-auth-proxy.cert" usage:"Path to the X509 public certificate PEM file for this SP"`
26-
NameIdMapping string `usage:"Name of the request header to convey the SAML nameID/subject"`
27-
AttributeHeaderMappings map[string]string `usage:"Comma separated list of attribute=header pairs mapping SAML IdP response attributes to forwarded request header"`
28-
NewAuthWebhookUrl string `usage:"URL of webhook that will get POST'ed when a new authentication is processed"`
29-
AuthorizeAttribute string `usage:"Enables authorization and specifies the attribute to check for authorized values"`
30-
AuthorizeValues []string `usage:"Specifies the possible values that must be present in the authorize attribute"`
24+
SpKeyPath string `default:"saml-auth-proxy.key" usage:"The [path] to the X509 private key PEM file for this SP"`
25+
SpCertPath string `default:"saml-auth-proxy.cert" usage:"The [path] to the X509 public certificate PEM file for this SP"`
26+
NameIdMapping string `usage:"Name of the request [header] to convey the SAML nameID/subject"`
27+
AttributeHeaderMappings map[string]string `usage:"Comma separated list of [attribute=header] pairs mapping SAML IdP response attributes to forwarded request header"`
28+
NewAuthWebhookUrl string `usage:"[URL] of webhook that will get POST'ed when a new authentication is processed"`
29+
AuthorizeAttribute string `usage:"Enables authorization and specifies the [attribute] to check for authorized values"`
30+
AuthorizeValues []string `usage:"If enabled, comma separated list of [values] that must be present in the authorize attribute"`
3131
}
3232

3333
func Start(cfg *Config) error {

0 commit comments

Comments
 (0)