Skip to content

Modify ticketer and ccache logic#2159

Open
laxa wants to merge 1 commit intofortra:masterfrom
laxa:improve_ticket
Open

Modify ticketer and ccache logic#2159
laxa wants to merge 1 commit intofortra:masterfrom
laxa:improve_ticket

Conversation

@laxa
Copy link
Copy Markdown
Contributor

@laxa laxa commented Mar 27, 2026

This PR fix multiple issues, all related to Kerberos tickets handling.

  • Ticketer now update existing ccache if KRB5CCNAME is specified

Current ticketer.py logic is to create a new ticket, the introduced modification will take into account the presence of KRB5CCNAME environment variable, and if set, will load the content of the ticket before adding the generated ticket and saving it to the target.

  • ticketConverter now convert all TGS within the Kirbi or provided Ccache

In the same manner, ticketConverter.py only takes the first TGS and discard all other tickets during conversion. This PR now loop on all tickets.

  • Fix a bug during the conversion from ccache to kirbi that does not correctly preserve ticket flags

During the conversion of tickets, from ccache to kirbi, the ticket's flags are converted to their ASN1 representation. However, the conversion is not properly done when an integer is given and null bytes are stripped. Using a string containing the binary representation of the flags solve the issue.
Currently, when using ticketer.py and then ticketConverter.py to a kirbi file, the ticket flags go from 0x50a00000 to 0xa1400000.

image

* ticketer now update existing ccache if KRB5CCNAME is specified
* ticketConverter now convert all TGS within the Kirbi or provided Ccache
* Fix a bug during the conversion from ccache to kirbi that does not correctly preserve ticket flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant