-1

Since Redis supports ACL from v6.How can we achieve authorization at the key pattern? We want to implement a system in which multiple services have their own key pattern and we don't want any service can read other service's data.

For example:

Service Name Keys Pattern
Service A Service_A_::_
Service B Service_B_::_

so that service A can't read data of service B and vice-versa.

sazzad
  • 5,740
  • 6
  • 25
  • 42

1 Answers1

0

Design the key as

{namespace}:{object type}:{identifier}:{optional name}.

Example :

public:users:{1234}:purchase

Key patterns restrictions can be done using ~:. Example ~public: when used with setuser will allow user to have access to public namespaces. More information available at https://redis.io/topics/acl