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

Update DOCTL to include new OpenSearch acl changes #1575

Merged

Conversation

bhardwajRahul
Copy link
Contributor

This PR aims at adding support for OpenSearch acl option to database user

Command Details

Creates a new user for a database. New users are given a role of `normal` and are given an automatically-generated password.

To retrieve a list of your databases and their IDs, call `doctl databases list`.

Usage:
  doctl databases user create <database-cluster-id> <user-name> [flags]

Aliases:
  create, c

Examples:
The following example creates a new user with the username `example-user` for a database cluster with the ID `ca9f591d-f38h-5555-a0ef-1c02d1d1e35`: doctl databases user create ca9f591d-f38h-5555-a0ef-1c02d1d1e35 example-user

Flags:
      --acl topic:permission                      A comma-separated list of kafka ACL rules, in topic:permission format.
  -h, --help                                      help for create
      --mysql-auth-plugin caching_sha2_password   Sets authorization plugin for a MySQL user. Possible values: caching_sha2_password or `mysql_native_password`
      --opensearch-acl index:permission           A comma-separated list of OpenSearch ACL rules, in index:permission format.

Global Flags:
  -t, --access-token string   API V2 access token
  -u, --api-url string        Override default API endpoint
  -c, --config string         Specify a custom config file (default "/home/user/.config/doctl/config.yaml")
      --context string        Specify a custom authentication context name
      --http-retry-max int    Set maximum number of retries for requests that fail with a 429 or 500-level error (default 5)
      --interactive           Enable interactive behavior. Defaults to true if the terminal supports it (default true)
  -o, --output string         Desired output format [text|json] (default "text")
      --trace                 Show a log of network activity while performing a command
  -v, --verbose               Enable verbose output

Command Usage

doctl -t $token databases user create 70c35b01-6f6d-40e6-92ec-2bdssdca61a test-user --opensearch-acl log-*:read

Ouput

Name         Role      Password
test-user    normal    AsdnXXXXXXnkRv1

Copy link

gitguardian bot commented Sep 9, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9440733 Triggered Generic Password f4f5430 integration/database_user_create_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@bhardwajRahul bhardwajRahul marked this pull request as draft September 9, 2024 11:54
@bhardwajRahul bhardwajRahul force-pushed the rbhardwaj/DBAAS-5109 branch 2 times, most recently from 6a0cc8c to 2512d16 Compare September 9, 2024 13:15
@bhardwajRahul bhardwajRahul marked this pull request as ready for review September 9, 2024 13:21
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@andrewsomething andrewsomething merged commit e89f54c into digitalocean:main Sep 9, 2024
8 checks passed
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