Skip to content

Commit

Permalink
Additional OAuth changes (#26)
Browse files Browse the repository at this point in the history
Remove instanceUrl from attr list.
Reformat the place showing custom domain.

* Modify oauthConig.

* Remove instanceUrl from requiredAttrlist, move custom domain field to
Adv tab.

* Remove instanceUrl from requiredAttrlist, move custom domain field to
Adv tab.

* Update connection-fields.xml

* Update connection-fields.xml

* Update connection-fields.xml

* Update connection-builder.js

Change auth mode name for backward compatibility.

Co-authored-by: Eric Wang <[email protected]>
  • Loading branch information
wangxinlei and wangxinlei authored Dec 3, 2020
1 parent 959c80c commit 0d307fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
2 changes: 1 addition & 1 deletion tableau-databricks/connection-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ limitations under the License.
var authenticationMode = attr[connectionHelper.attributeAuthentication];
switch (authenticationMode) {
case "auth-user-pass":
case "username-password":
case "Username and Password":
params["AUTHMECH"] = 3;
params["UID"] = attr[connectionHelper.attributeUsername];
params["PWD"] = attr[connectionHelper.attributePassword];
Expand Down
28 changes: 6 additions & 22 deletions tableau-databricks/connection-fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,14 @@ limitations under the License. -->
</selection-group>
</field>

<field name="v-show-advanced-aad-options" label="@string/authentication_aad_advanced_options_prompt/" category="authentication" value-type="boolean">
<field name="instanceurl" label="@string/authentication_aad_endpoint_prompt/" category="advanced" value-type="string" default-value="https://login.microsoftonline.com/common">
<conditions>
<condition field="authentication" value="oauth" />
</conditions>
<boolean-options>
<false-value value="" />
<true-value value="true" />
</boolean-options>
</field>

<field name="instanceurl" label="@string/authentication_aad_endpoint_prompt/" category="authentication" value-type="string" default-value="https://login.microsoftonline.com/common/" editable="false">
<conditions>
<condition field="v-show-advanced-aad-options" value="" />
</conditions>
</field>

<field name="instanceurl" label="@string/authentication_aad_endpoint_prompt/" category="authentication" value-type="string" default-value="https://login.microsoftonline.com/common/">
<conditions>
<condition field="v-show-advanced-aad-options" value="true" />
</conditions>
<!-- limit to well-known domains:
https://*.microsoftonline.(com|us|de|cn)/ (public, govcloud, germany, china),
https://*.chinacloudapi.cn/ (China) -->
<validation-rule reg-exp="^https:\/\/([a-zA-Z0-9-.]+\.)?((microsoftonline\.(com|us|cn|de))|chinacloudapi\.cn)/"/>
<!-- limit to well-known domains:
https://*.microsoftonline.(com|us|de|cn)/ (public, govcloud, germany, china),
https://*.chinacloudapi.cn/ (China) -->
<validation-rule reg-exp="^https:\/\/([a-zA-Z0-9-.]+\.)?((microsoftonline\.(com|us|cn|de))|chinacloudapi\.cn)/"/>
</field>

<field name="username" label="@string/username_prompt/" category="authentication" value-type="string">
Expand Down Expand Up @@ -111,4 +95,4 @@ limitations under the License. -->
<!-- valid values: word, Word, some-arbitrary*string, {has-semicolon;}, {has{closing}}bracket;} -->
<validation-rule reg-exp="^(([a-zA-Z0-9_.-]+)=(([^{};]*)|(\{((\}\}|[^}])*)\}));)*(([a-zA-Z0-9_.-]+)=(([^{};]*)|(\{((\}\}|[^}])*)\})))?$" />
</field>
</connection-fields>
</connection-fields>
1 change: 0 additions & 1 deletion tableau-databricks/connection-resolver.tdr
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ limitations under the License.
<attr>username</attr>
<attr>password</attr>
<attr>authentication-type</attr>
<attr>instanceurl</attr>
<attr>odbc-connect-string-extras</attr>
</attribute-list>
</required-attributes>
Expand Down

0 comments on commit 0d307fc

Please sign in to comment.