Skip to content

Commit f65f143

Browse files
author
awstools
committed
feat(client-datasync): AWS DataSync now supports the Kerberos authentication protocol for SMB locations.
1 parent 0bf68ed commit f65f143

File tree

6 files changed

+394
-64
lines changed

6 files changed

+394
-64
lines changed

Diff for: clients/client-datasync/src/commands/CreateLocationSmbCommand.ts

+11-5
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export interface CreateLocationSmbCommandOutput extends CreateLocationSmbRespons
3535
* <p>Creates a transfer <i>location</i> for a Server Message Block (SMB) file
3636
* server. DataSync can use this location as a source or destination for
3737
* transferring data.</p>
38-
* <p>Before you begin, make sure that you understand how DataSync
39-
* <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb">accesses
40-
* SMB file servers</a>.</p>
38+
* <p>Before you begin, make sure that you understand how DataSync accesses SMB
39+
* file servers. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
4140
* @example
4241
* Use a bare-bones client and the command you need to make an API call.
4342
* ```javascript
@@ -47,9 +46,9 @@ export interface CreateLocationSmbCommandOutput extends CreateLocationSmbRespons
4746
* const input = { // CreateLocationSmbRequest
4847
* Subdirectory: "STRING_VALUE", // required
4948
* ServerHostname: "STRING_VALUE", // required
50-
* User: "STRING_VALUE", // required
49+
* User: "STRING_VALUE",
5150
* Domain: "STRING_VALUE",
52-
* Password: "STRING_VALUE", // required
51+
* Password: "STRING_VALUE",
5352
* AgentArns: [ // AgentArnList // required
5453
* "STRING_VALUE",
5554
* ],
@@ -62,6 +61,13 @@ export interface CreateLocationSmbCommandOutput extends CreateLocationSmbRespons
6261
* Value: "STRING_VALUE",
6362
* },
6463
* ],
64+
* AuthenticationType: "NTLM" || "KERBEROS",
65+
* DnsIpAddresses: [ // DnsIpList
66+
* "STRING_VALUE",
67+
* ],
68+
* KerberosPrincipal: "STRING_VALUE",
69+
* KerberosKeytab: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
70+
* KerberosKrb5Conf: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
6571
* };
6672
* const command = new CreateLocationSmbCommand(input);
6773
* const response = await client.send(command);

Diff for: clients/client-datasync/src/commands/DescribeLocationSmbCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export interface DescribeLocationSmbCommandOutput extends DescribeLocationSmbRes
5353
* // Version: "AUTOMATIC" || "SMB2" || "SMB3" || "SMB1" || "SMB2_0",
5454
* // },
5555
* // CreationTime: new Date("TIMESTAMP"),
56+
* // DnsIpAddresses: [ // DnsIpList
57+
* // "STRING_VALUE",
58+
* // ],
59+
* // KerberosPrincipal: "STRING_VALUE",
60+
* // AuthenticationType: "NTLM" || "KERBEROS",
5661
* // };
5762
*
5863
* ```

Diff for: clients/client-datasync/src/commands/UpdateLocationSmbCommand.ts

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ export interface UpdateLocationSmbCommandOutput extends UpdateLocationSmbRespons
5353
* MountOptions: { // SmbMountOptions
5454
* Version: "AUTOMATIC" || "SMB2" || "SMB3" || "SMB1" || "SMB2_0",
5555
* },
56+
* AuthenticationType: "NTLM" || "KERBEROS",
57+
* DnsIpAddresses: [ // DnsIpList
58+
* "STRING_VALUE",
59+
* ],
60+
* KerberosPrincipal: "STRING_VALUE",
61+
* KerberosKeytab: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
62+
* KerberosKrb5Conf: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
5663
* };
5764
* const command = new UpdateLocationSmbCommand(input);
5865
* const response = await client.send(command);

Diff for: clients/client-datasync/src/models/models_0.ts

+179-26
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,20 @@ export interface CreateLocationS3Response {
16451645
LocationArn?: string | undefined;
16461646
}
16471647

1648+
/**
1649+
* @public
1650+
* @enum
1651+
*/
1652+
export const SmbAuthenticationType = {
1653+
KERBEROS: "KERBEROS",
1654+
NTLM: "NTLM",
1655+
} as const;
1656+
1657+
/**
1658+
* @public
1659+
*/
1660+
export type SmbAuthenticationType = (typeof SmbAuthenticationType)[keyof typeof SmbAuthenticationType];
1661+
16481662
/**
16491663
* <p>CreateLocationSmbRequest</p>
16501664
* @public
@@ -1656,45 +1670,52 @@ export interface CreateLocationSmbRequest {
16561670
* <code>/path/to/subdirectory</code>). Make sure that other SMB clients in your network can
16571671
* also mount this path.</p>
16581672
* <p>To copy all data in the subdirectory, DataSync must be able to mount the SMB
1659-
* share and access all of its data. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
1673+
* share and access all of its data. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
16601674
* @public
16611675
*/
16621676
Subdirectory: string | undefined;
16631677

16641678
/**
1665-
* <p>Specifies the Domain Name Service (DNS) name or IP address of the SMB file server that
1666-
* your DataSync agent will mount.</p>
1667-
* <note>
1668-
* <p>You can't specify an IP version 6 (IPv6) address.</p>
1669-
* </note>
1679+
* <p>Specifies the domain name or IP address of the SMB file server that your DataSync agent will mount.</p>
1680+
* <p>Remember the following when configuring this parameter:</p>
1681+
* <ul>
1682+
* <li>
1683+
* <p>You can't specify an IP version 6 (IPv6) address.</p>
1684+
* </li>
1685+
* <li>
1686+
* <p>If you're using Kerberos authentication, you must specify a domain name.</p>
1687+
* </li>
1688+
* </ul>
16701689
* @public
16711690
*/
16721691
ServerHostname: string | undefined;
16731692

16741693
/**
16751694
* <p>Specifies the user that can mount and access the files, folders, and file metadata in your
1676-
* SMB file server.</p>
1695+
* SMB file server. This parameter applies only if <code>AuthenticationType</code> is set to
1696+
* <code>NTLM</code>.</p>
16771697
* <p>For information about choosing a user with the right level of access for your transfer,
1678-
* see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
1698+
* see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
16791699
* @public
16801700
*/
1681-
User: string | undefined;
1701+
User?: string | undefined;
16821702

16831703
/**
1684-
* <p>Specifies the name of the Active Directory domain that your SMB file server belongs to. </p>
1685-
* <p>If you have multiple Active Directory domains in your environment, configuring this
1686-
* parameter makes sure that DataSync connects to the right file server.</p>
1704+
* <p>Specifies the Windows domain name that your SMB file server belongs to. This parameter
1705+
* applies only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
1706+
* <p>If you have multiple domains in your environment, configuring this parameter makes sure
1707+
* that DataSync connects to the right file server.</p>
16871708
* @public
16881709
*/
16891710
Domain?: string | undefined;
16901711

16911712
/**
16921713
* <p>Specifies the password of the user who can mount your SMB file server and has permission
1693-
* to access the files and folders involved in your transfer.</p>
1694-
* <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
1714+
* to access the files and folders involved in your transfer. This parameter applies only if
1715+
* <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
16951716
* @public
16961717
*/
1697-
Password: string | undefined;
1718+
Password?: string | undefined;
16981719

16991720
/**
17001721
* <p>Specifies the DataSync agent (or agents) that can connect to your SMB file
@@ -1716,6 +1737,60 @@ export interface CreateLocationSmbRequest {
17161737
* @public
17171738
*/
17181739
Tags?: TagListEntry[] | undefined;
1740+
1741+
/**
1742+
* <p>Specifies the authentication protocol that DataSync uses to connect to your SMB
1743+
* file server. DataSync supports <code>NTLM</code> (default) and <code>KERBEROS</code>
1744+
* authentication.</p>
1745+
* @public
1746+
*/
1747+
AuthenticationType?: SmbAuthenticationType | undefined;
1748+
1749+
/**
1750+
* <p>Specifies the IPv4 addresses for the DNS servers that your SMB file server belongs to.
1751+
* This parameter applies only if <code>AuthenticationType</code> is set to
1752+
* <code>KERBEROS</code>.</p>
1753+
* <p>If you have multiple domains in your environment, configuring this parameter makes sure
1754+
* that DataSync connects to the right SMB file server.</p>
1755+
* @public
1756+
*/
1757+
DnsIpAddresses?: string[] | undefined;
1758+
1759+
/**
1760+
* <p>Specifies a service principal name (SPN), which is an identity in your Kerberos realm that
1761+
* has permission to access the files, folders, and file metadata in your SMB file server.</p>
1762+
* <p>SPNs are case sensitive and must include a prepended <code>cifs/</code>. For example, an
1763+
* SPN might look like <code>cifs/[email protected]</code>.</p>
1764+
* <p>Your task execution will fail if the SPN that you provide for this parameter doesn’t match
1765+
* what’s exactly in your keytab or <code>krb5.conf</code> files. </p>
1766+
* @public
1767+
*/
1768+
KerberosPrincipal?: string | undefined;
1769+
1770+
/**
1771+
* <p>Specifies your Kerberos key table (keytab) file, which includes mappings between your
1772+
* service principal name (SPN) and encryption keys.</p>
1773+
* <p>You can specify the keytab using a file path (for example,
1774+
* <code>file://path/to/file.keytab</code>). The file must be base64 encoded. If you're using
1775+
* the CLI, the encoding is done for you.</p>
1776+
* <p>To avoid task execution errors, make sure that the SPN in the keytab file matches exactly
1777+
* what you specify for <code>KerberosPrincipal</code> and in your <code>krb5.conf</code> file. </p>
1778+
* @public
1779+
*/
1780+
KerberosKeytab?: Uint8Array | undefined;
1781+
1782+
/**
1783+
* <p>Specifies a Kerberos configuration file (<code>krb5.conf</code>) that defines your
1784+
* Kerberos realm configuration.</p>
1785+
* <p>You can specify the <code>krb5.conf</code> using a file path (for example,
1786+
* <code>file://path/to/krb5.conf</code>). The file must be base64 encoded. If you're using the
1787+
* CLI, the encoding is done for you.</p>
1788+
* <p>To avoid task execution errors, make sure that the service principal name (SPN) in the
1789+
* <code>krb5.conf</code> file matches exactly what you specify for
1790+
* <code>KerberosPrincipal</code> and in your keytab file.</p>
1791+
* @public
1792+
*/
1793+
KerberosKrb5Conf?: Uint8Array | undefined;
17191794
}
17201795

17211796
/**
@@ -3720,20 +3795,22 @@ export interface DescribeLocationSmbResponse {
37203795

37213796
/**
37223797
* <p>The user that can mount and access the files, folders, and file metadata in your SMB file
3723-
* server.</p>
3798+
* server. This element applies only if <code>AuthenticationType</code> is set to
3799+
* <code>NTLM</code>.</p>
37243800
* @public
37253801
*/
37263802
User?: string | undefined;
37273803

37283804
/**
3729-
* <p>The name of the Microsoft Active Directory domain that the SMB file server belongs
3730-
* to.</p>
3805+
* <p>The name of the Windows domain that the SMB file server belongs to. This element applies
3806+
* only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
37313807
* @public
37323808
*/
37333809
Domain?: string | undefined;
37343810

37353811
/**
3736-
* <p>The protocol that DataSync use to access your SMB file.</p>
3812+
* <p>The SMB protocol version that DataSync uses to access your SMB file
3813+
* server.</p>
37373814
* @public
37383815
*/
37393816
MountOptions?: SmbMountOptions | undefined;
@@ -3743,6 +3820,27 @@ export interface DescribeLocationSmbResponse {
37433820
* @public
37443821
*/
37453822
CreationTime?: Date | undefined;
3823+
3824+
/**
3825+
* <p>The IPv4 addresses for the DNS servers that your SMB file server belongs to. This element
3826+
* applies only if <code>AuthenticationType</code> is set to <code>KERBEROS</code>.</p>
3827+
* @public
3828+
*/
3829+
DnsIpAddresses?: string[] | undefined;
3830+
3831+
/**
3832+
* <p>The Kerberos service principal name (SPN) that has permission to access the files,
3833+
* folders, and file metadata in your SMB file server.</p>
3834+
* @public
3835+
*/
3836+
KerberosPrincipal?: string | undefined;
3837+
3838+
/**
3839+
* <p>The authentication protocol that DataSync uses to connect to your SMB file
3840+
* server.</p>
3841+
* @public
3842+
*/
3843+
AuthenticationType?: SmbAuthenticationType | undefined;
37463844
}
37473845

37483846
/**
@@ -6743,32 +6841,33 @@ export interface UpdateLocationSmbRequest {
67436841
* <code>/path/to/subdirectory</code>). Make sure that other SMB clients in your network can
67446842
* also mount this path.</p>
67456843
* <p>To copy all data in the specified subdirectory, DataSync must be able to mount
6746-
* the SMB share and access all of its data. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
6844+
* the SMB share and access all of its data. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
67476845
* @public
67486846
*/
67496847
Subdirectory?: string | undefined;
67506848

67516849
/**
67526850
* <p>Specifies the user name that can mount your SMB file server and has permission to access
6753-
* the files and folders involved in your transfer.</p>
6851+
* the files and folders involved in your transfer. This parameter applies only if
6852+
* <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
67546853
* <p>For information about choosing a user with the right level of access for your transfer,
6755-
* see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
6854+
* see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">Providing DataSync access to SMB file servers</a>.</p>
67566855
* @public
67576856
*/
67586857
User?: string | undefined;
67596858

67606859
/**
6761-
* <p>Specifies the Windows domain name that your SMB file server belongs to. </p>
6860+
* <p>Specifies the Windows domain name that your SMB file server belongs to. This parameter
6861+
* applies only if <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
67626862
* <p>If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.</p>
6763-
* <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
67646863
* @public
67656864
*/
67666865
Domain?: string | undefined;
67676866

67686867
/**
67696868
* <p>Specifies the password of the user who can mount your SMB file server and has permission
6770-
* to access the files and folders involved in your transfer.</p>
6771-
* <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html#configuring-smb-permissions">required permissions</a> for SMB locations.</p>
6869+
* to access the files and folders involved in your transfer. This parameter applies only if
6870+
* <code>AuthenticationType</code> is set to <code>NTLM</code>.</p>
67726871
* @public
67736872
*/
67746873
Password?: string | undefined;
@@ -6785,6 +6884,60 @@ export interface UpdateLocationSmbRequest {
67856884
* @public
67866885
*/
67876886
MountOptions?: SmbMountOptions | undefined;
6887+
6888+
/**
6889+
* <p>Specifies the authentication protocol that DataSync uses to connect to your SMB
6890+
* file server. DataSync supports <code>NTLM</code> (default) and <code>KERBEROS</code>
6891+
* authentication.</p>
6892+
* @public
6893+
*/
6894+
AuthenticationType?: SmbAuthenticationType | undefined;
6895+
6896+
/**
6897+
* <p>Specifies the IPv4 addresses for the DNS servers that your SMB file server belongs to.
6898+
* This parameter applies only if <code>AuthenticationType</code> is set to
6899+
* <code>KERBEROS</code>.</p>
6900+
* <p>If you have multiple domains in your environment, configuring this parameter makes sure
6901+
* that DataSync connects to the right SMB file server. </p>
6902+
* @public
6903+
*/
6904+
DnsIpAddresses?: string[] | undefined;
6905+
6906+
/**
6907+
* <p>Specifies a service principal name (SPN), which is an identity in your Kerberos realm that
6908+
* has permission to access the files, folders, and file metadata in your SMB file server.</p>
6909+
* <p>SPNs are case sensitive and must include a prepended <code>cifs/</code>. For example, an
6910+
* SPN might look like <code>cifs/[email protected]</code>.</p>
6911+
* <p>Your task execution will fail if the SPN that you provide for this parameter doesn’t match
6912+
* what’s exactly in your keytab or <code>krb5.conf</code> files.</p>
6913+
* @public
6914+
*/
6915+
KerberosPrincipal?: string | undefined;
6916+
6917+
/**
6918+
* <p>Specifies your Kerberos key table (keytab) file, which includes mappings between your
6919+
* service principal name (SPN) and encryption keys.</p>
6920+
* <p>You can specify the keytab using a file path (for example,
6921+
* <code>file://path/to/file.keytab</code>). The file must be base64 encoded. If you're using
6922+
* the CLI, the encoding is done for you.</p>
6923+
* <p>To avoid task execution errors, make sure that the SPN in the keytab file matches exactly
6924+
* what you specify for <code>KerberosPrincipal</code> and in your <code>krb5.conf</code> file.</p>
6925+
* @public
6926+
*/
6927+
KerberosKeytab?: Uint8Array | undefined;
6928+
6929+
/**
6930+
* <p>Specifies a Kerberos configuration file (<code>krb5.conf</code>) that defines your
6931+
* Kerberos realm configuration.</p>
6932+
* <p>You can specify the <code>krb5.conf</code> using a file path (for example,
6933+
* <code>file://path/to/krb5.conf</code>). The file must be base64 encoded. If you're using the
6934+
* CLI, the encoding is done for you.</p>
6935+
* <p>To avoid task execution errors, make sure that the service principal name (SPN) in the
6936+
* <code>krb5.conf</code> file matches exactly what you specify for
6937+
* <code>KerberosPrincipal</code> and in your keytab file.</p>
6938+
* @public
6939+
*/
6940+
KerberosKrb5Conf?: Uint8Array | undefined;
67886941
}
67896942

67906943
/**

0 commit comments

Comments
 (0)