1 /* 2 * (C) Copyright 1989-2011 Trend Micro, Inc. 3 * All Rights Reserved. 4 * 5 * This program is an unpublished copyrighted work which is proprietary 6 * to Trend Micro, Inc. and contains confidential information that is not 7 * to be reproduced or disclosed to any other person or entity without 8 * prior written consent from Trend Micro, Inc. in each and every instance. 9 * 10 * WARNING: Unauthorized reproduction of this program as well as 11 * unauthorized preparation of derivative works based upon the 12 * program or distribution of copies by sale, rental, lease or 13 * lending are violations of federal copyright laws and state trade 14 * secret laws, punishable by civil and criminal penalties. 15 */ 16 17 package com.trendmicro.grid.acl.l0; 18 19 /** 20 * Enumerates all known role names. 21 * 22 * @author Juergen_Kellerer, 2011-04-14 23 * @version 1.0 24 */ 25 public class KnownRoles { 26 /** 27 * Controls the general access to any details (= all data types containing metadata) 28 */ 29 public static final String ROLE_ACCESS_DETAILS = "access.details"; 30 31 /** 32 * Controls the general access to the protected services (aka. "/internal/") 33 */ 34 public static final String ROLE_ACCESS_PROTECTED_SERVICES = "access.protected.services"; 35 36 /** 37 * Controls whether, hash based queries can be executed. 38 */ 39 public static final String ROLE_RUN_HASH_QUERIES = "run.hash.queries"; 40 41 /** 42 * Controls whether tag matching queries can be executed. 43 * <br/> 44 * <b>Notes:</b><ul> 45 * <li>Methods that match tags by hashes like 46 * {@link FileService#isFilesTaggedWithAll(BatchCollection, String[]) isFilesTaggedWithAll(..)} do not fall under this role as the 47 * primary query key is hash not tag in such queries.</li> 48 * <li>Methods that require this role are in general more expensive to execute than hash based methods. 49 * This expensiveness originates in the higher cardinality of tag matching indexes.</li> 50 * </ul> 51 */ 52 public static final String ROLE_RUN_TAG_MATCHING_QUERIES = "run.tag.matching.queries"; 53 54 /** 55 * Controls whether file packages can be queried. 56 */ 57 public static final String ROLE_RUN_PACKAGE_QUERIES = "run.package.queries"; 58 59 /** 60 * Controls whether categorization queries can be executed. 61 */ 62 public static final String ROLE_RUN_CATEGORIZATION_QUERIES = "run.categorization.queries"; 63 64 /** 65 * Controls whether complex queries can be executed. 66 * <p/> 67 * Any query that allows retrieving relationships or does not fall under one of the other categories is considered a complex query. 68 * From a performance standpoint, complex queries are typically less expensive than tag matching queries except if the 69 * relationships are huge and require fetching many pages. 70 */ 71 public static final String ROLE_RUN_COMPLEX_QUERIES = "run.complex.queries"; 72 73 /** 74 * Controls whether a previously processed file can be downloaded. 75 */ 76 public static final String ROLE_ACCESS_BINARY_CONTENT = "access.binary.content"; 77 78 /** 79 * Controls whether a file can be sent (created) for processing. 80 */ 81 public static final String ROLE_CREATE_BINARY_CONTENT = "create.binary.content"; 82 83 /** 84 * Controls whether new or existing content can be processed or reprocessed. 85 * 86 * Note: Users that were granted this role but not "create.binary.content" can trigger reprocessing on previously 87 * stored content but cannot add new content. 88 */ 89 public static final String ROLE_PROCESS_CONTENT = "process.content"; 90 91 /** 92 * Controls whether management tasks like clearing caches can be executed. 93 * 94 * @since 1.2.2 95 */ 96 public static final String ROLE_MANAGE = "manage"; 97 98 /** 99 * Controls whether the user audit log can be accessed. 100 * 101 * @since 1.3 102 */ 103 public static final String ROLE_ACCESS_AUDIT_LOG = "access.audit.log"; 104 105 private KnownRoles() { 106 } 107 }