xref: /aosp_15_r20/external/tink/java_src/examples/gcs/BUILD.bazel (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1package(default_visibility = ["//visibility:public"])
2
3licenses(["notice"])
4
5java_binary(
6    name = "gcs_envelope_aead_example",
7    srcs = ["GcsEnvelopeAeadExample.java"],
8    main_class = "gcs.GcsEnvelopeAeadExample",
9    deps = [
10        "@maven//:com_google_auth_google_auth_library_oauth2_http",
11        "@maven//:com_google_cloud_google_cloud_storage",
12        "@tink_java//src/main/java/com/google/crypto/tink:aead",
13        "@tink_java//src/main/java/com/google/crypto/tink:key_templates",
14        "@tink_java//src/main/java/com/google/crypto/tink:registry_cluster",
15        "@tink_java//src/main/java/com/google/crypto/tink/aead:aead_config",
16        "@tink_java//src/main/java/com/google/crypto/tink/aead:kms_envelope_aead_key_manager",
17        "@tink_java//src/main/java/com/google/crypto/tink/integration/gcpkms:gcp_kms_client",
18    ],
19)
20
21# In order to run this test, you have to use your own GCP config.
22sh_test(
23    name = "gcs_envelope_aead_example_test",
24    size = "small",
25    srcs = ["gcs_envelope_aead_example_test.sh"],
26    args = [
27        "$(rootpath :gcs_envelope_aead_example)",
28        # Change this to your key
29        "gcp-kms://projects/tink-test-infrastructure/locations/global/keyRings/unit-and-integration-testing/cryptoKeys/aead-key",
30        # Change this to your credential
31        "$(rootpath //testdata/gcp:credential.json)",
32        # Change this to your project ID
33        "tink-test-infrastructure",
34        # Change this to your GCS bucket
35        "gs://tink-gcs-examples",
36    ],
37    data = [
38        ":gcs_envelope_aead_example",
39        # Change this to your credential
40        "//testdata/gcp:credential.json",
41    ],
42    tags = [
43        "manual",
44        "requires-network",
45    ],
46)
47