Commit Graph

406 Commits

Author SHA1 Message Date
Stephen Compall
4bf0de8901
better errors when querying by interface ID (#13406)
- double the resolveTemplateId interface and use the "contract type" for
  exercise-by-id only
- lookup for template ID only
- 400 + error message test
- move query test to also run on PG/oracle

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-31 15:53:39 +00:00
Victor Peter Rouven Müller
cc06073333
Java bindings/interface support (#13366)
* WIP

* First working version of java codegen daml interface support

* Update language-support/java/codegen/BUILD.bazel

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Fix compile errors

* Simplify code massivly, enjoy less duplication

changelog_begin

- The Java codegen now has basic support for daml interface definitions. Converting a contract id of a template implementing an interface to a contract id of the interface is possible and both executing interface choices is possible on the contract id of the interface and implementing template.

changelog_end

* Rename the test file to reflect it is a test file & enhance the inner test name & extend it further

* Fix test

* Refactor parts of TemplateClass.scala into multiple files

* Format that files!

* Minimize duplication further

* Remove unused comment

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

* Update language-support/java/codegen/src/main/scala/com/digitalasset/daml/lf/codegen/CodeGenRunner.scala

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

* Further refactoring and renaming of the TemplateClassSpec to ContractIdClassBuilderSpec

* Fix formatting

* Add interface docs

* Remove unnecessary code generation of the Contract class for interface types

* Use less bool flags and more good function names :)

* Fix build

Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-29 12:38:00 +02:00
Stephen Compall
467b8fbbe7
shorter Value expressions in json-api tests (#13358)
* template ID variables
* remove duplicate function

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:51:55 +00:00
Stephen Compall
2dd248cd68
move nonempty code to new nonempty library (#13350)
- new nonempty artifact, separate from scala-utils
- com.daml.scalautil.nonempty is now com.daml.nonempty

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 17:14:17 +00:00
Victor Peter Rouven Müller
8e6493b02a
Add security evidence about the failure tests from the json api (#13229)
changelog_begin
changelog_end
2022-03-21 15:58:59 +01:00
Victor Peter Rouven Müller
47ca2cb953
Add security evidence annotations to the integration tests of the json api (#13225)
changelog_begin
changelog_end
2022-03-21 15:58:23 +01:00
Victor Peter Rouven Müller
31366b939c
Add test evidence annotation to unit test of the json api (#13219)
changelog_begin
changelog_end
2022-03-21 15:57:59 +01:00
Victor Peter Rouven Müller
bfd69b0bee
Test that we return a 404 when requesting information about non-existing packages (#13346)
changelog_begin

- [HTTP-JSON] If information about a package is requested that doesn't exist on the ledger you will now get a 404 instead of a 500 as response.

changelog_end
2022-03-21 15:57:32 +01:00
Stephen Compall
d37a63f56e
interface choices in json-api (#13301)
This expands the domain of the exercise endpoint to accept interface IDs
instead of template IDs when exercising by contract ID. The argument is
still [compatibly] called templateId; interface IDs are accepted nowhere
else.

CHANGELOG_BEGIN
- [JSON API] Supports interface choices, including exercise by contract
  ID accompanied by an interface ID.
  See `issue #13301 <https://github.com/digital-asset/daml/pull/13301>`__.
CHANGELOG_END
2022-03-18 17:47:30 +00:00
Stephen Compall
0b5ad7a7bd
interface support in the interface library (#13154)
This adds the presence of interface names, as well as lists of choices
and their argument/return types for each interface.

It also changes the semantics of DefTemplate and EnvironmentInterface:
each may contain "unresolved choices", which are the choices inherited
from interfaces for each implementing template;
EnvironmentInterface#resolveChoices will copy the full type information
as a concrete choice for each implementing template, which should be
much simpler for codegen and json-api.

A type generator should take account of the astInterfaces as well as
typeDecls in EnvironmentInterface; interfaces aren't included in
typeDecls because where I is an interface only ContractId I is
serializable.

* Ast.DataInterface is empty, just use the interfaces map directly
* port json-api for interface API changes; does not solve #12689
* port Scala codegen for interface API changes; does not add support
* port Java codegen for interface API changes; does not solve #11350

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 19:34:54 +00:00
Stefano Baghino
739173bf84
Remove references to missing appender (#13294)
changelog_begin
[Trigger Service] Spurious logging warnings will not be printed when running `daml trigger-service`
[Oauth2 Middleware] Spurious logging warnings will not be printed when running `daml oauth2-middleware`
changelog_end

Removed references to a missing `stderr-appender` in several configuration file.

This removes warnings when running `daml trigger-service` and `daml oauth2-middleware`.

This will also remove those same warnings from several tests (HTTP JSON API and Trigger Service).
2022-03-15 18:02:02 +01:00
Stephen Compall
153a5e6bcc
parallelize long-running custom/user token tests (#13290)
Saves about 90 seconds in test wallclock time. Other tests considered
either ran too short to bother splitting, or were Oracle and thus won't
affect the main run at all.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 10:59:36 -04:00
Sergey Kisel
a4f4300502
Naming and logging improvements [DPP-956] (#13270)
* Naming and logging improvements [DPP-956]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 09:40:39 +01:00
Stephen Compall
2056f0a5cf
nonempty-cats refactoring (#13282)
* move ImplicitPreference to scala-utils
  - test it
  - use it instead of tags for json-api testing
  - fix a somewhat nonsensical type therein
* several new tests for the NonEmpty Foldable instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-14 20:48:41 -04:00
Stephen Compall
c9b5750968
NonEmpty utilities, new nonempty-cats library (#13115)
New instances and collection methods, many of which included
as-is from @andreaslochbihler-da's experiments downstream.

* mk, a version of apply with special inference
* new names for the conversion functions suggested by
  @andreaslochbihler-da
* groupBy1, zipWithIndex, reduceLeft, last1, distinct, toVector1
* a derived Semigroup instance
* a more explicit subtyping utility to specify implicit preference than
  what we get with shapeless @@
* from method, alias for unapply
* cats functorial, foldable instances in the new nonempty-cats library
* new NonEmpty utilities

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Lochbihler <36634420+andreaslochbihler-da@users.noreply.github.com>
2022-03-10 16:30:42 +00:00
Sergey Kisel
9a27edd656
Improve MessageDigest and Mac instance creation to solve lock contention [DPP-956] (#13221)
* Improve MessageDigest and Mac instance creation to solve lock contention problem [DPP-956]

changelog_begin
Scalability bottleneck in regard to hashing has been fixed in multiple places.
changelog_end
2022-03-09 22:15:32 +01:00
Stephen Compall
1e562757fe
json-api failure tests with user tokens (#13113)
Refactors a bunch of AbstractHttpServiceIntegrationTestFuns and
elements of #12922's JWT function abstractions into a new
HttpFailureUserFixture, using that split to split the
FailureTests as well.

Fixes #13112.

* restore failure test porting from #12922
This reverts b4942defa4.

* move token-relevant utilities to http-json-testing lib

* replace custom actorsystem setup with AkkaBeforeAndAfter
- suggested by @ray-roestenburg-da; thanks

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Victor Peter Rouven Müller <mueller.vpr@gmail.com>
2022-03-09 18:15:49 +00:00
Stefano Baghino
00b7ad3803
Fix red main (#13224)
changelog_begin
changelog_end

The clash is between:
- https://github.com/digital-asset/daml/pull/13147
- https://github.com/digital-asset/daml/pull/12906

The latter changed the type of `ServerError` to only get `Throwable`s, the former used `ServerError`'s to wrap a string.
2022-03-09 17:09:51 +00:00
Simon Maxen
1d40c55177
Add metering report http endpoint [DPP-855] (#13147)
* Added metering report http endpoint

changelog_begin
Added metering report http endpoint
changelog_end

* Update with review comments
2022-03-09 14:59:08 +00:00
Victor Peter Rouven Müller
6829881302
[JSON-API] Fix duplicate error logging & improve error logs messages (#12906)
* Fix duplicate error logging & improve error logs messages

changelog_begin

- [HTTP-JSON] Fix duplicate logging of errors & improved error messages slightly

changelog_end

* Simplify error handling code

* Use simple functions instead of overloading methods

* minimize diff
2022-03-09 12:43:26 +00:00
Stewart Stewart
0a52e56ca1
Make http.domain a package (Fixes #11151) (#13164)
Use a package instead of object for organization so the namespace
remains open. Note that in Scala 3, the val/type aliases in this diff
can become export statements.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Stewart Stewart <stewart.stewart@digitalasset.com>
2022-03-07 09:44:31 -05:00
Victor Peter Rouven Müller
fdb5cdae0a
[JSON-API] Normalize token parsing & remove custom parsing code (#13161)
* Normalize token parsing & remove custom parsing code

changelog_begin

- [HTTP-JSON] custom claim tokens without ledger id are now correctly recognized as such and not as user tokens

changelog_end

* Add test to check that tokens without ledger id work correctly

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

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

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

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Remove the overload of jwtForParties & change how the wihtoutNamespace JWT is constructed

* Remove unnecessary code line

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-07 13:35:37 +01:00
Victor Peter Rouven Müller
0dc167fa48
[JSON-API] Remove dependency on user provided tokens for the perf runner & refactor main (#13114)
* Don't error when user tokens are provided for the perf runner

changelog_begin
changelog_end

* Better token parsing error handling & extract user id to allocate the user if so

* make the code prettier

* Fix & simplify token parsing

* fix formatting of bazel file

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>

* correctly handle the response of createUser & don't throw if no LedgerId was found in the token

* Wrap exceptions in Futures

* Refactor Main.scala of the perf runner completely & remove dependency on user provided JWT's

* Minimize diff

* simplify code further

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Fix build

* Don't pass a jwt to the perf runner anymore everywhere it was used & fix ledger id to be right

* Minimize diff

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-03 16:12:40 +00:00
Victor Peter Rouven Müller
e1ccc2f4f4
duplicate json-api tests for full-lifecycle user token testing (#12922)
* WIP

* First version that compiles (with debug print statements)

* Revert changes on the failure tests

* Make all tests pass with some major cleanup of the new code

* Remove debug prints & outcommented code

* Make decoding / encoding test also compatible with user token tests

changelog_begin
changelog_end

* Minimize diff

* Fix oracle tests

* leave note for followup

* Update ledger-service/http-json/src/itlib/scala/http/AbstractHttpServiceIntegrationTest.scala

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-03-01 11:05:58 +00:00
Victor Peter Rouven Müller
300bbf86ae
[JSON-API] Fix duplicate calls to the command service while debug logging is enabled (#12699)
* Fix duplicate calls to the command service while debug logging is enabled

changelog_begin

- [HTTP-JSON] Fixed duplicate calls to the command service while debug logging is enabled.
- [HTTP-JSON] Fixed internal server errors which can occur while debug logging is enabled.

changelog_end

* Cleanup the code a bit, test still failing tho :(

* Finally fix the bug for real now

* Address review comments

* don't cast

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-02-11 12:53:31 +00:00
Victor Peter Rouven Müller
9e77b8dbf6
Fix logging of internal server errors for the json api (#12822)
changelog_begin

- [HTTP-JSON] Internal server errors are now properly logged again. See `issue #12887 <https://github.com/digital-asset/daml/issues/12887>`__.

changelog_end
2022-02-11 13:51:44 +01:00
Stephen Compall
dc77d35f97
move endpoint functions to separate package (#12805)
* move user management endpoint functions to separate module

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* move create and exercise endpoints to separate module

* fix copyright headers

* mark the helpers package-private

* more privacy modifiers

* import cleanup

* move Forwarded header test to unit tests

* move decodeAndParseUserIdFromToken to UserManagement

* move package endpoints to separate module
2022-02-09 11:32:31 +01:00
Stephen Compall
f63165aa76
chunked HTTP response for /v1/users endpoint (#12777)
Enriches #12766 with a chunked, lazy internal approach to
aggregating pages from the participant server, rather than
aggregating all users directly in memory before returning them.

CHANGELOG_BEGIN
- [JSON API] If ``/v1/users`` fails while retrieving users from the participant,
  it will be reported as a warning, with a partial set of users, rather than
  failing.
  See `issue #12777 <https://github.com/digital-asset/daml/pull/12777>`__.
CHANGELOG_END
2022-02-07 18:20:19 +00:00
tudor-da
14a0459f0a
SandboxNextFixture replaced by SOX-based SandboxFixture (#12654)
* SandboxNextFixture replaced by Sandbox-on-X based SandboxFixture

changelog_begin
changelog_end

* Some fixed tests

* No direct dependencies on //ledger/sandbox:sandbox and //ledger/sandbox:sandbox-scala-tests-lib

* Fix after rebase

* Rename SandboxFixture and add a missing dep

* Generate valid party names if hint is empty

* Smaller maxInboundMessageSize

* Added test for empty display name

* SandboxServer is a ResourceOwner
* Uses execution context passed as an input for resource management
* Fixes flaky FlywayMigrations issue with null Thread.currentThread.currentClassLoader
* SandboxServer simplification returns Port instead of ApiServer

* Dedicated PMAllocateWithoutDisplayName for non-Canton ledgers
* Created since Canton does not return empty display names
2022-02-07 09:25:22 +01:00
Stefano Baghino
9c35fa286e
Return all users from GET /v1/users/, paginating 1k at a time (#12766)
* Return all users from `GET /v1/users/`, paginating 1k at a time

The test runs overall for ~30 seconds, mostly due to the time required to
create 20k users.

changelog_begin
[HTTP-JSON API] Previously, a 10k limit was in place on the number of users returned by
`GET /v1/users/`. This limit has been removed and users are retrieved in chunks from the ledger
changelog_end

As of now, this builds the response in-memory, which is likely not what we want to
support long-term.

* Relax test condition due to interference with other test setups
2022-02-04 17:34:20 +00:00
Sergey Kisel
15caea42c0
Use fetchAndPersistBracket instead of fetchAndPersist (#12672)
* Use fetchAndPersistBracket instead of fetchAndPersist

* add changelog

CHANGELOG_BEGIN
- [JSON API] Under rare conditions, a POST-style multi-template query backed by
  database could have different template IDs appear to be queried at different
  ledger times, if updated concurrently.  This conditions is now checked and
  accounted for.  See `issue #12672
  <https://github.com/digital-asset/daml/pull/12672>`__.
CHANGELOG_END

* add a searchQuery metric event for each fetch trial in sync search

* revert the contract ID and contract key fetches, and explain why

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-02-03 20:16:47 +00:00
pbatko-da
7137b46543
[User management] Use pagination for listing users [DPP-840] (#12610)
CHANGELOG_BEGIN
Ledger API Specification: UserManagementService.ListUsers is now using pagination
CHANGELOG_END
2022-02-03 20:32:50 +01:00
Brian Healey
e70237a673
upgrade scalapb/netty/grpc/protobuf in proven combination (#12628)
* upgrade scalapb/netty/grpc/protobuf in proven combination

CHANGELOG_BEGIN
Upgrade scalapb, netty, grpc, protobuf and guava versions
CHANGELOG_END

* bazel reformat

* match grpc version in deps.bzl

* upgrade akka

* keep grpc version to 1.43 that is used in latest nixpkgs-unstable

* rebase and regen

* update SHA for scalapb tarball

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2022-02-03 08:38:38 -05:00
Adriaan Moors
810554bee5
Use Seq instead of Vector in user mgmt apis (#12725)
For consistency with other APIs in this area.
Note that some pre-existing APIs use `List` instead of `Seq`,
but at least those use the same underlying implementation.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 13:52:53 +01:00
Victor Peter Rouven Müller
8d5d3bdf2f
[JSON-API] User management endpoint adjustments (#12578)
* Return an empty object for deleteUser & createUser

* Make the field rights for creating a user optional & fix the tests

changelog_begin

- [HTTP-JSON] Adjusted the response for the createUser & deleteUser endpoint to an empty object instead of "true". This was done to allow possible future extensions to the return type without applying breaking changes.
- [HTTP-JSON] Made the field rights optional for the request body of the createUser endpoint. Now it is possible to create a user with just the userId (i.e. { "userId": "nice.user" }).

changelog_end
2022-01-31 18:04:42 +01:00
Remy
5cdf9b95fb
Remove some unecessary implictly with Factory (#12559)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 13:28:26 +00:00
Marton Nagy
54339ada82
Safeguard Oracle CI tests with lockIdSeed [DPP-802] (#12573)
* Fixes OracleAround so it creates unique oracle users
* Fixes rouge connection pool in JdbcLedgerDaoTransactionsSpec
* Fixes cleanup in OracleAroundAll
* Introduces lockIdSeed for test frameworks
* Adapts usage

changelog_begin
changelog_end
2022-01-26 00:54:17 +01:00
Victor Peter Rouven Müller
5f58698ba6
[JSON-API] Add list-specific-users-rights, grant & revoke user rights endpoints (#12352)
* Add an endpoint used for querying user rights of a specific user

changelog_begin

- [HTTP-JSON] Added endpoint /user/rights that if called with POST will return user rights of the user specified via the payload

changelog_end

* Add grant&revoke user rights endpoint

changelog_begin

- [HTTP-JSON] Added endpoints user/rights/grant & user/rights/revoke which allow granting & revoking user rights for a specific user

changelog_end

* Switch to using the UserRights list instead of a case class with fields

* fix type annotation

* Rename allocateUser func to createUser to comform with the endpoint path

* Response format simplification & cleanup

* Add one last test that ensure that the JSON format of UserRight doesn't change without us noticing

* Apply suggestions from code review

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

* Remove unnecessary conversations and also just use unwrap for tagged strings

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-25 11:21:55 +00:00
Stefano Baghino
aec3390904
Replace silencer plugin with built-in warning configuration (#12543)
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.

[Here][1] is s a blog post by the Scala team about it.

Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.

Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.

changelog_begin
changelog_end

[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
2022-01-24 15:01:35 +00:00
Moritz Kiefer
688f1e1e0b
Drop v0 contract ids (#12464)
* Drop v0 contract ids

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-20 15:28:27 +00:00
Victor Peter Rouven Müller
244389152f
Remove /user/delete GET endpoint (#12486)
changelog_begin

- [HTTP-JSON] Removed the /user/delete GET endpoint. Please use the /user/delete POST endpoint with the own user ID if you need to delete the user associated with the current token

changelog_end
2022-01-19 16:31:14 +00:00
Stefano Baghino
4af48bbccc
Split channel configuration from LedgerClientConfiguration (#12433)
* Split channel configuration from LedgerClientConfiguration

Fixes #12391

The channel configuration now has to be provided separately from the
configuration specific to the ledger client. In this way we avoid
situations where the builder is provided with some configuration
that gets overridden.

changelog_begin
[Scala bindings] The channel configuration has been split from the
LedgerClientConfiguration class. Provide the gRPC channel specific
configuration separately or use a builder. The channel configuration
no longer overrides the builder.
changelog_end

* Fix compilation issues in //ledger-service/...
2022-01-18 10:03:33 +00:00
Simon Meier
82bdfa5222
ledger-api-auth: remove SupportedJWTPayload (#12343)
* ledger-api-auth: make AuthServiceJWTPayload parse both user and custom daml access tokens

changelog_begin
changelog_end
2022-01-13 16:12:13 +00:00
Stephen Compall
e5dcea1084
design guidelines for JSON API endpoints (#12340)
CHANGELOG_BEGIN
CHANGELOG_END

* note about gRPC-to-HTTP error mapping

- suggested by @stefanobaghino-da; thanks

* minor wording
2022-01-11 17:37:17 +00:00
Stephen Compall
606019e4d4
local import cleanup in json-api (#12335)
* combine some scalaz imports and remove unneeded ones

* combine some local spray-json imports

* straightforward relative import

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 17:37:03 +00:00
Victor Peter Rouven Müller
4deee3fd19
Add get & delete user endpoints (#12332)
changelog_begin

- [HTTP-JSON] Added endpoints:
    - /user/delete that if called with GET will delete the current user & with POST will delete the user specified via the payload
    - /user that if called with POST will now return user info about the user specified via the payload

changelog_end
2022-01-11 12:01:02 +00:00
Victor Peter Rouven Müller
e4dbde3f18
[JSON-API] Add list users endpoint (#12323)
* Add list users endpoint

changelog_begin

- [HTTP-JSON] Added an endpoint /users which returns the available users on the ledger.

changelog_end

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

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-11 11:18:17 +00:00
akshayshirahatti-da
50de6e3639
[JSON-API] HOCON config json api (#12236)
* Change heartBeatPer to more intuitive naming of heartbeatPeriod

CHANGELOG_BEGIN
CHANGELOG_END

* Initial changes to add HOCON config for json_api

CHANGELOG_BEGIN
CHANGELOG_END

* avoid IllegalArgumentException noise

* use named arguments in big config conversion

* Changes include
 - tests for a full http-json-api config file
 - logging config and non-repudiation config is still specified via cli args.
 - config readers for MetricsReporter

* Add defaults to WebsocketConfig case class to allow partially specifying fields on typeconf file

* changes to the JwtVerifierBase config reader and equivalent test

* message already describes the value

* replace manual succeed/fails with scalatest combinators

* use qualified imports for WebsocketConfig defaults

* add back autodeleted empty lines

* collapse two lists of token verifiers into one

* add new line to config files

* rename dbStartupMode to startMode to keep consistent with cli option and for easy documentation

* Changes to daml docs to specify ways to run JSON-API by supplying a HOCON config file.

CHANGELOG_BEGIN
JSON-API can now be started supplying a HOCON application config file using the `--config` option.
All CLI flags except `logging` and `non-repudiation` one's are now deprecated and will be cleaned up in some future releases.
CHANGELOG_END

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-10 23:07:07 +00:00
Stefano Baghino
face7d303b
Remove unused line as reported in #12325 (#12331)
Reported by @realvictorprm in b4896c84af (r781264686)

changelog_begin
changelog_end
2022-01-10 12:13:03 -05:00
Victor Peter Rouven Müller
f675f1b4fe
[JSON-API] Add create user endpoint (#12272)
* WIP

* Adjust the format of the CreateUserRequest to be a nicer payload & add a simple test

changelog_begin

- [HTTP-JSON] An endpoint user/create has been added to be able to create a user via the json api

changelog_end

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

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-07 22:22:13 +00:00