• Itamar Haber's avatar
    Adds pub/sub channel patterns to ACL (#7993) · c1b1e8c3
    Itamar Haber authored
    Fixes #7923.
    
    This PR appropriates the special `&` symbol (because `@` and `*` are taken),
    followed by a literal value or pattern for describing the Pub/Sub patterns that
    an ACL user can interact with. It is similar to the existing key patterns
    mechanism in function (additive) and implementation (copy-pasta). It also adds
    the allchannels and resetchannels ACL keywords, naturally.
    
    The default user is given allchannels permissions, whereas new users get
    whatever is defined by the acl-pubsub-default configuration directive. For
    backward compatibility in 6.2, the default of this directive is allchannels but
    this is likely to be changed to resetchannels in the next major version for
    stronger default security settings.
    
    Unless allchannels is set for the user, channel access permissions are checked
    as follows :
    * Calls to both PUBLISH and SUBSCRIBE will fail unless a pattern matching the
      argumentative channel name(s) exists for the user.
    * Calls t...
    c1b1e8c3
acl.tcl 14.8 KB