You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-netapp-files/kerberos.md
+168-2Lines changed: 168 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@ SMB services in Azure NetApp Files are initially configured by setting up an Act
160
160
<!-- AD IMAGE -->
161
161
162
162
>[!NOTE]
163
-
>Only one AD connection is allowed per account. Once the AD connection is created, any new Azure NetApp Files SMB volume uses the AD connection configuration.
163
+
>Only one Active Directory (AD) connection is allowed per account. Once the AD connection is created, any new Azure NetApp Files SMB volume uses the AD connection configuration.
164
164
165
165
### SMB Kerberos machine account
166
166
@@ -347,6 +347,172 @@ When an Azure NetApp Files volume is mounting using Kerberos, a Kerberos ticket
347
347
>Azure NetApp Files adds entries to the Kerberos context cache for the client. These entries reside in the cache for the duration of the life of the Kerberos ticket (set by the KDC and controlled by the [Kerberos policy](/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/kerberos-policy)).
348
348
</details>
349
349
350
+
## Creating SMB server aliases
350
351
352
+
When Azure NetApp Files creates an SMB server using a naming convention of [SMB Server prefix specified in AD connection configuration]-[unique numeric identifier]. (For details about the unique numeric identifier, see [SMB Kerberos machine account](#smb-kerberos-machine-account)).
353
+
This formatting means SMB server names aren't constructed in a user-friendly way. For instance, a name of "SMB-7806" is harder to remember than something similar to "AZURE-FILESHARE."
351
354
352
-
355
+
Because of this behavior, administrators may want to create user-friendly alias names for Azure NetApp Files volumes. Doing this requires pointing a [DNS canonical name (CNAME)](/microsoft-365/admin/dns/create-dns-records-using-windows-based-dns?view=o365-worldwide#add-cname-records) to the existing DNS A/AAAA record in the server.
356
+
357
+
When a CNAME is created and used in UNC path requests (for example, `\\AZURE-FILESHARE` instead of `\\SMB-7806`), DNS redirect the CNAME request (AZURE-FILESHARE.contoso.com) to the proper A/AAAA record (SMB-7806.contoso.com), which wis used in the Kerberos SPN retrieval (cifs/SMB-7806). This allows Kerberized access to the SMB share while using the aliased name.
358
+
359
+
If a DNS A/AAAA record is created (for instance, AZURE-FILESHARE.contoso.com) and attempted to be used as an alias, Kerberos requests fail. The failure is the result of the constructed SPN used to authenticate to the share (cifs/AZURE-FILESHARE) not matching what the Kerberos SPN is for the SMB server (cifs/SMB-7806). The failure can be mitigated if another [SPN is created](/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731241(v=ws.11)) and appended to the SMB server machine account (such as cifs/AZURE-FILESHARE).
360
+
361
+
### Supported SMB server capabilities in Azure NetApp Files
362
+
363
+
When the SMB "negotiate protocol" request is made, the Azure NetApp Files SMB server is queried for support of specific capabilities. The table below shows the capabilities queried and the response returned from an Azure NetApp Files SMB volume when a [Session Setup/Tree connect](#SMB-share-connection-workflow-(Kerberos)) is performed.
364
+
365
+
| SMB capability | Supported by Azure NetApp Files? |
366
+
| - | - |
367
+
| DFS target | Yes |
368
+
| Leasing | Yes |
369
+
| Large MTU | Yes |
370
+
| SMB multi-channel | Yes |
371
+
| SMB persistent handles | Yes |
372
+
| Directory leasing | No |
373
+
| SMB encryption | Yes (if enabled) |
374
+
375
+
### Supported SMB share capabilities and properties in Azure NetApp Files
376
+
377
+
During SMB share access, a “tree connect” request is performed and the supported SMB share capabilities and properties are queried by the client to the Azure NetApp Files server. The table below shows the share capabilities queried and the response returned from an Azure NetApp Files SMB volume as seen in a packet capture.
NFS Kerberos works separately from SMB services, as the machine accounts created for each protocol cannot share keytabs because of the potential for changes to the Key Version Number (kvno) in one keytab impacting the other service. As a result, the workflows for SMB services for Kerberos and NFS for Kerberos will differ in functionality in some areas.
410
+
411
+
### Initial configuration of Kerberos realm
412
+
413
+
The NFS Kerberos realm is configured when the Kerberos realm information is filled out in the Azure NetApp Files portal under the Active Directory connections page.
414
+
415
+
<!-- image -->
416
+
417
+
The AD Server Name and KDC IP are used to connect to the AD KDC services on the initial machine account creation. The Azure NetApp Files service leverages the existing domain information to fill out the rest of the realm configuration. For example:
418
+
419
+
```
420
+
Kerberos Realm: CONTOSO.COM
421
+
KDC Vendor: Microsoft
422
+
KDC IP Address: x.x.x.x
423
+
KDC Port: 88
424
+
Clock Skew: 5
425
+
Active Directory Server Name: dc1.contoso.com
426
+
Active Directory Server IP Address: x.x.x.x
427
+
Comment: -
428
+
Admin Server IP Address: x.x.x.x
429
+
Admin Server Port: 749
430
+
Password Server IP Address: x.x.x.x
431
+
Password Server Port: 464
432
+
Permitted Encryption Types: aes-256
433
+
- Configured by Azure NetApp Files administrator in the portal
434
+
- Automatically configured by the service using Active Directory connection information/system defaults
435
+
```
436
+
437
+
When the NFS Kerberos realm is configured, a local hosts entry is added in the service with the KDC specified in the configuration. When the realm is modified, the local hosts entry is also modified in the service.
438
+
439
+
<!-- image -->
440
+
441
+
This local host entry acts as a "last resort" in case of a KDC outage on the KDC specified in the realm configuration and failure to query redundant KDCs via DNS.
442
+
443
+
>[!NOTE]
444
+
>If the KDC in the Kerberos realm needs to be brought down for maintenance (such as for upgrades or decommissioning of a server), it is recommended to configure the realm to use a KDC that is not undergoing maintenance to avoid outages.
445
+
446
+
### Initial creation of machine account/SPN
447
+
448
+
When Kerberos is enabled on an Azure NetApp Files volume, a machine account/principal named NFS-{SMB-server-name} is created in the domain in the specified OU in Active Directory connections (Organizational Unit). Machine account names are truncated after 15 characters.
449
+
450
+
>[!NOTE]
451
+
>When adding Linux clients with hostnames greater than 15 characters to an Active Directory domain, their Kerberos machine account SPNs will be truncated. For instance, a Linux client with a name of MORE-THAN-FIFTEEN has a machine account name of MORE-THAN-FIFT$, which becomes an SPN of MORE-THAN-FIFT$@CONTOSO.COM. When DNS looks up a client hostname, it finds the longer name and attempt to use that name in an SPN request ( [email protected]). Since that SPN doesn't exist, the client attempt to use the next SPN in the keytab in the request (usually host/hostname). Only machine account name SPNs natively work with Azure NetApp Files NFS Kerberos. As a result, ensure the Linux client hostnames used for NFS Kerberos with Azure NetApp Files do not exceed 15 characters. Alternately, if you want to use the host/hostname SPN, configure a UNIX user in LDAP with the username "host." This configuration provides a krb-unix name mapping for the SPN.
452
+
453
+
In Azure NetApp Files, Kerberos keyblocks (or keytab entries) are added to the service with the NFS service SPN (nfs/nfs-[email protected]). Multiple entries are created: one for each supported encryption type. In Azure NetApp Files, only the AES-256 encryption type is supported for NFS Kerberos.
454
+
455
+
In most cases, knowing these steps in depth won’t be necessary for day-to-day administration tasks, but are useful in troubleshooting any failures when attempting to create an NFS Kerberos volume in Azure NetApp Files.
456
+
457
+
### NFS Kerberos SPN creation workflow
458
+
459
+
The following diagram shows how an NFS SPN is created when an Azure NetApp Files NFS or dual protocol volume is created with Kerberos enabled. In most cases, knowing detailed steps in depth won’t be necessary for day-to-day administration tasks, but are useful in troubleshooting any failures when attempting to create an SMB volume in Azure NetApp Files.
460
+
461
+
<!-- diagram -->
462
+
463
+
<details>
464
+
<summary>For detailed steps about how a NFS Kerberos SPN is created with Azure NetApp Files, expand the list below.</summary>
465
+
466
+
- Admin credentials passed to KDC specified in the realm configuration using the username provided for use in the Active Directory connection – user must have permission to view/create objects in the specified OU
467
+
- The DNS servers specified in the Azure NetApp Files Active Directory connection configuration are queried by Azure NetApp Files for the Kerberos service records (SRV) in the following formats:
468
+
- URI query for _kerberos.CONTOSO.COM
469
+
- SRV query for _kerberos-master._udp. CONTOSO.COM
470
+
- SRV query for _kerberos-master._tcp. CONTOSO.COM
471
+
>[!NOTE]
472
+
>These queries occur multiple times in the same call over different portions of the process. DNS issues can create slowness in these calls or complete failures. These records do not appear to exist by default in Active Directory deployments and must be created manually.
473
+
- If the queries fail to find an entry or if the entries found cannot be contacted or used as the master KDC, then an A record query using the realm name found in the NFS Kerberos realm configuration will be used as a last resort to connect to the KDC over port 88.
474
+
- During the configuration of NFS Kerberos, a static host entry for the specified KDC is added to the local hosts file as a backup in case DNS lookups fail.
475
+
- If there is a cached DNS entry for the realm, then it will be used. If not, then the local file entry will be used. Cached DNS entries live as long as the Time to Live (TTL) is configured for the DNS record. The local file entry is configured with an 86400 second TTL (24 hours). The ns-switch configuration for host lookups in Azure NetApp Files uses files first and then DNS. When the local entry is found, no more queries are performed.
476
+
- The SMB machine account created when the Active Directory connection is created is used as credentials for an Active Directory LDAP bind using SASL/GSS over port 389 to search for any existing entries of the desired SPN or machine account name. If the SPN or machine account name already exists, an error will be sent. If the SPN does not exist in the LDAP query, then the machine account creation is performed in the designated OU with entries for the following attributes set by Azure NetApp Files:
- The NFS kerberos machine account password is set for the NFS-MACHINE account over port 464
485
+
- Kerberos keyblocks (keytabs) for the NFS SPN are saved on the Azure NetApp Files service
486
+
- A static name mapping rule is created on the Azure NetApp Files service to ensure the root user for each NFS Kerberos client is mapped to root when Kerberos is used.
487
+
- A krb5.conf file is added to the service’s internal systems with the NFS realm information.
488
+
</dewtails>
489
+
490
+
### NFS Kerberos mounts
491
+
492
+
When an Azure NetApp Files volume is mounted using Kerberos security flavors over NFS, the following workflow is performed. For a more detailed account of Kerberos, see [Kerberos Network Authentication Service (V5) Synopsis](/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13).
493
+
494
+
<!-- image -->
495
+
496
+
<details>
497
+
<summary>
498
+
For detailed steps about how a NFS Kerberos volume is mounted with Azure NetApp Files, expand the list below.
499
+
• The client attempts a mount to an NFS export path in Azure NetApp Files and specifies the -o krb5 (or krb5i or krb5p) security flavor
500
+
• DNS is used to formulate a request for an NFS service principal to Azure NetApp Files via either A/AAAA record or PTR (depending on how the mount command was issued)
501
+
• The client retrieves a TGT from the KDC via an AS-REQ call using the CLIENT principal name found in the client’s keytab
502
+
• The export path is checked to ensure it exists in the file system
503
+
• The export policy rule is checked to ensure that Kerberos access is allowed to the export path
504
+
• The NFS service ticket is requested from the KDC by the client via an AP-REQ call and Azure NetApp Files checks the keytab for a valid entry with a valid encryption type using the TGT from the client acquired from the KDC
505
+
• If the TGT is valid, a service ticket is issued
506
+
• The client SPN (for instance, CLIENT$@CONTOSO.COM) is mapped to the root user via the name mapping rule in Azure NetApp Files
507
+
• The root user is queried in the name services databases (files and ldap) for existence/group memberships
508
+
• An LDAP bind using the SMB server machine account is performed to allow an LDAP search for the root user
509
+
• Since root always exists in Azure NetApp Files, this should not cause any issues, but LDAP queries for root may fail. These failures can be ignored.
510
+
• The NFS service ticket is returned to the client and the mount is successful. The root user has root access to the Kerberos mount by way of the client’s machine account principal (viewable with the klist -e command from the client)
511
+
• Azure NetApp Files adds entries to the Kerberos context cache for the client. These entries will reside in cache for the duration of the life of the Kerberos ticket (set by the KDC and controlled by the Kerberos Policy)
512
+
• NFSv4.1 will periodically (every 20s) send Kerberos ticket refresh updates as “keepalives”
513
+
</summary>
514
+
</details>
515
+
516
+
### NFS Kerberos mount access with user principals
517
+
518
+
When an Azure NetApp Files NFS Kerberos mount is accessed by a user (other than the root user, which uses the machine account SPN), the following workflow is performed.
0 commit comments