[email protected] | af8b3400 | 2012-02-02 08:03:55 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 5 | #ifndef CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
| 6 | #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 7 | |
[email protected] | d9c2e51 | 2012-10-25 18:54:36 | [diff] [blame] | 8 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 9 | #include <map> |
| 10 | #include <set> |
| 11 | #include <string> |
| 12 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 13 | #include "base/compiler_specific.h" |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 14 | #include "base/gtest_prod_util.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 15 | #include "base/memory/singleton.h" |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 16 | #include "base/synchronization/lock.h" |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 17 | #include "content/public/browser/child_process_security_policy.h" |
[email protected] | 7491ad0 | 2014-07-05 19:10:07 | [diff] [blame] | 18 | #include "content/public/common/resource_type.h" |
[email protected] | ce5cbed8 | 2013-07-01 11:52:31 | [diff] [blame] | 19 | #include "webkit/common/fileapi/file_system_types.h" |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 20 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 21 | class GURL; |
| 22 | |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 23 | namespace base { |
| 24 | class FilePath; |
| 25 | } |
| 26 | |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 27 | namespace storage { |
[email protected] | ce5cbed8 | 2013-07-01 11:52:31 | [diff] [blame] | 28 | class FileSystemURL; |
| 29 | } |
| 30 | |
[email protected] | 4648832 | 2012-10-30 03:22:20 | [diff] [blame] | 31 | namespace content { |
| 32 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 33 | class CONTENT_EXPORT ChildProcessSecurityPolicyImpl |
[email protected] | 4648832 | 2012-10-30 03:22:20 | [diff] [blame] | 34 | : NON_EXPORTED_BASE(public ChildProcessSecurityPolicy) { |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 35 | public: |
| 36 | // Object can only be created through GetInstance() so the constructor is |
| 37 | // private. |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 38 | virtual ~ChildProcessSecurityPolicyImpl(); |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 39 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 40 | static ChildProcessSecurityPolicyImpl* GetInstance(); |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 41 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 42 | // ChildProcessSecurityPolicy implementation. |
| 43 | virtual void RegisterWebSafeScheme(const std::string& scheme) OVERRIDE; |
| 44 | virtual bool IsWebSafeScheme(const std::string& scheme) OVERRIDE; |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 45 | virtual void GrantReadFile(int child_id, const base::FilePath& file) OVERRIDE; |
[email protected] | bfcf1e9 | 2013-07-11 04:37:25 | [diff] [blame] | 46 | virtual void GrantCreateReadWriteFile(int child_id, |
[email protected] | 9f10431 | 2013-07-23 23:18:19 | [diff] [blame] | 47 | const base::FilePath& file) OVERRIDE; |
[email protected] | 65486ad | 2014-03-28 21:06:48 | [diff] [blame] | 48 | virtual void GrantCopyInto(int child_id, const base::FilePath& dir) OVERRIDE; |
| 49 | virtual void GrantDeleteFrom(int child_id, |
| 50 | const base::FilePath& dir) OVERRIDE; |
[email protected] | aa7cfbf | 2012-06-01 08:48:09 | [diff] [blame] | 51 | virtual void GrantReadFileSystem( |
| 52 | int child_id, |
| 53 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | 398d77b | 2013-01-17 01:31:06 | [diff] [blame] | 54 | virtual void GrantWriteFileSystem( |
| 55 | int child_id, |
| 56 | const std::string& filesystem_id) OVERRIDE; |
| 57 | virtual void GrantCreateFileForFileSystem( |
[email protected] | aa7cfbf | 2012-06-01 08:48:09 | [diff] [blame] | 58 | int child_id, |
| 59 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | 724173c | 2013-11-13 09:14:07 | [diff] [blame] | 60 | virtual void GrantCreateReadWriteFileSystem( |
| 61 | int child_id, |
| 62 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | b78c188fa6 | 2013-07-23 18:04:45 | [diff] [blame] | 63 | virtual void GrantCopyIntoFileSystem( |
| 64 | int child_id, |
| 65 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | 5a65fde3 | 2013-10-22 05:15:34 | [diff] [blame] | 66 | virtual void GrantDeleteFromFileSystem( |
| 67 | int child_id, |
| 68 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 69 | virtual void GrantScheme(int child_id, const std::string& scheme) OVERRIDE; |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 70 | virtual bool CanReadFile(int child_id, const base::FilePath& file) OVERRIDE; |
[email protected] | d4c797f | 2013-09-26 08:18:53 | [diff] [blame] | 71 | virtual bool CanCreateReadWriteFile(int child_id, |
| 72 | const base::FilePath& file) OVERRIDE; |
[email protected] | ffc7b4d | 2012-06-08 00:05:32 | [diff] [blame] | 73 | virtual bool CanReadFileSystem(int child_id, |
| 74 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | d8d1cbe | 2012-07-19 05:32:10 | [diff] [blame] | 75 | virtual bool CanReadWriteFileSystem( |
| 76 | int child_id, |
| 77 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | b78c188fa6 | 2013-07-23 18:04:45 | [diff] [blame] | 78 | virtual bool CanCopyIntoFileSystem(int child_id, |
| 79 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | 5a65fde3 | 2013-10-22 05:15:34 | [diff] [blame] | 80 | virtual bool CanDeleteFromFileSystem( |
| 81 | int child_id, |
| 82 | const std::string& filesystem_id) OVERRIDE; |
[email protected] | 2c6e3b04c | 2014-07-24 12:48:09 | [diff] [blame] | 83 | virtual bool HasWebUIBindings(int child_id) OVERRIDE; |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 84 | |
| 85 | // Pseudo schemes are treated differently than other schemes because they |
| 86 | // cannot be requested like normal URLs. There is no mechanism for revoking |
| 87 | // pseudo schemes. |
| 88 | void RegisterPseudoScheme(const std::string& scheme); |
| 89 | |
| 90 | // Returns true iff |scheme| has been registered as pseudo scheme. |
| 91 | bool IsPseudoScheme(const std::string& scheme); |
| 92 | |
| 93 | // Upon creation, child processes should register themselves by calling this |
| 94 | // this method exactly once. |
| 95 | void Add(int child_id); |
| 96 | |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 97 | // Upon creation, worker thread child processes should register themselves by |
| 98 | // calling this this method exactly once. Workers that are not shared will |
| 99 | // inherit permissions from their parent renderer process identified with |
| 100 | // |main_render_process_id|. |
| 101 | void AddWorker(int worker_child_id, int main_render_process_id); |
| 102 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 103 | // Upon destruction, child processess should unregister themselves by caling |
| 104 | // this method exactly once. |
| 105 | void Remove(int child_id); |
| 106 | |
| 107 | // Whenever the browser processes commands the child process to request a URL, |
| 108 | // it should call this method to grant the child process the capability to |
[email protected] | dc67e1c3 | 2012-06-08 00:10:40 | [diff] [blame] | 109 | // request the URL, along with permission to request all URLs of the same |
| 110 | // scheme. |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 111 | void GrantRequestURL(int child_id, const GURL& url); |
| 112 | |
[email protected] | dc67e1c3 | 2012-06-08 00:10:40 | [diff] [blame] | 113 | // Whenever the browser process drops a file icon on a tab, it should call |
| 114 | // this method to grant the child process the capability to request this one |
| 115 | // file:// URL, but not all urls of the file:// scheme. |
| 116 | void GrantRequestSpecificFileURL(int child_id, const GURL& url); |
| 117 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 118 | // Revokes all permissions granted to the given file. |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 119 | void RevokeAllPermissionsForFile(int child_id, const base::FilePath& file); |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 120 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 121 | // Grant the child process the ability to use Web UI Bindings. |
| 122 | void GrantWebUIBindings(int child_id); |
| 123 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 124 | // Grant the child process the ability to read raw cookies. |
| 125 | void GrantReadRawCookies(int child_id); |
| 126 | |
| 127 | // Revoke read raw cookies permission. |
| 128 | void RevokeReadRawCookies(int child_id); |
| 129 | |
[email protected] | 4ca7cf0f | 2013-08-28 14:19:03 | [diff] [blame] | 130 | // Grants permission to send system exclusive message to any MIDI devices. |
[email protected] | 6e068ea | 2014-02-04 07:05:47 | [diff] [blame] | 131 | void GrantSendMidiSysExMessage(int child_id); |
[email protected] | 4ca7cf0f | 2013-08-28 14:19:03 | [diff] [blame] | 132 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 133 | // Before servicing a child process's request for a URL, the browser should |
| 134 | // call this method to determine whether the process has the capability to |
| 135 | // request the URL. |
| 136 | bool CanRequestURL(int child_id, const GURL& url); |
| 137 | |
[email protected] | bbdd1b20b | 2012-12-11 21:24:13 | [diff] [blame] | 138 | // Returns true if the process is permitted to load pages from |
| 139 | // the given origin in main frames or subframes. |
| 140 | // Only might return false if --site-per-process flag is used. |
| 141 | bool CanLoadPage(int child_id, |
| 142 | const GURL& url, |
[email protected] | 6c1e0521 | 2014-07-31 00:59:40 | [diff] [blame] | 143 | ResourceType resource_type); |
[email protected] | bbdd1b20b | 2012-12-11 21:24:13 | [diff] [blame] | 144 | |
[email protected] | 9f10431 | 2013-07-23 23:18:19 | [diff] [blame] | 145 | // Explicit permissions checks for FileSystemURL specified files. |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 146 | bool CanReadFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 147 | bool CanWriteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
| 148 | bool CanCreateFileSystemFile(int child_id, const storage::FileSystemURL& url); |
[email protected] | d4c797f | 2013-09-26 08:18:53 | [diff] [blame] | 149 | bool CanCreateReadWriteFileSystemFile(int child_id, |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 150 | const storage::FileSystemURL& url); |
[email protected] | 4b9d086 | 2013-10-15 19:49:41 | [diff] [blame] | 151 | bool CanCopyIntoFileSystemFile(int child_id, |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 152 | const storage::FileSystemURL& url); |
| 153 | bool CanDeleteFileSystemFile(int child_id, const storage::FileSystemURL& url); |
[email protected] | 9f10431 | 2013-07-23 23:18:19 | [diff] [blame] | 154 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 155 | // Returns true if the specified child_id has been granted ReadRawCookies. |
| 156 | bool CanReadRawCookies(int child_id); |
| 157 | |
[email protected] | c6f2e67 | 2012-11-15 01:47:02 | [diff] [blame] | 158 | // Returns true if the process is permitted to read and modify the cookies for |
| 159 | // the given origin. Does not affect cookies attached to or set by network |
| 160 | // requests. |
[email protected] | 313b80bd | 2011-11-23 03:49:10 | [diff] [blame] | 161 | // Only might return false if the very experimental |
[email protected] | c6f2e67 | 2012-11-15 01:47:02 | [diff] [blame] | 162 | // --enable-strict-site-isolation or --site-per-process flags are used. |
| 163 | bool CanAccessCookiesForOrigin(int child_id, const GURL& gurl); |
| 164 | |
| 165 | // Returns true if the process is permitted to attach cookies to (or have |
| 166 | // cookies set by) network requests. |
| 167 | // Only might return false if the very experimental |
| 168 | // --enable-strict-site-isolation or --site-per-process flags are used. |
| 169 | bool CanSendCookiesForOrigin(int child_id, const GURL& gurl); |
[email protected] | 313b80bd | 2011-11-23 03:49:10 | [diff] [blame] | 170 | |
| 171 | // Sets the process as only permitted to use and see the cookies for the |
| 172 | // given origin. |
[email protected] | c6f2e67 | 2012-11-15 01:47:02 | [diff] [blame] | 173 | // Only used if the very experimental --enable-strict-site-isolation or |
| 174 | // --site-per-process flags are used. |
[email protected] | 313b80bd | 2011-11-23 03:49:10 | [diff] [blame] | 175 | void LockToOrigin(int child_id, const GURL& gurl); |
| 176 | |
[email protected] | ce5cbed8 | 2013-07-01 11:52:31 | [diff] [blame] | 177 | // Register FileSystem type and permission policy which should be used |
| 178 | // for the type. The |policy| must be a bitwise-or'd value of |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 179 | // storage::FilePermissionPolicy. |
| 180 | void RegisterFileSystemPermissionPolicy(storage::FileSystemType type, |
| 181 | int policy); |
[email protected] | ce5cbed8 | 2013-07-01 11:52:31 | [diff] [blame] | 182 | |
[email protected] | 4ca7cf0f | 2013-08-28 14:19:03 | [diff] [blame] | 183 | // Returns true if sending system exclusive messages is allowed. |
[email protected] | 6e068ea | 2014-02-04 07:05:47 | [diff] [blame] | 184 | bool CanSendMidiSysExMessage(int child_id); |
[email protected] | 4ca7cf0f | 2013-08-28 14:19:03 | [diff] [blame] | 185 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 186 | private: |
| 187 | friend class ChildProcessSecurityPolicyInProcessBrowserTest; |
[email protected] | bfcf1e9 | 2013-07-11 04:37:25 | [diff] [blame] | 188 | friend class ChildProcessSecurityPolicyTest; |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 189 | FRIEND_TEST_ALL_PREFIXES(ChildProcessSecurityPolicyInProcessBrowserTest, |
| 190 | NoLeak); |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 191 | FRIEND_TEST_ALL_PREFIXES(ChildProcessSecurityPolicyTest, FilePermissions); |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 192 | |
| 193 | class SecurityState; |
| 194 | |
| 195 | typedef std::set<std::string> SchemeSet; |
| 196 | typedef std::map<int, SecurityState*> SecurityStateMap; |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 197 | typedef std::map<int, int> WorkerToMainProcessMap; |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 198 | typedef std::map<storage::FileSystemType, int> FileSystemPermissionPolicyMap; |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 199 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 200 | // Obtain an instance of ChildProcessSecurityPolicyImpl via GetInstance(). |
| 201 | ChildProcessSecurityPolicyImpl(); |
| 202 | friend struct DefaultSingletonTraits<ChildProcessSecurityPolicyImpl>; |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 203 | |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 204 | // Adds child process during registration. |
| 205 | void AddChild(int child_id); |
| 206 | |
| 207 | // Determines if certain permissions were granted for a file to given child |
[email protected] | 322a6eb | 2013-11-12 06:13:09 | [diff] [blame] | 208 | // process. |permissions| is an internally defined bit-set. |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 209 | bool ChildProcessHasPermissionsForFile(int child_id, |
[email protected] | a3ef483 | 2013-02-02 05:12:33 | [diff] [blame] | 210 | const base::FilePath& file, |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 211 | int permissions); |
| 212 | |
[email protected] | 322a6eb | 2013-11-12 06:13:09 | [diff] [blame] | 213 | // Grant a particular permission set for a file. |permissions| is an |
| 214 | // internally defined bit-set. |
[email protected] | bfcf1e9 | 2013-07-11 04:37:25 | [diff] [blame] | 215 | void GrantPermissionsForFile(int child_id, |
| 216 | const base::FilePath& file, |
| 217 | int permissions); |
| 218 | |
| 219 | // Grants access permission to the given isolated file system |
| 220 | // identified by |filesystem_id|. See comments for |
| 221 | // ChildProcessSecurityPolicy::GrantReadFileSystem() for more details. |
| 222 | void GrantPermissionsForFileSystem( |
| 223 | int child_id, |
| 224 | const std::string& filesystem_id, |
| 225 | int permission); |
| 226 | |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 227 | // Determines if certain permissions were granted for a file. |permissions| |
[email protected] | 322a6eb | 2013-11-12 06:13:09 | [diff] [blame] | 228 | // is an internally defined bit-set. If |child_id| is a worker process, |
| 229 | // this returns true if either the worker process or its parent renderer |
| 230 | // has permissions for the file. |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 231 | bool HasPermissionsForFile(int child_id, |
| 232 | const base::FilePath& file, |
| 233 | int permissions); |
| 234 | |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 235 | // Determines if certain permissions were granted for a file in FileSystem |
[email protected] | 322a6eb | 2013-11-12 06:13:09 | [diff] [blame] | 236 | // API. |permissions| is an internally defined bit-set. |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 237 | bool HasPermissionsForFileSystemFile(int child_id, |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 238 | const storage::FileSystemURL& url, |
[email protected] | bee16c0b | 2013-09-16 20:30:48 | [diff] [blame] | 239 | int permissions); |
| 240 | |
[email protected] | 322a6eb | 2013-11-12 06:13:09 | [diff] [blame] | 241 | // Determines if certain permissions were granted for a file system. |
| 242 | // |permissions| is an internally defined bit-set. |
| 243 | bool HasPermissionsForFileSystem( |
| 244 | int child_id, |
| 245 | const std::string& filesystem_id, |
| 246 | int permission); |
| 247 | |
[email protected] | 826ad711 | 2011-09-02 21:39:03 | [diff] [blame] | 248 | // You must acquire this lock before reading or writing any members of this |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 249 | // class. You must not block while holding this lock. |
| 250 | base::Lock lock_; |
| 251 | |
| 252 | // These schemes are white-listed for all child processes. This set is |
| 253 | // protected by |lock_|. |
| 254 | SchemeSet web_safe_schemes_; |
| 255 | |
| 256 | // These schemes do not actually represent retrievable URLs. For example, |
| 257 | // the the URLs in the "about" scheme are aliases to other URLs. This set is |
| 258 | // protected by |lock_|. |
| 259 | SchemeSet pseudo_schemes_; |
| 260 | |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 261 | // This map holds a SecurityState for each child process. The key for the |
| 262 | // map is the ID of the ChildProcessHost. The SecurityState objects are |
| 263 | // owned by this object and are protected by |lock_|. References to them must |
| 264 | // not escape this class. |
| 265 | SecurityStateMap security_state_; |
| 266 | |
[email protected] | cee64fd3 | 2011-05-02 18:59:07 | [diff] [blame] | 267 | // This maps keeps the record of which js worker thread child process |
| 268 | // corresponds to which main js thread child process. |
| 269 | WorkerToMainProcessMap worker_map_; |
| 270 | |
[email protected] | ce5cbed8 | 2013-07-01 11:52:31 | [diff] [blame] | 271 | FileSystemPermissionPolicyMap file_system_policy_map_; |
| 272 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 273 | DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); |
[email protected] | df8e899b | 2011-02-22 22:58:22 | [diff] [blame] | 274 | }; |
| 275 | |
[email protected] | 4648832 | 2012-10-30 03:22:20 | [diff] [blame] | 276 | } // namespace content |
| 277 | |
[email protected] | b953542 | 2012-02-09 01:47:59 | [diff] [blame] | 278 | #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ |