Skip to content

Commit a02ce9c

Browse files
Feat: store account keys and authz server (#18)
Signed-off-by: Wouter Termont <wouter.termont@ugent.be>
1 parent 71b02d2 commit a02ce9c

File tree

25 files changed

+1029
-4164
lines changed

25 files changed

+1029
-4164
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"cross-fetch": "^4.0.0",
7676
"eslint": "^8.10.0",
7777
"jest": "^29.7.0",
78-
"lerna": "^4.0.0",
7978
"koreografeye": "^0.4.8",
8079
"shx": "^0.3.3",
8180
"ts-jest": "^29.1.1",

packages/css/.componentsignore

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
11
[
2-
"UmaVerificationOptions"
3-
]
2+
"UmaVerificationOptions",
3+
4+
"AccessMap",
5+
"Adapter",
6+
"AlgJwk",
7+
"BaseActivityEmitter",
8+
"BaseChannelType",
9+
"BaseHttpError",
10+
"BaseRouterHandler",
11+
"BasicConditions",
12+
"BasicRepresentation",
13+
"ChangeMap",
14+
"CredentialSet",
15+
"Dict",
16+
"EmptyObject",
17+
"Error",
18+
"EventEmitter",
19+
"FetchDocumentLoader",
20+
"GenericEventEmitter",
21+
"HashMap",
22+
"HttpErrorOptions",
23+
"HttpResponse",
24+
"IndexTypeCollection",
25+
"IdentifierMap",
26+
"IdentifierSetMultiMap",
27+
"interactionPolicy.DefaultPolicy",
28+
"NodeJS.Dict",
29+
"NotificationChannelType",
30+
"Omit",
31+
"PermissionMap",
32+
"Promise",
33+
"Readable",
34+
"Readonly",
35+
"RegExp",
36+
"Server",
37+
"SetMultiMap",
38+
"Shorthand",
39+
"Template",
40+
"TemplateEngine",
41+
"Transform",
42+
"TransformOptions",
43+
"ValuePreferencesArg",
44+
"VariableBindings",
45+
"UnionHandler",
46+
"VirtualObject",
47+
"WinstonLogger",
48+
"WrappedSetMultiMap",
49+
"YargsOptions"
50+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"import": [
7+
"css:config/app/init/initializers/base-url.json",
8+
"css:config/app/init/initializers/logger.json",
9+
"css:config/app/init/initializers/server.json",
10+
"css:config/app/init/initializers/version.json",
11+
"css:config/app/init/initializers/workers.json",
12+
"css:config/app/init/migration/base.json",
13+
14+
"uma-css:config/app/init/initializers/seeding.json"
15+
],
16+
"@graph": [
17+
{
18+
"comment": "These initializers will be all be executed sequentially when starting the server.",
19+
"@id": "urn:solid-server:default:Initializer",
20+
"@type": "SequenceHandler",
21+
"handlers": [
22+
{
23+
"@id": "urn:solid-server:default:LoggerInitializer"
24+
},
25+
{
26+
"@id": "urn:solid-server:default:EarlyProcessParallelInitializer"
27+
},
28+
{
29+
"@id": "urn:solid-server:default:PrimaryInitializer"
30+
},
31+
{
32+
"@id": "urn:solid-server:default:WorkerInitializer"
33+
}
34+
]
35+
},
36+
{
37+
"comment": "This wrapped sequence handler will be executed ONLY BY THE PRIMARY PROCESS when starting the server.",
38+
"@id": "urn:solid-server:default:PrimaryInitializer",
39+
"@type": "ProcessHandler",
40+
"executeOnPrimary": true,
41+
"clusterManager": {
42+
"@id": "urn:solid-server:default:ClusterManager"
43+
},
44+
"source": {
45+
"comment": "These initializers will all be executed sequentially when starting the server.",
46+
"@id": "urn:solid-server:default:PrimarySequenceInitializer",
47+
"@type": "SequenceHandler",
48+
"handlers": [
49+
{
50+
"@id": "urn:solid-server:default:CleanupInitializer"
51+
},
52+
{
53+
"@id": "urn:solid-server:default:MigrationInitializer"
54+
},
55+
{
56+
"@id": "urn:solid-server:default:BaseUrlVerifier"
57+
},
58+
{
59+
"@id": "urn:solid-server:default:PrimaryParallelInitializer"
60+
},
61+
{
62+
"@id": "urn:solid-server:default:SeededAccountInitializer"
63+
},
64+
{
65+
"@id": "urn:solid-server:default:ModuleVersionVerifier"
66+
},
67+
{
68+
"@id": "urn:solid-server:default:WorkerManager"
69+
}
70+
]
71+
}
72+
},
73+
{
74+
"comment": "This wrapped sequence handler will be executed ONLY BY THE WORKER PROCESSES when starting the server.",
75+
"@id": "urn:solid-server:default:WorkerInitializer",
76+
"@type": "ProcessHandler",
77+
"executeOnPrimary": false,
78+
"clusterManager": {
79+
"@id": "urn:solid-server:default:ClusterManager"
80+
},
81+
"source": {
82+
"comment": "These initializers will all be executed sequentially when starting the server.",
83+
"@id": "urn:solid-server:default:WorkerSequenceInitializer",
84+
"@type": "SequenceHandler",
85+
"handlers": [
86+
{
87+
"@id": "urn:solid-server:default:WorkerParallelInitializer"
88+
},
89+
{
90+
"@id": "urn:solid-server:default:ServerInitializer"
91+
}
92+
]
93+
}
94+
},
95+
{
96+
"comment": "Initializers that need to cleanup or do anything else before something writes to the backend should be added here.",
97+
"@id": "urn:solid-server:default:CleanupInitializer",
98+
"@type": "SequenceHandler",
99+
"handlers": []
100+
}
101+
]
102+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"import": [
7+
"uma-css:config/app/init/base/init.json"
8+
],
9+
"@graph": [
10+
{
11+
"comment": "These handlers are called for all processes whenever the server is started, and can be used to ensure that all necessary resources for booting are available.",
12+
"@id": "urn:solid-server:default:EarlyProcessParallelInitializer",
13+
"@type": "ParallelHandler",
14+
"handlers": []
15+
},
16+
{
17+
"comment": "These handlers are called only for the Primary process whenever the server is started, and can be used to ensure that all necessary resources for booting are available. (in singlethreaded mode, these are always called)",
18+
"@id": "urn:solid-server:default:PrimaryParallelInitializer",
19+
"@type": "ParallelHandler",
20+
"handlers": []
21+
},
22+
{
23+
"comment": "These handlers are called only for the workers processes whenever the server is started, and can be used to ensure that all necessary resources for booting are available. (in singlethreaded mode, these are always called)",
24+
"@id": "urn:solid-server:default:WorkerParallelInitializer",
25+
"@type": "ParallelHandler",
26+
"handlers": []
27+
}
28+
]
29+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"import": [
7+
"css:config/app/init/initializers/root.json",
8+
9+
"uma-css:config/app/init/default.json"
10+
],
11+
"@graph": [
12+
{
13+
"comment": "Initializes the root container resource.",
14+
"@id": "urn:solid-server:default:PrimaryParallelInitializer",
15+
"@type": "ParallelHandler",
16+
"handlers": [
17+
{
18+
"@id": "urn:solid-server:default:RootInitializer"
19+
}
20+
]
21+
},
22+
{
23+
"@id": "urn:solid-server:default:RootFolderGenerator",
24+
"@type": "StaticFolderGenerator",
25+
"templateFolder": "@css:templates/root/intro"
26+
}
27+
]
28+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
4+
],
5+
"@graph": [
6+
{
7+
"comment": "Initializer that instantiates all the seeded accounts and pods.",
8+
"@id": "urn:solid-server:default:SeededAccountInitializer",
9+
"@type": "SeededAccountInitializer",
10+
"accountStore": {
11+
"@id": "urn:solid-server:default:AccountStore"
12+
},
13+
"passwordStore": {
14+
"@id": "urn:solid-server:default:PasswordStore"
15+
},
16+
"podCreator": {
17+
"@id": "urn:solid-server:default:PodCreator"
18+
},
19+
"configFilePath": {
20+
"@id": "urn:solid-server:default:variable:seedConfig"
21+
}
22+
}
23+
]
24+
}

