Commit Graph

608 Commits

Author SHA1 Message Date
Stephen Compall
18e624a0d8
NonEmpty for non-empty arguments to Queries methods (#12341)
* declare needed NonEmpty query lists and condition lists

* selectContractsMultiTemplate requires non-empty query list

* propagate nonempty query sets through ContractDao

* propagate some NE constraints from selectContractsMultiTemplate through WebSocketService

* HashSet no longer needed

* pass non-emptiness through dbQueries

* add NE-preserving groupMap and groupMap1

* validate that resolvedWithKey is nonempty
2022-12-21 21:06:34 +00:00
Claudio Bley
c64471c28d
Remove duplicate FailureTests classes (#15937)
These have been split up into separate files already, see #13290.
2022-12-20 09:21:45 +01:00
Stephen Compall
1f31d2dce2
use LF 1.15 instead of dev for interface-related bazel tests (#15923) 2022-12-19 13:40:45 -05:00
Stephen Compall
2893e26872
fix MAXIMUM_NUMBER_OF_STREAMS errors when doing many websocket queries (#15733)
* log more termination

From the timeout loop:

+ fmm-outer
+ fmm-inner
x ACS-before-tx
x tx-after-ACS

* spam eagerCancel=true and see what happens

From the timeout loop:

+ after-split
+ IDSS-outer
+ fmm-outer
+ contractsAndBoundary
+ tx-after-ACS
+ fmm-inner
+ GTSFP-outer
x ACS-before-tx

* passing acs-and-tx tests

* trying combinations of reverting eagerCancel settings

- setting eagerCancel = false in acsAndBoundary causes the ACS
  cancellation to fail (first test), but the tx cancellation still
  succeeds

- setting eagerCancel = false in project2 causes both the ACS and tx
  stream cancellation tests (first and third tests) to fail

- the offset broadcast in acsFollowingAndBoundary appears to be
  redundant with respect to cancellation, so we revert it in the
  interest of conservatism

* make test size small

* current measurement

Still fine after the refactoring of logTermination and removal of fmm-*.

+ GTSFP-outer
+ contractsAndBoundary
x IDSS-outer-2
+ after-split
+ tx-after-ACS
+ IDSS-outer-1
x ACS-before-tx

* set level of the logTermination messages to trace
2022-12-16 16:41:08 -05:00
Simon Maxen
d76603d137
Metering clarifications for Daml Hub [DPP-1314] (#15898)
* Add metering report JSON schema

* Add metering report JSON schema
* Remove metering-report-schema from proto exclusion list
* Add header to metering report validator
* Rename struct-json to struct-spray-json
* Add struct-circe-json

* Update with release comments
2022-12-16 10:46:32 +00:00
Sergey Kisel
a7a958a337
Simplification of errors within JWT, unit test (#15881) 2022-12-14 11:05:18 +01:00
Claudio Bley
2acf719338
Refine "component" of asset field (#15833)
* Add "component" to `SecurityTest` entry for AbstractWebsocketServiceIntegrationTest

* Add README to test-evidence explaining the convention for components
2022-12-13 10:15:00 +01:00
Chun Lok Ling
f23f5d02af
13355 removed proxy* methods from RouteSetup (#15458)
* WIP

* do it on getuesr first

* remove old getUesr

* createUser

* createUser

* user post paths

* user post paths

* WIP

* removed routesetup from UserManagement

* refactor parties and allocateParty

* remove proxyWithCommand

* refactor PackagesAndDars

* remove proxyWithoutCommand

* refactor  PackagesAndDars

* merge from main

* move UploadDarFile implementation back to package and dars
2022-12-12 14:38:24 +00:00
Claudio Bley
c7aaa19c6e
Add attack/happyPath and asset information (#15732) 2022-12-12 09:43:30 +00:00
Nicu Reut
25f1254120
Move the metrics API to the observability module [PLEN-35] (#15831) 2022-12-12 09:35:55 +00:00
Sergey Kisel
e880f26b36
Identity Provider Management exposed via API [DPP-1334] (#15774) 2022-12-09 10:25:14 +01:00
Stephen Compall
d14a6441e3
close the gap between scalac -Xlint and our global options (#15799)
* add -Xlint options requiring no changes

* add -Xlint:recurse-with-default

- very minor code changes

* factor http-json hj_scalacopts duplication

* use lf_scalacopts_stricter in libs-scala where NonUnitStatements was

* use hj_scalacopts in api-type-signature

* add nonlocal-return and nullary-unit to hj_scalacopts

* commented-out excluded options

* add unit-special globally

* check implicit-recursion for clients code
2022-12-07 16:08:33 +00:00
Claudio Bley
48b9bb0aa8
Replace duplicate Security properties (#15777)
- `Authenticity` instead `Authentication`
- `Privacy` instead `Confidentiality`
2022-12-05 10:44:11 +00:00
Claudio Bley
e766f91338
Generate CSV file from all test evidences for ledger client components (#15372)
* Add new security categories

* Use test-security framework for OAuth2 middleware

* Regenerate `security-evidence.md`

* Explicitely exit the test-evidence generator

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Add //ledger-service/http-json:integration-tests-lib to evidence generator

* Skip maven artefacts on the classpath

The checker framework artefact (`checker-2.5.4.jar`) causes an `IllegalAccessError` when included in the runpath:
```
Exception in thread "main" java.lang.IllegalAccessError: class com.sun.tools.javac.code.Scope$ImportScope$ImportEntry cannot access its superclass com.sun.tools.javac.code.Scope$Entry (com.sun.tools.javac.code.Scope$ImportScope$ImportEntry is in unnamed module of loader java.net.URLClassLoader @31000e60; com.sun.tools.javac.code.Scope$Entry is in module jdk.compiler of loader app)
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at org.scalatest.tools.SuiteDiscoveryHelper$.isDiscoverableSuite(SuiteDiscoveryHelper.scala:204)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processClassName(SuiteDiscoveryHelper.scala:243)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$processFileNames$1(SuiteDiscoveryHelper.scala:279)
	at scala.collection.Iterator$$anon$9.next(Iterator.scala:577)
	at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:474)
	at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:576)
	at scala.collection.immutable.List.prependedAll(List.scala:152)
	at scala.collection.immutable.List$.from(List.scala:684)
	at scala.collection.immutable.List$.from(List.scala:681)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:35)
	at scala.collection.immutable.Iterable$.from(Iterable.scala:32)
	at scala.collection.IterableFactory$Delegate.from(Factory.scala:288)
	at scala.collection.IterableOnceExtensionMethods$.toIterable$extension(IterableOnce.scala:178)
	at org.scalatest.tools.SuiteDiscoveryHelper$.processFileNames(SuiteDiscoveryHelper.scala:285)
	at org.scalatest.tools.SuiteDiscoveryHelper$.$anonfun$discoverSuiteNames$1(SuiteDiscoveryHelper.scala:132)
	at scala.collection.immutable.List.map(List.scala:250)
```

* Regenerate `security-evidence.md`

* Convert remaining TEST_EVIDENCE stanzas of HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Print warning when a test suite could not be loaded

* Fix typo

* Use test-security framework for HTTP JSON

* Read files in tests lazily

The test-evidence generator tool needs to instantiate scalatest test suites in order
to access the tagged tests and collect relavant test entries.

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for HTTP JSON

* Regenerate `security-evidence.md`

* Use test-security framework for trigger service

* Use structural type to call `in` and `ignore` for different classes

* Remove Authentication category from EvidenceSecurity tool

There are no TEST_EVIDENCE annotations anymore.

* Add required trigger-runner-lib


* Import `scala.language.reflectiveCalls` where it is needed

* Remove left-over comments

* Add `test_evidence_binary` scala binary rule

This rule is a customized `scala_binary` rule which also accepts a `tests` attr and
generates a runpath file which is later consumed by scalatest to detect the relevant
scalatest test suites.

* Process test suites, add transitive deps

* Support nested tests_suites in `test_evidence_binary`

* Remove debug print's

* Add missing dependencies to test-evidence:generator

* Abort if test suites cannot be loaded

* Cleanup

* Reinstate scalacopts in http-json

* Reword the test description to not drop information

* Fix typo

* Explicitly exit the JVM on exceptions

This is required since non-daemon threads also prevent JVM shutdown when an exception was thrown.

* Format test-evidence/BUILD.bazel

* Resolve file paths lazily

This avoids a `NullPointerException` on Windows where Runfiles.rlocation returns `null`.

* Document new Security properties

* Print target directory and file name

* Clarify test descriptions

* Replace duplicate Security properties

Co-authored-by: Stephen Compall <stephen.compall@daml.com>Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-29 12:35:22 +01:00
Gary Verhaegen
46a4804672
bump nix (#15628)
Partly because the current version is from February (of this year,
fortunately), and partly because I need a more recent one to bump node
to 18 and fix the GSG for that.
2022-11-24 14:29:09 +00:00
mziolekda
fd8439144a
fix eta-expansion and nullary method warnings [DPP-1281] (#15689)
* Fix flake jwt leeway test

* fix eta-expansion warnings

* fix nullary method errors

* Revert "Fix flake jwt leeway test"

This reverts commit 5e2fed648b.

* format
2022-11-24 12:28:41 +00:00
mziolekda
9cee266479
Move jwt library to libs-scala (#15674) 2022-11-24 11:08:56 +01:00
Stephen Compall
51c3865701
use require for some argument checks instead of assert (#15646)
- suggested by @avdv in #15565; thanks
2022-11-22 10:13:59 -05:00
Luc Bourlier
3728919b66
Enables metrics for trigger-service [PLEN-13] (#15577)
* Adds the standard metrics to the HTTP endpoint

Refactors akka http metrics support to be used by both json-api and trigger-service

CHANGELOG_BEGIN

* Trigger Service - basic and HTTP endpoint metrics

CHANGELOG_END
2022-11-22 16:09:57 +01:00
matevarga-da
51ff569591
Match up JSON API logback date format (#15621)
I think it is reasonable to match all our default date log format across our components. The conversion is simple enough, but I did it at least 10 times just in the past 2 weeks.
2022-11-21 13:02:06 +01:00
Luc Bourlier
e24ce7ab4f
Adds labels to the Akka HTTP metrics [PLEN-12] (#15436)
* Adds labels to the Akka HTTP metrics

CHANGELOG_BEGIN
CHANGELOG_END

* code improvements

* A bit of headroom for the latency tests
2022-11-16 11:08:45 +01:00
Stephen Compall
ff194c379e
use a single DELETE for contracts on Oracle (#15565)
* use NonEmpty for joinFragment

* build a single DELETE for archiving, even on Oracle
2022-11-15 10:34:43 -05:00
atriantafyllos-da
5ddd0646c4
Removed http_json_api metrics from ledger metrics [DPP-1307]. (#15552)
changelog_begin
changelog_end
2022-11-15 14:56:41 +01:00
Luc Bourlier
4354c5d06b
Support for golden signals metrics on akka-http APIs [PLEN-12] (#15310)
* Support for golden signals metrics on akka-http

Adds metrics support needed for throughput, error rate, latency,
and data size on both the classic http endpoints and
the websocket endpoints.

Installed the support on the JSON API endpoints.

CHANGELOG_BEGIN

JSON API - additional metrics for endpoints

daml_http_json_api_requests_total
daml_http_json_api_errors_total
daml_http_json_api_requests_duration_seconds
daml_http_json_api_requests_size_bytes
daml_http_json_api_responses_size_bytes

daml_http_json_api_websocket_messages_received_total
daml_http_json_api_websocket_messages_received_size_bytes
daml_http_json_api_websocket_messages_sent_total
daml_http_json_api_websocket_messages_sent_size_bytes

CHANGELOG_END


Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2022-11-09 16:55:12 +01:00
Raymond Roestenburg
df41eedc81
Refactored resolving requests in WebSocketService. (#15398)
* Refactored resolving requests in WebSocketService.

CHANGELOG_BEGIN
CHANGELOG_END

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/WebSocketService.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/WebSocketService.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* Formatting.

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-07 17:22:19 +01:00
fayi-da
33b637433d
Query store support for interface query/fetch (#15304)
* Update contracts table to allow multiple rows per contract id

* Keep template id for deletes

* add tpid grouping to deleteContracts

* chunking implementation

* mention tpid for postgres ON CONFLICT

* Remove ByInterfaceId special case

* add changelog

CHANGELOG_BEGIN
- [JSON API] The JSON API query store database has changed schema and
  needs to be reset. If you are migrating from a previous version,
  either reset your database manually or start the HTTP JSON API with
  one of the options that regenerate the schema (``create-only``,
  ``create-if-needed-and-start``, ``create-and-start``).
CHANGELOG_END

* add tpid to ignore_row_on_dupkey_index pragma

- came up in discussion with @ray-roestenburg-da; thanks

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-11-01 15:53:57 -04:00
Stephen Compall
7da769f37f
test number of query results after overlapping contract IDs in database (#15316)
CHANGELOG_BEGIN
CHANGELOG_END

* add single-party test case as well
2022-10-26 10:13:33 -04:00
Stephen Compall
e1ff695d5e
less stringly websocket testing (#15330)
* use encoder for an exercise
* make ContractDelta a bit less magic
* encode a CreateCommand

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-25 16:31:38 +00:00
Stephen Compall
7e7a8f2f2e
use domain.Party instead of String in json-api tests (#15329)
* use domain.Party instead of String in jwtForParties, headersWithPartyAuth

CHANGELOG_BEGIN
CHANGELOG_END

* use domain.Party instead of String in headersWithPartyAuth

* fix sharedAccountCreateCommand and some corners
2022-10-25 11:31:26 -04:00
Nicu Reut
8da0a84183
Introduce explicit timer API for stopping a timer [PLEN-29] (#15344) 2022-10-25 14:44:32 +00:00
Nicu Reut
f550b69463
Reorganize the metrics package structure [PLEN-29] (#15312) 2022-10-25 10:05:40 +00:00
fayi-da
7762d2a376
Removed unnecessary log message (#15323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-24 14:35:18 +01:00
tudor-da
1a4ef5b238
Revert "Upgrade dependencies to their latest stable release (#15216)" (#15309)
This reverts commit 1454497f

changelog_begin
changelog_end
2022-10-24 08:33:37 +02:00
Nicu Reut
5b4c7f7677
Extract metrics API that is decoupled from dropwizard [PLEN-28] (#15231) 2022-10-21 16:30:21 +02:00
Stephen Compall
31942d46ee
make resolver preserve ContractTypeId type *and* class (#15282)
* move resolveTemplateId to ContractTypeIdMap
* replace the contractTypeIdMap with an interfaceIdMap
* remove ResolveContractTypeId's type parameter, replace with Overload relation
* define the ContractTypeId resolver to be overload, ctid-type-sensitive
* remove AnyKind usages
* remove resolveTemplateId argument-passing

* demonstrate very strange inserted cast
`x.packageId` inserts a cast on `x` to `ContractTypeId.Template`, for
which there is no local evidence
* fix compiler-inserted cast problem
- Why does this fix it?  Who knows!

* failure of template ID resolution no longer fails later than we want
* fix resolution of interface IDs for websocket queries

CHANGELOG_BEGIN
- [JSON API] Some error messages have been corrected to no longer
  confuse interface IDs with template IDs, based on what varieties of
  contract type ID the endpoint in question supports.
CHANGELOG_END

* mention #15293 where relevant
* define templateId_ generically
* remove unused utilities for old resolver
2022-10-20 10:02:04 -04:00
Chun Lok Ling
6e7c408484
Replace ContractTypeId with ContractTypeId.Template where appropriate (#15199)
* domain.ContractTypeId.Template
* ResolveKeyType to use .Template
* CreateAndExerciseCommand to use .Template
* keyTypeMap
* bitraverse

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-10-19 19:39:19 +00:00
Gerolf Seitz
1454497f3a
Upgrade dependencies to their latest stable release (#15216)
The outdated dependencies where determined by running
`bazel run @maven//:outdated`.

Not all dependencies are brought up to the latest version available on
Maven Central, for the following reasons:

Nobody dares to touch DB:
  com.oracle.database.jdbc:ojdbc8 [19.14.0.0 -> 21.7.0.0]
  com.oracle.database.jdbc.debug:ojdbc8_g [19.14.0.0 -> 21.7.0.0]
  com.h2database:h2 [2.1.210 -> 2.1.214]
  org.flywaydb:flyway-core [8.4.1 -> 9.4.0]

License issues beyond version 2.6.x:
  com.typesafe.akka:akka-actor_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-actor-testkit-typed_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-actor-typed_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-http_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-http-spray-json_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-http-testkit_2.13 [10.2.8 -> 10.4.0-M1]
  com.typesafe.akka:akka-slf4j_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-stream_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-stream-testkit_2.13 [2.6.18 -> 2.7.0-M3]
  com.typesafe.akka:akka-testkit_2.13 [2.6.18 -> 2.7.0-M3]

Not a stable release:
  com.chuusai:shapeless_2.13 [2.3.3 -> 2.4.0-M1]
  io.circe:circe-core_2.13 [0.14.3 -> 0.15.0-M1]
  io.circe:circe-generic_2.13 [0.14.3 -> 0.15.0-M1]
  io.circe:circe-parser_2.13 [0.14.3 -> 0.15.0-M1]
  org.scalameta:munit_2.13 [0.7.29 -> 1.0.0-M6]
  org.scalactic:scalactic_2.13 [3.2.14 -> 3.3.0-SNAP3]
  org.scalatest:scalatest_2.13 [3.2.14 -> 3.3.0-SNAP3]
  org.scalatestplus:scalacheck-1-15_2.13 [3.2.11.0 -> 3.3.0.0-SNAP3]
  org.scalatestplus:selenium-3-141_2.13 [3.2.10.0 -> 3.3.0.0-SNAP3]
  org.scalatestplus:testng-6-7_2.13 [3.2.10.0 -> 3.3.0.0-SNAP3]
  org.tpolecat:doobie-core_2.13 [0.13.4 -> 1.0.0-RC2]
  org.tpolecat:doobie-hikari_2.13 [0.13.4 -> 1.0.0-RC2]
  org.tpolecat:doobie-postgres_2.13 [0.13.4 -> 1.0.0-RC2]
  com.fasterxml.jackson.core:jackson-core [2.13.4 -> 2.14.0-rc2]
  com.fasterxml.jackson.core:jackson-databind [2.13.4 -> 2.14.0-rc2]

Netty + boringssl + grpc + protobuf need be kept in sync, and the latest
versions also aren't stable releases:
  io.netty:netty-buffer [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-codec-http2 [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-handler [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-handler-proxy [4.1.79.Final -> 5.0.0.Alpha2]
  io.netty:netty-resolver [4.1.79.Final -> 5.0.0.Alpha2]
  com.google.protobuf:protobuf-java [3.21.7 -> 4.0.0-rc-2]

Scalaz changed a few annoying things in 7.3, so let's stick to 7.2:
  org.scalaz:scalaz-core_2.13 [7.2.34 -> 7.4.0-M12]
  org.scalaz:scalaz-scalacheck-binding_2.13 [7.2.34-scalacheck-1.15 -> 7.4.0-M12]
  org.scalacheck:scalacheck_2.13 [1.15.4 -> 1.17.0]

Determined by the rules_scala:
  org.scala-lang:scala-library [2.13.8 -> 2.13.10]

CHANGELOG_BEGIN
Upgraded to the latest stable version of the following JVM dependencies:

ch.qos.logback:logback-classic:1.4.4
ch.qos.logback:logback-core:1.4.4
com.auth0:java-jwt:4.1.0
com.auth0:jwks-rsa:0.21.2
com.fasterxml.jackson.core:jackson-core:2.13.4
com.fasterxml.jackson.core:jackson-databind:2.13.4
com.github.ben-manes.caffeine:caffeine:3.1.1
com.github.pathikrit:better-files_2.13:3.9.1
com.github.pureconfig:pureconfig-core_2.13:0.17.1
com.github.pureconfig:pureconfig-generic-base_2.13:0.17.1"
com.github.pureconfig:pureconfig-generic_2.13:0.17.1
com.github.pureconfig:pureconfig_2.13:0.17.1
com.github.scopt:scopt_2.13:4.1.0
com.google.code.gson:gson:2.9.1
com.lihaoyi:pprint_2._13:0.8.0"
com.lihaoyi:sourcecode_2.13:0.3.0
com.sparkjava:spark-core:2.9.4
com.squareup:javapoet:1.13.0
com.storm-enroute:scalameter-core_2.13:0.21
com.storm-enroute:scalameter_2.13:0.21
com.thesamet.scalapb:scalapb-json4s_2.13:0.12.0
com.typesafe.scala-logging:scala-logging_2.13:3.9.5
com.zaxxer:HikariCP:5.0.1
commons-io:commons-io:2.11.0
eu.rekawek.toxiproxy:toxiproxy-java:2.1.7
io.circe:circe-core_2.13:0.14.3
io.circe:circe-generic-extras_2.13:0.14.2
io.circe:circe-generic_2.13:0.14.3
io.circe:circe-parser_2.13:0.14.3
io.circe:circe-yaml_2.13:0.14.1
io.github.paoloboni:spray-json-derived-codecs_2.13:2.3.9
io.reactivex.rxjava2:rxjava:2.2.21
io.spray:spray-json_2.13:1.3.6
javax.annotation:javax.annotation-api:1.3.2
javax.ws.rs:javax.ws.rs-api:2.1.1
junit:junit-dep:4.11
junit:junit:4.13.2
net.logstash.logback:logstash-logback-encoder:7.2
org.apache.commons:commons-lang3:3.12.0
org.apache.commons:commons-text:1.10.0
org.awaitility:awaitility:4.2.0
org.checkerframework:checker-qual:3.26.0
org.checkerframework:checker:3.26.0
org.codehaus.janino:janino:3.1.8
org.freemarker:freemarker-gae:2.3.31
org.jline:jline-reader:3.21.0
org.jline:jline:3.21.0
org.junit.jupiter:junit-jupiter-api:5.9.1
org.junit.jupiter:junit-jupiter-engine:5.9.1
org.junit.platform:junit-platform-engine:1.9.1
org.junit.platform:junit-platform-runner:1.9.1
org.mockito:mockito-core:4.6.1
org.mockito:mockito-inline:4.6.1
org.mockito:mockito-scala_2.13:1.17.12
org.pcollections:pcollections:3.2.0
org.playframework.anorm:anorm-akka_2.13:2.7.0
org.playframework.anorm:anorm_2.13:2.7.0
org.postgresql:postgresql:42.5.0
org.reactivestreams:reactive-streams-tck:1.0.4
org.reactivestreams:reactive-streams:1.0.4
org.reflections:reflections:0.10.2
org.sangria-graphql:sangria-ast_2.13:3.4.0
org.sangria-graphql:sangria-core_2.13:3.4.0
org.sangria-graphql:sangria-derivation_2.13:3.4.0
org.sangria-graphql:sangria-parser_2.13:3.4.0
org.sangria-graphql:sangria-spray-json_2.13:1.0.3
org.scala-lang.modules:scala-parallel-collections_2.13:1.0.4
org.scalactic:scalactic_2.13:3.2.10
org.scalameta:munit_2.13:0.7.29
org.scalatest:scalatest_2.13:3.2.10
org.scalatestplus:scalacheck-1-15_2.13:3.2.10.0
org.scalatestplus:selenium-3-141_2.13:3.2.10.0
org.scalatestplus:testng-6-7_2.13:3.2.10.0
org.scalaz:scalaz-core_2.13:7.2.34
org.scalaz:scalaz-scalacheck-binding_2.13:7.2.34-scalacheck-1.15
org.seleniumhq.selenium:selenium-java:4.5.0
org.slf4j:slf4j-api:2.0.3
org.slf4j:slf4j-simple:2.0.3
org.testng:testng:6.7
org.typelevel:cats-core_2.13:2.8.0
org.typelevel:cats-kernel_2.13:2.8.0
org.typelevel:cats-laws_2.13:2.8.0
org.typelevel:paiges-core_2.13:0.4.2
org.wartremover:wartremover_2.13.8:3.0.6
org.xerial:sqlite-jdbc:3.39.3.0
CHANGELOG_END
2022-10-18 08:50:23 +02:00
Chun Lok Ling
879048eedf
Removed alias fetchcontracts.domain.TemplateId (#15198)
* Removed alias fetchcontracts.domain.TemplateId

CHANGELOG_BEGIN
CHANGELOG_END

* order

* Apply suggestions from code review

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* add comment for .template

* format

* todo

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-10-17 17:23:53 +01:00
Claudio Bley
e24497635d
Rework evidence security categories (#15226)
* Rework evidence security categories

using the 7 industry standard security testing areas:

* Authentication
* Authorization
* Confidentiality
* Integrity
* Availability
* Non-Repudiation
* Resilience

CHANGELOG_BEGIN
CHANGELOG_END

* Replace category `Input Validation`

* Replace category `Privacy`

* Replace category `Semantics`

* Replace category `Semantics`

* Replace category `Performance`

* Skip categories `NonRepudiation` and `Resilience` for now

There are currently no tests for these categories.

* Regenerate `security-evidence.md`
2022-10-13 09:55:45 +00:00
Stephen Compall
951817aee1
run query-store-independent tests less often (#15201)
* declare the separate kind of duplication

CHANGELOG_BEGIN
CHANGELOG_END

* move completely independent tests

* move many tests to 'QueryStoreIndependent'

* fix metering-report test to work with user tokens

* rename query-store/auth-dependent tests

- to QueryStoreAndAuthDependentIntegrationTest
- from AbstractHttpServiceIntegrationTestTokenIndependent

* security evidence moved
2022-10-11 09:27:07 -04:00
Nicu Reut
2f453a145c
Extract the testing metrics instance [PLEN-4] (#15192) 2022-10-10 18:52:49 +00:00
Stephen Compall
70f118579c
remove some ResolvedQuery cases (#15000)
* introduce ForQuery to overload ActiveContract.fromLedgerApi
* remove booleans from ResolvedQuery.apply
* wrong error string
* use the fact that query is non-empty to hide the Empty case
* we definitely only need a Semigroup, which fixes the law violation
* remove Empty

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Chun Lok Ling <110462561+chunlokling-da@users.noreply.github.com>
2022-10-10 09:33:40 -04:00
atriantafyllos-da
507f18ad20
Dpp 1222 move metric tagging classes to daml sdk (#15067)
Moved canton's tagging metric class [DPP-1222].

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-03 14:23:07 +02:00
Simon Maxen
0654f9978c
Add libs-scala/struct-json (#15090)
changelog_begin
changelog_end
2022-09-29 16:22:01 +01:00
Chun Lok Ling
40e994bd46
Bug fix. template id of archived contracted should be interface id instead (#15117)
* use Consume.syntax

* added exercise in interface "sub query endpoint" test case. checked template id of archive. it is asserting to be template id but not interface id which is wrong. I will change it back to interface id after all CI passed

* test that the archive events have the interface ID; add the template-ID-to-interface-ID mapping to archive events in websocket result stream

* Add change log

CHANGELOG_BEGIM
CHANGELOG_END

* Add change log

CHANGELOG_BEGIN
CHANGELOG_END

* use JSON converter instead of hand-writing JSON

* factor assertions for created records

* combine value assertions

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-09-29 11:52:19 +01:00
Stephen Compall
9f1033a6ec
remove some domain.TemplateId usages (#15097)
* replace several TemplateId with ContractTypeId
* replace several TemplateId with ContractTypeId.Template
* deprecate, even though this misses so many usages
* link to #15098 for followups

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-27 07:53:10 -04:00
Stephen Compall
c1cde096b2
replace OneAnd with NonEmpty for query templateIds (#15088)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-26 16:06:58 +00:00
mziolekda
41dc32a016
Remove reliance on implicit party allocation in CI tests [DPP-1234] (#15037)
* Remove reliance on implict party allocation in the authorization tests of the sandbox-on-x

CHANGELOG_BEGIN
CHANGELOG_END

* Remove the HOCON and cli config parameters

* Remove implicit party allocation from the Submission Service

* Remove support for implicit parties from the bridge

* Fix codegen reliance on implicit party allocation

* Fix daml script tests

* Fix trigger tests

* format security-evidence.md post rebase

* Fix json-api tests

* One more json-api test

* Fix haskell tests

* Corrections post-review

* Cosmetic improvements

* Fix race condition in party allocation handling
2022-09-22 10:20:53 +02:00
Stephen Compall
77672d2896
better JsNull check for Oracle; test scenarios for nested cases (#15022)
* a couple comparison query scenarios with nested position
* same JSON null test, but different
- 'gt string' (scenario 0) fails without this change
- 'gt int' (scenario 1) succeeds regardless of this change

CHANGELOG_BEGIN
- [JSON API with Oracle] Fix some nested queries that were returning no
  data.  DisableContractPayloadIndexing must be set to true to take
  advantage of this fix.
CHANGELOG_END
2022-09-21 10:21:35 +00:00
Stephen Compall
a9ebecfe5c
retest Oracle with payload indexing (#15041)
* point to #14844 and #15040 for some TODOs
* duplicate the Oracle tests, disable large literals when indexing is on
* split test file for parallelization

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-20 10:32:58 -04:00