Commit graph

132 commits

Author SHA1 Message Date
Ori Bernstein 5bc9b0c3ca improve usage messages (thanks henesy)
Fix inconsistencies between programs and their usage
messages,  correct instances where information seems
to be missing or lost. This  includes missing arguments,
making usage consistent with manuals, and so on.
2020-03-10 10:09:34 -07:00
Ori Bernstein 50791b8755 add usage messages to auth/(enable disable status).
print useful message when user invokes these commands incorrectly
(thanks henesy)
2020-03-08 16:31:30 -07:00
cinap_lenrek 85216d3d95 auth/rsa2asn1: implement private key export with -a flag (thanks kvik)
kvik writes:

I needed to convert the RSA private key that was laying around in
secstore into a format understood by UNIX® tools like SSH.

With asn12rsa(8) we can go from the ASN.1/DER to Plan 9 format, but not
back - so I wrote the libsec function asn1encodeRSApriv(2) and used it in
rsa2asn1(8) by adding the -a flag which causes the full private key to be
encoded and output.
2019-08-30 07:34:35 +02:00
cinap_lenrek 79bfff6437 factotum: rsa: use mptober() to get right adjusted result instead of mptobe() and memset() 2018-12-04 19:34:36 +01:00
aiju 911df94e5d asaudit: make error more explicit 2018-07-11 12:23:48 +01:00
cinap_lenrek 83de8c0f5f authsrv: log message when no AES key is found for pak 2018-07-11 10:17:04 +02:00
cinap_lenrek e69cde3120 authsrv: implement AuthNTLM 2018-05-20 22:59:24 +02:00
cinap_lenrek 6e19d19285 separate MSCHAP(v2) and NTLM(v2) authentication
due to linux omiting the final Z(4) in the NTLMv2 reply, and
the need for the windom for LMv2 authentication, here is a new
AuthNTLM ticket request now with length and dom fields.
2018-05-20 22:49:24 +02:00
cinap_lenrek e684b2a3fb authsrv: work arround linux omiting final Z(4) after the AvrPairs 2018-05-20 01:37:38 +02:00
cinap_lenrek 58aba2a67f cifsd: fix ntlmv2 authentication
in ntlmv2, the client will retry the challenge response trying a bunch
of different domain names assuming the same server challenge. so we have
to make retries work with factotum and the auth server.

also, windows 7 with compatlevel=4 sends all zeros LM response.
2018-05-19 16:40:01 +02:00
cinap_lenrek d06196ab87 auth/asn12rsa: also convert ASN.1 encoded public key to plan9 format 2018-02-05 03:21:51 +01:00
cinap_lenrek a7974d96b7 factotum: implement mschapv2 role=server authentication (for ppp)
this implements the server part of mschapv2 with the new
authserver changes.

we also provide AuthInfo for the client now with the
MPPE secret and the authenticator.
2018-01-21 22:35:01 +01:00
cinap_lenrek fd1e50d653 authsrv: implement mschapv2 authentication, include MPPE secret in the ticket
this adds new rpc for mschapv2 authentication (21)

deliver the MPPE secret not after the ticket/authenticator
response as cheartext, but include it in the first 128 bit
of the ticket key. and the authenticator in the first 160 bit
of the authenticator random field.
2018-01-21 22:32:34 +01:00
cinap_lenrek 2bd59d9cb3 authsrv: fix chap
use OCHAPREPLYLEN instead of sizeof(reply) (no padding).

exit after sending ticket response to force eof as factotum
unconditionally reads tailing secret hash (as of mschap).
2018-01-15 01:31:27 +01:00
cinap_lenrek 069230cd62 forgot to commit asn1dump.c... 2018-01-07 05:17:34 +01:00
cinap_lenrek 1c3377a67f factotum: remove unused sshrsa.c 2018-01-06 08:37:32 +01:00
cinap_lenrek a200ecd3a6 remove asn12dsa, dsa2pub, dsa2ssh and dsagen
was mostly usefull for old ssh.
2018-01-06 08:32:51 +01:00
cinap_lenrek 91a701747c auth/asn1dump: include in mkfile 2018-01-06 07:44:12 +01:00
cinap_lenrek 1d7bb80793 factotum: remove legacy wep protocol 2018-01-02 04:27:23 +01:00
cinap_lenrek f7b0cc7a64 factotum: replace custom hex parsing code with dec16() avoding timing side channels 2018-01-01 21:14:39 +01:00
cinap_lenrek 3ef51c16d4 auth/factotum: add role=login protocol variant to dp9ik/p9sk1
the role=login protocol is ment to replace proto=p9cr in
auth_userpasswd() from libauth to authenticate a user
given a username and a password. in contrast to p9cr, it
does not require an authentication server when user is the
hostowner and its key is present in factotum.
2017-12-03 05:10:04 +01:00
cinap_lenrek e614cdf02f auth/login: add missing quotefmtinstall(), quote dom attribute 2017-12-03 04:54:34 +01:00
cinap_lenrek 0a3695ba84 rsa: add auth/rsa2asn1, check write error in auth/rsa2x509 and auth/rsa2pub, document in rsa(8) 2017-10-06 20:55:57 +02:00
cinap_lenrek 3fc29c6984 auth/factotum: complete p9any v.2 server protocol, but don't enable it. 2017-06-18 21:59:16 +02:00
cinap_lenrek 128783a700 factotum: append public rsa encyption exponent after the modulus
this makes implementing ssh-rsa authentication easier, as we
then can convert the public key directly to ssh format and check
if the server will accept that public key.

