summaryrefslogtreecommitdiffstats
path: root/mime (follow)
Commit message (Collapse)AuthorAgeFilesLines
* creds-util: add a concept of "user-scoped" credentialsLennart Poettering2024-01-301-0/+3
| | | | | | | | | | | | | | | | | | | So far credentials are a concept for system services only: to encrypt or decrypt credential you must be privileged, as only then you can access the TPM and the host key. Let's break this up a bit: let's add a "user-scoped" credential, that are specific to users. Internally this works by adding another step to the acquisition of the symmetric encryption key for the credential: if a "user-scoped" credential is used we'll generate an symmetric encryption key K as usual, but then we'll use it to calculate K' = HMAC(K, flags || uid || machine-id || username) and then use the resulting K' as encryption key instead. This basically includes the (public) user's identity in the encryption key, ensuring that only if the right user credentials are specified the correct key can be acquired.
* mime: also add magic-based mime type rules for our other binary filesLennart Poettering2024-01-171-0/+18
| | | | | No immediate usecase, it's just nice that if you browser these files with a graphical file manager you see them recognized as what they are.
* mime: expose a mime type for encrypted credentialsLennart Poettering2024-01-171-0/+12
| | | | | | | | | | | Let's make things nice for desktops, and provide a mime type for credential files. This uses the 128bit header identifier that our credential files start with. However, the files are always base64 encoded, hence we have to match the base64 string, hence add a small test case that generates them properly for us, and truncates them at the right place (since 128 is not evently divisable by 6).
* mime: register confext/sysext images in shared-mime-infoLennart Poettering2023-12-062-0/+16
This make them recognized by file managers and stuff. Maybe one day we should properly register mime types in the "vnd." namespace with IANA, but I am too lazy to deal with the bureaucracy for that, hence let's stick with the x. namespace for now. This defines confext/sysext DDIs as subtype of: https://www.iana.org/assignments/media-types/application/vnd.efi.img Which is what everyone appears to use for raw disk images, in particular if they contain a GPT partition table.