Skip to content

Commit

Permalink
Improve explanation of credentials generation
Browse files Browse the repository at this point in the history
Fix #141
  • Loading branch information
Mikescops committed Aug 3, 2023
1 parent c593796 commit b9a8f87
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 19 additions & 3 deletions documentation/pages/business/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,39 @@ Commands are calling a server API to perform actions and retrieve data. The firs
<Callout emoji="💡">Needs to be authenticated as an admin to use this command.</Callout>

```sh copy
dcli t generate-credentials
dcli t credentials generate
```

You will be prompted with a list of variables to export in your environment.
You will be prompted with a list of variables to export in your environment. Simply copy/paste them in your terminal.

```sh copy
export DASHLANE_TEAM_UUID=08a48d4f-[..redacted..]-fba9193d968c
export DASHLANE_TEAM_ACCESS_KEY=f56[..redacted..]56ce
export DASHLANE_TEAM_SECRET_KEY=839c9[..redacted..]3ada5
```

On Windows, you can use the `set` command instead of `export`.

```sh copy
set DASHLANE_TEAM_UUID=08a48d4f-[..redacted..]-fba9193d968c
set DASHLANE_TEAM_ACCESS_KEY=f56[..redacted..]56ce
set DASHLANE_TEAM_SECRET_KEY=839c9[..redacted..]3ada5
```

Make sure you save them in a safe place (use a secure note for instance 😉).

## List credentials

<Callout emoji="💡">Needs to be authenticated as an admin to use this command.</Callout>

```sh copy
dcli t credentials list
```

## Revoke credentials

<Callout emoji="💡">Needs to be authenticated as an admin to use this command.</Callout>

```sh copy
dcli t revoke-credentials <DASHLANE_TEAM_ACCESS_KEY>
dcli t credentials revoke <DASHLANE_TEAM_ACCESS_KEY>
```
2 changes: 2 additions & 0 deletions src/commands/team/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import winston from 'winston';
import { Command } from 'commander';
import { listAllTeamDevices } from '../../command-handlers';
import { connectAndPrepare } from '../../modules/database';
Expand Down Expand Up @@ -26,6 +27,7 @@ export const teamCredentialsCommands = (params: { teamGroup: Command }) => {
})
);
} else {
winston.info('The credentials have been generated, run the following commands to export them:');
console.log(`export DASHLANE_TEAM_UUID=${credentials.teamUuid}`);
console.log(`export DASHLANE_TEAM_ACCESS_KEY=${credentials.deviceAccessKey}`);
console.log(`export DASHLANE_TEAM_SECRET_KEY=${credentials.deviceSecretKey}`);
Expand Down

0 comments on commit b9a8f87

Please sign in to comment.