Skip to content

Commit 9269294

Browse files
committed
Removed system endpoint resources from default RDF datasets
As a result, during the ACL check resources that match `acl:accessTo` authorization(s) are no longer required to have an explicit `rdf:type`
1 parent 3fd852a commit 9269294

6 files changed

Lines changed: 113 additions & 244 deletions

File tree

platform/datasets/admin.trig

Lines changed: 4 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
@prefix def: <https://w3id.org/atomgraph/linkeddatahub/default#> .
22
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
3-
@prefix ac: <https://w3id.org/atomgraph/client#> .
43
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6-
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .
7-
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
8-
@prefix sp: <http://spinrdf.org/sp#> .
94
@prefix sioc: <http://rdfs.org/sioc/ns#> .
105
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
116
@prefix dct: <http://purl.org/dc/terms/> .
@@ -23,40 +18,6 @@
2318

2419
}
2520

26-
# ENDPOINTS
27-
28-
<sparql>
29-
{
30-
31-
<sparql> a foaf:Document ;
32-
dct:title "SPARQL endpoint" .
33-
34-
}
35-
36-
<ns>
37-
{
38-
39-
<ns> a foaf:Document ;
40-
dct:title "Namespace endpoint" .
41-
42-
}
43-
44-
<add>
45-
{
46-
47-
<add> a foaf:Document ;
48-
dct:title "Add data endpoint" .
49-
50-
}
51-
52-
<generate>
53-
{
54-
55-
<generate> a foaf:Document ;
56-
dct:title "Generate data endpoint" .
57-
58-
}
59-
6021
### ADMIN-SPECIFIC
6122

6223
@prefix lacl: <https://w3id.org/atomgraph/linkeddatahub/admin/acl#> .
@@ -70,7 +31,7 @@
7031
<sign%20up>
7132
{
7233

73-
<sign%20up> a adm:SignUp ;
34+
<sign%20up> a foaf:Document ;
7435
dct:title "Sign up" ;
7536
rdf:_1 <sign%20up#content> .
7637

@@ -288,44 +249,6 @@ WHERE
288249

289250
}
290251

291-
# access endpoint
292-
293-
<acl/authorizations/access/>
294-
{
295-
296-
<acl/authorizations/access/> a dh:Item ;
297-
sioc:has_container <acl/authorizations/> ;
298-
dct:title "Access description access" ;
299-
foaf:primaryTopic <acl/authorizations/access/#this> .
300-
301-
<acl/authorizations/access/#this> a acl:Authorization ;
302-
rdfs:label "Access description access" ;
303-
rdfs:comment "Allows non-authenticated access" ;
304-
acl:accessToClass ldh:Access ;
305-
acl:mode acl:Read ;
306-
acl:agentClass foaf:Agent, acl:AuthenticatedAgent .
307-
308-
}
309-
310-
# access request endpoint
311-
312-
<acl/authorizations/access-request/>
313-
{
314-
315-
<acl/authorizations/access-request/> a dh:Item ;
316-
sioc:has_container <acl/authorizations/> ;
317-
dct:title "Access request access" ;
318-
foaf:primaryTopic <acl/authorizations/access-request/#this> .
319-
320-
<acl/authorizations/access-request/#this> a acl:Authorization ;
321-
rdfs:label "Access request access" ;
322-
rdfs:comment "Allows non-authenticated access" ;
323-
acl:accessToClass ldh:AccessRequest ;
324-
acl:mode acl:Append ;
325-
acl:agentClass foaf:Agent, acl:AuthenticatedAgent .
326-
327-
}
328-
329252
# sign up
330253

331254
<acl/authorizations/sign-up/>
@@ -339,8 +262,7 @@ WHERE
339262
<acl/authorizations/sign-up/#this> a acl:Authorization ;
340263
rdfs:label "Signup access" ;
341264
rdfs:comment "Required to enable public signup" ;
342-
acl:accessTo <ns> ; # TO-DO: only allow <ns> access by the secretary agent?
343-
acl:accessToClass adm:SignUp ;
265+
acl:accessTo <ns>, <sign%20up> ; # TO-DO: only allow <ns> access by the secretary agent?
344266
acl:mode acl:Read, acl:Append ;
345267
acl:agentClass foaf:Agent .
346268

