Sign-in:
- Google, GitHub, Microsoft and any OpenID Connect provider, set up in the
admin panel (secrets are write-only). PocketBase talks to the provider,
and docwell-server keeps the state and PKCE verifier. Accounts a
provider creates follow the sign-up switch and the domain list; refused
ones are removed again.
- Two-step sign-in with an authenticator app (TOTP), set up under "Your
account", with ten single-use recovery codes. After any first factor
(password, email code, provider) the session is held behind a
five-minute challenge: five tries, each code works once. Turning it off
needs a code. Managers can reset it for someone who lost their phone.
Both the web app and the admin panel ask for the code.
Integrations:
- Personal API tokens ("dw_…") that act as their owner, read-only or
read-write, with optional expiry. Only a hash is stored, and the token is
shown once. Tokens cannot manage tokens or two-step sign-in. Admins see
and can revoke their organization's tokens.
- Workspace webhooks for page, comment and space events. Deliveries are
HMAC-SHA256 signed and retried (10 s, 1 min, 5 min), with a 30-day log
and a test button. Loopback and link-local addresses are refused
(DOCWELL_WEBHOOKS_ALLOW_LOCAL is for development).
Audit log: sign-ins (including failures and second steps, filed under the
account's organization) and every successful change request, by route and
path ids, never bodies. Superadmins see everything and org admins their
organization. It is searchable and exportable as CSV in the admin panel's
new Security page, and kept for DOCWELL_AUDIT_RETENTION_DAYS (365).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66 lines
2.7 KiB
AMPL
66 lines
2.7 KiB
AMPL
module docwell/server
|
|
|
|
go 1.26.0
|
|
|
|
require (
|
|
github.com/blevesearch/bleve/v2 v2.6.1
|
|
github.com/coder/websocket v1.8.15
|
|
github.com/oapi-codegen/runtime v1.8.0
|
|
github.com/pquerna/otp v1.5.0
|
|
github.com/tetratelabs/wazero v1.12.0
|
|
github.com/yuin/goldmark v1.8.7
|
|
golang.org/x/net v0.62.0
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
)
|
|
|
|
require (
|
|
github.com/RoaringBitmap/roaring/v2 v2.14.5 // indirect
|
|
github.com/bits-and-blooms/bitset v1.24.2 // indirect
|
|
github.com/blevesearch/bleve_index_api v1.4.1 // indirect
|
|
github.com/blevesearch/geo v0.2.6 // indirect
|
|
github.com/blevesearch/go-faiss v1.1.5 // indirect
|
|
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
|
|
github.com/blevesearch/gtreap v0.1.1 // indirect
|
|
github.com/blevesearch/mmap-go v1.2.0 // indirect
|
|
github.com/blevesearch/scorch_segment_api/v2 v2.4.10 // indirect
|
|
github.com/blevesearch/segment v0.9.1 // indirect
|
|
github.com/blevesearch/snowballstem v0.9.0 // indirect
|
|
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
|
|
github.com/blevesearch/vellum v1.2.0 // indirect
|
|
github.com/blevesearch/zapx/v11 v11.4.3 // indirect
|
|
github.com/blevesearch/zapx/v12 v12.4.3 // indirect
|
|
github.com/blevesearch/zapx/v13 v13.4.3 // indirect
|
|
github.com/blevesearch/zapx/v14 v14.4.3 // indirect
|
|
github.com/blevesearch/zapx/v15 v15.4.3 // indirect
|
|
github.com/blevesearch/zapx/v16 v16.3.4 // indirect
|
|
github.com/blevesearch/zapx/v17 v17.2.3 // indirect
|
|
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
|
|
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
|
|
github.com/getkin/kin-openapi v0.142.0 // indirect
|
|
github.com/go-openapi/jsonpointer v0.23.1 // indirect
|
|
github.com/go-openapi/swag/jsonname v0.26.0 // indirect
|
|
github.com/golang/snappy v1.0.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/mschoch/smat v0.2.0 // indirect
|
|
github.com/oapi-codegen/oapi-codegen/v2 v2.8.1 // indirect
|
|
github.com/oasdiff/yaml v0.1.1 // indirect
|
|
github.com/oasdiff/yaml3 v0.0.14 // indirect
|
|
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
|
|
github.com/speakeasy-api/jsonpath v0.6.3 // indirect
|
|
github.com/speakeasy-api/openapi v1.24.0 // indirect
|
|
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
|
|
go.etcd.io/bbolt v1.4.0 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
|
golang.org/x/mod v0.41.0 // indirect
|
|
golang.org/x/sync v0.24.0 // indirect
|
|
golang.org/x/sys v0.49.0 // indirect
|
|
golang.org/x/text v0.43.0 // indirect
|
|
golang.org/x/tools v0.51.0 // indirect
|
|
google.golang.org/protobuf v1.36.6 // indirect
|
|
)
|
|
|
|
tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
|