|
Context Masks |
Top Previous Next |
|
A context mask is a string that corresponds to one or more contexts. A mask name is similar to a context path, but its segments (parts, separated by dots) may include wildcard ("*") characters instead of context names. They quite similar to the filename masks (like "*.txt") which are often used in computing. Context masks may be resolved to a number of context paths that match to a context mask. Here's an example of a context mask: users.*.deviceservers.*.devices.*
Resolving Masks The context mask can be resolved to a list of context paths. For example, the mask users.* may be resolved to the following list of context paths: users.admin users.user1 users.user2 etc. And the mask users.*.deviceservers.* may be resolved to users.admin.deviceservers.c1 users.admin.deviceservers.c2 users.admin.deviceservers.c3 users.user1.deviceservers.ds1 users.user1.deviceservers.ds2 users.user2.deviceservers.plc The mask resolution process always involves permission checking. For example, the users.* mask is resolved to the list of user contexts accessible with the permissions of the user that requested the operation. It will be resolved to the list of all users in the system only if the user originating the operation has permissions to access all user accounts. A context path may match to a context mask. Also, context mask may extend a context path, or context path may extend a context mask. To match a context mask, context path must contain the same number of segments (parts between ".") at mask. Also, if any context mask segment is not a wildcard ("*") segment, it should be equal to the correspondent segment of context path. If a path extends a mask, the leading segments of the path must match the mask, but the path may contain any number of additional segments. Similarly, if a mask extends a path, its beginning should match the path, but it will contain additional mask segments. Examples Path users.admin matches mask users.* Path users.admin doesn't match the external_device_servers.* mask Path users.admin.deviceservers.c1 extends mask users.* (i.e, it's longer than that mask - matches the beginning and adds additional segments) Path users.admin.deviceservers.c1 doesn't extend mask users.*.alerts (because the mask don't match to the three leading segments of the path) Mask users.*.deviceservers.* extends path users.admin (because it adds additional information to it) Mask users.*.deviceservers.* doesn't extend path reports.impacts_report (because it doesn't match) |