factotum: add dp9ik / modern 9front auth support#770
Open
kiljoy001 wants to merge 2 commits into9fans:masterfrom
Open
factotum: add dp9ik / modern 9front auth support#770kiljoy001 wants to merge 2 commits into9fans:masterfrom
kiljoy001 wants to merge 2 commits into9fans:masterfrom
Conversation
Port modern 9front-style shared-key authentication into plan9port factotum. This adds dp9ik support, modern AuthPAK and form1 authsrv handling, updates p9any to negotiate dp9ik when available while preserving p9sk1 compatibility, and imports the supporting libauthsrv/libsec/libmp pieces needed for the newer protocol. The change also adds low-level auth regression coverage plus a live factotum regression path that verifies direct dp9ik, direct p9sk1, and p9any negotiation against a real 9front auth server. Parts of the protocol logic and support code are adapted from 9front and drawterm auth implementations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This ports modern 9front-style shared-key authentication into
plan9portfactotum.What this changes
dp9iksupport tofactotumAuthPAKandform1authsrv handling needed fordp9ikp9anyto advertise and preferdp9ikwhen available while preservingp9sk1fallbackfactotumregression path for directdp9ik, directp9sk1, andp9anynegotiationfactotum(4)to documentdp9ik,p9anypreference, and secret sizesThis is intended to restore interoperability between
plan9portand modern9frontauth servers while keeping legacyp9sk1behavior working.Implementation notes
Parts of the protocol logic and supporting C code were adapted from the
9frontanddrawtermauth implementations.Testing
PLAN9=/home/scott/Repo/plan9port mk dp9iktest && ./o.dp9iktestinsrc/libauthsrvPLAN9=/home/scott/Repo/plan9port mk installinsrc/libauthsrvPLAN9=/home/scott/Repo/plan9port mk installinsrc/cmd/auth/factotumsrc/cmd/auth/factotum/dp9iklive.shfactotumand writing successfully through a mounted serviceLive results:
dp9ik:ok secret=256p9anywithdp9ik:ok secret=256p9sk1:ok secret=8p9anywith both keys present prefersdp9ik:ok secret=256p9anywith onlyp9sk1falls back correctly:ok secret=8