Connecting to Amazon S3
Before You Connect
Obtain AWS Keys
To obtain the credentials for an IAM user:- Sign into the IAM console.
- In the navigation pane, select Users.
- To create or manage the access keys for a user, select the user and then go to the Security Credentials tab.
- Sign into the AWS Management console with the credentials for your root account.
- Select your account name or number.
- In the menu that displays, select My Security Credentials.
- To manage or create root account access keys, click Continue to Security Credentials and expand the "Access Keys" section.
Connecting to Amazon S3
Specify the following to connect to data:
- AWSRegion: Set this to the region where your Microsoft Excel data is hosted.
- StorageBaseURL (optional): Specify the base S3 service URL only if it has a different URL from "amazonaws.com". Make sure to specify the full URL. For example: http://127.0.0.1:9000.
Authenticating to Amazon S3
There are several authentication methods available for connecting to Microsoft Excel including:
- Root Credentials
- AWS Role, as an AWS Role (from an EC2 Instance or by specifying the root credentials)
- SSO (ADFS, Okta, PingFederate)
- MFA
- Temporary Credentials
- Credentials File
Root Credentials
To authenticate using account root credentials, set these configuration parameters:
- AuthScheme: AwsRootKeys.
- AWSAccessKey: The access key associated with the AWS root account.
- AWSSecretKey: The secret key associated with the AWS root account.
Note: Use of this authentication scheme is discouraged by Amazon for anything but simple tests. The account root credentials have the full permissions of the user, making this the least secure authentication method.
EC2 Instances
Set AuthScheme to AwsEC2Roles.
If you are using the provider from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. Since the provider automatically obtains your IAM Role credentials and authenticates with them, it is not necessary to specify AWSAccessKey and AWSSecretKey.
If you are also using an IAM role to authenticate, you must additionally specify the following:
- AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the provider to attempt to retrieve credentials for the specified role.
- AWSExternalId (optional): Only required if you are assuming a role in another AWS account.
IMDSv2 Support
The Microsoft Excel provider now supports IMDSv2. Unlike IMDSv1, the new version requires an authentication token. Endpoints and response are the same in both versions.
In IMDSv2, the Microsoft Excel provider first attempts to retrieve the IMDSv2 metadata token and then uses it to call AWS metadata endpoints. If it is unable to retrieve the token, the provider reverts to IMDSv1.
AWS IAM Roles
Set AuthScheme to AwsIAMRoles.
In many situations, it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user. If you are specifying the AWSAccessKey and AWSSecretKey of an AWS root user, you may not use roles.
To authenticate as an AWS role, set these properties:
- AWSAccessKey: The access key of the IAM user to assume the role for.
- AWSSecretKey: The secret key of the IAM user to assume the role for.
- AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the provider to attempt to retrieve credentials for the specified role.
- AWSExternalId (optional): Only required if you are assuming a role in another AWS account.
ADFS
To connect to ADFS, set the AuthScheme to ADFS, and set these properties:
- User: The ADFS user.
- Password: The ADFS user's password.
- SSOLoginURL: The SSO provider's login url.
To authenticate to ADFS, set these SSOProperties:
- RelyingParty: The value of the ADFS server's Relying Party Identifier.
Example connection string:
AuthScheme=ADFS;User=username;Password=password;SSOLoginURL='https://sts.company.com';SSOProperties='RelyingParty=https://saml.salesforce.com';
ADFS Integrated
The ADFS Integrated flow indicates you are connecting with the currently logged in Windows user credentials. To use the ADFS Integrated flow, do not specify the User and Password, but otherwise follow the same steps in the ADFS guide above.
Okta
To connect to Okta, set the AuthScheme to Okta, and set these properties:
- User: The Okta user.
- Password: The Okta user's password.
- SSOLoginURL: The SSO provider's login URL.
If you are using a trusted application or proxy that overrides the Okta client request OR configuring MFA, you must use combinations of SSOProperties to authenticate using Okta. Set any of the following, as applicable:
- APIToken: When authenticating a user via a trusted application or proxy that overrides the Okta client request context, set this to the API Token the customer created from the Okta organization.
- MFAType: If you have configured the MFA flow, set this to one of the following supported types: OktaVerify, Email, or SMS.
- MFAPassCode: If you have configured the MFA flow, set this to a valid passcode.
If you set this to empty or an invalid value, the provider issues a one-time password challenge to your device or email. After the passcode is received, reopen the connection where the retrieved one-time password value is set to the MFAPassCode connection property. - MFARememberDevice: True by default. Okta supports remembering devices when MFA is required. If remembering devices is allowed according to the configured authentication policies, the provider sends a device token to extend MFA authentication lifetime. If you do not want MFA to be remembered, set this variable to False.
Example connection string:
AuthScheme=Okta;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;
To connect to PingFederate, set AuthScheme to PingFederate, and set these properties:
- User: The PingFederate user.
- Password: The PingFederate user's password.
- SSOLoginURL: The SSO provider's login url.
- AWSRoleARN (optional): If you have multiple role ARNs, specify the one you want to use for authorization.
- AWSPrincipalARN (optional): If you have multiple principal ARNs, specify the one you want to use for authorization.
- SSOExchangeUrl: The Partner Service Identifier URI configured in your PingFederate server instance under: SP Connections > SP Connection > WS-Trust > Protocol Settings. This should uniquely identify a PingFederate SP Connection, so it is a good idea to set it to your AWS SSO ACS URL. You can find it under AWS SSO > Settings > View Details next to the Authentication field.
- SSOProperties (optional): Authscheme=Basic if you want to include your username and password as an authorization header in requests to Amazon S3.
To enable mutual SSL authentication for SSOLoginURL, the WS-Trust STS endpoint, configure these SSOProperties:
- SSLClientCert
- SSLClientCertType
- SSLClientCertSubject
- SSLClientCertPassword
Example connection string:
authScheme=pingfederate;SSOLoginURL=https://mycustomserver.com:9033/idp/sts.wst;SSOExchangeUrl=https://us-east-1.signin.aws.amazon.com/platform/saml/acs/764ef411-xxxxxx;user=admin;password=PassValue;AWSPrincipalARN=arn:aws:iam::215338515180:saml-provider/pingFederate;AWSRoleArn=arn:aws:iam::215338515180:role/SSOTest2;
Multi-Factor Authentication (MFA)
For users and roles that require multi-factor authentication, specify the following:
- AuthScheme: AwsMFA.
- CredentialsLocation: The location of the settings file where MFA credentials are saved. See the Credentials File Location page under Connection String Options for more information.
- MFASerialNumber: The serial number of the MFA device if one is being used.
- MFAToken: The temporary token available from your MFA device.
- AWSAccessKey: The access key of the IAM user for whom MFA will be issued.
- AWSSecretKey: The secret key of the IAM user whom MFA will be issued.
- AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This will cause the provider to attempt to retrieve credentials for the specified role using MFA.
- AWSExternalId (optional): Only required if you are assuming a role in another AWS account.
Note: If you want to control the duration of the temporary credentials, set the TemporaryTokenDuration property (default: 3600 seconds).
Temporary Credentials
To authenticate using temporary credentials, specify the following:
- AuthScheme: AwsTempCredentials.
- AWSAccessKey: The access key of the IAM user to assume the role for.
- AWSSecretKey: The secret key of the IAM user to assume the role for.
- AWSSessionToken: Your AWS session token, provided with your temporary credentials. For details, see AWS Identity and Access Management User Guide.
The provider can now request resources using the same permissions provided by long-term credentials (such as IAM user credentials) for the lifespan of the temporary credentials.
To authenticate using both temporary credentials and an IAM role, set all the parameters described above, and specify these additional parameters:
- AWSRoleARN: Specify the Role ARN for the role you'd like to authenticate with. This prompts the provider to retrieve credentials for the specified role.
- AWSExternalId (optional): Only required if you are assuming a role in another AWS account.
Credentials Files
You can use a credentials file to authenticate. Any configurations related to AccessKey/SecretKey authentication, temporary credentials, role authentication, or MFA can be used. To do so, set the following properties to authenticate:
- AuthScheme: AwsCredentialsFile.
- AWSCredentialsFile: The location of your credentials file.
- AWSCredentialsFileProfile (optional): The name of the profile you would like to use from the specified credentials file. If not specified, the default profile is used.
Azure AD
This configuration requires two separate Azure AD applications:
- The "Microsoft Excel" application used for single sign-on, and
- A custom OAuth application with user_impersonation permission on the "Microsoft Excel" application. (See Creating a Custom OAuth App.)
To connect to Azure AD, set the AuthScheme to AzureAD, and set these properties:
- OAuthClientId: The application Id of the connector application, listed in the Overview section of the app registration.
- OAuthClientSecret: The client secret value of the connector application. Azure AD displays this when you create a new client secret.
- CallbackURL: The redirect URI of the connector application. For example: https://localhost:33333.
- InitiateOAuth: Set this to GETANDREFRESH.
To authenticate to Azure AD, set these SSOProperties:
- Resource: The application Id URI of the Microsoft Excel application, listed in the app registration's Overview section. In most cases this is the URL of your custom Microsoft Excel domain.
- AzureTenant: The Id of the Azure AD tenant where the applications are registered.
Example connection string:
AuthScheme=AzureAD;InitiateOAuth=GETANDREFRESH;OAuthClientId=3ea1c786-d527-4399-8c3b-2e3696ae4b48;OauthClientSecret=xxx;CallbackUrl=https://localhost:33333;SSOProperties='Resource=https://signin.aws.amazon.com/saml;AzureTenant=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';