wiki-security-oidc 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +23 -0
- package/package.json +2 -5
- package/src/server.js +4 -1
package/LICENSE
CHANGED
|
@@ -629,7 +629,7 @@ to attach them to the start of each source file to most effectively
|
|
|
629
629
|
state the exclusion of warranty; and each file should have at least
|
|
630
630
|
the "copyright" line and a pointer to where the full notice is found.
|
|
631
631
|
|
|
632
|
-
wiki-
|
|
632
|
+
wiki-security-oidc, Open ID Connect security plug-in for Federated Wiki.
|
|
633
633
|
Copyright (C) 2025 Ruben Beltran del Rio
|
|
634
634
|
|
|
635
635
|
This program is free software: you can redistribute it and/or modify
|
package/README.md
CHANGED
|
@@ -23,6 +23,29 @@ To use this plugin, you must set the `security_type` to `"oidc"`.
|
|
|
23
23
|
out from the wiki. Providers like Pocket ID don't allow you to be redirected
|
|
24
24
|
back if this is true. **Optional, defaults to `false`**
|
|
25
25
|
|
|
26
|
+
### Additional Considerations
|
|
27
|
+
|
|
28
|
+
When running behind a reverse proxy such as `nginx`, it might be necessary to
|
|
29
|
+
increase the buffer sizes to properly handle the response. We use:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
proxy_busy_buffers_size 512k;
|
|
33
|
+
proxy_buffers 4 512k;
|
|
34
|
+
proxy_buffer_size 256k;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Likewise, if running behind a reverse proxy, you might need to set up the
|
|
38
|
+
following configuration values in your `config.json` to get the right
|
|
39
|
+
callbacks:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
{
|
|
43
|
+
...
|
|
44
|
+
security_useHttps: true,
|
|
45
|
+
wiki_domain: <the_external_facing_domain>
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
26
49
|
## Development workflow
|
|
27
50
|
|
|
28
51
|
This project has a `Makefile` that encapsulates some of the common development
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-security-oidc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Security plugin for Federated Wiki, using OIDC",
|
|
5
5
|
"main": "src/server.js",
|
|
6
6
|
"keywords": [
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
"license": "AGPL-3.0",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "git+https://git.sr.ht/~rbdr/wiki-
|
|
33
|
-
},
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://todo.sr.ht/~rbdr/wmap"
|
|
32
|
+
"url": "git+https://git.sr.ht/~rbdr/wiki-security-oidc"
|
|
36
33
|
},
|
|
37
34
|
"packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac",
|
|
38
35
|
"dependencies": {
|
package/src/server.js
CHANGED
|
@@ -11,7 +11,10 @@ const internals = {
|
|
|
11
11
|
let host = wiki_domain || url;
|
|
12
12
|
|
|
13
13
|
if (host.includes("//")) {
|
|
14
|
-
|
|
14
|
+
if (security_useHttps) {
|
|
15
|
+
return host.replace(/^http:\/\//, "https://");
|
|
16
|
+
}
|
|
17
|
+
return host;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const protocol = security_useHttps ? "https" : "http";
|