Commits
- Commit:
3b8fb9520f899be7cb492c652afa0cdce28e350e
- From:
- Tracey Emery <tracey@traceyemery.net>
- Date:
rm unused boolean grammar. ok stsp@
- Commit:
abe844e2dfc7056150889993b3568fe400af7358
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: move socket path check to parse.y and error from the main process
It's handy to have a "bad unix socket path" error being reported
directly from the main process since can get caught by `gotd -n'.
ok jamsek stsp
- Commit:
809a54db7c7cec54dcacb53f62eedecc18a833da
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: move nrepos check to parse_config
ok jamsek stsp
- Commit:
9b7f22a6148eb14af6e59de120bb5b1dd0e05469
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
call realpath() during early startup in gotd's parse.y
This ensures that all repositories exist when the process is first started.
It will also help to avoid an "rpath" pledge promise in a future gotd which
uses a separate session process, by avoiding realpath() calls while starting
new processes.
- Commit:
83577462cc61708af1c98d70939bb1d6c54a1506
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch gotd.conf syntax from 'unix_socket' to 'listen on'
ok op@
- Commit:
6f854dde056f82d0c757c720beed863fc557a1ca
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove the gotsh group requirement from gotd; any user can now connect
Repository access is now controlled by access rules in gotd.conf,
and concurrent connections to the gotd socket by local users are
limited by the listen process. We should keep refining our anti-DoS
measures in the future, but at least we have something in place now.
ok jamsek, op
- Commit:
71cd355cb2711ad528715bbbb5b41be7c26ace2a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify gotd' timeouts string parsing
no need to duplicate what strtonum does; pass the *real* maximum value
allowed to it directly.
ok stsp@
- Commit:
2be11cdeee0c210d3273b3724e924de0422d9f67
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotd: allow to express timeouts using minutes/hours
This allows to use a suffix to indicate the unit of measure, such as
"1h" for one hour or "30m" for 30 minutes. The suffix "s" for seconds
is also accepted for completeness.
ok stsp
- Commit:
46e48ac738ef3d714f4258bd513bca84369a457d
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
enforce gotd request timeout > 0; the code doesn't handle zero right now
spotted by + ok op@
- Commit:
fc89c9001a9df4312083343d1cabb3a8ad055af5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add conf_limit_user_connection prototype at the top of parse.y
different yacc implementations (e.g. GNU bison) may put the various
parts in a different order, and so the definition of the function may
not be visible in the generated code.
- Commit:
40b85cca5d86ebef3a353efd464af989c3ebf18b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
introduce connection options to gotd.conf
Allow administrators to tweak the default authentication and request
timeouts if needed, and to tweak the limit of concurrent connections
for specific user accounts.
with several tweaks from and ok op@
- Commit:
2507ffb7f18f4e8d71f47efc0cc1e746177e9167
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
log_warnx and fatalx prepend the program name internally, don't add it manually
- Commit:
3b70620381319263c9c5e4d4ddbc07118aa5fb87
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
gotd.conf: complain if a repository lacks a path in the configuration file
- Commit:
7683f79a1159f06db89b132aa5fceb5f3146bb2a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
gotd.conf: treat empty repository names as a syntax error
- Commit:
fa7014189021ca34283ee2283918646f21b26f9b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
gotd.conf: treat repositories without any parameters as a syntax error
Because gotd expects some parameters to be present they must not be
optional at the syntax level.
- Commit:
5e25db14db9eb20ee11b68048b45b3e0f54d50eb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
run gotd authentication in a separate child process
ok op@
- Commit:
d93ecf7dc6dd75bc506128cc5666c1b76761e0a0
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add a gotd "listen" process which watches the unix socket
ok op@
- Commit:
533abaaa4c6fa1e70dad2edc1ed7a94c07be94e0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
forward-declare conf_new_access_rule
not all yacc implementations put the section in the same order: with
OpenBSD' yacc it's fine, with GNU' bison it results in a warning about
using an undeclared function conf_new_access_rule.
extracted from -portable via thomas, ok stsp@
- Commit:
c2a4f618fa3c9683fbb5f384b117f7e45a041122
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add missing RO and RW tokens; pointed out by op@
- Commit:
0ccf3acb6c3004ac41b46ad931024da1f4ea0e3e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
implement per-repository read/write authorization rules in gotd
ok op@
- Commit:
13b2bc374c1870ec27b2eeb40efe68fd465f64bb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
introduce gotd(8), a Git repository server reachable via ssh(1)
This is an initial barebones implementation which provides the absolute
minimum of functionality required to serve got(1) and git(1) clients.
Basic fetch/send functionality has been tested and seems to work here,
but this server is not yet expected to be stable.
More testing is welcome. See the man pages for setup instructions.
The current design uses one reader and one writer process per repository,
which will have to be extended to N readers and N writers in the future.
At startup, each process will chroot(2) into its assigned repository.
This works because gotd(8) can only be started as root, and will then
fork+exec, chroot, and privdrop.
At present the parent process runs with the following pledge(2) promises:
"stdio rpath wpath cpath proc getpw sendfd recvfd fattr flock unix unveil"
The parent is the only process able to modify the repository in a way
that becomes visible to Git clients. The parent uses unveil(2) to
restrict its view of the filesystem to /tmp and the repositories
listed in the configuration file gotd.conf(5).
Per-repository chroot(2) processes use "stdio rpath sendfd recvfd".
The writer defers to the parent for modifying references in the
repository to point at newly uploaded commits. The reader is fine
without such help, because Git repositories can be read without
having to create any lock-files.
gotd(8) requires a dedicated user ID, which should own repositories
on the filesystem, and a separate secondary group, which should not
have filesystem-level repository access, and must be allowed access
to the gotd(8) socket.
To obtain Git repository access, users must be members of this
secondary group, and must have their login shell set to gotsh(1).
gotsh(1) connects to the gotd(8) socket and speaks Git-protocol
towards the client on the other end of the SSH connection.
gotsh(1) is not an interactive command shell.
At present, authenticated clients are granted read/write access to
all repositories and all references (except for the "refs/got/" and
the "refs/remotes/" namespaces, which are already being protected
from modification).
While complicated access control mechanism are not a design goal,
making it possible to safely offer anonymous Git repository access
over ssh(1) is on the road map.