Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve explanation of credentials generation #142

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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