Files
systemd/test/fuzz/fuzz-user-record/auth-pkcs11.json
Frantisek Sumsal be0db50cad fuzz: add a fuzzer for user records
Add a simple fuzzer that verifies our machinery for parsing user records
from JSON works as intended.

The initial corpus was created with the help of Claude, so we have a
bunch of valid user records with as much fields as possible for the
initial corpus.
2026-03-06 19:03:14 +01:00

34 lines
1.2 KiB
JSON

{
"userName": "pkcs11user",
"realName": "PKCS#11 Token User",
"uid": 2001,
"gid": 2001,
"homeDirectory": "/home/pkcs11user",
"shell": "/bin/bash",
"disposition": "regular",
"storage": "luks",
"imagePath": "/home/pkcs11user.home",
"pkcs11TokenUri": [
"pkcs11:model=PKCS%2315%20emulated;manufacturer=piv_II;serial=00000000;token=pkcs11user",
"pkcs11:model=YubiKey;manufacturer=Yubico;serial=12345678;token=PIV"
],
"privileged": {
"pkcs11EncryptedKey": [
{
"uri": "pkcs11:model=PKCS%2315%20emulated;manufacturer=piv_II;serial=00000000;token=pkcs11user",
"data": "SGVsbG8gV29ybGQhIFRoaXMgaXMgYSB0ZXN0IGVuY3J5cHRlZCBrZXkgZm9yIFBLQ1MjMTEu",
"hashedPassword": "$6$pkcs11salt$encryptedkeyhashforpkcs11authentication"
},
{
"uri": "pkcs11:model=YubiKey;manufacturer=Yubico;serial=12345678;token=PIV",
"data": "QW5vdGhlciBlbmNyeXB0ZWQga2V5IGZvciBhIGRpZmZlcmVudCB0b2tlbi4=",
"hashedPassword": "$6$yubisalt$encryptedkeyhashforyubikey"
}
]
},
"secret": {
"tokenPin": ["123456"],
"pkcs11ProtectedAuthenticationPathPermitted": true
}
}