{"id":23618888,"url":"https://github.com/xavierog/yamltab","last_synced_at":"2026-02-15T00:32:04.782Z","repository":{"id":187565673,"uuid":"259984665","full_name":"xavierog/yamltab","owner":"xavierog","description":"yamltab converts Kerberos keytabs to YAML/JSON and the other way around.","archived":false,"fork":false,"pushed_at":"2025-01-04T19:20:47.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T18:11:46.195Z","etag":null,"topics":["converter","editor","json","kerberos","keytab","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavierog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-29T16:46:51.000Z","updated_at":"2025-01-04T19:20:50.000Z","dependencies_parsed_at":"2023-08-11T05:13:07.813Z","dependency_job_id":"70bb3fd6-9bcb-4b81-ba15-3a04e1c019b9","html_url":"https://github.com/xavierog/yamltab","commit_stats":null,"previous_names":["xavierog/yamltab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xavierog/yamltab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamltab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamltab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamltab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamltab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavierog","download_url":"https://codeload.github.com/xavierog/yamltab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamltab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29461911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","editor","json","kerberos","keytab","yaml"],"created_at":"2024-12-27T19:33:07.202Z","updated_at":"2026-02-15T00:32:04.759Z","avatar_url":"https://github.com/xavierog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# yamltab\n\nyamltab converts Kerberos keytabs to YAML/JSON and the other way around.\n\n## Keytab input, YAML/JSON output\n\nGiven a keytab file, yamltab will output a YAML representation of its contents, suitable for human edition\n\n```console\n$ yamltab example.keytab\nversion: 2\nentries:\n- spn: HTTP/application.example.com@EXAMPLE.COM\n  principal:\n    name_type: KRB5_NT_PRINCIPAL\n    components:\n    - HTTP\n    - application.example.com\n    realm: EXAMPLE.COM\n  kvno: 42\n  date: '2020-04-28T14:04:12+0000'\n  enctype: AES256_CTS_HMAC_SHA1_96\n  key: 0123456789abcdeffedcba9876543210abcdeffedcba9876543210abcdef1234\n```\n\nJSON output is also supported:\n```console\n$ yamltab -f json example.keytab | jq '.entries[0].principal.realm'\n\"EXAMPLE.COM\"\n```\n\n## Data layouts\nyamltab offers several \"data layouts\" for its YAML/JSON output:\n\n - **raw** simply reflects the raw, complete binary structure: it reflects records and holes, tails (i.e. data in a record beyond its entry length) and exposes raw values (name types, timestamps, encryption types, etc.), without any kind of interpretation.\n - **full** is the same structure as *raw* with additional properties for the sake of readability.\n - **simple**, shown above, is the default format; it aims at exposing everything that matters in the keytab  in a user-friendly way.\n\n```console\n$ yamltab -l raw -f json example.keytab | jq '.records[0].entry.timestamp'\n1588082652\n$ yamltab -l full -f json example.keytab | jq '.records[0].entry.date'\n\"2020-04-28T14:04:12+0000\"\n$ yamltab -l simple -f json example.keytab | jq '.entries[0].date'\n\"2020-04-28T14:04:12+0000\"\n```\n\n## YAML/JSON input, keytab output\nyamltab also offers the ability to convert YAML/JSON input into a binary keytab:\n```console\n$ yamltab example.keytab.yaml | file -\n/dev/stdin: Kerberos Keytab file, realm=EXAMPLE.COM, principal=HTTP/application.example.com, type=1, date=Tue Apr 28 14:04:12 2020, kvno=42\n```\nIt supports all three data layouts: *raw* is useful to control every detail of the keytab; *full* is processed the same way. Internally, *simple* input is converted to the *full* data layout; the resulting structure can be inspected using `--simple-to-full`.\n\n## Other options\n`--names-types` and `--enc-types` list known name and encryption types, respectively. They can be combined with `--format`:\n```console\n$ ./yamltab -f json --enc-types | jq '.AES256_CTS_HMAC_SHA1_96'\n18\n```\n`--v1-endianness` exists as a vague attempt to support keytab v1 format. However, keytab v2 has been around since 1992 and real-life keytab v1 files are nowhere to be found. Consequently, keytab v1 support is completely untested and very likely to result in a stacktrace or absurd output.\n\n## Keytab edition\nSince yamltab can convert a keytab to YAML and this YAML representation back into a keytab, then it should be easy to assemble a wrapper that allows interactive edition of a keytab file as YAML by invoking your favourite editor. This is what the `keytab-editor` script does.\n\n## Subtleties\nThe simple format is liable to expose two overlapping properties: `spn` and `principal`. (the former is convenient, the latter is comprehensive). When processing its YAML input, yamltab takes `principal` into account and ignores `spn`... unless `principal` happens to be missing, in which case yamltab attempts to convert `spn` into a KRB5_NT_PRINCIPAL principal.\n\n`name_type_raw`, `enc_type_raw` and `timestamp` override `name_type`, `enc_type` and `date` respectively.\n\nDate handling is NOT clever. Stick to the `YYYY-mm-DDTHHMMSS+ZZZZ` format. That said, it is possible to  write `date: now` in simple mode.\n\nIn *simple* mode,`kvno_in_tail: True` can be used to force storage of the key version number as a 32-bit unsigned integer in the tail (i.e. after the entry). `extra_tail` can be used to inject arbitrary data in the tail.\nIn *full* mode, the following keys strive to reflect kvno:\n\n - `kvno`: 8-bit key version number found in the entry, always present;\n - `tail_kvno`: 32-bit key version number found right after the entry, present only if actually found;\n - `actual_kvno`: kvno value that matters, always present.\n\nLimitations: yamltab spares you the pain of hex-editing keytab files; however, it offers no encryption-related features. Keys are always handled as hexadecimal blobs, and password hashing is simply not supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fyamltab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavierog%2Fyamltab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fyamltab/lists"}