Skip to content

Commit

Permalink
feat: Allow registration to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed Jul 26, 2021
1 parent 2d1d098 commit 6c8e650
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/default.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions config/dynamic.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/dynamic.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions config/example-https-file.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions config/file.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
5 changes: 5 additions & 0 deletions config/identity/README.md
Expand Up @@ -23,3 +23,8 @@ What to use for pod creation.
* *dynamic*: Every created pod has its own Components.js config for its ResourceStore,
which can differ from the others.
* *static*: All pod data is stored in separate containers in the same ResourceStore.

## Registration
If users should be able to register on the server.
* *enabled*: Enables registration.
* *disabled*: Disables registration.
2 changes: 0 additions & 2 deletions config/identity/handler/interaction/handler.json
Expand Up @@ -4,7 +4,6 @@
"files-scs:config/identity/handler/interaction/handlers/forgot-password.json",
"files-scs:config/identity/handler/interaction/handlers/initial.json",
"files-scs:config/identity/handler/interaction/handlers/login.json",
"files-scs:config/identity/handler/interaction/handlers/registration.json",
"files-scs:config/identity/handler/interaction/handlers/reset-password.json",
"files-scs:config/identity/handler/interaction/handlers/session.json"
],
Expand All @@ -15,7 +14,6 @@
"@type": "WaterfallHandler",
"handlers": [
{ "@id": "urn:solid-server:auth:password:InitialInteractionHandler" },
{ "@id": "urn:solid-server:auth:password:RegistrationInteractionHandler" },
{ "@id": "urn:solid-server:auth:password:LoginInteractionHandler" },
{ "@id": "urn:solid-server:auth:password:SessionInteractionHandler" },
{ "@id": "urn:solid-server:auth:password:ForgotPasswordInteractionHandler" },
Expand Down
8 changes: 8 additions & 0 deletions config/identity/registration/disabled.json
@@ -0,0 +1,8 @@
{
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
"@graph": [
{
"comment": "Disable registration by not attaching a registration handler."
}
]
}
15 changes: 15 additions & 0 deletions config/identity/registration/enabled.json
@@ -0,0 +1,15 @@
{
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
"import": [
"files-scs:config/identity/registration/handler/registration.json"
],
"@graph": [
{
"comment": "Enable registration by adding a registration handler to the list of interaction handlers.",
"@id": "urn:solid-server:auth:password:InteractionHttpHandler",
"WaterfallHandler:_handlers": [
{ "@id": "urn:solid-server:auth:password:RegistrationInteractionHandler" }
]
}
]
}
1 change: 1 addition & 0 deletions config/memory-subdomains.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions config/path-routing.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions test/integration/config/server-dynamic-unsafe.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/unsafe-no-check.json",
"files-scs:config/identity/pod/dynamic.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/debug-auth-header.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions test/integration/config/server-memory.json
Expand Up @@ -10,6 +10,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/token.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/dpop-bearer.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down
1 change: 1 addition & 0 deletions test/integration/config/server-subdomains-unsafe.json
Expand Up @@ -11,6 +11,7 @@
"files-scs:config/identity/handler/default.json",
"files-scs:config/identity/ownership/unsafe-no-check.json",
"files-scs:config/identity/pod/static.json",
"files-scs:config/identity/registration/enabled.json",
"files-scs:config/ldp/authentication/debug-auth-header.json",
"files-scs:config/ldp/authorization/webacl.json",
"files-scs:config/ldp/handler/default.json",
Expand Down

0 comments on commit 6c8e650

Please sign in to comment.