• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/components/idl_tool/idl.gni")
15import("//build/ohos.gni")
16
17config("userauth_client_ipc_config") {
18  include_dirs = [
19    "inc",
20    "common_defines",
21    "${target_gen_dir}",
22  ]
23}
24
25idl_gen_interface("auth_user_ipc_interface") {
26  sources = [
27    "idl/ICoAuth.idl",
28    "idl/IUserAuth.idl",
29    "idl/IUserIdm.idl",
30  ]
31
32  sources_common = [ "UserAuthTypes.idl" ]
33
34  sources_callback = [
35    "IExecutorCallback.idl",
36    "IExecutorMessenger.idl",
37    "IEventListenerCallback.idl",
38    "IGetExecutorPropertyCallback.idl",
39    "IIamCallback.idl",
40    "IIdmGetCredInfoCallback.idl",
41    "IIdmGetSecureUserInfoCallback.idl",
42    "IModalCallback.idl",
43    "ISetExecutorPropertyCallback.idl",
44    "IVerifyTokenCallback.idl",
45    "IWidgetCallback.idl",
46  ]
47
48  log_domainid = "0xD002401"
49  log_tag = "USER_AUTH_SA"
50  subsystem_name = "useriam"
51  part_name = "user_auth_framework"
52}
53
54ohos_source_set("userauth_client_ipc") {
55  sanitize = {
56    integer_overflow = true
57    ubsan = true
58    boundary_sanitize = true
59    cfi = true
60    cfi_cross_dso = true
61    debug = false
62    blocklist = "../../../cfi_blocklist.txt"
63  }
64  branch_protector_ret = "pac_ret"
65  include_dirs = [
66    "inc",
67    "common_defines",
68    "../../../interfaces/inner_api",
69  ]
70
71  output_file_path = get_target_outputs(":auth_user_ipc_interface")
72  sources = filter_include(output_file_path, [ "*co_auth_proxy.cpp" ])
73  sources +=
74      filter_include(output_file_path, [ "*event_listener_callback_stub.cpp" ])
75  sources += filter_include(output_file_path, [ "*executor_callback_stub.cpp" ])
76  sources +=
77      filter_include(output_file_path, [ "*executor_messenger_proxy.cpp" ])
78  sources += filter_include(output_file_path, [ "*iam_callback_stub.cpp" ])
79  sources += filter_include(output_file_path, [ "*user_auth_proxy.cpp" ])
80  sources += filter_include(output_file_path, [ "*user_idm_proxy.cpp" ])
81  sources += filter_include(output_file_path, [ "*widget_callback_stub.cpp" ])
82  sources += filter_include(output_file_path, [ "*modal_callback_stub.cpp" ])
83  sources +=
84      filter_include(output_file_path, [ "*verify_token_callback_stub.cpp" ])
85  sources += filter_include(output_file_path,
86                            [ "*get_executor_property_callback_stub.cpp" ])
87  sources += filter_include(output_file_path,
88                            [ "*set_executor_property_callback_stub.cpp" ])
89  sources += filter_include(output_file_path,
90                            [ "*idm_get_cred_info_callback_stub.cpp" ])
91  sources += filter_include(output_file_path,
92                            [ "*idm_get_secure_user_info_callback_stub.cpp" ])
93  sources += filter_include(output_file_path, [ "*user_auth_types.cpp" ])
94
95  configs = [
96    "../../../common:iam_log_config",
97    "../../../common:iam_utils_config",
98  ]
99
100  public_configs = [ ":userauth_client_ipc_config" ]
101  remove_configs = [ "//build/config/compiler:no_exceptions" ]
102
103  deps = [ ":auth_user_ipc_interface" ]
104
105  external_deps = [
106    "c_utils:utils",
107    "hilog:libhilog",
108    "ipc:ipc_single",
109  ]
110
111  subsystem_name = "useriam"
112  part_name = "user_auth_framework"
113}
114
115ohos_source_set("userauth_service_ipc") {
116  sanitize = {
117    integer_overflow = true
118    ubsan = true
119    boundary_sanitize = true
120    cfi = true
121    cfi_cross_dso = true
122    debug = false
123    blocklist = "../../../cfi_blocklist.txt"
124  }
125  branch_protector_ret = "pac_ret"
126  include_dirs = [
127    "inc",
128    "common_defines",
129    "../../../interfaces/inner_api",
130  ]
131
132  output_file_path = get_target_outputs(":auth_user_ipc_interface")
133  sources = filter_include(output_file_path, [ "*co_auth_stub.cpp" ])
134  sources +=
135      filter_include(output_file_path, [ "*event_listener_callback_proxy.cpp" ])
136  sources +=
137      filter_include(output_file_path, [ "*executor_callback_proxy.cpp" ])
138  sources +=
139      filter_include(output_file_path, [ "*executor_messenger_stub.cpp" ])
140  sources += filter_include(output_file_path, [ "*modal_callback_proxy.cpp" ])
141  sources += filter_include(output_file_path,
142                            [ "*user_access_ctrl_callback_proxy.cpp" ])
143  sources += filter_include(output_file_path, [ "*iam_callback_proxy.cpp" ])
144  sources += filter_include(output_file_path, [ "*user_auth_stub.cpp" ])
145  sources += filter_include(output_file_path, [ "*user_idm_stub.cpp" ])
146  sources += filter_include(output_file_path, [ "*widget_callback_proxy.cpp" ])
147  sources +=
148      filter_include(output_file_path, [ "*verify_token_callback_proxy.cpp" ])
149  sources += filter_include(output_file_path,
150                            [ "*get_executor_property_callback_proxy.cpp" ])
151  sources += filter_include(output_file_path,
152                            [ "*set_executor_property_callback_proxy.cpp" ])
153  sources += filter_include(output_file_path,
154                            [ "*idm_get_cred_info_callback_proxy.cpp" ])
155  sources += filter_include(output_file_path,
156                            [ "*idm_get_secure_user_info_callback_proxy.cpp" ])
157  sources += filter_include(output_file_path, [ "*user_auth_types.cpp" ])
158
159  configs = [
160    "../../../common:iam_log_config",
161    "../../../common:iam_utils_config",
162  ]
163
164  public_configs = [ ":userauth_client_ipc_config" ]
165  remove_configs = [ "//build/config/compiler:no_exceptions" ]
166
167  deps = [ ":auth_user_ipc_interface" ]
168
169  external_deps = [
170    "c_utils:utils",
171    "hilog:libhilog",
172    "ipc:ipc_single",
173  ]
174
175  subsystem_name = "useriam"
176  part_name = "user_auth_framework"
177}
178
179ohos_source_set("iam_inner_api") {
180  sanitize = {
181    integer_overflow = true
182    ubsan = true
183    boundary_sanitize = true
184    cfi = true
185    cfi_cross_dso = true
186    debug = false
187    blocklist = "../../../cfi_blocklist.txt"
188  }
189  branch_protector_ret = "pac_ret"
190  include_dirs = [
191    "inc",
192    "common_defines",
193    "../../../interfaces/inner_api",
194  ]
195
196  output_file_path = get_target_outputs(":auth_user_ipc_interface")
197  sources = filter_include(output_file_path, [ "*.cpp" ])
198
199  configs = [
200    "../../../common:iam_log_config",
201    "../../../common:iam_utils_config",
202  ]
203
204  public_configs = [ ":userauth_client_ipc_config" ]
205  remove_configs = [ "//build/config/compiler:no_exceptions" ]
206
207  deps = [ ":auth_user_ipc_interface" ]
208
209  external_deps = [
210    "c_utils:utils",
211    "hilog:libhilog",
212    "ipc:ipc_single",
213  ]
214
215  subsystem_name = "useriam"
216  part_name = "user_auth_framework"
217}
218
219ohos_source_set("userauth_client_ipc_fuzzer") {
220  branch_protector_ret = "pac_ret"
221  include_dirs = [
222    "inc",
223    "common_defines",
224    "../../../interfaces/inner_api",
225  ]
226
227  output_file_path = get_target_outputs(":auth_user_ipc_interface")
228  sources = filter_include(output_file_path, [ "*co_auth_proxy.cpp" ])
229  sources +=
230      filter_include(output_file_path, [ "*event_listener_callback_stub.cpp" ])
231  sources += filter_include(output_file_path, [ "*executor_callback_stub.cpp" ])
232  sources +=
233      filter_include(output_file_path, [ "*executor_messenger_proxy.cpp" ])
234  sources += filter_include(output_file_path,
235                            [ "*user_auth_event_listener_callback_stub.cpp" ])
236  sources += filter_include(output_file_path, [ "*iam_callback_stub.cpp" ])
237  sources += filter_include(output_file_path, [ "*user_auth_proxy.cpp" ])
238  sources += filter_include(output_file_path, [ "*user_idm_proxy.cpp" ])
239  sources += filter_include(output_file_path, [ "*widget_callback_stub.cpp" ])
240  sources += filter_include(output_file_path, [ "*modal_callback_stub.cpp" ])
241  sources +=
242      filter_include(output_file_path, [ "*verify_token_callback_stub.cpp" ])
243  sources += filter_include(output_file_path,
244                            [ "*get_executor_property_callback_stub.cpp" ])
245  sources += filter_include(output_file_path,
246                            [ "*set_executor_property_callback_stub.cpp" ])
247  sources += filter_include(output_file_path,
248                            [ "*idm_get_cred_info_callback_stub.cpp" ])
249  sources += filter_include(output_file_path,
250                            [ "*idm_get_secure_user_info_callback_stub.cpp" ])
251  sources += filter_include(output_file_path, [ "*user_auth_types.cpp" ])
252
253  configs = [
254    "../../../common:iam_log_config",
255    "../../../common:iam_utils_config",
256  ]
257
258  public_configs = [ ":userauth_client_ipc_config" ]
259  remove_configs = [ "//build/config/compiler:no_exceptions" ]
260
261  deps = [ ":auth_user_ipc_interface" ]
262
263  external_deps = [
264    "c_utils:utils",
265    "hilog:libhilog",
266    "ipc:ipc_single",
267  ]
268
269  subsystem_name = "useriam"
270  part_name = "user_auth_framework"
271}
272
273ohos_source_set("userauth_service_ipc_fuzzer") {
274  branch_protector_ret = "pac_ret"
275  include_dirs = [
276    "inc",
277    "common_defines",
278    "../../../interfaces/inner_api",
279  ]
280
281  output_file_path = get_target_outputs(":auth_user_ipc_interface")
282  sources = filter_include(output_file_path, [ "*co_auth_stub.cpp" ])
283  sources +=
284      filter_include(output_file_path, [ "*event_listener_callback_proxy.cpp" ])
285  sources +=
286      filter_include(output_file_path, [ "*executor_callback_proxy.cpp" ])
287  sources +=
288      filter_include(output_file_path, [ "*executor_messenger_stub.cpp" ])
289  sources += filter_include(output_file_path, [ "*modal_callback_proxy.cpp" ])
290  sources += filter_include(output_file_path,
291                            [ "*user_access_ctrl_callback_proxy.cpp" ])
292  sources += filter_include(output_file_path, [ "*iam_callback_proxy.cpp" ])
293  sources += filter_include(output_file_path, [ "*user_auth_stub.cpp" ])
294  sources += filter_include(output_file_path, [ "*user_idm_stub.cpp" ])
295  sources += filter_include(output_file_path, [ "*widget_callback_proxy.cpp" ])
296  sources +=
297      filter_include(output_file_path, [ "*verify_token_callback_proxy.cpp" ])
298  sources += filter_include(output_file_path,
299                            [ "*get_executor_property_callback_proxy.cpp" ])
300  sources += filter_include(output_file_path,
301                            [ "*set_executor_property_callback_proxy.cpp" ])
302  sources += filter_include(output_file_path,
303                            [ "*idm_get_cred_info_callback_proxy.cpp" ])
304  sources += filter_include(output_file_path,
305                            [ "*idm_get_secure_user_info_callback_proxy.cpp" ])
306  sources += filter_include(output_file_path, [ "*user_auth_types.cpp" ])
307
308  configs = [
309    "../../../common:iam_log_config",
310    "../../../common:iam_utils_config",
311  ]
312
313  public_configs = [ ":userauth_client_ipc_config" ]
314  remove_configs = [ "//build/config/compiler:no_exceptions" ]
315
316  deps = [ ":auth_user_ipc_interface" ]
317
318  external_deps = [
319    "c_utils:utils",
320    "hdf_core:libhdf_utils",
321    "hilog:libhilog",
322    "ipc:ipc_single",
323  ]
324
325  subsystem_name = "useriam"
326  part_name = "user_auth_framework"
327}
328