Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Add final Tableau impersonation changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kylep-dremio committed Apr 26, 2020
1 parent 0db0162 commit ae37061
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions connectionProperties.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
(function propertiesbuilder(attr) {
function isEmpty(str) {
return (!str || 0 === str.length);
}

var props = {};
props["user"] = attr[connectionHelper.attributeUsername];
props["password"] = attr[connectionHelper.attributePassword];

if (attr["workgroup-auth-mode"] == "db-impersonate") {
var str = attr[":workgroup-auth-user"];

if (!isEmpty(str)) {
// Strip domain, if any
var arr = str.split("\\");
if (arr.length == 2) {
props["impersonation_target"] = arr[1];
} else {
props["impersonation_target"] = str;
}
}
}

if (attr["sslmode"] !== "") {
props["ssl"] = "true";
Expand Down
1 change: 1 addition & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<driver name="Dremio Connector"/>
<customizations>
<customization name="CAP_CREATE_TEMP_TABLES" value="no"/>
<customization name="CAP_AUTH_DB_IMPERSONATE" value="yes"/>
<customization name="CAP_DB_IMPERSONATE" value="yes"/>
<customization name="CAP_FAST_METADATA" value="no"/>
<customization name="CAP_QUERY_BOOL_IDENTIFIER_TO_LOGICAL" value="yes"/>
Expand Down

0 comments on commit ae37061

Please sign in to comment.