bt-cli 0.4.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bt_cli/__init__.py +3 -0
- bt_cli/cli.py +830 -0
- bt_cli/commands/__init__.py +1 -0
- bt_cli/commands/configure.py +415 -0
- bt_cli/commands/learn.py +229 -0
- bt_cli/commands/quick.py +784 -0
- bt_cli/core/__init__.py +1 -0
- bt_cli/core/auth.py +213 -0
- bt_cli/core/client.py +313 -0
- bt_cli/core/config.py +393 -0
- bt_cli/core/config_file.py +420 -0
- bt_cli/core/csv_utils.py +91 -0
- bt_cli/core/errors.py +247 -0
- bt_cli/core/output.py +205 -0
- bt_cli/core/prompts.py +87 -0
- bt_cli/core/rest_debug.py +221 -0
- bt_cli/data/CLAUDE.md +94 -0
- bt_cli/data/__init__.py +0 -0
- bt_cli/data/skills/bt/SKILL.md +108 -0
- bt_cli/data/skills/entitle/SKILL.md +170 -0
- bt_cli/data/skills/epmw/SKILL.md +144 -0
- bt_cli/data/skills/pra/SKILL.md +150 -0
- bt_cli/data/skills/pws/SKILL.md +198 -0
- bt_cli/entitle/__init__.py +1 -0
- bt_cli/entitle/client/__init__.py +5 -0
- bt_cli/entitle/client/base.py +443 -0
- bt_cli/entitle/commands/__init__.py +24 -0
- bt_cli/entitle/commands/accounts.py +53 -0
- bt_cli/entitle/commands/applications.py +39 -0
- bt_cli/entitle/commands/auth.py +68 -0
- bt_cli/entitle/commands/bundles.py +218 -0
- bt_cli/entitle/commands/integrations.py +60 -0
- bt_cli/entitle/commands/permissions.py +70 -0
- bt_cli/entitle/commands/policies.py +97 -0
- bt_cli/entitle/commands/resources.py +131 -0
- bt_cli/entitle/commands/roles.py +74 -0
- bt_cli/entitle/commands/users.py +123 -0
- bt_cli/entitle/commands/workflows.py +187 -0
- bt_cli/entitle/models/__init__.py +31 -0
- bt_cli/entitle/models/bundle.py +28 -0
- bt_cli/entitle/models/common.py +37 -0
- bt_cli/entitle/models/integration.py +30 -0
- bt_cli/entitle/models/permission.py +27 -0
- bt_cli/entitle/models/policy.py +25 -0
- bt_cli/entitle/models/resource.py +29 -0
- bt_cli/entitle/models/role.py +28 -0
- bt_cli/entitle/models/user.py +24 -0
- bt_cli/entitle/models/workflow.py +55 -0
- bt_cli/epmw/__init__.py +1 -0
- bt_cli/epmw/client/__init__.py +5 -0
- bt_cli/epmw/client/base.py +848 -0
- bt_cli/epmw/commands/__init__.py +33 -0
- bt_cli/epmw/commands/audits.py +250 -0
- bt_cli/epmw/commands/auth.py +55 -0
- bt_cli/epmw/commands/computers.py +140 -0
- bt_cli/epmw/commands/events.py +233 -0
- bt_cli/epmw/commands/groups.py +215 -0
- bt_cli/epmw/commands/policies.py +673 -0
- bt_cli/epmw/commands/quick.py +348 -0
- bt_cli/epmw/commands/requests.py +224 -0
- bt_cli/epmw/commands/roles.py +78 -0
- bt_cli/epmw/commands/tasks.py +38 -0
- bt_cli/epmw/commands/users.py +219 -0
- bt_cli/epmw/models/__init__.py +1 -0
- bt_cli/pra/__init__.py +1 -0
- bt_cli/pra/client/__init__.py +5 -0
- bt_cli/pra/client/base.py +618 -0
- bt_cli/pra/commands/__init__.py +30 -0
- bt_cli/pra/commands/auth.py +55 -0
- bt_cli/pra/commands/import_export.py +442 -0
- bt_cli/pra/commands/jump_clients.py +139 -0
- bt_cli/pra/commands/jump_groups.py +146 -0
- bt_cli/pra/commands/jump_items.py +638 -0
- bt_cli/pra/commands/jumpoints.py +95 -0
- bt_cli/pra/commands/policies.py +197 -0
- bt_cli/pra/commands/quick.py +470 -0
- bt_cli/pra/commands/teams.py +81 -0
- bt_cli/pra/commands/users.py +87 -0
- bt_cli/pra/commands/vault.py +564 -0
- bt_cli/pra/models/__init__.py +27 -0
- bt_cli/pra/models/common.py +12 -0
- bt_cli/pra/models/jump_client.py +25 -0
- bt_cli/pra/models/jump_group.py +15 -0
- bt_cli/pra/models/jump_item.py +72 -0
- bt_cli/pra/models/jumpoint.py +19 -0
- bt_cli/pra/models/team.py +14 -0
- bt_cli/pra/models/user.py +17 -0
- bt_cli/pra/models/vault.py +45 -0
- bt_cli/pws/__init__.py +1 -0
- bt_cli/pws/client/__init__.py +5 -0
- bt_cli/pws/client/base.py +356 -0
- bt_cli/pws/client/beyondinsight.py +869 -0
- bt_cli/pws/client/passwordsafe.py +1786 -0
- bt_cli/pws/commands/__init__.py +33 -0
- bt_cli/pws/commands/accounts.py +372 -0
- bt_cli/pws/commands/assets.py +311 -0
- bt_cli/pws/commands/auth.py +166 -0
- bt_cli/pws/commands/clouds.py +221 -0
- bt_cli/pws/commands/config.py +344 -0
- bt_cli/pws/commands/credentials.py +347 -0
- bt_cli/pws/commands/databases.py +306 -0
- bt_cli/pws/commands/directories.py +199 -0
- bt_cli/pws/commands/functional.py +298 -0
- bt_cli/pws/commands/import_export.py +452 -0
- bt_cli/pws/commands/platforms.py +118 -0
- bt_cli/pws/commands/quick.py +1646 -0
- bt_cli/pws/commands/search.py +256 -0
- bt_cli/pws/commands/secrets.py +1343 -0
- bt_cli/pws/commands/systems.py +389 -0
- bt_cli/pws/commands/users.py +415 -0
- bt_cli/pws/commands/workgroups.py +166 -0
- bt_cli/pws/config.py +18 -0
- bt_cli/pws/models/__init__.py +19 -0
- bt_cli/pws/models/account.py +186 -0
- bt_cli/pws/models/asset.py +102 -0
- bt_cli/pws/models/common.py +132 -0
- bt_cli/pws/models/system.py +121 -0
- bt_cli-0.4.13.dist-info/METADATA +417 -0
- bt_cli-0.4.13.dist-info/RECORD +121 -0
- bt_cli-0.4.13.dist-info/WHEEL +4 -0
- bt_cli-0.4.13.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: epmw
|
|
3
|
+
description: EPM Windows commands for endpoint privilege management. Use when working with Windows computers, policies, admin access requests, or audit logs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# EPM Windows Commands (`bt epmw`)
|
|
7
|
+
|
|
8
|
+
## IMPORTANT: Destructive Operations
|
|
9
|
+
|
|
10
|
+
**ALWAYS confirm with the user before:**
|
|
11
|
+
- `bt epmw computers archive` - Archives computer from management
|
|
12
|
+
- `bt epmw groups delete` - Deletes computer group
|
|
13
|
+
- `bt epmw policies delete` - Deletes policy
|
|
14
|
+
- `bt epmw quick stale --delete` - Deletes stale computers
|
|
15
|
+
|
|
16
|
+
List affected resources first, then ask for explicit confirmation.
|
|
17
|
+
|
|
18
|
+
## Quick Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Find stale computers (not checked in recently)
|
|
22
|
+
bt epmw quick stale # 24+ hours
|
|
23
|
+
bt epmw quick stale --hours 48 # 48+ hours
|
|
24
|
+
bt epmw quick stale -h 12 -g "Workstations"
|
|
25
|
+
|
|
26
|
+
# Delete stale computers
|
|
27
|
+
bt epmw quick stale --delete # With confirmation
|
|
28
|
+
bt epmw quick stale --delete --force # Skip confirmation
|
|
29
|
+
|
|
30
|
+
# Find disconnected computers
|
|
31
|
+
bt epmw quick disconnected
|
|
32
|
+
bt epmw quick disconnected -g "Servers"
|
|
33
|
+
|
|
34
|
+
# Status summary by group
|
|
35
|
+
bt epmw quick status
|
|
36
|
+
bt epmw quick status -g "Datacenter"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Computers
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bt epmw computers list
|
|
43
|
+
bt epmw computers list -o json
|
|
44
|
+
bt epmw computers get <computer_id>
|
|
45
|
+
bt epmw computers delete <computer_id>
|
|
46
|
+
bt epmw computers archive <computer_id>
|
|
47
|
+
bt epmw computers unarchive <computer_id>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Groups
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bt epmw groups list
|
|
54
|
+
bt epmw groups get <group_id>
|
|
55
|
+
bt epmw groups create --name "NewGroup" --description "Description"
|
|
56
|
+
bt epmw groups update <group_id> --name "UpdatedName"
|
|
57
|
+
bt epmw groups delete <group_id>
|
|
58
|
+
bt epmw groups assign-policy <group_id> --policy <policy_id>
|
|
59
|
+
bt epmw groups assign-computers <group_id> --computers <id1>,<id2>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Policies
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bt epmw policies list
|
|
66
|
+
bt epmw policies get <policy_id>
|
|
67
|
+
bt epmw policies groups <policy_id> # Show assigned groups
|
|
68
|
+
|
|
69
|
+
# Download policy XML (for template)
|
|
70
|
+
bt epmw policies download <policy_id> > template.xml
|
|
71
|
+
|
|
72
|
+
# Create policy from XML
|
|
73
|
+
bt epmw policies create -n "My Policy" -f template.xml
|
|
74
|
+
|
|
75
|
+
# Policy revisions
|
|
76
|
+
bt epmw policies revisions list <policy_id>
|
|
77
|
+
bt epmw policies revisions get <policy_id> <revision_id>
|
|
78
|
+
bt epmw policies revisions upload <policy_id> -f policy.xml
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Admin Access Requests
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
bt epmw requests list
|
|
85
|
+
bt epmw requests get <request_id>
|
|
86
|
+
bt epmw requests create --computer <id> --duration 30 --reason "Maintenance"
|
|
87
|
+
bt epmw requests approve <request_id>
|
|
88
|
+
bt epmw requests deny <request_id> --reason "Not authorized"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Users & Roles
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
bt epmw users list
|
|
95
|
+
bt epmw users get <user_id>
|
|
96
|
+
bt epmw users create --username "newuser" --email "user@example.com"
|
|
97
|
+
bt epmw users enable <user_id>
|
|
98
|
+
bt epmw users disable <user_id>
|
|
99
|
+
bt epmw users assign-roles <user_id> --roles <role1>,<role2>
|
|
100
|
+
|
|
101
|
+
bt epmw roles list
|
|
102
|
+
bt epmw roles get <role_id>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Audits
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Activity audits
|
|
109
|
+
bt epmw audits activity list
|
|
110
|
+
bt epmw audits activity get <audit_id>
|
|
111
|
+
|
|
112
|
+
# Authorization requests
|
|
113
|
+
bt epmw audits authorization list
|
|
114
|
+
bt epmw audits authorization get <audit_id>
|
|
115
|
+
|
|
116
|
+
# Request audits
|
|
117
|
+
bt epmw audits requests list
|
|
118
|
+
bt epmw audits requests get <audit_id>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Discover IDs
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Find group IDs
|
|
125
|
+
bt epmw groups list
|
|
126
|
+
|
|
127
|
+
# Find computer IDs
|
|
128
|
+
bt epmw computers list
|
|
129
|
+
|
|
130
|
+
# Find policy IDs
|
|
131
|
+
bt epmw policies list
|
|
132
|
+
|
|
133
|
+
# Find user IDs
|
|
134
|
+
bt epmw users list
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## API Notes
|
|
138
|
+
|
|
139
|
+
- Base path: `/management-api/v3`
|
|
140
|
+
- Token endpoint: `/oauth/token`
|
|
141
|
+
- Pagination: `pageNumber`/`pageSize`
|
|
142
|
+
- Response: `{"data": [...], "totalCount": N}`
|
|
143
|
+
- All IDs are UUIDs
|
|
144
|
+
- Delete returns 405 - use archive instead
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pra
|
|
3
|
+
description: Privileged Remote Access commands for jump items, vault accounts, and remote sessions. Use when working with PRA shell jumps, RDP, protocol tunnels, or SSH CA authentication.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PRA Commands (`bt pra`)
|
|
7
|
+
|
|
8
|
+
## IMPORTANT: Destructive Operations
|
|
9
|
+
|
|
10
|
+
**ALWAYS confirm with the user before:**
|
|
11
|
+
- `bt pra jump-items shell delete` - Deletes shell jump item
|
|
12
|
+
- `bt pra jump-items rdp delete` - Deletes RDP jump item
|
|
13
|
+
- `bt pra jump-items tunnel delete` - Deletes protocol tunnel
|
|
14
|
+
- `bt pra jump-groups delete` - Deletes jump group
|
|
15
|
+
- `bt pra vault accounts delete` - Deletes vault account
|
|
16
|
+
|
|
17
|
+
List affected resources first, then ask for explicit confirmation.
|
|
18
|
+
|
|
19
|
+
## Quick Commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Vault credential checkout
|
|
23
|
+
bt pra quick vault # Interactive - shows accounts, prompts
|
|
24
|
+
bt pra quick vault -n "server-admin"
|
|
25
|
+
bt pra quick vault -n postgres --raw
|
|
26
|
+
|
|
27
|
+
# Search jump items and vault
|
|
28
|
+
bt pra quick search axion
|
|
29
|
+
bt pra quick search admin -o json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Jump Items
|
|
33
|
+
|
|
34
|
+
### Shell Jump (SSH/Telnet)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
bt pra jump-items shell list
|
|
38
|
+
bt pra jump-items shell get <jump_item_id>
|
|
39
|
+
bt pra jump-items shell create \
|
|
40
|
+
--name "web-server-01" \
|
|
41
|
+
--hostname "10.0.1.50" \
|
|
42
|
+
--jumpoint <jumpoint_id> \
|
|
43
|
+
--jump-group <jump_group_id> \
|
|
44
|
+
--protocol ssh \
|
|
45
|
+
--port 22 \
|
|
46
|
+
--username "admin"
|
|
47
|
+
bt pra jump-items shell delete <jump_item_id>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### RDP Jump
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bt pra jump-items rdp list
|
|
54
|
+
bt pra jump-items rdp get <jump_item_id>
|
|
55
|
+
bt pra jump-items rdp create \
|
|
56
|
+
--name "win-server-01" \
|
|
57
|
+
--hostname "10.0.2.10" \
|
|
58
|
+
--jumpoint <jumpoint_id> \
|
|
59
|
+
--jump-group <jump_group_id> \
|
|
60
|
+
--port 3389
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Protocol Tunnels (TCP/MSSQL/K8s)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
bt pra jump-items tunnel list
|
|
67
|
+
bt pra jump-items tunnel create \
|
|
68
|
+
--name "production-k8s" \
|
|
69
|
+
--hostname "k8s-api.example.com" \
|
|
70
|
+
--jumpoint <jumpoint_id> \
|
|
71
|
+
--jump-group <jump_group_id> \
|
|
72
|
+
--type k8s \
|
|
73
|
+
--url "https://k8s-api.example.com:6443" \
|
|
74
|
+
--ca-cert "$(cat /path/to/ca.crt)"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Jump Groups
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
bt pra jump-groups list
|
|
81
|
+
bt pra jump-groups get <group_id>
|
|
82
|
+
bt pra jump-groups create \
|
|
83
|
+
--name "Customer-05" \
|
|
84
|
+
--code-name customer05 \
|
|
85
|
+
--comments "New customer environment"
|
|
86
|
+
bt pra jump-groups delete <group_id>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Vault Accounts
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
bt pra vault accounts list
|
|
93
|
+
bt pra vault accounts get <account_id>
|
|
94
|
+
bt pra vault accounts checkout <account_id>
|
|
95
|
+
bt pra vault accounts checkin <account_id>
|
|
96
|
+
bt pra vault accounts rotate <account_id>
|
|
97
|
+
|
|
98
|
+
# SSH CA - get public key for provisioning
|
|
99
|
+
bt pra vault accounts get-public-key <ssh_ca_account_id>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## SSH CA Authentication
|
|
103
|
+
|
|
104
|
+
PRA supports SSH CA for ephemeral access - no static keys on hosts.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Find SSH CA vault accounts
|
|
108
|
+
bt pra vault accounts list | grep -i ssh
|
|
109
|
+
|
|
110
|
+
# Get CA public key (ready for authorized_keys)
|
|
111
|
+
bt pra vault accounts get-public-key <ssh_ca_account_id>
|
|
112
|
+
# Output: cert-authority ssh-rsa AAAAB3NzaC1yc2E...
|
|
113
|
+
|
|
114
|
+
# Provision EC2 with SSH CA
|
|
115
|
+
PRA_CA_KEY=$(bt pra vault accounts get-public-key <ssh_ca_account_id>)
|
|
116
|
+
# Embed in user-data script for EC2
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## CSV Import/Export
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
bt pra export jump-items --file jump-items-template.csv
|
|
123
|
+
bt pra export vault-accounts --file vault-accounts-template.csv
|
|
124
|
+
bt pra import jump-items --file jump-items.csv --dry-run
|
|
125
|
+
bt pra import jump-items --file jump-items.csv
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Discover IDs
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Find jumpoint IDs
|
|
132
|
+
bt pra jumpoint list
|
|
133
|
+
|
|
134
|
+
# Find jump group IDs
|
|
135
|
+
bt pra jump-groups list
|
|
136
|
+
|
|
137
|
+
# Find vault account IDs
|
|
138
|
+
bt pra vault accounts list
|
|
139
|
+
|
|
140
|
+
# Find vault account group IDs
|
|
141
|
+
bt pra vault groups list
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## API Notes
|
|
145
|
+
|
|
146
|
+
- Base path: `/api/config/v1`
|
|
147
|
+
- Pagination: `per_page`/`current_page` (1-indexed)
|
|
148
|
+
- Response: Array directly (pagination in headers)
|
|
149
|
+
- Jump item types have separate endpoints
|
|
150
|
+
- K8s tunnels require Linux jumpoint
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pws
|
|
3
|
+
description: Password Safe commands for credentials, systems, accounts, secrets, and user management. Use when working with PWS checkouts, managed systems, Secrets Safe, or credential rotation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Password Safe Commands (`bt pws`)
|
|
7
|
+
|
|
8
|
+
## IMPORTANT: Destructive Operations
|
|
9
|
+
|
|
10
|
+
**ALWAYS confirm with the user before:**
|
|
11
|
+
- `bt pws systems delete` - Deletes managed system
|
|
12
|
+
- `bt pws accounts delete` - Deletes managed account
|
|
13
|
+
- `bt pws secrets safes delete` - Deletes entire safe
|
|
14
|
+
- `bt pws secrets folders delete` - Deletes folder and contents
|
|
15
|
+
- `bt pws quick offboard` - Removes system + accounts + asset
|
|
16
|
+
|
|
17
|
+
List affected resources first, then ask for explicit confirmation.
|
|
18
|
+
|
|
19
|
+
## Quick Commands (Most Common)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Checkout credentials
|
|
23
|
+
bt pws quick checkout -s "axion-finapp-01" -a "root"
|
|
24
|
+
bt pws quick checkout -s axion -a root --duration 30 --reason "Maintenance"
|
|
25
|
+
PASSWORD=$(bt pws quick checkout -s server -a admin --raw)
|
|
26
|
+
|
|
27
|
+
# Check in
|
|
28
|
+
bt pws quick checkin 17
|
|
29
|
+
bt pws quick checkin 17 --rotate
|
|
30
|
+
|
|
31
|
+
# Quick password lookup with auto-checkin
|
|
32
|
+
bt pws quick password -s "axion-finapp-01" -a "root"
|
|
33
|
+
|
|
34
|
+
# Search systems and accounts
|
|
35
|
+
bt pws quick search axion
|
|
36
|
+
bt pws quick search root -o json
|
|
37
|
+
|
|
38
|
+
# Rotate password
|
|
39
|
+
bt pws quick rotate -s "axion-finapp-01" -a "root"
|
|
40
|
+
|
|
41
|
+
# Onboard system (asset + system + account)
|
|
42
|
+
# First find your workgroup and functional account IDs (see "Discover IDs" below)
|
|
43
|
+
bt pws quick onboard -n "my-server" -i "10.0.1.50" -w <workgroup_id>
|
|
44
|
+
bt pws quick onboard -n "web-01" -i "10.0.1.100" -w <workgroup_id> -f <func_acct_id> -e "sudo"
|
|
45
|
+
|
|
46
|
+
# Offboard system
|
|
47
|
+
bt pws quick offboard -s "my-server"
|
|
48
|
+
bt pws quick offboard -s "web-01" --force
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Systems & Accounts
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# List systems
|
|
55
|
+
bt pws systems list
|
|
56
|
+
bt pws systems list --workgroup <workgroup_id>
|
|
57
|
+
bt pws systems list -o json
|
|
58
|
+
|
|
59
|
+
# Get system details
|
|
60
|
+
bt pws systems get <system_id>
|
|
61
|
+
|
|
62
|
+
# List accounts on a system
|
|
63
|
+
bt pws accounts list --system <system_id>
|
|
64
|
+
bt pws accounts get <account_id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Secrets Safe
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Safes
|
|
71
|
+
bt pws secrets safes list
|
|
72
|
+
bt pws secrets safes create --name "MyApp" --description "App credentials"
|
|
73
|
+
bt pws secrets safes delete <safe_id>
|
|
74
|
+
|
|
75
|
+
# Folders
|
|
76
|
+
bt pws secrets folders list
|
|
77
|
+
bt pws secrets folders create --name "Database" --parent <safe_id>
|
|
78
|
+
bt pws secrets folders delete <folder_id>
|
|
79
|
+
|
|
80
|
+
# Secrets
|
|
81
|
+
bt pws secrets secrets list
|
|
82
|
+
bt pws secrets secrets get <secret_id>
|
|
83
|
+
bt pws secrets secrets create --folder <folder_id> --title "db-admin" \
|
|
84
|
+
--username "admin" --password "secret123"
|
|
85
|
+
|
|
86
|
+
# Search secrets
|
|
87
|
+
bt pws quick find-secret database
|
|
88
|
+
bt pws quick get-secret "MySafe/Folder/SecretName"
|
|
89
|
+
PASSWORD=$(bt pws quick get-secret "MySafe/Secret" --raw)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Storing SSH Private Keys
|
|
93
|
+
|
|
94
|
+
Use **TEXT type** for SSH keys - simpler retrieval for automation:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Store SSH key as TEXT (recommended for automation)
|
|
98
|
+
bt pws secrets secrets create-text --folder <folder_id> --title "svc-deploy SSH Key" \
|
|
99
|
+
--file /path/to/id_rsa --description "Deployment service account key"
|
|
100
|
+
|
|
101
|
+
# Retrieve SSH key (one API call)
|
|
102
|
+
bt pws secrets secrets get <secret_id> --show-password
|
|
103
|
+
|
|
104
|
+
# Alternative: FILE type (preserves filename metadata)
|
|
105
|
+
bt pws secrets secrets create-file --folder <folder_id> --title "svc-deploy Key" \
|
|
106
|
+
--file /path/to/id_rsa
|
|
107
|
+
|
|
108
|
+
# Download FILE type secret
|
|
109
|
+
bt pws secrets secrets download <secret_id> -o /tmp/key
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Note:** TEXT type stores content in Password field (retrieved with `-p`). FILE type requires separate download command.
|
|
113
|
+
|
|
114
|
+
## Users & Groups
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
bt pws users list
|
|
118
|
+
bt pws users list -s "admin" # Search
|
|
119
|
+
bt pws users get 4
|
|
120
|
+
bt pws users groups
|
|
121
|
+
bt pws users group 1 --members
|
|
122
|
+
bt pws users roles
|
|
123
|
+
|
|
124
|
+
# User entitlements report
|
|
125
|
+
bt pws quick user-entitlements dave
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Credential Checkout Flow (Manual)
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# 1. Find system
|
|
132
|
+
bt pws systems list -o json | jq '.[] | select(.SystemName=="my-server")'
|
|
133
|
+
|
|
134
|
+
# 2. Find account
|
|
135
|
+
bt pws accounts list --system <system_id>
|
|
136
|
+
|
|
137
|
+
# 3. Checkout
|
|
138
|
+
bt pws credentials checkout --system "my-server" --account "root"
|
|
139
|
+
|
|
140
|
+
# 4. Get password
|
|
141
|
+
bt pws credentials show <request_id>
|
|
142
|
+
|
|
143
|
+
# 5. Checkin
|
|
144
|
+
bt pws credentials checkin <request_id>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## CSV Import/Export
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Export template
|
|
151
|
+
bt pws export systems --file systems-template.csv
|
|
152
|
+
bt pws export secrets --file secrets-template.csv
|
|
153
|
+
|
|
154
|
+
# Dry run validation
|
|
155
|
+
bt pws import systems --file systems.csv --dry-run
|
|
156
|
+
|
|
157
|
+
# Import
|
|
158
|
+
bt pws import systems --file systems.csv
|
|
159
|
+
bt pws import secrets --file secrets.csv
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Discover IDs
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Find workgroup IDs
|
|
166
|
+
bt pws workgroups list
|
|
167
|
+
|
|
168
|
+
# Find platform IDs
|
|
169
|
+
bt pws platforms list
|
|
170
|
+
|
|
171
|
+
# Find functional account IDs (for auto-management)
|
|
172
|
+
bt pws functional list
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## EC2 Systems in AWS
|
|
176
|
+
|
|
177
|
+
When onboarding EC2 instances to Password Safe, use the **internal AWS DNS name** (not public IP) for reliable connectivity:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Use internal DNS for EC2 systems
|
|
181
|
+
bt pws quick onboard -n "web-prod-01" \
|
|
182
|
+
-i "ip-10-0-12-45.us-east-1.compute.internal" \
|
|
183
|
+
-w <workgroup_id> -f <func_acct_id>
|
|
184
|
+
|
|
185
|
+
# Or set DNS separately
|
|
186
|
+
bt pws systems update <system_id> --dns "ip-10-0-12-45.us-east-1.compute.internal"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Why internal DNS?**
|
|
190
|
+
- Public IPs change on instance restart
|
|
191
|
+
- Internal DNS resolves correctly from VPC-connected jumpoints
|
|
192
|
+
- Enables ECM integration (PWS system name must match PRA jump item)
|
|
193
|
+
|
|
194
|
+
## API Notes
|
|
195
|
+
|
|
196
|
+
- Pagination: `limit`/`offset` (not page/perPage)
|
|
197
|
+
- Response format: `{"TotalCount": N, "Data": [...]}`
|
|
198
|
+
- Asset creation requires workgroup: `POST /Workgroups/{id}/Assets`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Entitle product module."""
|