Commit Graph

56 Commits

Author SHA1 Message Date
decentral1se 00a1452cfc
Migrate to ssbc urls (#336)
* fix: ssbc urls

Closes https://github.com/ssbc/go-ssb-room/issues/332

* fix: go-ssb-refs API changes

* test: go-ssb-refs API changes

Co-authored-by: decentral1se <cellarspoon@riseup.net>
Co-authored-by: André Staltz <andre@staltz.com>
2022-11-07 11:18:13 +02:00
Steven Roose e3afd943c9 Document shscap option 2022-11-07 11:09:36 +02:00
Andre Staltz e3cea25e25
release v2.0.7 2021-11-23 09:38:33 -03:00
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Henry a51e5327c8 begin next release cycle 2021-06-03 09:24:04 +02:00
Henry 8a19bc6806 release v2.0.6 2021-06-03 09:24:04 +02:00
Henry 45967a79cb begin next release cycle 2021-06-01 09:14:02 +02:00
Henry Bubert f0c696884f v2.0.5 2021-06-01 08:03:29 +02:00
Henry 4d3610e2fb prepare v2 release 2021-05-31 14:51:05 +02:00
Henry 3e53570638 dependency updates
* use LICENSEd version of nocomment
* use forked kitlog
* cleanup of various dependencies
2021-05-25 12:40:00 +02:00
Henry a537596a5a fix embedded build information 2021-05-24 16:31:20 +02:00
Henry 940cd2b3d1 Fix ssb-ws connections
The landing path (/) can now also be used as a websocket endpoint.
This enables use of the room server with ssb-browser-demo and similar
applications that can't use TCP connections.

also pin WIP muxrpc branch (fix-stupid-timeout)
2021-04-20 18:10:26 +02:00
Henry 52ec94e878 fix link generation for alias registration
fixes #160
2021-04-19 15:00:35 +02:00
Henry e14525f112 allow wildcard of the configured domain, too 2021-04-19 13:49:07 +02:00
cblgh 83500421f8 deny connections for banned keys 2021-04-07 12:58:03 +02:00
cblgh 75c60dbb16 implement SetPrivacyMode, rework -mode flag to use 2021-04-06 16:52:54 +02:00
cblgh b0761783f9 persist privacy mode in sqlite :> 2021-04-06 16:52:54 +02:00
cblgh faae7c0324 get started with privacy modes, parse -mode flag 2021-04-06 16:52:51 +02:00
Henry d1d108b9b7 Add support for invite consumption via JSON 2021-03-29 15:53:30 +02:00
Henry 921626b829 move NetworkInfo to network package
... and implement MultiserverAddress() there.
2021-03-29 12:29:01 +02:00
Henry 57c6baf43d add ratelimiter middleware for HTTP and relax server timeouts
these timeouts affect server-sent events, too and interfer with sign-in with ssb.
2021-03-26 13:45:21 +01:00
Henry 4325e0fb3d various fixes
* fill in sid and sc
* fix logout
* cascade member removal
* fix links
* trim suffix from signature
* fix /sse/login link
* fix sse links and filenames
* fix logout
* fix typos
* fix test compilation
* fix bridge test
* correct alias url test
* add some comments
* fix potentiall "can't send" deadlock on bridge

some documentation and license headers
2021-03-26 13:45:17 +01:00
Henry 396961e5e8 implement bridge between muxrcp and http 2021-03-26 13:36:48 +01:00
Henry afa6bee285 add server-sent events handler 2021-03-26 13:36:48 +01:00
Henry a180c74c38 begin sign-in with ssb
* sketch session store
* use session store and unify authentication handling
* sketch muxrpc handlers
2021-03-26 13:36:42 +01:00
Henry 0065312db1 change muxrpc room.registerAlias to return the resolve URL 2021-03-23 16:50:25 +01:00
Henry a0be3e998b various fixes 2021-03-22 13:02:39 +01:00
Henry 36d46a8576 fix denied list in sqlite 2021-03-22 13:02:39 +01:00
Henry a9e7297f64 update cmd/server 2021-03-22 13:02:39 +01:00
Henry 1cc5cb435d fix cmd/server build 2021-03-16 08:49:58 +01:00
Henry 50e4ebbaca aliases: add overview and revoke handlers 2021-03-16 08:49:47 +01:00
Henry 38da82980e fix builds 2021-03-16 08:49:40 +01:00
Henry 117cad48a7 rename admindb to roomdb 2021-03-10 16:44:46 +01:00
Henry b95c8de8be add room v1 "invite" until we have ssb-uri finalized 2021-03-10 09:35:54 +01:00
Henry fd21dfc60a Various fixes
* fix accept and consumed view
* Apply suggestions from Alex' code review
* define admin.Databases options struct
* structify database parameters of web/handlers
2021-03-10 09:34:36 +01:00
Henry 98468e93a5 Invite endpoints
* Add revoke and created templates
* Render invite accept with domain
* Flesh out accept page
2021-03-10 09:33:55 +01:00
Henry c7bcef4339 invite form testing 2021-03-10 09:33:15 +01:00
Henry 1ec3e8b064 list, set and get pinned notices 2021-02-25 10:07:47 +01:00
Henry e5a07fd8bc (Pinned)Notices
Notices are pages that admins can fill with their content to describe
and customize the room.

Pinned notices are common notices that each room has. Like a description
and privacy policy.

* update models
* simple crud test for basic notices
* edit and save notices as admin
2021-02-25 10:07:44 +01:00
Henry 8285c68417 remove -development falg from server cli
use -tags dev like we do in the rest of the code
2021-02-22 15:51:58 +01:00
Henry 6a4c1e54d9 add default CSP and some other browser mitigations
Though, CSP is primarily a tool against cross-site scripting and we
don't plan to host any user-generated or 3rd party content it's still a
good practice.  The primary requirment with this rule is
 to move all inline style tags to a seperate file.
2021-02-22 14:39:45 +01:00
Henry 6416d1c215 allow list interface 2021-02-15 14:43:32 +01:00
Henry 99c2e95aa3 setup logging in http handlers (fixes #10)
in a http.Handler you can now do the following to log events:

logger := logging.FromContext(req.Context())
level.Info(logger).Log("event", "happend", ...)
2021-02-11 16:43:37 +01:00
Henry beea19f93e seperate room state from muxrpc handler
There is a new roomstate package now with a Manager which is shared between muxrpc and the http
handler(s).

Also adds a list of peers in the room to admin dashboard.
2021-02-11 15:30:51 +01:00
Henry fec92d428c change name to go-ssb-room
It has been brought to my attention that "gossb" reads like "gossip..?"
to the untrained eye. That's just confusing.

Also the project hosts a single room so the plural was just wrong.
2021-02-09 17:38:51 +01:00
Henry 830678c914 admindb: add migrations based on rubenv/sql-migrate
This removes the nasty need for creating the database manually.

Migrations are kept in an embedded filesystem, just like the templates
and assets for the web frontend. The same -tags dev trick applies for
them.
2021-02-09 16:49:48 +01:00
Henry ef4a2f3f22 sqlite and auth setup 2021-02-08 17:47:42 +01:00
Henry 01ed66d6df basic auth middleware setup 2021-02-08 13:02:45 +01:00
Henry e9013a0c6b change import path
this is part of the NGI work and should be clearly indicated as such
2021-02-04 16:54:30 +01:00
Henry f741065836 add i18n support
TODO: default files once embedded assets are there
2021-02-04 16:52:55 +01:00