Update sessions and targets workflow docs (#659)
This commit is contained in:
1 parent
74f3c40178
commit
52a43b65b4
2 files changed
+14
-14
No files matched your search
@@ -7,15 +7,15 @@ description: How to manage Boundary sessions
|
||||
|
||||
# Manage Sessions
|
||||
|
||||
[Sessions](/docs/concepts/domain-model/sessions) are Boundary resources created when connecting to a [target](/docs/concepts/domain-model/target). A target allows Boundary users to define an endpoint with a default-port and a protocol to establish a session. Unless specified with a `-host-id` flag when establishing a session, Boundary will choose one [host](/docs/concepts/domain-model/hosts) from the target's host-sets to connect to at random.
|
||||
[Sessions](/docs/concepts/domain-model/sessions) are Boundary resources created when connecting to a [Target](/docs/concepts/domain-model/target). A target allows Boundary users to define an endpoint with a protocol and default port to establish a session. Unless specified with a `-host-id` flag when establishing a session, Boundary will choose one [Host](/docs/concepts/domain-model/hosts) from the target's [Host Sets](/docs/concepts/domain-model/host-sets) to connect to at random.
|
||||
|
||||
In this section, we'll show you the basics of how to start a session, view the session details, and cancel a session in Boundary using the CLI.
|
||||
|
||||
We assume you're running Boundary in dev mode using the default target resource of `ttcp_1234567890`. We also assume you've authenticated using the CLI. See the output of `boundary dev` for these login values.
|
||||
We assume you're running Boundary in `dev` mode using the default target resource of `ttcp_1234567890`. We also assume you've authenticated using the CLI. See the output of `boundary dev` for these login values.
|
||||
|
||||
## Start a Session
|
||||
|
||||
Connecting to a target creates a session in Boundary. To demonstrate what a session looks like we are going to connect to a TCP target with a default port of 22 for SSH access.
|
||||
Connecting to a target creates a session in Boundary (via a call to the target to authorize a session for the user). To demonstrate what a session looks like we are going to connect to a `tcp` target with a default port of 22 for SSH access.
|
||||
|
||||
```bash
|
||||
$ boundary connect ssh -target-id ttcp_1234567890 --
|
||||
@@ -108,7 +108,7 @@ Session information:
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
To cancel a session the person initiating the connection can disconnect all connections, or a request can be sent to Boundary to cancel it.
|
||||
To send a request to Boundary to cancel a session:
|
||||
|
||||
|
||||
```bash
|
||||
@@ -170,7 +170,7 @@ Boundary then cancels the session and move it into a "Terminated" state.
|
||||
|
||||
## Advanced Session Establishment
|
||||
|
||||
Above we discussed connecting to a target using the `boundary connect` command. In addition to this we can create a session to a target and connect to that session in separate steps. This is accomplished using the `boundary targets authorize-session` command, which generates a authorization token that users can use to start a session via `boundary proxy` at their own convenience.
|
||||
Above, we discussed connecting to a target using the `boundary connect` command. In addition to this we can create a session to a target and connect to that session in separate steps. This is accomplished using the `boundary targets authorize-session` command, which generates an authorization token that a user can use to start a session via `boundary connect -authz-token` at their own convenience.
|
||||
|
||||
```bash
|
||||
$ boundary targets authorize-session -id ttcp_1234567890
|
||||
@@ -186,7 +186,7 @@ Target information:
|
||||
User ID: u_1234567890
|
||||
```
|
||||
|
||||
Note: You can also provide a -host-id flag in the request above which ensures connecting using the provided Authorization Token will connect you to this specific host.
|
||||
Note: You can also provide a `-host-id` flag in the request above which ensures connecting using the provided Authorization Token will connect you to this specific host.
|
||||
|
||||
```bash
|
||||
$ boundary proxy -authz $LONG_STRING_OF_TEXT
|
||||
|
||||
@@ -7,14 +7,14 @@ description: How to manage Boundary targets
|
||||
|
||||
# Manage Targets
|
||||
|
||||
[Targets](/docs/concepts/domain-model/targets) are Boundary resources which contain a [host-set](/docs/concepts/domain-model/host-sets). A target allows Boundary users to define an endpoint with a default-port and a protocol to establish a session. Unless specified with a `-host-id` flag, Boundary will choose one [host](/docs/concepts/domain-model/hosts) in the host-set to connect to at random.
|
||||
[Targets](/docs/concepts/domain-model/targets) are Boundary resources which contain one or more [Host Sets](/docs/concepts/domain-model/host-sets). A target allows Boundary users to define an endpoint with a default port and a protocol to establish a session. Unless specified with a `-host-id` flag, Boundary will choose one [Host](/docs/concepts/domain-model/hosts) in the host set to connect to at random.
|
||||
|
||||
In this section, we'll show you the basics of how to define a host, host-set, and a target in Boundary on the CLI, the admin console, and using our [Terraform provider](https://github.com/hashicorp/terraform-provider-boundary).
|
||||
In this section, we'll show you the basics of how to define a host, host set, and a target in Boundary on the CLI, the admin console, and using our [Terraform provider](https://github.com/hashicorp/terraform-provider-boundary).
|
||||
|
||||
We assume you're running Boundary in dev mode and have a default static host-catalog of `hcst_1234567890`. We also assume you've logged in on the command line and the admin console. See the output of `boundary dev` for these login values.
|
||||
We assume you're running Boundary in `dev` mode and have a default static host-catalog of `hcst_1234567890`. We also assume you've logged in on the command line and the admin console. See the output of `boundary dev` for these login values.
|
||||
|
||||
~> Note that all resource ID's in this example are illustration only - ID's are uniquely generated for every resource upon creation with the exception being
|
||||
generated resources in `dev mode`. Please make sure to use the resource ID's that are generated when running this example. For example, if you run
|
||||
~> Note that all resource IDs in this example are illustration only - IDs are uniquely generated for every resource upon creation with the exception being
|
||||
generated resources in `dev` mode. Please make sure to use the resource IDs that are generated when running this example. For example, if you run
|
||||
`boundary users create`, use the resource ID of the user seen in stdout, not the ID in the example command.
|
||||
|
||||
## Define a Host
|
||||
@@ -87,9 +87,9 @@ resource "boundary_host" "postgres" {
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Define a Host-Set
|
||||
## Define a Host Set
|
||||
|
||||
Host-sets allow us to group hosts of similar interests together. A target works off of host-sets, so even though we are only defining one host in this example, we're going to create a host-set of one host.
|
||||
Host sets allow us to group hosts providing equivalient services together. A target works off of host sets, so even though we are only defining one host in this example, we're going to create a host set of one host.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
@@ -149,7 +149,7 @@ Then associate the host set with a host:
|
||||
<Tab heading="Terraform">
|
||||
|
||||
|
||||
To define this host-set in Terraform:
|
||||
To define this host set in Terraform:
|
||||
|
||||
```hcl
|
||||
resource "boundary_host_set" "postgres" {
|
||||
|
||||
Reference in new issue
Block a user