yagamil
V2EX  ›  数据库

redis 可以设置用户名和密码,限制不同的用户访问自己的 db 吗

  •  
  •   yagamil · May 22, 2024 · 1753 views
    This topic created in 745 days ago, the information mentioned may be changed or developed.
    redis version > 7

    不知道能否像 mysql 这样,不同用户访问自己的 db ,而无法访问其他人的 db 。

    目前比较傻瓜,开了几个端口,几个 redis 服务,用端口号和密码区分不同的用户和数据库。
    dextercai
        1
    dextercai  
       May 22, 2024
    Redis 的 ACL 一般是限制 Key 的 Prefix 的,具体可见: https://redis.io/docs/latest/operate/rs/security/access-control/
    yagamil
        2
    yagamil  
    OP
       May 22, 2024
    @dextercai #1 谢谢大哥。 但这个功能要企业版才行?
    dextercai
        3
    dextercai  
       May 22, 2024
    RBAC 是企业版的特性,但 ACL 不是。
    https://redis.io/docs/latest/commands/acl-setuser/

    @yagamil
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2964 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 04:16 · PVG 12:16 · LAX 21:16 · JFK 00:16
    ♥ Do have faith in what you're doing.