Advanced Settings
Connecting to HTTP XML Streams
Set the URI to the HTTP or HTTPS URL of the XML resource you want to access as a table. Set AuthScheme to use the following authentication types.
- HTTP:To use HTTP Basic or Digest, set the User and Password and set the corresponding AuthScheme. Set CustomHeaders if you need access to the request headers. Set CustomUrlParams to modify the URL query string.
- Windows (NTLM): Set the Windows User and Password to connect and set AuthScheme to "NTLM".
- Kerberos and Kerberos Delegation: To authenticate with Kerberos, set the User and Password and set AuthScheme to NEGOTIATE. To use Kerberos Delegation, set AuthScheme to KERBEROSDELEGATION.
For example:
URI=http://www.host1.com/streamname1;AuthScheme=BASIC;User=admin;Password=admin
Connecting to Amazon S3
Set the URI to an XML document in a bucket. Additionally, set the following properties to authenticate:
- AWSAccessKey: Set to an Amazon Web Services Access Key (a user name).
- AWSSecretKey: Set to an Amazon Web Services Secret Key.
For example:
Optionally, specify Region.
Connect to Azure Blob Storage
Set the URI to the name of your container and the name of the blob. Additionally, set the following properties to authenticate:
- AzureAccount: Set this to the account associated with the Azure blob.
- AzureAccessKey: Set the to the access key associated with the Azure blob.
Connecting to Google Drive
Set the URI to the path to an XML file and authenticate using the OAuth standard. See Connecting to Google Drive for an authentication guide. You can connect with a user account or a service account. In the user account flow, you do not need to set any connection properties for your user credentials, as shown in the following connection string:
Set the URI to the path to an XML file and authenticate using the OAuth standard. You can authenticate with a user account or a service account. In the user account flow, you do not need to set any connection properties for your user credentials, as shown in the following connection string:
Connecting to Dropbox
Set the URI to the path to an XML file and authenticate using the OAuth standard. You can authenticate with a user account or a service account. In the user account flow, you do not need to set any connection properties for your user credentials, as shown in the following connection string:
Connecting to FTP
Set the URI to the address of the server followed by the path to an XML file. To authenticate, set User and Password.
For example:
URI=ftps://localhost:990/folder1/file.xml; User=user1; Password=password1;
Securing XML Connections
By default, the provider attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store. To specify another certificate, see the SSLServerCert property for the available formats to do so.
Using OAuth
This section shows how to use the provider to authenticate to any data source that supports OAuth.
OAuth requires the authenticating user to interact with XML using the browser. The provider facilitates this in various ways as described in the following sections.
Before following the procedures below, you need to register an OAuth app with the service to obtain the OAuthClientId and OAuthClientSecret.
Authenticate to XML from a Desktop Application
After setting the following connection properties, you are ready to connect:
- OAuthVersion: Set this to the OAuth Version, either 1.0 or 2.0.
- OAuthRequestTokenURL: Required for OAuth 1.0. In OAuth 1.0 this is the URL where the app makes a request for the request token.
- OAuthAuthorizationURL: Required for OAuth 1.0 and 2.0. This is the URL where the user logs into the service and grants permissions to the application. In OAuth 1.0 if permissions are granted the request token is authorized.
- OAuthAccessTokenURL: Required for OAuth 1.0 and 2.0. This is the URL where the request for the access token is made. In OAuth 1.0 the authorized request token is exchanged for the access token.
- OAuthRefreshTokenURL: Required for OAuth 2.0. In OAuth 2.0 this is the URL where the refresh token is exchanged for a new access token when the old one expires. Note that for your data source this may be the same as the access token URL.
- OAuthClientId: Set this to the client Id in your app settings. This is also called the consumer key.
- OAuthClientSecret: Set this to the client secret in your app settings. This is also called the consumer secret.
- CallbackURL: Set this to http://localhost:33333. If you specified a redirect URL in your app settings, this must match.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the access token in the connection string.
- Extracts the access token from the callback URL and authenticates requests.
- Refreshes the access token when it expires.
- Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Authenticate to XML from a Web Application
When connecting via a Web application, or if the provider is not authorized to open a browser window, use the provided stored procedures to get and manage the OAuth token values.
Note: You can extend the stored procedure schemas to set defaults for the OAuth URLs or other connection string properties.
Set Up the OAuth Flow
Provide the OAuth URLs to authenticate in the Web flow.
- OAuthRequestTokenURL: Required for OAuth 1.0. In OAuth 1.0 this is the URL where the app makes a request for the request token.
- OAuthAuthorizationURL: Required for OAuth 1.0 and 2.0. This is the URL where the user logs into the service and grants permissions to the application. In OAuth 1.0 if permissions are granted the request token is authorized.
- OAuthAccessTokenURL: Required for OAuth 1.0 and 2.0. This is the URL where the request for the access token is made. In OAuth 1.0 the authorized request token is exchanged for the access token.
- OAuthRefreshTokenURL: Required for OAuth 2.0. In OAuth 2.0 this is the URL where the refresh token is exchanged for a new access token when the old one expires. Note that for your data source this may be the same as the access token URL.
Get an Access Token
In addition to the OAuth URLs, set the following additional connection properties to obtain the OAuthAccessToken:
- OAuthClientId: Set this to the client Id in your app settings. This is also called the consumer key.
- OAuthClientSecret: Set this to the client secret in your app settings. This is also called the consumer secret.
- OAuthVersion: Set this to the OAuth version, either 1.0 or 2.0.
OAuth Endpoints
- OAuthRequestTokenURL
- OAuthAuthorizationURL
- OAuthAccessTokenURL
- OAuthRefreshTokenURL
OAuth Tokens and Keys
- OAuthClientId
- OAuthClientSecret
- OAuthRefreshToken
- OAuthAccessToken
Initiate OAuth
- OAuthVersion: Set this to 1.0 or 2.0.
- InitiateOAuth: Set this to REFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
- OAuthSettingsLocation: Set this to the path where the provider will save the OAuth values, to be persisted across connections.
On subsequent data connections, set the following:
- InitiateOAuth
- OAuthSettingsLocation
- OAuthRequestTokenURL
- OAuthAuthorizationURL
- OAuthAccessTokenURL
- OAuthRefreshTokenURL