mik2k2
10d42bac7c
small message change
2022-01-06 10:03:47 +01:00
mik2k2
4fe4ff0154
not allowlisted -> not allowed
2022-01-05 11:02:41 +01:00
mik2k2
bd91a245a0
check names directly on the User objects in TestHostNameCollision
2022-01-04 16:15:05 +01:00
mik2k2
be6a0f69da
apparently, we have another prefix
2022-01-04 15:55:10 +01:00
mik2k2
0b7f1c465f
add --whitelist with a warning; update tests for messages
2022-01-04 15:41:02 +01:00
mik2k2
dc6fa21eaa
minor message changes
2022-01-04 15:11:14 +01:00
mik2k2
7677d48704
add loader to allowlist test
2021-12-24 12:28:29 +01:00
mik2k2
27997bcdf6
use a key loader function to move file reading out of auth
2021-12-23 19:55:05 +01:00
mik2k2
be26ace545
fix crash on specifying exactly one more -v flag than the max level
2021-12-23 19:11:00 +01:00
mik2k2
110aca2e8b
s/whitelist/allowlist/
2021-12-23 19:06:45 +01:00
mik2k2
dbc0bdbeac
hopefully make test less racy
2021-12-22 16:11:52 +01:00
mik2k2
20720ae2c4
add client connection with key; add test for /allowlist import AGE
2021-12-22 16:06:02 +01:00
mik2k2
46e2e8a812
remove some unimportant TODOs; add a message when reverify kicks people; add a reverify test
2021-12-22 15:20:18 +01:00
mik2k2
efe894e021
managed to reproduce the timeout after updating, hopefully it's the same one
2021-12-22 14:37:02 +01:00
mik2k2
89ee27d930
Merge branch 'master' into whitelist-command
2021-12-22 14:07:46 +01:00
mik2k2
a8abf7091a
Revert "possibly fix the test timeout in HostNameCollision" (didn't work)
...
This reverts commit 664dbb0976f8f10ea7a673950a879591c2e7c320.
2021-12-22 13:47:54 +01:00
mik2k2
664dbb0976
possibly fix the test timeout in HostNameCollision
2021-12-18 17:29:05 +01:00
mik2k2
1d63444579
check for ops in Auth.CheckPublicKey and move /allowlist handling to helper functions
2021-12-18 17:09:48 +01:00
Andrey Petrov
84bc5c76dd
go mod update for golang.org/x/crypto/ssh
2021-12-03 11:03:08 -05:00
Andrey Petrov
82526e9123
Update ssh.chat pubkey
2021-10-13 11:30:58 -04:00
Akshay Shekher
d25630020d
/back, /away: Change no-op to return err
...
Fixes #402
When the user is not set as away, using the
`/back` or `/away` command should return error.
The previous behaviour was inconsistent,
`/away` sent a message and `/back` ignored it.
New behaviour is error for both cases.
Co-authored-by: Akshay <akshay.shekher@gmail.com>
v1.11-rc4
2021-10-13 11:00:11 -04:00
Andrey Petrov
0eebb64c1d
sshd/terminal/terminal.go: Clamp pos to protect from some fuzzing failures
2021-10-13 10:43:49 -04:00
Andrey Petrov
db14517499
cmd/ssh-chat: Accept multiple --identity keys
...
Fixes #401
2021-10-13 10:27:04 -04:00
Andrey Petrov
88fa53fd16
Makefile: deploy tweak
2021-10-11 10:18:06 -04:00
mik2k2
69c236d8be
s/whitelist/allowlist/ (user-facing); move helper functions outside the handler function
2021-07-16 14:27:29 +02:00
mik2k2
4961647f51
mutex whitelistMode and remove some deferred TODOs
2021-07-10 13:31:52 +02:00
mik2k2
18a00b66c8
use the same auth (the tests don't seem to care, but htis is more right)
2021-07-07 08:59:09 +02:00
mik2k2
93a8d19281
Merge branch 'shazow:master' into whitelist-command
2021-07-07 08:27:20 +02:00
mik2k2
253302a057
gofmt
2021-07-06 12:57:51 +02:00
mik2k2
efab623a6a
add test for /whitelist
2021-07-06 12:55:47 +02:00
mik2k2
7951c57ef2
add /whitelist command with lots of open questions
2021-07-03 22:57:57 +02:00
mik2k2
7628a47c4c
set: Allow nil/expired items
...
Fixes #397
2021-07-03 13:37:09 -04:00
mik2k2
1a533b023d
move loading whitelist+ops from file to auth and save the loaded files fro reloading
2021-07-02 14:36:00 +02:00
mik2k2
7413539965
main, sshd: Refactor authentication, add IP throttling, improve passphrase auth
...
* Move password authentication handling into sshd/auth (fixes #394 ).
Password authentication is now completely handeled in Auth. The normal
keyboard-interactive handler checks if passwords are supported and asks
for them, removing the need to override the callbacks.
Brute force throttling is removed; I'd like to base it on IP address
banning, which requires changes to the checks.
I'm not sure, but I think timing attacks against the password are fixed:
- The hashing of the real password happens only at startup.
- The hashing of a provided password is something an attacker can do
themselves; It doesn't leak anything about the real password.
- The hash comparison is constant-time.
* refactor checks, IP-ban incorrect passphrases, renames
- s/assword/assphrase/, typo fixes
- bans are checked separately from public keys
- an incorrect passphrase results in a one-minute IP ban
- whitelists no longer override bans (i.e. you can get banned if you're
whitelisted)
* (hopefully) final changes
2021-05-31 10:08:30 -04:00
Akshay Shekher
c3b589b286
tests: Fixed flaky test by using user joined callback. ( #393 )
...
Instead of relying on the go scheduler to do the expected thing >_>
Co-authored-by: Akshay <akshay.shekher@gmail.com>
2021-05-02 13:02:39 -04:00
Akshay Shekher
e1e534344e
Fix SSHCHAT_TIMESTAMP env variables ( #392 )
...
* Fixes Env Vars to pass config to ssh-chat.
The env vars were beign parsed and set to the host
before the user was even added to the host and
hence ignored. This change moves the env var parsing
to after initializing the user.
TODO: tests, completeness+reliability
* cleaned up the test
* reduced test flakyness by adding wait instead of being optimistic
Co-authored-by: Akshay <akshay.shekher@gmail.com>
2021-05-02 12:18:31 -04:00
Andrey Petrov
46eaf037e3
Merge pull request #390 from shazow/shazow-patch-3
...
tests: Skip flakey TestHostNameCollision
2021-04-24 12:49:09 -04:00
Andrey Petrov
3c246777a1
tests: Skip flakey TestHostNameCollision
2021-04-24 12:22:42 -04:00
Andrey Petrov
fef128b91f
Merge pull request #389 from shazow/shazow-patch-2
...
ci: Test all sub-packages
2021-04-24 12:18:44 -04:00
Andrey Petrov
1ef05d0c26
ci: Test all sub-packages
2021-04-24 12:16:10 -04:00
Andrey Petrov
af502977e6
Merge pull request #388 from voldyman/ill-be-back
...
Added /back and tests for all away commands
2021-04-24 12:15:22 -04:00
Andrey Petrov
c3dccfd3eb
chat: /back help formatting.
2021-04-24 12:14:24 -04:00
Akshay
aae5bc8d2e
Added /back and tests for all away commands
2021-04-24 07:54:50 -07:00
Andrey Petrov
fb73ace458
Merge pull request #385 from sytranvn/build-apple-silocon
...
Add build script for apple silicon
2021-04-19 09:45:02 -04:00
Sy Tran
3557bf762d
Add build script for apple silicon
2021-04-18 07:31:13 +07:00
Andrey Petrov
fa3146c800
Makefile: Add deploy helper
2021-04-13 11:32:24 -04:00
Andrey Petrov
badcaa6e3b
/away: Fix output for admin whois
...
cc #377
v1.11-rc3
2021-04-13 11:27:44 -04:00
Andrey Petrov
9bf66ea992
Merge pull request #383 from shazow/add-mute
...
chat: Add /mute command for op
2021-04-13 11:24:53 -04:00
Andrey Petrov
37b101c3c1
chat: Add /mute command for op
2021-04-13 11:21:16 -04:00
Andrey Petrov
b73b45640c
host: Fix /msg vs /reply message formatting
...
Closes #382
v1.11-rc2
2021-04-06 09:28:48 -04:00