Browse Source

Merge pull request #11608 from hashicorp/proxy-codeblocks

docs: updated proxy page to use new codeblock
pull/11614/head
mrspanishviking 3 years ago committed by GitHub
parent
commit
5c33003eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      website/content/docs/connect/proxies/integrate.mdx

20
website/content/docs/connect/proxies/integrate.mdx

@ -32,20 +32,24 @@ The proxy must accept TLS connections on some port to accept inbound connections
Call the [`/v1/agent/connect/ca/leaf/`] API endpoint to obtain the client certificate, e.g.:
```shell-session
curl http://<host-ip>:8500/v1/agent/connect/ca/leaf/<service-name>
<CodeBlockConfig language="shell-session">
```shell
$ curl http://<host-ip>:8500/v1/agent/connect/ca/leaf/<service-name>
```
The client certificate from the inbound connection must be validated against the Connect CA root certificates. Call the [`/v1/agent/connect/ca/roots`] endpoint to obtain the root certificates from the Connect CA, e.g.:
</CodeBlockConfig>
```shell-session
The client certificate from the inbound connection must be validated against the Connect CA root certificates. Call the [`/v1/agent/connect/ca/roots`] endpoint to obtain the root certificates from the Connect CA, e.g.:
curl http://<host-ip>:8500/v1/agent/connect/ca/roots
<CodeBlockConfig language="shell-session">
```shell
$ curl http://<host-ip>:8500/v1/agent/connect/ca/roots
```
</CodeBlockConfig>
### Authorizing the connection
After validating the client certificate from the caller, the proxy can authorize the entire connection (L4) or each request (L7). Depending upon the [protocol] of the proxied service, authorization is performed either on a per-connection (L4) or per-request (L7) basis. Authentication is based on "service identity" (TLS), and is implemented at the
@ -176,7 +180,7 @@ Alternatively, you may also use the flags `-token` or `-token-file` to provide t
<CodeBlockConfig language="shell-session">
```shell
consul connect envoy -sidecar-for "web" -token-file=/etc/consul.d/consul.token
$ consul connect envoy -sidecar-for "web" -token-file=/etc/consul.d/consul.token
```
</CodeBlockConfig>
@ -184,7 +188,7 @@ Alternatively, you may also use the flags `-token` or `-token-file` to provide t
<CodeBlockConfig >
```shell
$ consul connect proxy -sidecar-for "web" -token-file=/etc/consul.d/consul.token
$ consul connect proxy -sidecar-for "web" -token-file=/etc/consul.d/consul.token
```
</CodeBlockConfig>

Loading…
Cancel
Save