packages/css/config/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
55
],
66
"import": [
7-
"css:config/app/init/initialize-intro.json",
87
"css:config/app/main/default.json",
98
"css:config/app/variables/default.json",
109
"css:config/http/handler/default.json",
@@ -14,7 +13,6 @@
1413
"css:config/http/static/default.json",
1514
"css:config/identity/access/public.json",
1615
"css:config/identity/email/default.json",
17-
"css:config/identity/handler/default.json",
1816
"css:config/identity/oidc/disabled.json",
1917
"css:config/identity/ownership/token.json",
2018
"css:config/identity/pod/static.json",
@@ -35,6 +33,8 @@
3533
"uma-css:config/ldp/authorization/uma.json",
3634
"uma-css:config/ldp/handler/uma.json",
3735
"uma-css:config/ldp/metadata-writer/uma.json",
36+
"uma-css:config/identity/handler/default.json",
37+
"uma-css:config/app/init/initialize-intro.json",
3838
"css:config/storage/location/pod.json"
3939
],
4040
"@graph": [
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"import": [
7+
"css:config/identity/handler/base/adapter-factory.json",
8+
"css:config/identity/handler/base/jwks.json",
9+
"css:config/identity/handler/base/provider-factory.json",
10+
11+
"uma-css:config/identity/handler/storage/default.json"
12+
],
13+
"@graph": [
14+
{
15+
"comment": "Routes all IDP related requests to the relevant handlers.",
16+
"@id": "urn:solid-server:default:IdentityProviderHandler",
17+
"@type": "RouterHandler",
18+
"baseUrl": {
19+
"@id": "urn:solid-server:default:variable:baseUrl"
20+
},
21+
"targetExtractor": {
22+
"@id": "urn:solid-server:default:TargetExtractor"
23+
},
24+
"allowedPathNames": [
25+
"^/.account/.*"
26+
],
27+
"handler": {
28+
"@id": "urn:solid-server:default:IdentityProviderParsingHandler"
29+
}
30+
},
31+
{
32+
"comment": "Handles IDP input parsing.",
33+
"@id": "urn:solid-server:default:IdentityProviderParsingHandler",
34+
"@type": "ParsingHttpHandler",
35+
"requestParser": {
36+
"@id": "urn:solid-server:default:RequestParser"
37+
},
38+
"errorHandler": {
39+
"@id": "urn:solid-server:default:ErrorHandler"
40+
},
41+
"responseWriter": {
42+
"@id": "urn:solid-server:default:ResponseWriter"
43+
},
44+
"operationHandler": {
45+
"comment": "Handles IDP input authorization. Permission reader should be set to allow all if no authorization is needed.",
46+
"@type": "AuthorizingHttpHandler",
47+
"@id": "urn:solid-server:default:IdentityProviderAuthorizingHandler",
48+
"credentialsExtractor": {
49+
"@id": "urn:solid-server:default:CredentialsExtractor"
50+
},
51+
"modesExtractor": {
52+
"@id": "urn:solid-server:default:ModesExtractor"
53+
},
54+
"authorizer": {
55+
"@id": "urn:solid-server:default:Authorizer"
56+
},
57+
"operationHandler": {
58+
"@id": "urn:solid-server:default:IdentityProviderHttpHandler"
59+
}
60+
}
61+
},
62+
{
63+
"comment": "Handles IDP handler behaviour.",
64+
"@id": "urn:solid-server:default:IdentityProviderHttpHandler",
65+
"@type": "IdentityProviderHttpHandler",
66+
"providerFactory": {
67+
"@id": "urn:solid-server:default:IdentityProviderFactory"
68+
},
69+
"cookieStore": {
70+
"@id": "urn:solid-server:default:CookieStore"
71+
},
72+
"handler": {
73+
"@id": "urn:solid-server:default:InteractionHandler"
74+
}
75+
}
76+
]
77+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^7.0.0/components/context.jsonld",
4+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
5+
],
6+
"import": [
7+
"css:config/identity/handler/routing/default.json",
8+
"css:config/identity/handler/storage/password.json",
9+
"css:config/identity/handler/enable/account.json",
10+
"css:config/identity/handler/enable/client-credentials.json",
11+
"css:config/identity/handler/enable/password.json",
12+
"css:config/identity/handler/enable/pod.json",
13+
"css:config/identity/handler/enable/webid.json",
14+
15+
"uma-css:config/identity/handler/base/default.json"
16+
],
17+
"@graph": [
18+
{
19+
"comment": "Enables all account-related features."
20+
}
21+
]
22+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"@context": [
3+
"https://linkedsoftwaredependencies.org/bundles/npm/@solidlab/uma-css/^0.0.0/components/context.jsonld"
4+
],
5+
"@graph": [
6+
{
7+
"@id": "urn:solid-server:default:AccountStore",
8+
"@type": "BaseAccountStore",
9+
"storage": {
10+
"@id": "urn:solid-server:default:AccountStorage"
11+
}
12+
}
13+
]
14+
}

0 commit comments

Comments
 (0)