@@ -359,7 +281,7 @@ WHERE
359281
<acl/authorizations/oauth2-login/#this> a acl:Authorization ;
360282
rdfs:label "OAuth2 login access" ;
361283
rdfs:comment "Required to enable public OAuth2 login" ;
362-
acl:accessToClass ldh:OAuthLogin ;
284+
acl:accessToClass <oauth2/login/google>, <oauth2/login/orcid> ;
363285
acl:mode acl:Read ;
364286
acl:agentClass foaf:Agent .
365287

@@ -378,7 +300,7 @@ WHERE
378300
<acl/authorizations/oauth2-authorize/#this> a acl:Authorization ;
379301
rdfs:label "OAuth2 authorization" ;
380302
rdfs:comment "Required to enable public OAuth2 login" ;
381-
acl:accessToClass ldh:OAuthAuthorize ;
303+
acl:accessTo <oauth2/authorize/google>, <oauth2/authorize/orcid> ;
382304
acl:mode acl:Read ;
383305
acl:agentClass foaf:Agent .
384306

platform/datasets/end-user.trig

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
@prefix def: <https://w3id.org/atomgraph/linkeddatahub/default#> .
22
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
3-
@prefix ac: <https://w3id.org/atomgraph/client#> .
43
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6-
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .
7-
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
8-
@prefix sp: <http://spinrdf.org/sp#> .
94
@prefix sioc: <http://rdfs.org/sioc/ns#> .
105
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
116
@prefix dct: <http://purl.org/dc/terms/> .
@@ -23,97 +18,10 @@
2318

2419
}
2520

26-
# ENDPOINTS
27-
28-
<sparql>
29-
{
30-
31-
<sparql> a foaf:Document ;
32-
dct:title "SPARQL endpoint" .
33-
34-
}
35-
36-
<ns>
37-
{
38-
39-
<ns> a foaf:Document ;
40-
dct:title "Namespace endpoint" .
41-
42-
}
43-
44-
<add>
45-
{
46-
47-
<add> a foaf:Document ;
48-
dct:title "Add data endpoint" .
49-
50-
}
51-
52-
<generate>
53-
{
54-
55-
<generate> a foaf:Document ;
56-
dct:title "Generate data endpoint" .
57-
58-
}
59-
6021
### END-USER-SPECIFIC
6122

62-
<access>
63-
{
64-
65-
<access> a ldh:Access ;
66-
dct:title "Access endpoint" .
67-
68-
}
69-
70-
<access/request>
71-
{
72-
73-
<access/request> a ldh:AccessRequest ;
74-
dct:title "Access request endpoint" .
75-
76-
}
77-
78-
<oauth2/login/google>
79-
{
80-
81-
<oauth2/login/google> a ldh:OAuthLogin ;
82-
dct:title "OAuth 2.0 login" .
83-
84-
}
85-
86-
<oauth2/authorize/google>
87-
{
88-
89-
<oauth2/authorize/google> a ldh:OAuthAuthorize ;
90-
dct:title "Google OAuth2.0 authorization" .
91-
92-
}
93-
94-
<oauth2/login/orcid>
95-
{
96-
97-
<oauth2/login/orcid> a ldh:OAuthLogin ;
98-
dct:title "ORCID OAuth2.0 login" .
99-
100-
}
101-
102-
<oauth2/authorize/orcid>
103-
{
104-
105-
<oauth2/authorize/orcid> a ldh:OAuthAuthorize ;
106-
dct:title "ORCID OAuth2.0 authorization" .
107-
108-
}
109-
110-
<settings>
111-
{
112-
113-
<settings> a foaf:Document ;
114-
dct:title "Settings endpoint" .
115-
116-
}
23+
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .
24+
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
11725

11826
<services/dbpedia/>
11927
{

platform/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ for app in "${apps[@]}"; do
698698

699699
namespace_ontology_dataset_path="/var/linkeddatahub/datasets/${app_folder}/namespace-ontology.trig"
700700
mkdir -p "$(dirname "$namespace_ontology_dataset_path")"
701-
export end_user_origin admin_origin
701+
export end_user_origin
702702
envsubst < namespace-ontology.trig.template > "$namespace_ontology_dataset_path"
703703

704704
trig --base="${admin_origin}/" --output=nq "$namespace_ontology_dataset_path" > "/var/linkeddatahub/based-datasets/${app_folder}/namespace-ontology.nq"

0 commit comments

Comments
 (0)