-
Notifications
You must be signed in to change notification settings - Fork 18
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
document pomerium-cli client cert functionality #1001
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -113,6 +113,42 @@ pomerium-cli tcp tcp+https://proxy.corp.example.com:8443/redis.internal.example. | |||||
|
||||||
The command above connects to `https://pomerium.corp.example.com:8443` and then requests the TCP route for `redis.internal.example.com:6379`. | ||||||
|
||||||
### Client Certificates | ||||||
|
||||||
If Pomerium is configured to require client certificates, you will also need to provide a client certificate and private key when invoking the `pomerium-cli` command. | ||||||
|
||||||
You can specify these either by using PEM files, or (starting in v0.25) by searching for a certificate in the system trust store (**macOS** and **Windows** only). | ||||||
|
||||||
To specify a client certificate and key using PEM files: | ||||||
|
||||||
```bash | ||||||
pomerium-cli tcp --client-cert cert.pem --client-key key.pem redis.corp.example.com:6379 | ||||||
``` | ||||||
|
||||||
To search for a client certificate in the system trust store: | ||||||
|
||||||
```bash | ||||||
pomerium-cli tcp --client-cert-from-store redis.corp.example.com:6379 | ||||||
``` | ||||||
|
||||||
This will search the Keychain (on macOS) or the Windows certificate store (on Windows) for a client certificate and private key, based on the trusted CA names advertised by Pomerium in the TLS handshake. | ||||||
|
||||||
If you need to select between multiple matching client certificates, you can additionally filter based on the Distinguished Name of the certificate's Issuer and/or the certificate Subject. | ||||||
|
||||||
For example, to filter for a certificate directly issued by a CA with the Common Name "My Trusted CA": | ||||||
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.
Suggested change
|
||||||
|
||||||
```bash | ||||||
pomerium-cli tcp --client-cert-from-store --client-cert-issuer "CN=My Trusted CA" redis.corp.example.com:6379 | ||||||
``` | ||||||
|
||||||
Or, to filter for a certificate whose Subject contains the Organizational Unit Name "My Department": | ||||||
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.
Suggested change
|
||||||
|
||||||
```bash | ||||||
pomerium-cli tcp --client-cert-from-store --client-cert-subject "OU=My Department" redis.corp.example.com:6379 | ||||||
``` | ||||||
|
||||||
See the [reference page](/docs/capabilities/tcp/reference#certificate-name-filters) for more details about the certificate name filter syntax. | ||||||
|
||||||
## Service-Specific Documentation | ||||||
|
||||||
We've outlined how to use a TCP tunnel through Pomerium for several popular services that use TCP connections: | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,15 +18,42 @@ pomerium-cli tcp [destination] [flags] | |||||
|
||||||
## Flags | ||||||
|
||||||
| Flags | Description | Default Value | | ||||||
| Flags | Description | Type | | ||||||
| :-- | :-- | --- | | ||||||
| <a className="entRef-anchor" id="--alternate-ca-path">#</a><a href='#--alternate-ca-path'>--alternate-ca-path</a> | Path to CA certificate to use for HTTP requests. | string | | ||||||
| <a className="entRef-anchor" id="--browser-cmd">#</a><a href='#--browser-cmd'>--browser-cmd</a> | Custom browser command to run when opening a URL. | string | | ||||||
| <a className="entRef-anchor" id="--ca-cert">#</a><a href='#--ca-cert'>--ca-cert</a> | Path to CA certificate to use for HTTP requests. | string | | ||||||
| <a className="entRef-anchor" id="--client-cert">#</a><a href='#--client-cert'>--client-cert</a> | (optional) PEM-encoded client certificate. | string | | ||||||
| <a className="entRef-anchor" id=" --client-key">#</a><a href='# --client-key'> --client-key</a> | (optional) PEM-encoded client certificate key. | string | | ||||||
| <a className="entRef-anchor" id="--client-cert-from-store">#</a><a href='#--client-cert-from-store'> --client-cert-from-store</a> | (optional) If provided, pomerium-cli will attempt to use a client certificate from the system trust store (macOS and Windows only), searching for a certificate based on the trusted CA names advertised by Pomerium in the TLS handshake. | none | | ||||||
| <a className="entRef-anchor" id="--client-cert-issuer">#</a><a href='#--client-cert-issuer'> --client-cert-issuer</a> | (optional) When used in combination with --client-cert-from-store, restricts the client certificate search based on a particular attribute of the certificate's [Issuer name](#certificate-name-filters). | string | | ||||||
| <a className="entRef-anchor" id="--client-cert-subject">#</a><a href='#--client-cert-subject'> --client-cert-subject</a> | (optional) When used in combination with --client-cert-from-store, restricts the client certificate search based on a particular attribute of the certificate's [Subject name](#certificate-name-filters). | string | | ||||||
| <a className="entRef-anchor" id=" --disable-tls-verification">#</a><a href='# --disable-tls-verification'>--disable-tls-verification</a> | Disables TLS verification. | none | | ||||||
| <a className="entRef-anchor" id="--help">#</a><a href='#--help'>-h, --help</a> | Help for tcp. | none | | ||||||
| <a className="entRef-anchor" id="--listen">#</a><a href='#--listen'>--listen</a> | Local address to start a listener on (default "127.0.0.1:0"). | string | | ||||||
| <a className="entRef-anchor" id="--pomerium-url">#</a><a href='#--pomerium-url'>--pomerium-url</a> | The URL of the Pomerium server to connect to. | string | | ||||||
| <a className="entRef-anchor" id="--version">#</a><a href='#--version'>-v, --version</a> | Version for pomerium-cli. | none | | ||||||
|
||||||
### Certificate name filters | ||||||
|
||||||
The certificate name filter syntax is `attribute=value`. A name filter can accept only one name attribute. The value must be an exact match (not a substring match). Make sure to quote name filters as appropriate for your shell. | ||||||
|
||||||
For example, `--client-cert-issuer "CN=My Trusted CA"` would filter for a certificate directly issued by a CA with the Common Name "My Trusted CA". | ||||||
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.
Suggested change
|
||||||
|
||||||
Or, `--client-cert-subject "OU=My Department"` would filter for a certificate whose Subject name contains the Organizational Unit Name "My Department". | ||||||
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.
Suggested change
|
||||||
|
||||||
The supported name attributes are: | ||||||
|
||||||
- commonName (CN) | ||||||
- countryName (C) | ||||||
- localityName (L) | ||||||
- organizationName (O) | ||||||
- organizationalUnitName (OU) | ||||||
- postalCode | ||||||
- serialNumber | ||||||
- stateOrProvinceName (ST) | ||||||
- streetAddress (STREET) | ||||||
|
||||||
Either the long or abbreviated attribute name may be used (for example, `localityName=New York` or `L=New York`). | ||||||
|
||||||
Values are case sensitive: `L=new york` will not match the Locality Name "New York". |
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.
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'd prefer not to show these terms in bold.