Setting up Lustre Security: Difference between revisions
KenRawlings (talk | contribs) (adding needs-review category) |
Elliswilson (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
{| class= | This page summarizes Lustre's security features and points to a detailed guide for each. The authoritative references are the ''Managing Security'', ''Mapping UIDs and GIDs with Nodemap'', and ''Configuring Shared-Secret Key (SSK) Security'' chapters of the [https://doc.lustre.org/lustre_manual.xhtml Lustre Operations Manual]. | ||
|- | |||
== Feature Summary == | |||
{| class="wikitable" | |||
! Feature !! Protects against !! Configured on !! Details | |||
|- | |||
| POSIX ACLs || Permissions that are too coarse || MDS (applies filesystem-wide) || [[#Access Control Lists|Below]] | |||
|- | |||
| Root squash and nodemaps || Client root acting as filesystem root; ID collisions between sites || MGS || [[UID/GID_Mapping|UID/GID Mapping]], [[Lustre Multi Tenancy]] | |||
|- | |||
| Namespace isolation (filesets) || Tenants seeing each other's files || MGS || [[Lustre Multi Tenancy]] | |||
|- | |||
| Kerberos and Shared-Secret Key || Unauthorized or spoofed nodes; tampering with or eavesdropping on RPCs || All nodes || [[Lustre Kerberos SSK Authentication]] | |||
|- | |||
| Client-side encryption || Disclosure of file contents on the wire or from server storage || Clients || [[Lustre Client Encryption]] | |||
|- | |||
| SELinux || Clients not enforcing the expected MAC policy || Clients; policy check enforced through nodemaps || [[#SELinux|Below]] | |||
|- | |||
| Role-based admin control || Tenants running privileged operations (quota, changelogs, HSM, DNE, and more) || Nodemap <code>rbac</code> property || [[Lustre Multi Tenancy]] | |||
|- | |||
| Auditing || Unrecorded file access || Changelogs, plus the per-nodemap <code>audit_mode</code> property || ''Monitoring a Lustre File System'' chapter of the manual | |||
|} | |} | ||
These features complement each other. A typical multi-tenant site uses nodemaps and filesets for isolation, SSK or Kerberos so that tenants cannot impersonate each other's NIDs, and client-side encryption where data must stay confidential even from storage administrators. | |||
== Access Control Lists == | |||
Lustre supports POSIX ACLs through the standard <code>getfacl</code> and <code>setfacl</code> tools. ACLs are '''enabled by default''' and are controlled filesystem-wide by the MDS mount options <code>acl</code> and <code>noacl</code>: either every client has ACLs or none does. No client-side configuration is needed. | |||
== Root Squash == | |||
Without root squash, root on any client can read, modify, or delete any file. The preferred way to set up root squash is through nodemaps. With the <code>admin</code> property at its default of 0, root on that nodemap's clients is mapped to <code>squash_uid</code>/<code>squash_gid</code> (default 65534). Combined with ID mapping, this lets clients keep a local root without having root on the filesystem. See [[Lustre Multi Tenancy]]. | |||
== SELinux == | |||
Lustre supports SELinux on the '''client''' side, storing labels in the <code>security.selinux</code> extended attribute. Every client must run the SELinux policy provided by its Linux distribution. Servers do not need SELinux. | |||
MLS protection only works if every client actually enforces the right policy, so servers can require it per nodemap: | |||
# On a client known to enforce the correct policy, get its status string. The format is <code>mode:name:version:hash</code>, where mode 1 means enforcing: | |||
#: <code>client# l_getsepol</code> | |||
#: <code>SELinux status info: 1:mls:31:40afb76d...</code> | |||
# Require that string for a nodemap: | |||
#: <code>mgs# lctl nodemap_set_sepol --name restricted --sepol '1:mls:31:40afb76d...'</code> | |||
# Make the requirement persistent: | |||
#: <code>mgs# lctl set_param -P nodemap.restricted.sepol=1:mls:31:40afb76d...</code> | |||
# On the clients, set the <code>ptlrpc</code> module parameter <code>send_sepol</code> to a non-zero value so they report their status: <code>-1</code> to report on every request, or <code>N</code> to refresh every N seconds. | |||
Clients in that nodemap that do not report a matching policy get "Permission denied" when they mount or access files. To remove the requirement, set <code>--sepol ""</code>. | |||
== See Also == | |||
* [[Lustre Multi Tenancy]] | |||
* [[UID/GID_Mapping|UID/GID Mapping]] | |||
* [[Lustre Kerberos SSK Authentication]] | |||
* [[Lustre Client Encryption]] | |||
* [[Shared Secret Key Authentication And Encryption]] — SSK background and design references | |||
* [[Security]] | |||
[[Category: | [[Category:Security]] | ||
Latest revision as of 08:12, 12 October 2026
This page summarizes Lustre's security features and points to a detailed guide for each. The authoritative references are the Managing Security, Mapping UIDs and GIDs with Nodemap, and Configuring Shared-Secret Key (SSK) Security chapters of the Lustre Operations Manual.
Feature Summary
| Feature | Protects against | Configured on | Details |
|---|---|---|---|
| POSIX ACLs | Permissions that are too coarse | MDS (applies filesystem-wide) | Below |
| Root squash and nodemaps | Client root acting as filesystem root; ID collisions between sites | MGS | UID/GID Mapping, Lustre Multi Tenancy |
| Namespace isolation (filesets) | Tenants seeing each other's files | MGS | Lustre Multi Tenancy |
| Kerberos and Shared-Secret Key | Unauthorized or spoofed nodes; tampering with or eavesdropping on RPCs | All nodes | Lustre Kerberos SSK Authentication |
| Client-side encryption | Disclosure of file contents on the wire or from server storage | Clients | Lustre Client Encryption |
| SELinux | Clients not enforcing the expected MAC policy | Clients; policy check enforced through nodemaps | Below |
| Role-based admin control | Tenants running privileged operations (quota, changelogs, HSM, DNE, and more) | Nodemap rbac property |
Lustre Multi Tenancy |
| Auditing | Unrecorded file access | Changelogs, plus the per-nodemap audit_mode property |
Monitoring a Lustre File System chapter of the manual |
These features complement each other. A typical multi-tenant site uses nodemaps and filesets for isolation, SSK or Kerberos so that tenants cannot impersonate each other's NIDs, and client-side encryption where data must stay confidential even from storage administrators.
Access Control Lists
Lustre supports POSIX ACLs through the standard getfacl and setfacl tools. ACLs are enabled by default and are controlled filesystem-wide by the MDS mount options acl and noacl: either every client has ACLs or none does. No client-side configuration is needed.
Root Squash
Without root squash, root on any client can read, modify, or delete any file. The preferred way to set up root squash is through nodemaps. With the admin property at its default of 0, root on that nodemap's clients is mapped to squash_uid/squash_gid (default 65534). Combined with ID mapping, this lets clients keep a local root without having root on the filesystem. See Lustre Multi Tenancy.
SELinux
Lustre supports SELinux on the client side, storing labels in the security.selinux extended attribute. Every client must run the SELinux policy provided by its Linux distribution. Servers do not need SELinux.
MLS protection only works if every client actually enforces the right policy, so servers can require it per nodemap:
- On a client known to enforce the correct policy, get its status string. The format is
mode:name:version:hash, where mode 1 means enforcing:client# l_getsepolSELinux status info: 1:mls:31:40afb76d...
- Require that string for a nodemap:
mgs# lctl nodemap_set_sepol --name restricted --sepol '1:mls:31:40afb76d...'
- Make the requirement persistent:
mgs# lctl set_param -P nodemap.restricted.sepol=1:mls:31:40afb76d...
- On the clients, set the
ptlrpcmodule parametersend_sepolto a non-zero value so they report their status:-1to report on every request, orNto refresh every N seconds.
Clients in that nodemap that do not report a matching policy get "Permission denied" when they mount or access files. To remove the requirement, set --sepol "".
See Also
- Lustre Multi Tenancy
- UID/GID Mapping
- Lustre Kerberos SSK Authentication
- Lustre Client Encryption
- Shared Secret Key Authentication And Encryption — SSK background and design references
- Security