Repository navigation
Kerberos PAC: decode and encode client and device claims (PAC_CLIENT_CLAIMS_INFO / PAC_DEVICE_CLAIMS_INFO) - #357
Open
rcbjBlueMars wants to merge 1 commit into
Open
rcbjBlueMars wants to merge 1 commit into
rcbjBlueMars wants to merge 1 commit into
Conversation
…IMS_INFO For rcbj/iya-sts#493. krb5_pac.js gains an NDR encoder and decoder for [MS-ADTS] 2.2.18's CLAIMS_SET_METADATA wrapping a CLAIMS_SET: every claims source type, the four claim types (INT64, UINT64, STRING, BOOLEAN; the 64-bit values as decimal strings through BigInt), the 16-bit enums, the union's repeated discriminant and the [string] ids whose counts include the NUL. A compressed set is decoded: COMPRESSION_FORMAT_XPRESS_HUFF ([MS-XCA] 2.2 LZ77+Huffman), bounded by the declared size and refusing an incomplete code. LZNT1 and plain XPRESS are reported by name. Nothing is ever compressed. parsePac() decodes types 13 and 15; buildPac() writes type 13 from spec.clientClaims; resignPac() carries both buffers byte for byte (it always did, and its comment said otherwise) and can replace or remove the client claims (spec.clientClaims). krb5_describe.js shows the claims. No new file, so the sts/ COPY closure and sync-to-mock-sts.sh's list are unchanged. client/src's tracked copies follow common/krb5. tests/krb5_pac_layout.js: hand-derived offsets for both streams, every type at its extremes, refusals of unencodable values, decompression with a test-only encoder over two tables, and claims signed, tampered, carried, replaced and removed through a re-sign.
This branch has not been deployed
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.
Codec half of rcbj/iya-sts#493.
common/krb5/krb5_pac.js: NDR encode/decode of CLAIMS_SET_METADATA / CLAIMS_SET (MS-PAC 2.11, MS-ADTS 2.2.18), all source types and the four value types (INT64/UINT64 as BigInt, read back as decimal strings). XPRESS Huffman decompression (MS-XCA); LZNT1 and plain XPRESS are named, not decoded. Nothing is compressed on output.parsePacdecodes types 13 and 15.buildPactakesspec.clientClaims.resignPackeeps both buffers and can replace or remove type 13.common/krb5/krb5_describe.jsshows the claims; theclient/srccopies are updated to match.tests/krb5_pac_layout.jscovers the round trips. Of 17 mutants, 14 were caught; the other 3 are equivalent.The file is already synced byte-identically into iya-sts
kerberos/on rcbj/iya-stsfeature/493. When thests/gitlink is bumped, bump it together with this PR, orkrb5_codec_sync.jswill see the two copies differ. No new file, so the Kerberos COPY closure owes nothing.🤖 Generated with Claude Code