45 Commits

Author SHA1 Message Date
Joachim Van Herwegen
2ec8fabd54 feat: Add support for client_credentials authentication 2022-04-15 11:20:26 +02:00
Joachim Van Herwegen
d908374364 feat: Check parent ACL permissions for create/delete requests 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
2ae5924dde feat: Pass access modes to PermissionReaders
This allows PermissionReaders to potentially only check the necessary access modes
for potential performance optimization.
2022-03-18 14:15:12 +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
c5052625d1 Merge branch 'main' into versions/3.0.0
# Conflicts:
#	package-lock.json
#	package.json
#	src/storage/patch/SparqlUpdatePatcher.ts
#	test/unit/init/AppRunner.test.ts
#	test/unit/util/QuadUtil.test.ts
2022-02-11 15:30:45 +01:00
Joachim Van Herwegen
9ceb62b8b6 refactor: Remove @rdfjs/data-model dependency
We already have N3.js for term generation.
No need to have two solutions there.
2022-02-11 15:28:50 +01:00
Joachim Van Herwegen
a9941ebe78 feat: Add support for N3 Patch 2022-01-25 11:30:42 +01:00
Joachim Van Herwegen
1afed65368 feat: Return correct status codes for invalid requests 2022-01-21 17:10:38 +01:00
Joachim Van Herwegen
5613ff9e71 fix: Let Representations always have a body
This is relevant when the request has a content-type
but no data.
2021-10-12 13:30:06 +02:00
Joachim Van Herwegen
b3da9c9fcf refactor: Restructure source code folder
This way the location of certain classes should make more sense
2021-10-12 12:51:02 +02:00
Joachim Van Herwegen
7c7fee5f5c refactor: Rename associated resource to subject resource 2021-10-08 15:49:49 +02:00
Joachim Van Herwegen
8f5d61911d feat: Always grant control permissions to pod owners 2021-10-05 13:19:01 +02:00
Joachim Van Herwegen
7f8b923399 feat: Replace acl specific permissions with generic permissions
This required AuxiliaryStrategy to have a new function
indicating if the auxiliary resource just used its associated resource authorization
or its own.
2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
5104cd56e8 feat: Create OperationMetadataCollector to handle operation metadata 2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
bf28c83ffa feat: Use PermissionReaders to determine available permissions
These readers will determine which permissions
are available for the incoming credentials.
Their results then get combined in a UnionReader
and authorized in a PermissionBasedAuthorizer
2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
e8dedf5c23 feat: Extract set of required modes instead of PermissionSet 2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
c3fa74de78 feat: Let CredentialsExtractors specify what type of Credentials they generate 2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
ff200e22a9 feat: Add a cache to the AgentGroupAccessChecker 2021-08-23 16:39:25 +02:00
Simone Persiani
401923b792 feat: Add support for agentGroup ACL rules
Co-Authored-By: Ludovico Granata <Ludogranata@gmail.com>
2021-08-23 16:39:25 +02:00
Simone Persiani
16ebfb329f refactor: Refactor WebAclAuthorizer
Co-Authored-By: Ludovico Granata <Ludogranata@gmail.com>
2021-08-23 16:39:25 +02:00
Joachim Van Herwegen
f4833d2534 feat: Create PathBasedAuthorizer 2021-07-27 14:31:02 +02:00
Joachim Van Herwegen
d95db60fe1 feat: Create DenyAllAuthorizer 2021-07-27 14:31:02 +02:00
Joachim Van Herwegen
dee382849d refactor: Rename AllowEverythingAuthorizer to AllowAllAuthorizer 2021-07-27 14:31:02 +02:00
Joachim Van Herwegen
e43b579ae7 fix: Throw internal error with invalid ACL. 2021-07-16 16:42:32 +02:00
Michiel de Jong
91791a0a14 Fix #621: acl:AuthenticatedAgent instead of foaf:AuthenticatedAgent 2021-02-18 15:28:29 +01:00
Joachim Van Herwegen
f2f265c586 feat: Let Authorizers output an Authorization 2021-02-18 14:13:47 +01:00
Joachim Van Herwegen
7f34fe6ae3 feat: Create separate authorizer for auxiliary functions 2021-02-18 13:26:08 +01:00
Joachim Van Herwegen
8339413ab4 feat: Add permissions extractor for acl resources 2021-02-18 13:26:08 +01:00
Joachim Van Herwegen
758f5ed083 feat: Generalize AclManager to AuxiliaryManager 2021-02-18 13:26:08 +01:00
Joachim Van Herwegen
766e6318ba feat: Add control permission to PermissionSet
This is in preparation of generalizing permissions
of auxiliary resources.
2021-02-18 13:26:08 +01:00
Ruben Verborgh
7dcde1e0e3 refactor: Improve logging for access control. 2021-01-15 18:25:37 +01:00
Joachim Van Herwegen
ee50f40062 docs: Add comments referencing the Solid spec where relevant
Also some minor changes to completely match the spec there.
2021-01-15 08:42:36 +01:00
Joachim Van Herwegen
61aa2e12bd fix: Update acl authorizer to make write rights imply append rights 2021-01-11 09:05:41 +01:00
Joachim Van Herwegen
f0db9e501f refactor: Replace getParentContainer util function with ContainerManager 2020-12-11 12:42:17 +01:00
Ruben Verborgh
74415cf49b fix: Align webId capitalization. 2020-12-01 23:35:11 +01:00
Joachim Van Herwegen
ee312910d7 fix: Correctly handle acl behaviour for acl identifiers 2020-11-25 09:04:55 +01:00
Joachim Van Herwegen
1073c2ff4c refactor: Clean up utility functions 2020-11-18 17:19:53 +01:00
Ruben Verborgh
1a45b65df7
refactor: Implement empty canHandle on base class. (#289) 2020-10-30 17:56:39 +01:00
Joachim Van Herwegen
9657fbafb1 refactor: Update eslint related dependencies 2020-09-17 11:55:49 +02:00
Joachim Van Herwegen
199d657097 refactor: Remove overused "Simple" prefix 2020-09-02 15:42:13 +02:00
Ruben Taelman
48740e5cba style: improve linting of imports
A new plugin is used that offers autofixing capabilities.
2020-08-26 13:20:19 +02:00
Joachim Van Herwegen
0545ca121e feat: Add acl support 2020-08-18 10:32:07 +02:00
Joachim Van Herwegen
d983fca8f5 feat: add simple permissions related handlers 2020-06-24 14:08:56 +02:00