Commit Graph

314 Commits

Author SHA1 Message Date
mziolekda
954bc5e0d4
Remove the reset service from sandbox-classic and sandbox [DPP-804] (#12448)
* Remove the reset service from sandbox-classic and sandbox

CHANGELOG_BEGIN
Reset service has been removed from the sandbox-classic, sandbox and daml-on-sql
CHANGELOG_END

* format it
2022-01-19 09:18:14 +01:00
pbatko-da
4fe6e53b9d
[User management] Persistence with caching (#12344)
Adding
 - `PersistentUserManagementStore` and `CachedUserManagementStore`,
 - `UserManagementStorageBackendTemplate` and sql migrations,
 - CLI flags: `--user-management-max-cache-size` and `--user-management-cache-expiry`;
 And wiring `PersistentUserManagementStore` where before we had `InMemoryUserManagementStore`.
2022-01-18 15:59:22 +01:00
nicu-da
5a7b2bae12
ledger-api - Rename error method to invalidDeduplicationPeriod [KVL-1222] (#12424) 2022-01-17 11:54:32 +00:00
Simon Meier
62b61c0d51
ledger api auth: polish error messages (#12350)
* ledger api auth: polish error messages

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 18:16:59 +00:00
Simon Meier
6dd0eb774e
ledger api server: support auth0 usernames (#12308)
* ledger api: support Auth0 user names in user management

See the `IdString.UserId` and `IdString.ApplicationId` comments wrt the
character classes being introduced.

Many thanks to @cocreature for helping with deciding on the exact
restrictions of user-ids.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 12:58:43 +00:00
Samir Talwar
3b8a9e4432
Revert "devenv: Just require Nix v2.4 or newer." (#12299)
This reverts commit ed442fa8ae.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-06 18:02:21 +00:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
nicu-da
e182fc5026
[ledger-api] - Move deduplication duration validation into the KV WriteService (#12151)
changelog_begin
ledger-api - Remove validation for duration deduplication periods, which was validating that the deduplication duration is smaller than the max deduplication duration. This is now up to the ledger to enforce.
changelog_end
2021-12-20 05:33:46 -08:00
Simon Meier
f223528bfb
Implement PoC of user management for Ledger API server (fix #12014) (#12063)
CHANGELOG_BEGIN
- [User Management]: add support for managing participant node users and authenticating
  requests as these users using standard JWT tokens.
CHANGELOG_END

Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Adriaan Moors <90182053+adriaanm-da@users.noreply.github.com>
2021-12-13 17:58:30 +01:00
nicu-da
e1a2da0771
[ledger-api] - Add deduplication_offset as a valid deduplication period for commands [KVL-1172] (#12041)
changelog_begin
[ledger-api] - Add `deduplication_offset` as a valid type for the command deduplication period
changelog_end
2021-12-13 12:26:09 +00:00
Samir Talwar
9f8e640b1a
Use ExecutionContext.parasitic instead of DirectExecutionContext. (#11783)
* concurrent: Replace `DirectExecutionContextInternal` with `parasitic`.

* concurrent: Rename `DirectExecutionContext` `parasitic`.

* Use `ExecutionContext.parasitic` instead of `DirectExecutionContext`.

We no longer need the latter.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix formatting.
2021-12-10 16:25:46 +01:00
pbatko-da
f330ace261
[DPP-765] Follow-up to generic gRPC error handler (#12056)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-10 10:12:14 +01:00
pbatko-da
0613a712c9
[DPP-767] Add assertion for logged messages in ErrorFactoriesSpec (#11973)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 09:54:49 +01:00
Stefano Baghino
00d3326ebe
Remove source code specific to Scala 2.12 (#12003)
Looks like it has been removed from the build files but not from the source tree.

changelog_begin
changelog_end
2021-12-07 10:08:19 +00:00
nicu-da
28e62820ef
[ledger-api] - Rename the error metadata key for invalid deduplication duration (#11966)
changelog_begin
[ledger-api] - rename metadata key max_deduplication_duration to longest_duration for error concerning invalid deduplication durations
changelog_end
2021-12-05 23:55:47 -08:00
nicu-da
61334cff77
kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
changelog_begin
changelog_end
2021-11-29 10:28:07 -08:00
mziolekda
056fc52706
Log while processing base64 encoded server key [DPP-761] (#11835)
* Log while processing base64 encoded server key

CHANGELOG_BEGIN
CHANGELOG_END

* address review comments

* demote logs from error to debug

* format
2021-11-25 18:02:35 +00:00
tudor-da
cf3ac011ca
[Self-service error codes] Do not return error code id and definite_answer in metadata for security sensitive errors (#11828)
* [Self-service error codes] Do not return error code id in metadata

CHANGELOG_BEGIN
CHANGELOG_END

* Do not propagate definite_answer
* Additionally, remove redundant context info from error codes

* Fix tests

* Create IndexDbException as a specialization
* Used to globally define error codes returned by the persistence layer
that are logging
2021-11-25 12:42:29 +01:00
nicu-da
59eb0d2eff
kvutils - For duplicate command rejections, add the submission id as metadata [KVL-1175] (#11848)
changelog_begin
kvutils - For duplicate command rejections, the submission id of the already accepted transaction is returning as part of the gRPC metadata. The submission id will be included under the key `existing_submission_id`.
changelog_end
2021-11-24 04:32:34 -08:00
mziolekda
f2aa09c114
Allow encoded server key files to be in base64 [DPP-761] (#11796)
* Allow encoded server key files to be in base64

CHANGELOG_BEGIN
CHANGELOG_END

* format

* dry tests
2021-11-23 09:49:52 +00:00
nicu-da
f5a6302ba1
[participant-integration-api] - Use internal CommandCompletionService [KVL-1172] (#11741)
Fully decouple the usage of the gRPC CommandCompletionService vs the internally defined CommandCompletionService. This allows the two interfaces to diverge and does not force us to expose all the methods that we want to add to the internal CommandCompletionService.

changelog_begin
changelog_end
2021-11-18 07:19:27 -08:00
tudor-da
b0a1bf79df
More missing error codes (#11749)
* Missing error codes in Sandbox classic

CHANGELOG_BEGIN
CHANGELOG_END

* Covering more errors above the persistence layer

* Fix wrong contextualizedErrorLoggers

* Compilation fixes
2021-11-18 10:00:43 +00:00
Moritz Kiefer
c8ace8b1cf
Factor kind projector target into a variable (#11759)
Seems nicer than trying to format a string everywhere

changelog_begin
changelog_end
2021-11-18 09:51:43 +01:00
Moritz Kiefer
fa7663148a
Drop 2.12 versioned_scala_deps (#11748)
I’ve kept the infrastructure for versioned_scala_deps around because
I’m optimistic and hope that eventually we’ll do another Scala upgrade.

changelog_begin
changelog_end
2021-11-17 22:13:08 +00:00
tudor-da
a05a40aeec
[Self-service error codes] Adapt ResetService in Sandbox classic (#11731)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-17 11:11:54 +01:00
tudor-da
fbc436d70a
[DPP-739][Self-service error codes] Adapt QueueBackedTracker error codes (#11719)
* [Self-service error codes] Adapt QueueBasedTracker

CHANGELOG_BEGIN
CHANGELOG_END

* Added changed error codes to migration guide

* Fixed ErrorFactoriesSpec

* Update ledger/error/src/main/scala/com/daml/error/definitions/LedgerApiErrors.scala

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: Pawel Batko <pawel.batko@digitalasset.com>
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-16 22:21:29 +00:00
pbatko-da
a29fee925c
[Self-service error-codes] Add introductory section to self-service error codes page. (#11712) 2021-11-16 16:41:41 +01:00
tudor-da
05f604d672
[Self-service error codes] Enrich migration guide [DPP-755] (#11711)
* Adapted migration guide to include changes from https://github.com/digital-asset/daml/pull/11686

CHANGELOG_BEGIN
CHANGELOG_END

* Enriched migration guide with Sandbox-classic changed gRPC error codes

* Added migration guide for error codes changed in KV committer

* Extract the KV and Sandbox-classic migration guides

* Hierarchical order of error codes docs

* Added back full grpc error code description to columns
* Using "gRPC status code" instead of "gRPC error code"
* Addressed review comments from Hubert

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

* Addressed review comments
* Use 'Error codes' instead of 'Self-service error codes'

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-16 14:25:53 +00:00
tudor-da
ec6d7cc3db
[Self-service error codes] Error code definitions revisiting [DPP-675] (#11686)
* Error definitions revisiting and hierarchical grouping refactoring

CHANGELOG_BEGIN
CHANGELOG_END

* Full hierarchical path for error grouping

* Addressed Pawel's review comments

* Apply suggestions from code review

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

* Do not strip margin in error code explanations

* Revert changing LEDGER_ID_MISMATCH from NOT_FOUND to FAILED_PRECONDITION

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-15 21:28:13 +00:00
Hubert Slojewski
69471d6135
ledger-api-client: Fix a log message related to an empty submission ID (#11695)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-15 13:57:19 +00:00
tudor-da
8e08450220
[Self-service error codes] No redundant logging in Ledger API (#11649)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-15 09:13:50 +01:00
tudor-da
c4da8e327e
Limit gRPC wire transport size legacy error codes size (#11666)
* Limit gRPC wire transport size legacy error codes size

CHANGELOG_BEGIN
CHANGELOG_END

* Add detail around limiting the Status message size.

* Update ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/server/api/validation/ErrorFactories.scala

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

* Reformat

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-12 19:04:20 +00:00
tudor-da
d6ca68dc23
[Self-service error codes] Adapt Sandbox classic rejection error codes (#11622)
* [Self-service error codes] Adapt Sandbox classic rejection error codes
* Unify common rejection error codes with KV
* Adapt conformance tests

CHANGELOG_BEGIN
CHANGELOG_END

* Fix JdbcLedgerDaoPostCommitValidationSpec

* Addressed first round of review comments

* Addressed Miklos' comments

* Revert camelCasing invalidLedgerTime arguments

* Moves DuplicateCommand to CommandRejections

* Addressed Gerolf's comments
2021-11-12 16:33:02 +00:00
tudor-da
2f4476c12a
[Self-service error codes] Fill in missing places with submission id for correlation id (#11593)
* [Self-service error codes] Fill in missing places with submission id for correlation id
* KVConsumption
* GrpcCommandSubmissionService

CHANGELOG_BEGIN
CHANGELOG_END

* Addressed review comments

* WriteService uses submission id as correlation id

* Populate the submission id in command submissions in ledger-api-test-tool

* Do not fail submission on missing submission id

* Fix KeyValueParticipantStateWriterSpec

* Addressed review comments
2021-11-12 09:08:06 +01:00
Remy
b8f384e193
LF: Drop typeparameter from KeyWithMaintainers (#11625)
Following up #10827 and #10921, we drop type parameter to
KeyWithMaintainers, and use the `Versioned` wrapper introduced in

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-10 13:21:13 +01:00
nicu-da
9b94fa9769
[ledger-api] - metadata for invalid deduplication period [KVL-1170] (#11534)
CHANGELOG_BEGIN
[ledger-api] - Return max_deduplication_duration as part of the metadata sent with the gRPC status for commands rejected because of invalid deduplication periods
CHANGELOG_END
2021-11-08 14:45:35 +00:00
tudor-da
21c97453bd
[Self-service error codes] ValueSwitch parameterized method (#11567)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-08 12:11:56 +00:00
nicu-da
9bb1d6443c
[ledger-api] - Return FAILED_PRECONDITION gRPC status code for invalid deduplication duration [KVL-1170] (#11483)
CHANGELOG_BEGIN
[ledger-api] - Return FAILED_PRECONDITION gRPC status code, instead of INVALID_ARGUMENT, for an invalid command deduplication duration
CHANGELOG_END
2021-11-03 13:34:31 +00:00
pbatko-da
8a9f15b8de
[DPP-686][Self-service error codes] Removing default error factories (#11403)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-03 09:40:19 +01:00
Remy
a8ae4d6f9c
LF: Rename GenNode to Node (#11469)
Following up #10827 and #10921 that drop type parameters from GenNode,
we rename GenNode into Node.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 16:42:16 +00:00
tudor-da
a79cc08687
DbDispatcher handles SQL exceptions with self-service error codes [DPP-690] (#11435)
* DbDispatcher handles transient and non-transient SQL exceptions with specific error codes

CHANGELOG_BEGIN
CHANGELOG_END

* Handle retries when verifying ledger id

* Addressed Pawel's comments

* Logging clean-up and small refactoring

* Exhaustive match against Oracle and PSQL exceptions
2021-11-01 13:35:33 +01:00
Remy
e445fe1aee
LfEngineToApi conversions do not have to deal with version. (#11414)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-29 15:57:09 +02:00
tudor-da
6c88e55509
Pass submission id as correlation id to error codes in Ledger API (#11381)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-27 19:26:53 +00:00
pbatko-da
46d31d5d48
[DPP-676][Self-service error codes] Adapt ApiConfigManagementService (#11402)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-27 16:02:50 +02:00
pbatko-da
3031190994
[DPP-676][Self-service error codes] Adapt request validators (#11379)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-27 12:41:36 +02:00
Hubert Slojewski
8212c0b2a5
Make submission ID optional [KVL-1107] (#11011)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-26 14:39:56 +00:00
Robert Autenrieth
1309c2f819
DPP-587 Use Timestamp instead of Instant (#11183)
* Use Timestamp instead of Instant

Time has microsecond resolution in Daml

changelog_begin
changelog_end

* Revert accidental newline changes

* Remove unused conversion modes

* Apply review comments
2021-10-26 08:54:47 +02:00
tudor-da
03cfd1237c
Configurable assertions in Ledger API test tool by feature descriptors (#11328)
* ApiVersionService propagates self-service error codes flag.
* ParticipantTestContext is enriched with feature descriptors
* ContractIdIT adapted with assertions for self-service error codes

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-25 14:13:44 +02:00
pbatko-da
79037c8855
[DPP-646][Self-service error codes] Adopt ApiPackageManagementService (#11314)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-25 12:11:15 +02:00
pbatko-da
a89079b4a5
[DPP-647][Self-service error codes] Adopt ApiParticipantPruningService (#11324)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-22 15:39:58 +02:00