Enhancement #79375
closedclient: allow user to view and set alternate_name
0%
Description
Background¶
The alternate_name is used for case insensitivity and fscrypt to store original input of an dirent name (dname). For case insensitivity, it will be the original case sensitive value and for fscrypt it will be the raw ciphertext. As the client currently stands, this field is not to be visible to the end user. This adds guardrails to prevent breakage through unintended values, being overwritten or deleted. If this value is set improperly, it can break the internal client mechanisms.
This will enable the capability of administrators being able to backup fscrypt enabled dir trees without needing the key. The main drive of this will be fscrypt backup, future work done will validate case sensitivity.
Proposal¶
Introduce a new xattr "ceph.alternate_name" to access this field. This xattr will only be visible based on an advanced bool config option called client_alternate_name_visible. Enabling this option will explicitly put the responsibility of setting alternate_name on the end user. This means mechanisms that normally exist within fscrypt to generate per-file keys will be disabled.
Key behavior and properties¶
- The value is immutable, cannot be overwritten or deleted.
- The exception is if the same alternate_name is provided, it will perform no-op. No error will be returned. This will help with backup restarts.
parent dir must contain proper fscrypt information (fscrypt_auth field)This is removed as we cannot determine top level dir, the system administrator MUST know what they are doing when using this feature.- when inode is created, fscrypt_auth, fscrypt_file and alternate_name will not be populated
Scenario¶
Set config options for fscrypt case
client_fscrypt_as set to false
client_alternate_name_visible set to true
Steps a backup utility may take
create top level dir with provided dname (b64 encoded)
copy fscrypt.auth, fscrypt.file, alternate_name
create inodde with provided dname (b64 encoded)
copy data contents (could be actual data or symlink target)
copy fscrypt.auth, fscrypt.file, alternate_name
CH Updated by Christopher Hoffman 4 months ago
- Status changed from New to In Progress
CH Updated by Christopher Hoffman 3 months ago
- Description updated (diff)
CH Updated by Christopher Hoffman 3 months ago
- Description updated (diff)
VS Updated by Venky Shankar 3 months ago
- Category set to Administration/Usability
- Target version set to v22.0.0
- Source set to Development
- Backport set to umbrella
- Component(FS) Client added
- Labels (FS) fscrypt added
CH Updated by Christopher Hoffman 3 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 71881
UB Updated by Upkeep Bot 27 days ago
- Copied to Backport #82846: umbrella: client: allow user to view and set alternate_name added
UB Updated by Upkeep Bot 27 days ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to bfdca235443e37988d65d27618c170b408cd4966
- Fixed In set to v22.0.0-539-gbfdca23544
- Upkeep Timestamp set to 2026-11-06T05:08:40+00:00
VS Updated by Venky Shankar 3 days ago
- Related to Bug #83688: mds: "bad backtrace on directory inode" after failover due to an inode update dropping a pending backtrace added