64 Commits

Author SHA1 Message Date
Joachim Van Herwegen
d1282f6b1a chore: Update eslint-plugin-jest dependency 2024-07-19 15:04:09 +02:00
Joachim Van Herwegen
5e60000681 fix: Make allow headers more accurate 2024-04-09 08:29:56 +02:00
Joachim Van Herwegen
d7078ad692 fix: Expose auxiliary links on errors 2024-04-09 08:29:56 +02:00
Joachim Van Herwegen
419312ee5f feat: Store original target in error metadata 2024-04-09 08:29:56 +02:00
Joachim Van Herwegen
e09b53b20d chore: Replace rdf-js import with @rdfjs/types 2024-01-16 08:49:28 +01:00
Joachim Van Herwegen
990184dbb5 refactor: Use node protocol when importing builtins 2023-11-02 09:49:17 +01:00
Joachim Van Herwegen
def0b5c732 refactor: Enable consistent newlines in lists 2023-11-02 09:49:17 +01:00
Joachim Van Herwegen
3bb3004abb refactor: Bring lint config back to original strictness 2023-11-02 09:49:17 +01:00
Joachim Van Herwegen
7a007dc466 refactor: Enable stricter test linting 2023-11-02 09:49:17 +01:00
Joachim Van Herwegen
6248ed0938 refactor: Replace linting configurations
The previous package was outdated, preventing us from updating TS.
This one also lints YAML and JSON,
and applies many more rules to the test files,
explaining all the changes in this PR.
2023-11-02 09:49:17 +01:00
Joachim Van Herwegen
f932cf4b22 chore: Update dependencies 2023-10-11 16:25:49 +02:00
Joachim Van Herwegen
a47f5236ef feat: Full rework of account management
Complete rewrite of the account management and related systems.
Makes the architecture more modular,
allowing for easier extensions and configurations.
2023-10-06 11:04:40 +02:00
Joachim Van Herwegen
c95198285c Merge branch 'main' into versions/next-major 2023-10-05 14:28:06 +02:00
Joachim Van Herwegen
71e55690f3 feat: Track binary size of resources when possible 2023-10-05 10:07:49 +02:00
Joachim Van Herwegen
3e9adef4cf feat: Add support for range headers 2023-10-05 10:07:49 +02:00
Joachim Van Herwegen
baa64987c6 fix: Return ETag in 304 responses 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
afcbfdaacf feat: Use ETagHandler for ETag generation and comparison 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
5ec6eddbfa refactor: Move condition classes to separate folder 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
b608080d5f feat: Store ETag in metadata 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
0245b31e0c feat: Add error causes to error serializations 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
f373dff1d7 feat: Add metadata to errors 2023-08-28 09:06:39 +02:00
Joachim Van Herwegen
6f6784a288 fix: Do not show PUT in Allow header for existing containers 2023-07-20 09:48:42 +02:00
Joachim Van Herwegen
4b7621f9e0 feat: Support both the old and new WebSocket specifications together 2023-04-27 11:27:34 +02:00
Joachim Van Herwegen
d6be724a12 Merge branch 'main' into versions/6.0.0
# Conflicts:
#	config/ldp/authorization/readers/access-checkers/agent-group.json
2023-04-24 11:21:59 +02:00
Joachim Van Herwegen
134237a80f feat: Support Add/Remove notifications on containers 2023-04-20 15:42:04 +02:00
Joachim Van Herwegen
9e1e65cdb9 refactor: Rename internal activity vocabulary
The original URL does not exist so should use an internal value for now.
Renamed to `activity` as predicates tend to be lower case.
2023-04-20 15:42:04 +02:00
Joachim Van Herwegen
23db528472 fix: Replace inefficient storage detection
This replaces the recursive backend calls to find the storage
by a new class that is aware what the storage URLs look like.
2023-04-19 09:47:47 +02:00
Joachim Van Herwegen
c3f48ddb97 fix: Ensure the ETag is representation specific 2023-04-18 10:41:48 +02:00
Joachim Van Herwegen
6ad5c0c797 feat: Move WAC-Allow metadata collecting to HTTP handler
This depends on all auth related handlers to cache their results.
This allows us to remove the permission field from Operation.
2022-11-18 16:08:06 +01:00
Joachim Van Herwegen
b1f7a6a8b1 feat: Add support for WebSocketSubscription2021 2022-11-09 09:10:00 +01:00
Joachim Van Herwegen
df2f69f532 feat: Expose a storage description resource for storage containers 2022-11-09 09:10:00 +01:00
Joachim Van Herwegen
4223dcf8a4 feat: Split up server creation and request handling
This allows us to decouple the WebSocket listening from the HTTP configs,
making these features completely orthogonal.
2022-11-09 09:10:00 +01:00
Joachim Van Herwegen
f3e7a20800 feat: Update Credentials typings to support client/issuer 2022-10-06 09:36:04 +02:00
Wout Slabbinck
ca62511d12
feat: Edit metadata resources (#1188)
* feat: only allow metadata to be edited with PATCH request & only allow metadata files to be edited when a resource is available

* fix: remove unnecesary log at POST

* feat: PUT resets metadata contents + not possible to add metadata with PUT to container

* feat: add metadataStrategy (auxiliaryStrategy) + use that strategy in operationhandlers

* feat: PUT request on existing LDPC is not allowed as it would be possible to edit (read reset) metadata

* test: add unit tests to operationhandlers to handle metadata editing

* test: add unit tests to representationPatchHandler to handle metadata editing

* fix: update dependency of meta.json to version 3.0.0

* fix: lint and dependency still v2

* fix: replaced file references to resource references + moved Patch check to new patchhandler which is more generic

* fix: moved checking metadata resources checking from DELETE and POST handler down to DABS

* fix: remove PATCH message about metadata extension

* fix: move PATCH message about metadata extension

* WIP: adding writeMetadata + getMetadata in DABS and add writeMetadata to DataAccessors (part 1)

* WIP: implement writeMetadata in memorybackend + change resourceExists

* WIP: implement writeMetadata in SparqlDataAccessor.ts

* test: fix test interfaces

* test: InMemoryDataAccessor.ts resulted into changing identifier for writeMetadata in DataAccessor.ts (now taking subject identifier instead of metadata resource identifier)

* test: accessor tests implemented for metadata

* test: add RdfImmutableCheckPatcher.test.ts

* test: add tests in DataAccessorBasedStore.test.ts

* test: fix template config for DynamicPods test

* test: add integration tests for metadata

* fix: change metaStrategy to metadataStrategy

* refactor: comments updated to new location CSS on github + some alphabetical edits

* refactor: remove getMetadata function in DABS as it is only used once

* refactor: add DataAccessorBasedStoreArgs to DataAccessorBasedStore.ts

* docs: modify documentation for writeMetadata function in DataAccessor.ts

* feat: ldp:contains is also part of the metadata resource of a container

* refactor: change function name and move check to DataAccessorBasedStore

* fix: fix tests for DABS and PutOperationHandler

* feat: avoid cloneRepresentation by introducing RdfPatcher, RdfStorePatcher and modifying ImmutableMetadataPatcher, N3Patcher, patching.json and SparqlUpdatePatcher

* test: fix patcher tests

* feat: create sparqlInsertMetadata in SparqlDataAccessor.ts

* fix: move check during put on container if it exists already back to PutOperationHandler.ts after discussion in PR

* test: update tests PutOperationHandler.ts and DataAccessorBasedStore.ts regarding previous commit

* test: add converter to DABS and replace rejection on data during container creation to warning

* test: implemented RdfPatcher test

* feat: remove ContainerPatcher

* fix: fix lint

* fix: fix integration tests

* refactor: fix minor issues mentioned in the PR

* WIP: problem with removeResponseMetadata

* refactor: remove responseMetadata in QuadToRdfConverter.ts

* feat: handle ResponeMetadata when writing to the store via a patch

* refactor: refactor based on comments in PR

* feat: make ImmutableMetadataPatcher.ts instantiation more clear

* test: achieve 100% coverage again

* fix: fix lint

* refactor: return to explicit arguments for the DABS

* fix: return to explicit arguments for the DABS (missed one)

* feat: optimise immutable checker

* fix: fix, enhance docs + optimise config files

* fix: DABS + QuadToRdfConverter feedback implemented

* fix: patching feedback implemented

* test: update operationhandler tests

* test: update integration tests after feedback

* test: update DABS tests after feedback

* test: update ImmutableMetadataPatcher.test.ts after feedback

* test: update patch tests after feedback

* docs: add documentation about editing metadata

* fix: config: intendation + name change + extra filters | filter pattern

* docs: tsdoc added to RdfStorePatcher.ts

* fix: DABS split implemented for getRepresentation + comment refactoring

* docs: further documentation on removing response data on serialization

* fix: DABS getRepresentation method

* docs: apply feedback from Joachim on the documentation of metadata-editing.md

* fix: indentation fix + fix metadata-editing.md documentation after feedback from Joachim

* docs: small fix in metadata-editing.md documentation after feedback from Joachim

* fix: fix metadata-editing.md documentation after feedback from Joachim

* fix: fix tests meta-editing after feedback Joachim

* feat: first attempt at RELEASE_NOTES.md

* docs: update release notes based on feedback

* docs: fix newline

* fix: patching config changes after feedback

* docs: metadata editing documentation changes after feedback

* docs: metadata editing documentation changes after feedback

* docs: metadata editing documentation changes after feedback

* feat: optimisation on ImmutableMetadataPatcher.ts algorithm

* feat: remove converter from DABS and add conversion for metadata resources in the RCS

* fix: Fix documentation RepresentationPatchHandler.ts + fix response graph not being stored due to convertingstore

* feat: make RepresentationPatcher generic

* test: generic RepresentationPatcher tests

* test: 100% coverage for patchers again

* feat: containers can be created with POST with no content-type

* feat: Immutable checks always with subject identifier

* feat: create AuxiliaryLinkMetadataWriter for adding description resources Link Header

* test: add tests for AuxiliaryLinkMetadataWriter and update them for ImmutableMetadataPatcher

* feat: remove metadataGenerator from acl.json and fix tests accordingly

* WIP: preserve metadata on PUT

* feat: preserve metadata on PUT

* fix: keep metadata on PATCHes

* test: add unit tests for preserving metadata on PUT

* fix: remove inConverter from sparql endpoint as that is already the default in the (converting.json)

* fix: add metadatastrategy to RepresentationConvertingStore in regex.json

* test: add integration tests for preserving metadata on PUT

* docs: update release notes and adding documentation about preserving metadata on PUT

* WIP: Template create setRepresentation

* fix: Move container exists and not allowed check to setRepresentation

* test: fix lint

* fix: update configs and documentation

* refactor: update and add documentation + small refactoring

* refactor: update and add documentation + small refactoring + fix tests

* fix: Dynamic pod config + tests

* fix: TemplatedResourcesGenerator does not create containers when they already exist

* fix: metadata preservation now deals with complex content types

* docs: explain the case when there is no content-type

* fix: minor comments
2022-08-04 15:24:36 +02:00
Joachim Van Herwegen
9a12152253 feat: Use an IdentifierMap for ResourceStore responses 2022-07-11 16:48:50 +02:00
Joachim Van Herwegen
fd83f4b013 feat: Update WebAclMetadataCollector to support new permission interface 2022-07-11 14:07:43 +02:00
Thomas Dupont
311f8756ec fix: return contenttype header value string with parameters 2022-07-07 10:02:24 +02:00
Arthur Joppart
e0954cf2a7
feat: Rework ResourceStore to return extra info
* feat: change return types in ResourceStore.ts

* feat: change return types in BaseResourceStore.ts

* feat: change return types in LockingResourceStore.ts

* feat: change return types in RoutingResourceStore.ts

* feat: change return types in MonitoringStore.ts

* feat: change return types in PassthroughStore.ts

* feat: change return types in ReadOnlyStore.ts

* feat: change return types in PatchHandler.ts

* feat: change return types in PatchingStore.ts

* feat: change return types in RepresentationPatchHandler.ts

* feat: create createResourceIdentifier() function for convenience

* feat: adapt PostOperationHandler.ts to new typing

* feat: change return types in RepresentationConvertingStore.ts

* feat: adapt DataAccessorBasedStore.ts implementation to new typings

* feat: adapt UnsecureWebSocketsProtocol.ts to new typing

* chore: add temporary comments

* fix: return correct Location header on POST request with slug

* fix: npm run lint command needs more packages

* fix: linting errors

* chore: revert ed9952b

* test: adapt PostOperationHandler tests

* test: adapt UnsecureWebSocketsProtocol tests

* test: adapt DataAccessorBasedStore tests

* fix: linting errors

* feat: emit specific created, deleted, updated events in MonitoringStore

* test: adapt RepresentationPatchHandler tests

* fix: revert UnsecureWebSocketsProtocol changes

* feat: emit extra parameter on changed

* test: adapt MonitoringStore tests

* fix: linting errors

* test: add test to MonitorStore.test for coverage

* fix: linting error

* chore: update doc in ResourceStore.ts

* test: improve MonitoringStore tests

* chore: update RELEASE_NOTES.md

* chore: add extra info about the MonitoringStore to documentation/resource-store.md

* chore: Update RELEASE_NOTES.md

Co-authored-by: Anton Wiklund <ixuz07@gmail.com>

* chore: Update documentation/resource-store.md

Co-authored-by: Anton Wiklund <ixuz07@gmail.com>

* chore: very small changes

* chore: simplify metadata creation

* fix: DataAccessorBasedStore improvement and bugfix

* chore: improve resource-store.md

* chore: adapt MonitoringStore event names, update docs and apply code suggestion

* chore: use ResourceStoreResponse type

* fix: typo

* chore: rename ResourceStoreResponse type to ChangeMap

* chore: adapt .gitignore to name change

Co-authored-by: Anton Wiklund <ixuz07@gmail.com>
2022-07-06 14:40:28 +02:00
Joachim Van Herwegen
affcb7a7b3 Merge branch 'main' into versions/5.0.0
# Conflicts:
#	RELEASE_NOTES.md
#	config/quota-file.json
2022-07-04 13:53:17 +02:00
Ruben Verborgh
ba40374c66 chore: Clarify error messages. 2022-06-23 15:55:21 +02:00
Ruben Verborgh
82f90709a6 fix: Use encrypted field to check for TLS. 2022-06-23 15:55:21 +02:00
Joachim Van Herwegen
df0825936a feat: Parse Accept headers as early as possible 2022-06-01 10:05:36 +02:00
Jasper Vaneessen
668d0a331f
feat: Only accept NamedNodes as predicates for metadata
* refactor: move toCachedNamedNode (private)

* chore: only NamedNodes predicates in removes

* feat: enforce NamedNode predicates in most cases

* feat: getAll only accepts NamedNodes

* feat: toCachedNamedNode only accepts string arg

* tests: use NamedNodes for getAll calls

* test: remove unnecessary string check for coverage

* tests: fix NamedNodes in new tests after rebase

* feat: metadatawriters store NamedNodes

* refactor: toCachedNamedNode as utility function

* fix: double write of linkRelMap

* test: use the CONTENT_TYPE constant
2022-04-15 09:53:39 +02:00
wkerckho
d42125a91d
fix: Throw error when accessing URLs out of scope
* feat: allow OriginalUrlExtractor to be configured with an identifierStrategy. Included the existing parameter 'includeQueryString' in the OriginalUrlExtractorArgs type.

* test: fixed OriginalUrlExtractor instantiation in OriginalUrlExtractor and RequestParser tests

* fix: Server no longer warns when accessing a URL out of scope #1148

* test: updated tests broken by #1148 fix

* test: ensuring 100% coverage

Co-authored-by: Wannes Kerckhove <wannes.kerckhove@ugent.be>
2022-04-08 09:33:22 +02:00
Joachim Van Herwegen
97e600bf4f fix: Undo authorization on OPTIONS requests 2022-04-04 13:35:15 +02:00
Thomas Dupont
48efc6fae1
feat: Create MetadataParser that detects JSON with Context link and throws an error
* feat: add PlainJsonLdFilter to reject JSON with context link

* refactor: abstract parseLinkHeader into HeaderUtils

* docs: typo in comment field

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>

* refactor: Replace BadRequestHttpError with NotImplementedError

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>

* refactor: incorporate requested changes

* refactor: requested changes incorporated

* refactor: remove obsolete code lines

Co-authored-by: Ruben Verborgh <ruben@verborgh.org>
2022-04-01 14:25:09 +02:00
Joachim Van Herwegen
641d39d4bc Merge branch 'main' into versions/4.0.0 2022-03-29 14:54:59 +02:00
Joachim Van Herwegen
6e98c6aae4 feat: Dynamically generate Allow and Accept-* headers 2022-03-29 14:52:36 +02:00
Joachim Van Herwegen
027e3707fd feat: Parse content-type more strictly 2022-03-28 10:45:05 +02:00
Joachim Van Herwegen
7d3320dea6 chore: Update links for new repository 2022-03-28 10:20:22 +02:00