by superb_dev · 1y ago · 0 comments
Git actually has a solution for this! I don’t know if it would work with the custom python stuff going on, but you can set the login shell to `git-shell`
If you're really dogmatic about it, I guess you would have no dependency lock files either, but commit all that code directly to git instead of having references. Some people do that, so wouldn't be a huge surprise.
It also may mean that git-shell could use a few PRs adding whatever is missing for git-lfs to work, given that git-lfs does not do anything extra fancy.
It won't be long before that hardware device that is supposedly being held by a person becomes a soft device, which will then be impersonated.
Heck, just true the public key as the authentication header.
Or use authentication certificates.
If ssh is such a big problem, use something else
Traditionally both facets of the 3rd party trust model have had CVE over the years. SSL protocol misconfiguration is also very common, and connections can be downgraded by adversaries into a vulnerable version of the protocol.
It could be argued ssh is a weaker Trust on first use model, but in most cases the keys will rarely change for the short service life of the server instance... and the server may be setup from a local physical terminal, and keys communicated out-of-band to remote users.
At some point one has to admit if someone really wants in they will physically pull the drive in the data center. However, people using web vulnerability scanners on your systems are less of a nuisance.
Best regards =3
It's not a problem. You can use SSH today (and since years already now) with Yubikey and the likes. I'm using Git over SSH with Yubikeys and it works.
Use Git over SSH, use a Yubikey (or whatever suits you), set the login shell to git-shell.
Combined with port-knocking and fail2ban, the setup has proven rather reliable over the years. The Go language can make surprisingly resilient servers if you have the memory available.
The ssh key handling in gitea requires manual setup, and thus does not necessarily even have to use the same administrative user login key sets.
Best regards =3