mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
bd01a211f4
Adding support for accepting server's private key as an encrypted file (since storing unencrypted private key in a file system might be a risk). Encrypted private key is assumed to be encrypted using AES or similar algorithm. The details necessary to decrypt it are be obtained from a secrets server over HTTP as JSON document. The URL to secret's server is supplied through the new `--secrets-url` CLI parameter. One can supply private in either plaintext (old behavior) or ciphertext: if a private key's file ends with .enc suffix it is assumed to be ciphertext. Otherwise it is assumed to be plain text. CHANGELOG_BEGIN - [DPP-418] [Participant] Add support for supplying server's private key as an encrypted file and then decrypting it with the help of a secrets server. CHANGELOG_END
72 lines
1.9 KiB
Python
72 lines
1.9 KiB
Python
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//bazel_tools:scala.bzl",
|
|
"da_scala_binary",
|
|
"da_scala_library",
|
|
"da_scala_test",
|
|
"lf_scalacopts",
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "jwt",
|
|
srcs = glob(["src/main/scala/**/*.scala"]),
|
|
scala_deps = [
|
|
"@maven//:com_github_scopt_scopt",
|
|
"@maven//:com_typesafe_scala_logging_scala_logging",
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
tags = ["maven_coordinates=com.daml:jwt:__VERSION__"],
|
|
versioned_scala_deps = {
|
|
"2.12": [
|
|
"@maven//:org_scala_lang_modules_scala_collection_compat",
|
|
],
|
|
},
|
|
visibility = ["//visibility:public"],
|
|
runtime_deps = [
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
],
|
|
deps = [
|
|
"@maven//:com_auth0_java_jwt",
|
|
"@maven//:com_auth0_jwks_rsa",
|
|
"@maven//:com_google_guava_guava",
|
|
"@maven//:org_slf4j_slf4j_api",
|
|
],
|
|
)
|
|
|
|
da_scala_binary(
|
|
name = "jwt-bin",
|
|
main_class = "com.daml.jwt.Main",
|
|
scalacopts = lf_scalacopts,
|
|
runtime_deps = [
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
],
|
|
deps = [
|
|
":jwt",
|
|
],
|
|
)
|
|
|
|
da_scala_test(
|
|
name = "tests",
|
|
size = "medium",
|
|
srcs = glob(["src/test/scala/**/*.scala"]),
|
|
resources = glob(["src/test/resources/**/*"]),
|
|
scala_deps = [
|
|
"@maven//:com_typesafe_scala_logging_scala_logging",
|
|
"@maven//:org_scalatest_scalatest_core",
|
|
"@maven//:org_scalatest_scalatest_matchers_core",
|
|
"@maven//:org_scalatest_scalatest_shouldmatchers",
|
|
"@maven//:org_scalatest_scalatest_wordspec",
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
deps = [
|
|
":jwt",
|
|
"//ledger/test-common",
|
|
"@maven//:com_auth0_java_jwt",
|
|
"@maven//:org_scalatest_scalatest_compatible",
|
|
],
|
|
)
|