1# Copyright 2017 gRPC authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package") 16 17licenses(["notice"]) # Apache v2 18 19grpc_package(name = "test/core/security") 20 21load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") 22 23grpc_fuzzer( 24 name = "alts_credentials_fuzzer", 25 srcs = ["alts_credentials_fuzzer.cc"], 26 corpus = "corpus/alts_credentials_corpus", 27 language = "C++", 28 tags = ["no_windows"], 29 deps = [ 30 "//:gpr", 31 "//:grpc", 32 "//test/core/util:grpc_test_util", 33 ], 34) 35 36grpc_fuzzer( 37 name = "ssl_server_fuzzer", 38 srcs = ["ssl_server_fuzzer.cc"], 39 corpus = "corpus/ssl_server_corpus", 40 data = [ 41 "//src/core/tsi/test_creds:ca.pem", 42 "//src/core/tsi/test_creds:server1.key", 43 "//src/core/tsi/test_creds:server1.pem", 44 ], 45 language = "C++", 46 tags = ["no_windows"], 47 deps = [ 48 "//:gpr", 49 "//:grpc", 50 "//test/core/util:grpc_test_util", 51 ], 52) 53 54grpc_cc_library( 55 name = "oauth2_utils", 56 srcs = ["oauth2_utils.cc"], 57 hdrs = ["oauth2_utils.h"], 58 language = "C++", 59 visibility = ["//test/cpp:__subpackages__"], 60 deps = ["//:grpc"], 61) 62 63grpc_cc_test( 64 name = "auth_context_test", 65 srcs = ["auth_context_test.cc"], 66 language = "C++", 67 uses_polling = False, 68 deps = [ 69 "//:gpr", 70 "//:grpc", 71 "//test/core/util:grpc_test_util", 72 ], 73) 74 75grpc_cc_test( 76 name = "credentials_test", 77 srcs = ["credentials_test.cc"], 78 language = "C++", 79 deps = [ 80 "//:gpr", 81 "//:grpc", 82 "//test/core/util:grpc_test_util", 83 ], 84) 85 86grpc_cc_test( 87 name = "json_token_test", 88 srcs = ["json_token_test.cc"], 89 language = "C++", 90 uses_polling = False, 91 deps = [ 92 "//:gpr", 93 "//:grpc", 94 "//test/core/util:grpc_test_util", 95 ], 96) 97 98grpc_cc_test( 99 name = "jwt_verifier_test", 100 srcs = ["jwt_verifier_test.cc"], 101 language = "C++", 102 uses_polling = False, 103 deps = [ 104 "//:gpr", 105 "//:grpc", 106 "//test/core/util:grpc_test_util", 107 ], 108) 109 110grpc_cc_test( 111 name = "secure_endpoint_test", 112 srcs = ["secure_endpoint_test.cc"], 113 language = "C++", 114 deps = [ 115 "//:gpr", 116 "//:grpc", 117 "//test/core/iomgr:endpoint_tests", 118 "//test/core/util:grpc_test_util", 119 ], 120) 121 122grpc_cc_test( 123 name = "security_connector_test", 124 srcs = ["security_connector_test.cc"], 125 language = "C++", 126 deps = [ 127 "//:gpr", 128 "//:grpc", 129 "//test/core/util:grpc_test_util", 130 ], 131) 132 133grpc_cc_test( 134 name = "linux_system_roots_test", 135 srcs = ["linux_system_roots_test.cc"], 136 data = [ 137 "//test/core/security/etc:bundle.pem", 138 "//test/core/security/etc:test_roots/cert1.pem", 139 "//test/core/security/etc:test_roots/cert2.pem", 140 "//test/core/security/etc:test_roots/cert3.pem", 141 ], 142 external_deps = [ 143 "gtest", 144 ], 145 language = "C++", 146 deps = [ 147 "//:gpr", 148 "//:grpc", 149 "//test/core/util:grpc_test_util", 150 ], 151) 152 153grpc_cc_test( 154 name = "ssl_credentials_test", 155 srcs = ["ssl_credentials_test.cc"], 156 language = "C++", 157 deps = [ 158 "//:gpr", 159 "//:grpc", 160 "//test/core/util:grpc_test_util", 161 ], 162) 163 164grpc_cc_binary( 165 name = "create_jwt", 166 srcs = ["create_jwt.cc"], 167 language = "C++", 168 deps = [ 169 "//:gpr", 170 "//:grpc", 171 "//test/core/util:grpc_test_util", 172 ], 173) 174 175grpc_cc_binary( 176 name = "fetch_oauth2", 177 srcs = ["fetch_oauth2.cc"], 178 language = "C++", 179 deps = [ 180 ":oauth2_utils", 181 "//:gpr", 182 "//:grpc", 183 "//:grpc++", 184 "//test/core/util:grpc_test_util", 185 ], 186) 187 188grpc_cc_binary( 189 name = "verify_jwt", 190 srcs = ["verify_jwt.cc"], 191 language = "C++", 192 deps = [ 193 "//:gpr", 194 "//:grpc", 195 "//test/core/util:grpc_test_util", 196 ], 197) 198 199grpc_cc_test( 200 name = "check_gcp_environment_linux_test", 201 srcs = ["check_gcp_environment_linux_test.cc"], 202 language = "C++", 203 deps = [ 204 "//:alts_util", 205 "//:gpr", 206 "//:gpr_base", 207 "//:grpc", 208 "//test/core/util:grpc_test_util", 209 ], 210) 211 212grpc_cc_test( 213 name = "check_gcp_environment_windows_test", 214 srcs = ["check_gcp_environment_windows_test.cc"], 215 language = "C++", 216 deps = [ 217 "//:alts_util", 218 "//:gpr", 219 "//:gpr_base", 220 "//:grpc", 221 "//test/core/util:grpc_test_util", 222 ], 223) 224 225grpc_cc_test( 226 name = "grpc_alts_credentials_options_test", 227 srcs = ["grpc_alts_credentials_options_test.cc"], 228 language = "C++", 229 deps = [ 230 "//:alts_util", 231 "//:gpr", 232 "//:grpc", 233 "//test/core/util:grpc_test_util", 234 ], 235) 236 237grpc_cc_test( 238 name = "alts_security_connector_test", 239 srcs = ["alts_security_connector_test.cc"], 240 language = "C++", 241 deps = [ 242 "//:gpr", 243 "//:grpc", 244 "//:grpc_base_c", 245 "//:grpc_secure", 246 "//:tsi", 247 "//:tsi_interface", 248 "//test/core/util:grpc_test_util", 249 ], 250) 251 252grpc_cc_test( 253 name = "tls_security_connector_test", 254 srcs = ["tls_security_connector_test.cc"], 255 data = [ 256 "//src/core/tsi/test_creds:ca.pem", 257 "//src/core/tsi/test_creds:server1.key", 258 "//src/core/tsi/test_creds:server1.pem", 259 ], 260 external_deps = [ 261 "gtest", 262 ], 263 language = "C++", 264 deps = [ 265 "//:gpr", 266 "//:grpc", 267 "//:grpc_secure", 268 "//:tsi", 269 "//:tsi_interface", 270 "//test/core/util:grpc_test_util", 271 ], 272) 273 274grpc_cc_test( 275 name = "grpc_tls_credentials_options_test", 276 srcs = ["grpc_tls_credentials_options_test.cc"], 277 data = [ 278 "//src/core/tsi/test_creds:ca.pem", 279 "//src/core/tsi/test_creds:server1.key", 280 "//src/core/tsi/test_creds:server1.pem", 281 ], 282 external_deps = ["gtest"], 283 language = "C++", 284 deps = [ 285 "//:gpr", 286 "//:grpc", 287 "//:grpc_secure", 288 "//test/core/util:grpc_test_util", 289 ], 290) 291