83 Commits

Author SHA1 Message Date
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
6eaaa42015 chore(release): Update configs to v7.0.0 2023-10-19 09:13:48 +02:00
Joachim Van Herwegen
010017a141 feat: Update configurations so ldp/accounts/oidc can be disabled 2023-10-09 09:10:34 +02:00
Joachim Van Herwegen
307dba3219 fix: Rename cookie field to authorization 2023-10-06 11:05:00 +02:00
Joachim Van Herwegen
cd07338ce7 feat: Add support for pod owners 2023-10-06 11:04:59 +02:00
Joachim Van Herwegen
4230db5038 feat: Use IndexedStorage to store account data 2023-10-06 11:04:58 +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
3e9adef4cf feat: Add support for range headers 2023-10-05 10:07:49 +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
4ff6fe66ea fix: Minor documentation and configuration updates 2023-04-25 11:43:56 +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
d9c0e9b043 chore(release): Update configs to v6.0.0 2023-02-01 10:54:37 +01: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
59e64a22ea chore: Add caching to all authorization steps 2022-11-18 16:08:06 +01:00
Joachim Van Herwegen
2d54493485 chore: Generalize authorization configurations 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
3db1921633 feat: Create an OperationRouterHandler
This allows us to route after an Operation has been parsed
2022-11-09 09:10:00 +01:00
Joachim Van Herwegen
3328f8dea6 Merge branch 'main' into versions/6.0.0 2022-11-07 09:45:22 +01:00
Joachim Van Herwegen
68ee9648e1 fix: Require create permission for empty PATCH bodies 2022-11-02 16:48:15 +01:00
Joachim Van Herwegen
ef48660b48 fix: Return correct status code when deleting non-existent resource 2022-11-02 09:31:42 +01:00
Joachim Van Herwegen
b3dd50a593 refactor: Move WAC-Allow configs to ACL-specific config 2022-10-06 09:36:04 +02:00
Joachim Van Herwegen
fa1dee573e feat: Add required ACP headers 2022-10-06 09:36:04 +02:00
Joachim Van Herwegen
40f2c8ea42 feat: Update templates and generators to support ACP 2022-10-06 09:36:04 +02:00
Joachim Van Herwegen
db680740b5 feat: Create configs for server with ACP authorization 2022-10-06 09:36:04 +02:00
Joachim Van Herwegen
a3c7baf6d3 Merge branch 'main' into versions/6.0.0 2022-09-05 13:27:53 +02:00
Jasper Vaneessen
9a5fc674f3
style: Enforce linting rules on markdown files
* chore: add markdownlint-cli2 and config for mkdocs

* style: enforce linting rules on mkdocs md files

* chore: tweaks to markdownlint rules

* style: linting changelog

* style: linting release notes

* style: linting .github md files

* style: further linting of docs

* style: linting readmes

* chore: update linting script entries

* docs: tweak release after rebase

* chore: simplify root md linting config

* chore: extend base config

* chore: implement requested changes

* chore: remove unnecessary exception

* chore: fix comment type

* styling: single config + list spacing

* chore: implement requested changes

* chore: use .cjs files for markdownlint config

* chore: implement requested changes
2022-08-25 11:32:09 +02:00
Jasper Vaneessen
3c43d046ef feat!: remove caching from AgentGroupAccessChecker 2022-08-10 10:23:37 +02:00
Joachim Van Herwegen
21b2850696 fix: Remove MS-Author-Via header 2022-08-05 15:58:29 +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
d5bcec704c feat: Update configs based on all permission changes 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
Wannes Kerckhove
1c65b06392 fix: Introducing initializers for handling lock cleanup on start 2022-07-06 10:00:15 +02:00
Joachim Van Herwegen
df0825936a feat: Parse Accept headers as early as possible 2022-06-01 10:05:36 +02:00
Wannes Kerckhove
fbbccb0cf1 fix: Stop creating meta files for each new resource #1217 2022-05-06 08:20:55 +02:00
Joachim Van Herwegen
77eeae9c9e chore: Update configs to v5.0.0 2022-05-05 11:20:53 +02:00
Joachim Van Herwegen
cfdd1221f0 fix: Always define @type in configs 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
ce27bec207 fix: Update prefixes in all configs 2022-04-25 09:09:39 +02:00
Joachim Van Herwegen
784bfc8c21 chore: Update configs to v4.0.0 2022-04-19 15:13:55 +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
6e98c6aae4 feat: Dynamically generate Allow and Accept-* headers 2022-03-29 14:52:36 +02:00
Joachim Van Herwegen
ad3edcf1a8 feat: Handle OPTIONS requests in OperationHandler 2022-03-18 14:15:12 +01:00
Joachim Van Herwegen
e86e0cf36b feat: Return 404 for read/delete requests if there is no resource 2022-03-18 14:15:12 +01:00
Joachim Van Herwegen
9a29cc2257 fix: Extract correct access modes from request 2022-03-18 14:15:12 +01:00
Joachim Van Herwegen
b292cd2e2b chore: Update configs to v3.0.0 2022-02-23 11:09:41 +01:00
Thomas Dupont
ce754c119f
fix: Add content-negotiation when fetching dataset from url
* Solution works but tests don't

* refactor(FetchUtil): use arrayifyStream

* refactor(FetchUtil): split fetchDataset into 2 separate functions

* style(FetchUtil): onelining instead of declaring new local var

* test: trying to mock rdfDereferencer

* refactor: promise can't have async function as arg

* test(FetchUtil): pass Quad array to mockDereference instead

* test: all tests should pass now and coverage is back to 100%

* style: comment typo

* chore: make package.json and package-lock.json compatible with main

* chore: fix package.json double entries

* chore: updated package.json to be alfabetical again

* refactor(AgentGroupAccessChecker): Remove converter from contructor and config

* refactor(TokenOwnerShipValidator): Remove converter from constructor and config

* refactor(FetchUtil): Return BadRequestHttpError instead of generic Error

* test(FetchUtil): return Response object instead of mocking fetch

* style: typos and newlines
2022-02-15 13:44:03 +01:00
Joachim Van Herwegen
a9941ebe78 feat: Add support for N3 Patch 2022-01-25 11:30:42 +01:00