docs: IA reorganization (#5838)
* docs: IA reorganization * docs: Updates * docs: Updates * docs: Fix links * docs: Updates * docs: Fix a typo * docs: Fix client agent topic * docs: Update Client Agent nav * docs: Fix conflict * docs: Fix a typo in Client Agent docs (#5853) * docs: Fix client agent topic * docs: Updates * docs: Updates * docs: Updates * docs: Updates * docs: Fixes get started and operations links * docs: Update nav * docs: Partials * docs: Unix partials * docs: Worker partials * docs: Updates * docs: Update workers and targets * docs: Updates * docs: Updates * docs: Fixes link * docs: Updates after sync review * docs: Updates from review feedback * docs: Move worker filter examples * docs: Fix links * docs: Updates for filters based on working session * docs: Fixes broken links * docs: Add links to other filter topics * docs: Update list intro * docs: Adds link * docs: Fixes redirects * docs: Fixes redirects * docs: Deleted mysql page from TOC * docs: Add versioned redirect * docs: Adds versioned redirects * docs: Adds versioned redirects * docs: Update redirects * docs: Update redirects * docs: Redirect fixes * docs: Update redirect format * docs: Fix a typo * docs: Fixes redirects * docs: Fixes redirect * docs: Adds links out to client agent troubleshooting * uses /etc/boundary.d/ as recommended installation directory (#6003) * docs: Updates legacy io links * docs: Fixes redirects * docs: Fix redirect * docs: Restoring deleted file --------- Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
This commit is contained in:
1 parent
21fce7c5eb
commit
5ce6515156
253 files changed
+7897
-5673
No files matched your search
@@ -1,419 +0,0 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Manage roles and permissions
|
||||
description: >-
|
||||
Use roles to manage permissions assigned to users and groups. Create roles and assign principals and grants to them. Add grant scopes and configure inheritance.
|
||||
---
|
||||
|
||||
# Manage roles and permissions
|
||||
|
||||
[Roles](/boundary/docs/concepts/domain-model/roles) in Boundary manage the permissions assigned to principals:
|
||||
|
||||
- [Users](/boundary/docs/concepts/domain-model/users)
|
||||
- [Groups](/boundary/docs/concepts/domain-model/groups)
|
||||
- [Managed Groups](/boundary/docs/concepts/domain-model/managed-groups)
|
||||
|
||||
You can define a role in the global, org, or project scopes.
|
||||
|
||||
In this topic, we show how to create a role in Boundary, assign that role a permission set using grants, and assign principals to the role.
|
||||
|
||||
<Note>
|
||||
|
||||
All resource IDs in this guide are examples. Boundary generates unique IDs for every resource, with the exception of the resources that are created when you use Boundary's `dev` mode. Make sure you substitute your own resource IDs when you follow this example. For example, if you execute `boundary roles create`, use the resource ID of the role in your stdout, not the ID in the example command.
|
||||
|
||||
</Note>
|
||||
|
||||
## Create a role
|
||||
|
||||
Roles can live in the global, org, or project scopes. In this example, we create a role in the generated org scope in [Boundary's `dev` mode](/boundary/docs/getting-started/dev-mode/dev-mode).
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
```shell-session
|
||||
$ boundary roles create -scope-id o_1234567890 -name list_all_resources -description "List all resources"
|
||||
|
||||
Role information:
|
||||
Created Time: Thu, 25 Jul 2024 17:21:22 MDT
|
||||
Description: List all resources
|
||||
Grant Scope ID: this
|
||||
ID: r_22sVJoKZj3
|
||||
Name: list_all_resources
|
||||
Updated Time: Thu, 25 Jul 2024 17:21:22 MDT
|
||||
Version: 2
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Authorized Actions:
|
||||
add-principals
|
||||
set-grants
|
||||
remove-grants
|
||||
no-op
|
||||
remove-principals
|
||||
set-grant-scopes
|
||||
read
|
||||
update
|
||||
add-grant-scopes
|
||||
delete
|
||||
add-grants
|
||||
set-principals
|
||||
remove-grant-scopes
|
||||
|
||||
Grant Scope IDs:
|
||||
ID: this
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin UI" group="ui">
|
||||
|
||||
Complete the following steps in the Boundary Admin UI.
|
||||
|
||||
1. Log in to Boundary.
|
||||
1. Navigate to an org, then select **Roles** on the navigation pane.
|
||||
1. Click the **New** button.
|
||||
1. Fill in the role details, including the name `List all resources`.
|
||||
1. Click **Save**. You are then directed to the role's **Settings** page.
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
Before you create a role, ensure that the principals you want to assign to the role exist.
|
||||
|
||||
For example, to create an org, project, user, and a group in an org scope, use the following resources:
|
||||
|
||||
```hcl
|
||||
resource "boundary_scope" "org" {
|
||||
name = "org_one"
|
||||
description = "My org scope"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My project scope"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_user" "foo" {
|
||||
name = "Foo user"
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
|
||||
resource "boundary_group" "bar" {
|
||||
name = "Bar group"
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
```
|
||||
|
||||
Next, add the `boundary_role` resource, adding the org scope for `scope_id`:
|
||||
|
||||
```hcl
|
||||
resource "boundary_role" "listonly" {
|
||||
name = "listonly"
|
||||
description = "A list only role"
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Assign principals to a role
|
||||
|
||||
You can grant users, groups, and managed groups permissions to perform actions by assigning them as a role principal.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
Examples of principal IDs include:
|
||||
|
||||
- User: `u_tfRrCUIpGH`
|
||||
- Group: `g_qu2V5QMGQD`
|
||||
- Managed group: `mgldap_98UNHEqtmD`
|
||||
|
||||
The following example adds a group as a role principal.
|
||||
|
||||
```shell-session
|
||||
$ boundary roles add-principals -id r_22sVJoKZj3 -principal g_qu2V5QMGQD
|
||||
|
||||
Role information:
|
||||
Created Time: Thu, 25 Jul 2024 17:21:22 MDT
|
||||
Description: List all resources
|
||||
Grant Scope ID: this
|
||||
ID: r_22sVJoKZj3
|
||||
Name: list_all_resources
|
||||
Updated Time: Thu, 25 Jul 2024 17:33:33 MDT
|
||||
Version: 3
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Authorized Actions:
|
||||
set-grant-scopes
|
||||
no-op
|
||||
read
|
||||
update
|
||||
set-principals
|
||||
add-principals
|
||||
set-grants
|
||||
remove-principals
|
||||
remove-grant-scopes
|
||||
delete
|
||||
add-grants
|
||||
add-grant-scopes
|
||||
remove-grants
|
||||
|
||||
Principals:
|
||||
ID: g_qu2V5QMGQD
|
||||
Type: group
|
||||
Scope ID: global
|
||||
|
||||
Grant Scope IDs:
|
||||
ID: this
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin UI" group="ui">
|
||||
|
||||
1. Log in to Boundary.
|
||||
1. Select **Roles** in the navigation pane, and then select the role you want to assign principals to.
|
||||
1. From the role's **Setting** page, click on the **Principals** tab.
|
||||
1. Click the **Add Principals** button, or select it from the **Manage** dropdown.
|
||||
1. Select one or more users, groups, or managed groups to associate with the role.
|
||||
1. Click the **Add Principals** button. The role's **Principals** page should now show the principals you selected before.
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
You can assign principals with the `principal_ids` attribute.
|
||||
|
||||
The following example adds the `boundary_user.foo` and `boundary_group.bar` principals to the role.
|
||||
|
||||
```hcl
|
||||
resource "boundary_role" "listonly" {
|
||||
name = "listonly"
|
||||
description = "A list only role"
|
||||
principal_ids = [boundary_user.foo.id,boundary_group.bar.id]
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Assign grants to a role
|
||||
|
||||
Grants describe the actions that the principals are allowed to perform. For more information on how to format grants, refer to [Permission grant formats](/boundary/docs/configuration/identity-access-management/permission-grant-formats).
|
||||
|
||||
In this example, we give a role read and list permissions for all resources. The grant we apply for the role is:
|
||||
|
||||
```text
|
||||
ids=*;type=*;actions=no-op,list
|
||||
```
|
||||
|
||||
The `no-op` action enables users that don't have any other assigned permissions, like read or update, the ability to list resources they cannot take any actions on.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
```shell-session
|
||||
$ boundary roles add-grants -id r_22sVJoKZj3 -grant 'ids=*;type=*;actions=no-op,list'
|
||||
|
||||
Role information:
|
||||
Created Time: Thu, 25 Jul 2024 17:21:22 MDT
|
||||
Description: List all resources
|
||||
Grant Scope ID: this
|
||||
ID: r_22sVJoKZj3
|
||||
Name: list_all_resources
|
||||
Updated Time: Thu, 25 Jul 2024 17:42:46 MDT
|
||||
Version: 4
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Authorized Actions:
|
||||
remove-grant-scopes
|
||||
add-grants
|
||||
add-grant-scopes
|
||||
delete
|
||||
add-principals
|
||||
set-grant-scopes
|
||||
set-principals
|
||||
remove-principals
|
||||
set-grants
|
||||
remove-grants
|
||||
no-op
|
||||
read
|
||||
update
|
||||
|
||||
Principals:
|
||||
ID: g_qu2V5QMGQD
|
||||
Type: group
|
||||
Scope ID: global
|
||||
|
||||
Canonical Grants:
|
||||
ids=*;type=*;actions=list,no-op
|
||||
|
||||
Grant Scope IDs:
|
||||
ID: this
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin UI" group="ui">
|
||||
|
||||
1. Log in to Boundary.
|
||||
1. Select **Roles** in the navigation pane, and the select the role you want to assign grants to.
|
||||
1. From the role's **Settings** page, click on the **Grants** tab.
|
||||
1. In the **New Grant** field, paste in the example grant: `ids=*;type=*;actions=no-op,list`
|
||||
1. Click **Add**.
|
||||
1. Click **Save** to commit your grant changes.
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
You assign grants using the `grant_strings` attribute.
|
||||
|
||||
```hcl
|
||||
resource "boundary_role" "listonly" {
|
||||
name = "listonly"
|
||||
description = "A list only role"
|
||||
principal_ids = [boundary_user.foo.id,boundary_group.bar.id]
|
||||
grant_strings = ["ids=*;type=*;actions=no-op,list"]
|
||||
scope_id = boundary_scope.org.id
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Add grant scopes
|
||||
|
||||
You can assign roles to multiple scopes and configure role inheritance.
|
||||
|
||||
Role can have a combination of the following grant scope IDs:
|
||||
|
||||
- `this` (this scope)
|
||||
- `children` (all direct children of the assigned scope, `global` and org scopes only)
|
||||
- `descendants` (all descendants of a scope, `global only`)
|
||||
- ID (such as `o_v2MpV4vBHN` or `p_0vfvaQPwhD`. Roles accept multiple grant scope IDs)
|
||||
|
||||
Boundary automatically assigns grants the `this` scope, when you create them.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI" group="cli">
|
||||
|
||||
The following command adds the IDs of a project scope and the direct children of the role's scope to the role. This includes projects within `o_1234567890` in this example.
|
||||
|
||||
```shell-session
|
||||
$ boundary roles add-grant-scopes -id r_22sVJoKZj3 -grant-scope-id "p_1234567890" -grant-scope-id "children"
|
||||
|
||||
Role information:
|
||||
Created Time: Thu, 25 Jul 2024 17:21:22 MDT
|
||||
Description: List all resources
|
||||
ID: r_22sVJoKZj3
|
||||
Name: list_all_resources
|
||||
Updated Time: Thu, 25 Jul 2024 18:06:08 MDT
|
||||
Version: 6
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Authorized Actions:
|
||||
remove-principals
|
||||
set-grants
|
||||
remove-grants
|
||||
delete
|
||||
add-principals
|
||||
add-grants
|
||||
set-grant-scopes
|
||||
set-principals
|
||||
add-grant-scopes
|
||||
no-op
|
||||
read
|
||||
update
|
||||
remove-grant-scopes
|
||||
|
||||
Principals:
|
||||
ID: g_qu2V5QMGQD
|
||||
Type: group
|
||||
Scope ID: global
|
||||
|
||||
Canonical Grants:
|
||||
ids=*;type=*;actions=list,no-op
|
||||
|
||||
Grant Scope IDs:
|
||||
ID: children
|
||||
ID: p_1234567890
|
||||
ID: this
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin UI" group="ui">
|
||||
|
||||
1. Log in to Boundary.
|
||||
1. Select **Roles** in the navigation pane, and then select the role.
|
||||
1. Click on the **Scopes** tab. The `this` scope will already be applied to the grant.
|
||||
1. From the **Manage** dropdown, click **Manage Scopes**.
|
||||
1. Click **Manage custom scopes**.
|
||||
1. Select any additional scopes that you want to assign this grant, such as `p_1234567890` in Boundary's `dev` mode.
|
||||
|
||||
The settings you define for the role's children or descendants will apply to any scope you assign to this role.
|
||||
|
||||
1. Click **Apply changes to org**.
|
||||
1. Toggle the switch beside **Add all children**.
|
||||
1. Click **Save**. The selected scope IDs and `children` are listed under the **Scopes** tab.
|
||||
|
||||

|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform" group="terraform">
|
||||
|
||||
You can declare scope inheritance with the `grant_scope_ids` attribute.
|
||||
|
||||
The following example adds the assigned scope's ID with `this`, the ID of a project scope, and the direct children of the role's scope to the role. This includes projects within `org_one` in this example.
|
||||
|
||||
```hcl
|
||||
resource "boundary_role" "listonly" {
|
||||
name = "listonly"
|
||||
description = "A list only role"
|
||||
principal_ids = [boundary_user.foo.id,boundary_group.bar.id]
|
||||
grant_strings = ["ids=*;type=*;actions=no-op,list"]
|
||||
scope_id = boundary_scope.org.id
|
||||
grant_scope_ids = ["this",boundary_scope.project.id,"children"]
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## More information
|
||||
|
||||
1. Refer to [Assignable permissions](/boundary/docs/configuration/identity-access-management/assignable-permissions) for more information about the permissions you can assign to Boundary principals.
|
||||
1. Refer to [Permission grant formats](/boundary/docs/configuration/identity-access-management/permission-grant-formats) for more information about grant strings and example formats.
|
||||
1. Refer to the [Resource table](/boundary/docs/configuration/identity-access-management/resource-table) for a cheat sheet to help you manage your permissions.
|
||||
@@ -6,7 +6,7 @@ description: How to manage Boundary scopes
|
||||
|
||||
# Manage Scopes
|
||||
|
||||
[Scopes](/boundary/docs/concepts/domain-model/scopes) are a foundational part of Boundary. They allow users to partition resources and assign ownership of resources to principals. There are three types of scopes within Boundary:
|
||||
[Scopes](/boundary/docs/domain-model/scopes) are a foundational part of Boundary. They allow users to partition resources and assign ownership of resources to principals. There are three types of scopes within Boundary:
|
||||
|
||||
1. Global (`global`)
|
||||
2. Org
|
||||
@@ -18,7 +18,7 @@ These are in a hierarchy:
|
||||
- Under the `global` scope there can be many org scopes. These are used to hold IAM-related resources and project scopes.
|
||||
- Under each org scope can be many project scopes. These are used to hold infrastructure-related resources.
|
||||
|
||||
Some resources can only be associated with a specific level of scope. As an example, [Targets](/boundary/docs/concepts/domain-model/targets) can only be contained within a project scope. Other resources can be contained by multiple scopes. For example, users can be created within the `global` scope or an org-level scope. See the [domain model](/boundary/docs/concepts/domain-model) for detailed resource specific information.
|
||||
Some resources can only be associated with a specific level of scope. As an example, [Targets](/boundary/docs/domain-model/targets) can only be contained within a project scope. Other resources can be contained by multiple scopes. For example, users can be created within the `global` scope or an org-level scope. See the [domain model](/boundary/docs/domain-model) for detailed resource specific information.
|
||||
|
||||
In this example, we're going to create two scopes, an org and a project.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ description: How to manage Boundary sessions
|
||||
|
||||
# Manage Sessions
|
||||
|
||||
[Sessions](/boundary/docs/concepts/domain-model/sessions) are Boundary resources created when connecting to a [Target](/boundary/docs/concepts/domain-model/targets). 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](/boundary/docs/concepts/domain-model/hosts) from the target's [Host Sets](/boundary/docs/concepts/domain-model/host-sets) to connect to at random.
|
||||
[Sessions](/boundary/docs/domain-model/sessions) are Boundary resources created when connecting to a [Target](/boundary/docs/domain-model/targets). 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](/boundary/docs/domain-model/hosts) from the target's [Host Sets](/boundary/docs/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.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ description: How to manage Boundary targets
|
||||
|
||||
# Manage Targets
|
||||
|
||||
[Targets](/boundary/docs/concepts/domain-model/targets) are Boundary resources which contain one or more [Host Sets](/boundary/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](/boundary/docs/concepts/domain-model/hosts) in the host set to connect to at random.
|
||||
[Targets](/boundary/docs/domain-model/targets) are Boundary resources which contain one or more [Host Sets](/boundary/docs/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](/boundary/docs/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).
|
||||
|
||||
|
||||
@@ -1,320 +0,0 @@
|
||||
---
|
||||
layout: docs
|
||||
page_title: Manage Users and Groups
|
||||
description: How to manage Boundary users and groups
|
||||
---
|
||||
|
||||
# Managing Principals (Users and Groups)
|
||||
|
||||
Users and Groups in Boundary are collectively known as principals. Assigning
|
||||
[grants](/boundary/docs/concepts/security/permissions) on
|
||||
[Roles](/boundary/docs/concepts/domain-model/roles) is performed through principal IDs;
|
||||
that is, the unique IDs of either users, groups, or both.
|
||||
|
||||
This page will walk you through managing users within Boundary. (Groups will be
|
||||
added at a later time.)
|
||||
|
||||
## Users
|
||||
|
||||
Users in Boundary represent an _internal_ notion of a particular entity (human,
|
||||
machine, etc.). Users can be correlated with one or more
|
||||
[Account](/boundary/docs/concepts/domain-model/accounts) resources via [Auth
|
||||
Methods](/boundary/docs/concepts/domain-model/auth-methods). Accounts represent
|
||||
_external_ notions of a particular entity. Among other use-cases, this mechanism
|
||||
allows for an easy way to switch users to new IdPs within the organization
|
||||
deploying Boundary.
|
||||
|
||||
In this example, we're going to show you how to create an account and user for
|
||||
an auth method to allow that user to login to Boundary. Because an auth method
|
||||
can be at the org and global scopes, we're going to create an org-scoped auth
|
||||
method in the default generated org in a `dev` mode server. (If you're not
|
||||
running `dev` mode, you'll need to substitute appropriate generated IDs in the
|
||||
steps below.)
|
||||
|
||||
~> Currently, all auth methods auto-vivify users on authentication; that is, on
|
||||
successful authentication against an account, if there is no user already linked
|
||||
with that account, a user will be automatically created. This may be a nice
|
||||
time-saver, but in other situations (such as when you want Terraform to fully
|
||||
describe the Boundary resources) this may be undesirable, so the steps below
|
||||
walk you through manually making these resources and linking them. A future
|
||||
Boundary update will allow turning off auto-vivification on a per-auth-method
|
||||
basis.
|
||||
|
||||
## Create an Auth Method
|
||||
|
||||
Create a password-type auth method in the generated default org:
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
|
||||
|
||||
```bash
|
||||
$ boundary auth-methods create password -scope-id o_1234567890 -name org_auth_method -description 'Org auth method'
|
||||
|
||||
Auth Method information:
|
||||
Created Time: Tue, 29 Sep 2020 08:32:04 PDT
|
||||
Description: Org auth method
|
||||
ID: ampw_PbE6nNT72a
|
||||
Name: org_auth_method
|
||||
Type: password
|
||||
Updated Time: Tue, 29 Sep 2020 08:32:04 PDT
|
||||
Version: 1
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Attributes:
|
||||
Minimum Login Name Length: 3
|
||||
Minimum Password Length: 8
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin Console">
|
||||
|
||||
|
||||
1. Navigate to an org, then to auth methods.
|
||||
1. Choose the **New** button.
|
||||
1. Fill in the auth method details.
|
||||
1. Choose **Save** and view the auth method edit form page.
|
||||
|
||||
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
|
||||
<source
|
||||
type="video/mp4"
|
||||
src="https://www.datocms-assets.com/2885/1602261000-boundary-clickthrough-manage-identities-create-auth-method.mp4"
|
||||
/>
|
||||
</video>
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform">
|
||||
|
||||
|
||||
```hcl
|
||||
resource "boundary_auth_method" "password" {
|
||||
name = "org_auth_method"
|
||||
description = "Password auth method for org"
|
||||
type = "password"
|
||||
scope_id = "o_1234567890"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Create Account
|
||||
|
||||
Create an account for the org-scoped auth method. Note that by default, user
|
||||
names must be all lowercase alphanumeric of at least 3 characters and the
|
||||
password must be 8 or more characters. (The minimum lengths can be changed in
|
||||
the attributes for the auth method, if desired.)
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
|
||||
|
||||
```bash
|
||||
boundary accounts create password -auth-method-id ampw_PbE6nNT72a -login-name 'myuser' -name my_account -description 'My password account'
|
||||
|
||||
Account information:
|
||||
Auth Method ID: ampw_PbE6nNT72a
|
||||
Created Time: Tue, 29 Sep 2020 08:35:02 PDT
|
||||
Description: My password account
|
||||
ID: acctpw_BOn3EcqQfe
|
||||
Name: my_account
|
||||
Type: password
|
||||
Updated Time: Tue, 29 Sep 2020 08:35:02 PDT
|
||||
Version: 1
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Attributes:
|
||||
Login Name: myuser
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin Console">
|
||||
|
||||
|
||||
1. Navigate to orgs > auth methods > auth method, then to the **Accounts** tab.
|
||||
1. Choose the **New** button.
|
||||
1. Fill the account details.
|
||||
1. Choose **Save** and view the account edit form page.
|
||||
|
||||
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
|
||||
<source
|
||||
type="video/mp4"
|
||||
src="https://www.datocms-assets.com/2885/1602260998-boundary-clickthrough-manage-identities-create-account.mp4"
|
||||
/>
|
||||
</video>
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform">
|
||||
|
||||
|
||||
```hcl
|
||||
resource "boundary_account" "my_user" {
|
||||
name = "myuser"
|
||||
description = "Login account for my user"
|
||||
type = "password"
|
||||
login_name = "myuser"
|
||||
password = "supersecure"
|
||||
auth_method_id = "ampw_PbE6nNT72a"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Create a User
|
||||
|
||||
Next, create a user at the org scope.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
|
||||
|
||||
First, create the user resource:
|
||||
|
||||
```bash
|
||||
$ boundary users create -name "myuser" -description "My user resource" -scope-id o_1234567890
|
||||
|
||||
User information:
|
||||
Created Time: Tue, 29 Sep 2020 06:37:12 PDT
|
||||
Description: My user resource
|
||||
ID: u_yXhZpt5PX3
|
||||
Name: myuser
|
||||
Updated Time: Tue, 29 Sep 2020 06:37:12 PDT
|
||||
Version: 1
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
```
|
||||
|
||||
Then associate the user with the account previously created:
|
||||
|
||||
```bash
|
||||
$ boundary users set-accounts -id u_yXhZpt5PX3 -account acctpw_BOn3EcqQfe
|
||||
|
||||
User information:
|
||||
Created Time: Tue, 29 Sep 2020 08:43:43 PDT
|
||||
Description: My org user
|
||||
ID: u_yXhZpt5PX3
|
||||
Name: my_user
|
||||
Updated Time: Tue, 29 Sep 2020 08:54:11 PDT
|
||||
Version: 2
|
||||
|
||||
Scope:
|
||||
ID: o_1234567890
|
||||
Name: Generated org scope
|
||||
Parent Scope ID: global
|
||||
Type: org
|
||||
|
||||
Accounts:
|
||||
ID: acctpw_BOn3EcqQfe
|
||||
Scope ID: o_1234567890
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin Console">
|
||||
|
||||
|
||||
1. Navigate to an org, then to users.
|
||||
1. Choose the **New** button.
|
||||
1. Fill the user details.
|
||||
1. Choose **Save** and view the user edit form page.
|
||||
|
||||
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
|
||||
<source
|
||||
type="video/mp4"
|
||||
src="https://www.datocms-assets.com/2885/1602261002-boundary-clickthrough-manage-identities-create-user.mp4"
|
||||
/>
|
||||
</video>
|
||||
|
||||
Then associate the user with an account:
|
||||
|
||||
1. From the user edit form, navigate to the **Accounts** tab.
|
||||
1. Choose **Add Accounts** from the **Manage** dropdown.
|
||||
1. Select one or more accounts to associate with the user.
|
||||
1. Choose the **Add Accounts** button and view the user accounts list.
|
||||
|
||||
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
|
||||
<source
|
||||
type="video/mp4"
|
||||
src="https://www.datocms-assets.com/2885/1602260997-boundary-clickthrough-manage-identities-assign-account-to-user.mp4"
|
||||
/>
|
||||
</video>
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform">
|
||||
|
||||
|
||||
```hcl
|
||||
resource "boundary_user" "myuser" {
|
||||
name = "myuser"
|
||||
description = "My user resource"
|
||||
|
||||
# taken from the example account resource defined above
|
||||
account_ids = [ boundary_account.myuser.id ]
|
||||
scope_id = "o_1234567890"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Login
|
||||
|
||||
Now you can test logging in.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI">
|
||||
|
||||
|
||||
```bash
|
||||
$ boundary authenticate password -auth-method-id ampw_PbE6nNT72a
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Admin Console">
|
||||
|
||||
|
||||
1. Navigate to the authenticate page.
|
||||
1. Choose an org scope with which to authenticate.
|
||||
1. Fill the credentials.
|
||||
1. Choose **Authenticate** and view the projects overview for the org.
|
||||
|
||||
<video muted playsInline autoPlay loop class="boundary-clickthrough-video">
|
||||
<source
|
||||
type="video/mp4"
|
||||
src="https://www.datocms-assets.com/2885/1602261004-boundary-clickthrough-manage-identities-login.mp4"
|
||||
/>
|
||||
</video>
|
||||
|
||||
</Tab>
|
||||
<Tab heading="Terraform">
|
||||
|
||||
|
||||
```hcl
|
||||
provider "boundary" {
|
||||
addr = "http://127.0.0.1:9200"
|
||||
auth_method_id = "ampw_PbE6nNT72a"
|
||||
password_auth_method_login_name = "myuser"
|
||||
password_auth_method_password = "supersecure"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
Reference in new issue
Block a user