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

Add command to list credentials created on a Capella cluster #575

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

Westwooo
Copy link
Contributor

Addresses: #424

Sample output:

👤 Administrator 🏠 remote
> credentials
╭───┬──────────────────────────────────────┬────────────────┬─────────┬───────────────────────────────────────────────────────────────────────╮
│ # │                  id                  │      name      │ cluster │                                access                                 │
├───┼──────────────────────────────────────┼────────────────┼─────────┼───────────────────────────────────────────────────────────────────────┤
│ 0 │ 354dd662-4d6a-4e1c-80f3-6c78eafa405a │ Administrator  │ remote  │ ╭───┬───────────────┬─────────────────────────┬─────────────────────╮ │
│   │                                      │                │         │ │ # │    bucket     │         scopes          │     privileges      │ │
│   │                                      │                │         │ ├───┼───────────────┼─────────────────────────┼─────────────────────┤ │
│   │                                      │                │         │ │ 0 │ testing       │ ╭───┬───╮               │ ╭───┬─────────────╮ │ │
│   │                                      │                │         │ │   │               │ │ 0 │ * │               │ │ 0 │ data_reader │ │ │
│   │                                      │                │         │ │   │               │ ╰───┴───╯               │ ╰───┴─────────────╯ │ │
│   │                                      │                │         │ │ 1 │ travel-sample │ ╭───┬─────────────────╮ │ ╭───┬─────────────╮ │ │
│   │                                      │                │         │ │   │               │ │ 0 │ inventory       │ │ │ 0 │ data_reader │ │ │
│   │                                      │                │         │ │   │               │ │ 1 │ tenant_agent_00 │ │ │ 1 │ data_writer │ │ │
│   │                                      │                │         │ │   │               │ ╰───┴─────────────────╯ │ ╰───┴─────────────╯ │ │
│   │                                      │                │         │ ╰───┴───────────────┴─────────────────────────┴─────────────────────╯ │
│ 1 │ f0668638-0cf1-417c-8521-abbd1cbf0624 │ Administrator2 │ remote  │ ╭───┬────────┬───────────┬─────────────────────╮                      │
│   │                                      │                │         │ │ # │ bucket │  scopes   │     privileges      │                      │
│   │                                      │                │         │ ├───┼────────┼───────────┼─────────────────────┤                      │
│   │                                      │                │         │ │ 0 │ *      │ ╭───┬───╮ │ ╭───┬─────────────╮ │                      │
│   │                                      │                │         │ │   │        │ │ 0 │ * │ │ │ 0 │ data_reader │ │                      │
│   │                                      │                │         │ │   │        │ ╰───┴───╯ │ ╰───┴─────────────╯ │                      │
│   │                                      │                │         │ ╰───┴────────┴───────────┴─────────────────────╯                      │
╰───┴──────────────────────────────────────┴────────────────┴─────────┴───────────────────────────────────────────────────────────────────────╯

@@ -518,11 +551,54 @@ impl CredentialsCreateRequest {
Self {
name,
password,
access: vec![Access { privileges }],
access: vec![Access {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed since the Access struct was changed to support reading the list credentials response. They have been hardcoded to values that preserve the behaviour from before the change, and this issue will allow users to specify scopes/buckets on credential creation: #576

@Westwooo Westwooo merged commit 8e802e4 into main Jan 16, 2025
12 checks passed
@Westwooo Westwooo deleted the credentials_list branch January 16, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants