daml/ledger-service
Stephen Compall 22d916baed
party-set arguments for JSON API (#11454)
* add actAs, readAs to `meta` for create, exercise, createAndExercise endpoints

* use meta actAs, readAs to control how contract IDs are looked up for exercise

* outdated comments on JwtWritePayload and JwtPayload

* toSet1 operator to clean up some NEL manipulation

* take optional readAs argument for query endpoint

* use readAs for query POST

* check whether readAs is safe in query endpoint

* missed CommandMeta args in tests

* FetchRequest, a domain model to layer on "fetch" endpoint's ContractLocator

- ContractLocator was overloaded as a domain request model *and* a component
  of other domain request models; the addition of new arguments means it can
  no longer exactly meet the former, and adding "readAs" to it would poison it
  for the latter cases.

* take readAs argument from fetch endpoint

* add readAs security check from query to fetch

* move jwt parties functions to util

* testing the party-set/JWT functions

* missing headers

* caught boolean blindness in readAs security checks

* test that meta params are used for commands

* make resolveRefParties do a subset check, too

* Revert "make resolveRefParties do a subset check, too"

This reverts commit 40a66f102c.

* test that the readAs auth check actually applies

* test that command service uses meta readAs, actAs

* note on test coverage

* add changelog

CHANGELOG_BEGIN
- [JSON API] ``actAs`` and ``readAs`` may be specified for create, exercise,
  create-and-exercise, non-WS fetch, and non-WS query.
  See `issue #11454 <https://github.com/digital-asset/daml/pull/11454>`__.
CHANGELOG_END

* no saving mallocs

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* untabify

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

* move design comment to comment from function name

- suggested by @cocreature; thanks

* remove unneeded variable

* refactor single-key callers of requestJsonReader

- suggested by @cocreature; thanks

* build error in ce

* diagnose Windows failure

* add missed http-json-testing requirement

* use readers as fetch/query party-set name

- suggested by @cocreature and @realvictorprm, thanks

* extra import

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-11-12 02:10:15 +00:00
..
cli-opts Simplify loading of logback file (#10592) 2021-08-17 08:46:37 +00:00
db-backend replace OneAnd party Sets with NonEmpty Set (#11420) 2021-10-28 15:23:12 +00:00
fetch-contracts limit contract insertion/deletion batching on backpressure (#11589) 2021-11-09 19:03:03 +00:00
http-json party-set arguments for JSON API (#11454) 2021-11-12 02:10:15 +00:00
http-json-cli Optional table prefix for trigger service (#11047) 2021-10-04 17:02:36 +00:00
http-json-ledger-client [JSON-API] Use the token from incoming requests to update the package list (#10602) 2021-09-03 10:12:01 +00:00
http-json-oracle [JSON-API] Configurable Hikari connection pool props (#11621) 2021-11-11 05:43:56 +00:00
http-json-perf [JSON-API] Configurable Hikari connection pool props (#11621) 2021-11-11 05:43:56 +00:00
http-json-testing [JSON-API] Configurable Hikari connection pool props (#11621) 2021-11-11 05:43:56 +00:00
jwt [Short] Typo (#11410) 2021-10-27 12:44:13 +02:00
lf-value-json Drop ContractId typeparameter from Value (#10827) 2021-09-16 08:46:57 +00:00
utils [JSON-API] Use the token from incoming requests to update the package list (#10602) 2021-09-03 10:12:01 +00:00