Skip to content

Commit ba3f050

Browse files
author
Corentin Mors
authored
Add first draft for all commands (#107)
Adding some info around the different available commands.
1 parent 0776c20 commit ba3f050

File tree

9 files changed

+84
-8
lines changed

9 files changed

+84
-8
lines changed

documentation/pages/_meta.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"index": "Introduction",
33
"personal": "Personal",
4-
"business": "Business"
4+
"business": "Business",
5+
"reset": "Reset local data"
56
}
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"index": "Get Started",
33
"audit-logs": "Audit Logs",
4-
"members": "Members"
4+
"members": "Members",
5+
"reports": "Reports"
56
}
+27-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
# Audit logs
22

3-
_coming soon_
3+
## Fetching the logs
4+
5+
You can query the audit logs using the `logs` command. For example:
6+
7+
```sh
8+
dcli t logs
9+
```
10+
11+
The logs are output in JSON format, each line is a new log entry.
12+
13+
```json
14+
{"uuid": "e2d9ce5b-[..redacted..]-b6de479b3483", "team_id": 1315574321, "category": "authentication", "log_type": "user_device_added", "date_time": 1688629046919, "properties": {"device_name": "Dashlane CLI", "author_login": "admin@something.io", "device_platform": "server_standalone"}, "author_user_id": 28080685, "schema_version": "1.0.0"}
15+
{"uuid": "d2f5db34-[..redacted..]-1dfcc3bdf911", "team_id": 1315574321, "category": "authentication", "log_type": "user_device_added", "date_time": 1688628172021, "properties": {"device_name": "Chrome - Mac OS", "author_login": "admin@something.io", "device_platform": "server_standalone"}, "author_user_id": 28080685, "schema_version": "1.0.0"}
16+
{"uuid": "4ca3bb56-[..redacted..]-66cbb387cb54", "team_id": 1315574321, "category": "authentication", "log_type": "user_device_added", "date_time": 1683303544898, "properties": {"device_name": "Firefox - Ubuntu", "author_login": "user@something.io", "device_platform": "server_standalone"}, "author_user_id": 28086620, "schema_version": "1.0.0"}
17+
{"uuid": "68e70f62-[..redacted..]-1bb9830f9f18", "team_id": 1315574321, "category": "team_settings_sso", "log_type": "sso_service_provider_url_set", "date_time": 1671629557924, "properties": {"author_login": "admin@something.io", "service_provider_url": "https://sso.nitro.dashlane.com"}, "author_user_id": 28080685, "schema_version": "1.0.0"}
18+
```
19+
20+
## Filtering the logs
21+
22+
With the following options you can filter the logs by start and end date, log type and category.
23+
24+
```sh
25+
--start <start> start timestamp (default: "0")
26+
--end <end> end timestamp (default: "now")
27+
--type <type> log type
28+
--category <category> log category
29+
```
+11-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
# Business Commands
1+
# Get started with Business Commands
22

33
Commands related to business use a different authentication than your personal vault.
44

5-
Commands are calling a server API to perform actions an retrieve data. The first step is to generate a set of credentials.
5+
Commands are calling a server API to perform actions and retrieve data. The first step is to login with the personal account ([follow this guide](/personal/authentication)) of a team admin and to generate a set of credentials.
66

77
## Generate credentials
88

99
```sh
1010
dcli t generate-credentials
1111
```
1212

13+
You will be prompted with a list of variables to export in your environment.
14+
15+
```sh
16+
export DASHLANE_TEAM_UUID=08a48d4f-[..redacted..]-fba9193d968c
17+
export DASHLANE_TEAM_ACCESS_KEY=f56[..redacted..]56ce
18+
export DASHLANE_TEAM_SECRET_KEY=839c9[..redacted..]3ada5
19+
```
20+
1321
## Revoke credentials
1422

1523
```sh
16-
dcli t revoke-credentials
24+
dcli t revoke-credentials <DASHLANE_TEAM_ACCESS_KEY>
1725
```
+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
# Listing members
22

3-
_coming soon_
3+
Listing team members allows you to access many information about them, such as their email, their role, their 2FA status, their security score, etc.
4+
5+
```sh
6+
dcli t members
7+
```
8+
9+
You can even pipe the output to `jq` to filter the results:
10+
11+
```sh
12+
dcli t members | jq '.members[] | select(.isTeamCaptain == true)'
13+
```
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Reports
2+
3+
You can get reports on your team about the number of seats provisioned, used and pending. You can also get reports on the aggregated password health history of your team.
4+
5+
The following commands take in input the number of days to look back for the password health history. The default is 0 day.
6+
7+
```sh
8+
dcli t report 30
9+
```

documentation/pages/personal/authentication.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { Callout } from 'nextra/components';
22

33
# Authentication
44

5+
To start with launch a first manual sync:
6+
7+
```sh
8+
dcli sync
9+
```
10+
511
Authenticating to your personal vault requires your email.
612
You will be then asked to validate a second factor to register the CLI to your account.
713

documentation/pages/personal/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Callout } from 'nextra/components';
22

3-
# Personal Commands
3+
# Get started with Personal Commands
44

55
Accessing your personal vault allows you to view your passwords, secure notes and OTP codes.
66

documentation/pages/reset.mdx

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Callout } from 'nextra/components';
2+
3+
# Reset local data
4+
5+
If you want to start fresh with the CLI or use another account, you can reset the local data by running the following command:
6+
7+
```sh
8+
dcli reset
9+
```
10+
11+
<Callout type="info" emoji="ℹ️">
12+
This does not perform an account reset, it only resets the local data on the device.
13+
</Callout>
14+
15+
A confirmation will be asked, then the local database containing your encrypted data will be wiped and any entry related to the CLI will be removed from the OS keychain.

0 commit comments

Comments
 (0)