<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Is it possible to connect Sql Server via Sqoop or Nifi with the AD user without a password? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243100#M204899</link>
    <description>&lt;P&gt;If it is possible, Could you please share steps that how I can do it.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Versions:&lt;/P&gt;&lt;P&gt;Sqoop1.4.7 &lt;/P&gt;&lt;P&gt;NiFi1.8.0&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jan 2019 19:29:45 GMT</pubDate>
    <dc:creator>alierdem</dc:creator>
    <dc:date>2019-01-29T19:29:45Z</dc:date>
    <item>
      <title>Is it possible to connect Sql Server via Sqoop or Nifi with the AD user without a password?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243100#M204899</link>
      <description>&lt;P&gt;If it is possible, Could you please share steps that how I can do it.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Versions:&lt;/P&gt;&lt;P&gt;Sqoop1.4.7 &lt;/P&gt;&lt;P&gt;NiFi1.8.0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 19:29:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243100#M204899</guid>
      <dc:creator>alierdem</dc:creator>
      <dc:date>2019-01-29T19:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to connect Sql Server via Sqoop or Nifi with the AD user without a password?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243101#M204900</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Ali Erdem"&gt; @Ali Erdem&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;YES&lt;/STRONG&gt; it's possible to connect and run a sqoop job against an SQL server without a password. Hadoop credential provider API the CredentialProvider API in Hadoop allows for the separation of applications and how they store their required passwords/secrets. With Sqoop 1.4.5 or higher, the credential API keystore is supported by Sqoop.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The AD user ONLY needs to include the -Dhadoop.security.crendential.provider.path in the sqoop command. Here are the steps, The API expects the password &lt;STRONG&gt;.jceks&lt;/STRONG&gt; file to be in HDFS and accessible to that user preferably in his/her home directory &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Assumption password for Production sqlserver it's good to standardize eg &lt;STRONG&gt;sql_prod,sql_dev&lt;/STRONG&gt; or &lt;STRONG&gt;ora_prod,ora_dev&lt;/STRONG&gt; etc&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hadoop credential create sql_prod.password -provider jceks://hdfs/user/erdem/sql_prod.password.jceks&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The above command will prompt for the target database password see output below&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;Enter password:  {the_target_database_password}
Enter password again:  {the_target_database_password}ora_prod.password
has been successfully created.org.apache.hadoop.security.alias.JavaKeyStoreProvider
has been updated.&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Now the password should be in your home directory,the file should be readable&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -ls /user/erdem
Found 1 items
-rwx------ 3 erdem erdem 502 2019-01-29 11:08 /user/erdem/sql_prod.password.jceks&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Now the user erdem can run a sqoop job&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;sqoop import
-Dhadoop.security.crendential.provider.path jceks//hdfs/user/erdem/sql_prod.password.jceks
-Doraoop.timestamp.string=false -Dmapreduce.job.user.classpath.first=true \
--verbose --connect jdbc:sqlserver://sqlserver-name \
--username erdem \
--password alias ora_prod.password \
--driver   com.microsoft.sqlserver.jdbc.SQLServerDriver \
--table test \
--target-dir "{some_dir}" \
--split-by NOOBJETRISQUECONTRAT --direct --as-parquetfile&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;In the above, I modified the output from my oracle sqoop output especially for the driver part. But it should work without issue you will realise the user &lt;STRONG&gt;erdem&lt;/STRONG&gt; didn't key in a password on the CLI a security loophole.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;There you go revert if you need more help.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 20:02:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243101#M204900</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-01-29T20:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to connect Sql Server via Sqoop or Nifi with the AD user without a password?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243102#M204901</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/234965/@Ali%20Erdem"&gt;@Ali Erdem&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Any updates on this thread?&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 18:55:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-to-connect-Sql-Server-via-Sqoop-or-Nifi-with/m-p/243102#M204901</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-01-30T18:55:43Z</dc:date>
    </item>
  </channel>
</rss>

