Skip to content

Commit

Permalink
feat: add username for support with redis setups using ACL (#99)
Browse files Browse the repository at this point in the history
https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/
authored-by: Majdie Gideir <majdie.gideir@invinciblesstudio.com>
  • Loading branch information
majdie40 authored Aug 30, 2024
1 parent 4aa18f7 commit e8125ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Call the tool and get a help on the options:
--tls [tls] (default: "Activate secured TLS connection to Redis")
-h, --host [host] redis host [localhost] (default: "localhost")
-d, --database [db] redis database [0] (default: "0")
--username [username] redis username
--passwd [passwd] redis password
--spasswd [spasswd] redis sentinel password
-u, --uri [uri] redis uri
Expand Down
2 changes: 2 additions & 0 deletions lib/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const run = (name: string, version: string) => {
process.env.REDIS_HOST || "localhost"
)
.option("-d, --database [db]", "redis database [0]", "0")
.option("--username [username]", "redis username", process.env.REDIS_USERNAME)
.option("--passwd [passwd]", "redis password", process.env.REDIS_PASSWD)
.option(
"--spasswd [spasswd]",
Expand Down Expand Up @@ -109,6 +110,7 @@ export const run = (name: string, version: string) => {
const connection = {
port: options.port,
host: options.host,
username: options.username,
password: options.passwd,
sentinelPassword: options.spasswd,
db: options.database,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8125ac

Please sign in to comment.