tlshand just needs the modulus to see if the public key matches
the one it has from the certificate.
2017-04-17 05:18:24 +02:00
cinap_lenrek 242274f733 rsa2ssh: drop support for version 1 key format 2017-04-17 05:13:46 +02:00
cinap_lenrek 394af5a216 authsrv: handle short reads in initkeyseed() 2017-02-26 23:10:17 +01:00
cinap_lenrek 6de804b578 authsrv: don't hash in hostowner key for keyseed
aiju → i don't like it, it's more bullshit ways to expose the key :)
aiju → if someone can grab /adm/keyseed, they can also grab /adm/users and /adm/keys
2017-02-26 22:44:47 +01:00
cinap_lenrek 009bec0752 authsrv: salt the keyseed from /adm/keyseed file
change the keyseed key derivation to hkdf sha256
using the hostowners des key plus 256 bit random
salt from /adm/keyseed.
2017-02-26 03:47:46 +01:00
cinap_lenrek 27498dd63a authsrv: fix mkkey() dummy key generation (thanks aiju) 2017-02-26 02:21:49 +01:00
cinap_lenrek 27485e62d1 authsrv: get rid of needreply parameter by changing vnc protocol handler 2017-02-26 01:34:42 +01:00
aiju 6651be7516 authsrv: more useful error reporting 2017-02-26 01:11:37 +01:00
cinap_lenrek 28491941b0 auth/asaudit: quote user and dom attributes in factotum key 2017-02-25 17:47:36 +01:00
aiju e4dc3f9bd8 asaudit: check factotum key ; netaudit: mention asaudit 2017-02-25 11:54:15 +01:00
aiju 0406d9828a asaudit: missing \n in print 2017-02-24 01:08:08 +01:00
aiju e14690517e merge 2017-02-24 01:02:43 +01:00
aiju 1645f3314c add auth/asaudit 2017-02-24 00:54:40 +01:00
cinap_lenrek c22fa6d5eb auth/readnvram: also print dp9ik key 2017-02-24 00:10:36 +01:00
aiju 54ec7aed62 auth/keyfs: support -r flag to mount read-only 2017-02-23 23:22:49 +01:00
mischief e8045cbcbf factotum: support sha256 algorithm in rsa pkcs#1 signing
also removed md2 oid, it is unused.
2017-02-09 09:08:43 +00:00
cinap_lenrek bbce9c0566 rsagen: prefer 65537 as the default exponent when elen == 0, otherwise pick randomly 2017-02-06 04:25:38 +01:00
cinap_lenrek c6b2ad583e auth/keyfs: use ulong for time 2017-01-26 22:09:44 +01:00
cinap_lenrek 8ea917d119 secstore/secuser: use ulong for time 2017-01-26 22:06:57 +01:00
cinap_lenrek d6bb01da76 factotum: fix memory leak in findkey() 2017-01-22 00:42:13 +01:00
cinap_lenrek 84228515b6 keyfs: print error message when reading /adm/keys fails 2016-12-26 19:48:38 +01:00
cinap_lenrek 3bf89ed825 auth/as: simplify further 2016-12-22 21:55:56 +01:00
cinap_lenrek 82bf19941e auth/as, auth/none, auth/newns: consistent handling of command arguments, cleanup 2016-12-22 21:39:59 +01:00
cinap_lenrek f3feafc476 auth/factotum: bound the number of srv processes to 16, error the 9p rpc when it is over limit 2016-10-23 17:18:35 +02:00
cinap_lenrek 590a4980bc auth/fgui: use pale colors 2016-08-08 07:48:55 +02:00
cinap_lenrek 2a6fd6ec25 auth/login: add dp9ik key to sub factotum, get rid of temporary /srv file 2016-08-04 11:47:12 +02:00