Skip to content

Commit

Permalink
Merge pull request #4804 from EnterpriseDB/BigAnimal-UPM-23034-Create…
Browse files Browse the repository at this point in the history
…-credentials-for-alternative-organizations

BigAnimal-UPM-23034-Create-credentials-for-alternative-organizations
  • Loading branch information
nidhibhammar authored Oct 11, 2023
2 parents 0b7c31d + 96f005a commit 82fba47
Showing 1 changed file with 51 additions and 9 deletions.
60 changes: 51 additions & 9 deletions product_docs/docs/biganimal/release/reference/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ chmod +x biganimal
```


## Authenticate as a valid user
## Authenticating as a valid user

Before using the CLI to manage BigAnimal, you need to authenticate as a valid BigAnimal user. Use the `credential create` command to authenticate through the BigAnimal website and assign a refresh token and an access token to a local credential. For example:

Expand Down Expand Up @@ -82,19 +82,61 @@ You can create multiple credentials for different BigAnimal accounts and then se
```shell
biganimal credential show
__OUTPUT__
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Credentials ┃
┣━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ name ┃ address ┃ port ┃ context credential ┃
┃━━━━━━━━━━┃━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┃━━━━━━┃━━━━━━━━━━━━━━━━━━━━━━━━━┃
┃ ba-user1 ┃ portal.biganimal.com ┃ 443 ┃ x ┃
┃ ba-user2 ┃ portal.biganimal.com ┃ 443 ┃ ┃
┗━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━┛
┌────────────────────────────────────────────────────────────────────────────────────┐
│ Credentials │
├──────────┬──────────────────────┬──────────────────────┬──────┬────────────────────┤
│ name │ Organization │ address │ port │ context credential │
├──────────┼──────────────────────┼──────────────────────┼──────┼────────────────────┤
│ ba-user1 │ My_organization │ portal.biganimal.com │ 443 │ x │
│ ba-user2 │ My_organization │ portal.biganimal.com │ 443 │ │
└──────────┴──────────────────────┴──────────────────────┴──────┴────────────────────┘

The credential ba-user1 has been set up
```

```shell
biganimal config set context_credential ba-user1
```
## Creating credentials for an alternative organization

The BigAnimal CLI supports the capability to create credentials for an alternative organization to which you have been invited or are already a member. You can invite users that have an EDB account to join an organization by selecting the **Invite New User** option on the Users page in the BigAnimal portal.

To create credentials for an alternative organization, you can use either interactive mode or specify the settings with flags on the command line:

- Select the organization from the list in interactive mode:

```shell
biganimal credential create
__OUTPUT__
? Credential Name: ba-user2
? Organization: [Use arrows to move, type to filter]
My_Organization
> My_Organization_2

? Organization: My_Organization_2
Credential "ba-user2" is created operation succeeded
Switched the context credential to "ba-user2".
```

- Specify the organization name in the `credential create` command:

```shell
biganimal credential create -name ba-user2 --organization "My_Organization_2"
```

You can verify the operation using `credential show`:

```shell
biganimal credential show
__OUTPUT__
┌────────────────────────────────────────────────────────────────────────────────────┐
│ Credentials │
├──────────┬──────────────────────┬──────────────────────┬──────┬────────────────────┤
│ name │ Organization │ address │ port │ context credential │
├──────────┼──────────────────────┼──────────────────────┼──────┼────────────────────┤
│ ba-user2 │ org_aNR9SNuNcUN6vGSn │ portal.biganimal.com │ 443 │ x │
└──────────┴──────────────────────┴──────────────────────┴──────┴────────────────────┘

```

## Configuring
Expand Down

0 comments on commit 82fba47

Please sign in to comment.