Compare commits
12 Commits
patch/TPS-
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1942a2a714 | ||
|
|
e525d98851 | ||
|
|
031dcf8074 | ||
|
|
a8a764e273 | ||
|
|
d803bd655a | ||
|
|
64b033c51b | ||
|
|
9c31c2869d | ||
|
|
e91f8c1b5d | ||
|
|
6d16ec2e3e | ||
|
|
d5dfa732da | ||
|
|
49d093c671 | ||
|
|
0f3b302525 |
57
PATCH_RELEASE_NOTE.md
Normal file
57
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
version: 7.2.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-3290
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| Patch Name | Patch\_20190805\_TPS-3290\_v1-7.2.1 |
|
||||
| Release Date | 2019-08-05 |
|
||||
| Target Version | 20190620_1446-V7.2.1 |
|
||||
| Product affected | Talend Studio |
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a self-contained patch.
|
||||
|
||||
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
|
||||
|
||||
## Fixed issues
|
||||
|
||||
This patch contains the following fixes:
|
||||
|
||||
- TPS-3290 [7.2.1] SSO enabled Redshift connectivity with Talend 7.2.1 Big Data Platform (Standard Job) (TDI-42674)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Talend Studio 7.2.1 must be installed.
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing the patch using Software update
|
||||
|
||||
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
|
||||
|
||||
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
|
||||
|
||||
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
|
||||
|
||||
### Installing the patch using Talend Studio
|
||||
|
||||
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
|
||||
|
||||
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
|
||||
|
||||
### Installing the patch using Commandline
|
||||
|
||||
Execute the following commands:
|
||||
|
||||
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
|
||||
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
|
||||
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.documentation.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.fileoutputxml.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.gefabstractmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.mapper.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.job.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.rowgenerator.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.runprocess.nl</artifactId>
|
||||
|
||||
@@ -52,7 +52,7 @@ ProcessDebugDialog.errortext=Impossible de d\u00E9bugger le job.\\nV\u00E9rifiez
|
||||
ShadowProcess.notGeneratedOutputException=Sortie non g\u00E9n\u00E9r\u00E9e.
|
||||
ProcessComposite.contextGroup=Contexte
|
||||
prefs.clientConfiguration=Configuration du client Talend
|
||||
ProcessComposite.endPattern=Le Job {0} s\'est termin\u00E9 \u00E0 {1,date,HH:mm dd/MM/yyyy}. [code de sortie={2,number}]
|
||||
ProcessComposite.endPattern=Le Job {0} s'est termin\u00E9 \u00E0 {1,date,HH:mm dd/MM/yyyy}. [code de sortie={2,number}]
|
||||
ProcessView.title=Ex\u00E9cuter({0})
|
||||
Processor.configurePerl=L'interpr\u00E9teur Perl n'est pas configur\u00E9.
|
||||
JavaProcessor.notFoundedFolderException=Dossier introuvable dans le projet .Java
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.scd.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.webservice.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.xmlmap.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.expressionbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.resource.tos.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.ftp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.json.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.di.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.engines.client.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sqlbuilder.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.di.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.branding.tos.test.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.sbi.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.spagic.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.components.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.tos.libraries.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.abstractmap</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.alfrescooutput</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.business.diagram</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.codegen</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.exchange</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.libs</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
java.util.List
|
||||
org.talend.core.model.process.IConnection
|
||||
@@ -16,6 +16,7 @@
|
||||
java.util.HashSet
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ jet
|
||||
imports="
|
||||
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
|
||||
java.util.List
|
||||
@@ -17,6 +17,7 @@
|
||||
java.util.HashSet
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,56 @@
|
||||
"
|
||||
%>
|
||||
<%
|
||||
|
||||
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
DbMapComponent node = (DbMapComponent) codeGenArgument.getArgument();
|
||||
boolean stats = codeGenArgument.isStatistics();
|
||||
|
||||
@@ -15,6 +15,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/HelpClass/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
class ConnectionUtil extends DefaultConnectionUtil{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Input/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBInputBeginUtil extends DefaultDBInputUtil{
|
||||
|
||||
@@ -17,6 +17,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Row/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBRowBeginUtil extends DefaultDBRowUtil{
|
||||
|
||||
@@ -18,6 +18,7 @@ imports="
|
||||
skeleton="../templates/slowly_change_dimension.skeleton"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
|
||||
@@ -9,6 +9,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
|
||||
@@ -14,6 +14,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="../templates/Log4j/Log4jDBConnUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/HelpClass/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
class ConnectionUtil extends DefaultConnectionUtil{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Input/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBInputBeginUtil extends DefaultDBInputUtil{
|
||||
|
||||
@@ -17,6 +17,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Row/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBRowBeginUtil extends DefaultDBRowUtil{
|
||||
|
||||
@@ -16,7 +16,7 @@ imports="
|
||||
"
|
||||
skeleton="../templates/slowly_change_dimension.skeleton"
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
|
||||
@@ -14,7 +14,7 @@ imports="
|
||||
"
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
|
||||
@@ -8,6 +8,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
|
||||
@@ -18,6 +18,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
|
||||
<%@ include file="../templates/Log4j/Log4jDBConnUtil.javajet"%>
|
||||
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
@@ -96,6 +97,57 @@ String url_<%=cid%> = null;
|
||||
int deletedCount_<%=cid%>=0;
|
||||
<%
|
||||
boolean useExistingConnection = "true".equalsIgnoreCase(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
if(useExistingConnection) {
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
String conn = "conn_" + connection;
|
||||
|
||||
@@ -7,6 +7,56 @@ imports="
|
||||
%>
|
||||
<%@ include file="../templates/DB/HelpClass/HelpClass.javajet"%>
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
class ConnectionUtil extends DefaultConnectionUtil{
|
||||
|
||||
public void beforeComponentProcess(INode node){
|
||||
|
||||
@@ -14,6 +14,56 @@ imports="
|
||||
%>
|
||||
<%@ include file="../templates/DB/Input/HelpClass.javajet"%>
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
class DBInputBeginUtil extends DefaultDBInputUtil{
|
||||
|
||||
private INode node = null;
|
||||
|
||||
@@ -51,6 +51,56 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
boolean createGeometryColumns = ("true").equals(ElementParameterParser.getValue(node,"__GEOMETRY_COLUMNS__"));
|
||||
boolean useExistingConnection = "true".equals(ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"));
|
||||
String connection = ElementParameterParser.getValue(node,"__CONNECTION__");
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
String rejectConnName = null;
|
||||
List<? extends IConnection> rejectConns = node.getOutgoingConnections("REJECT");
|
||||
|
||||
@@ -6,8 +6,58 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Row/HelpClass.javajet"%>
|
||||
<%
|
||||
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
class DBRowBeginUtil extends DefaultDBRowUtil{
|
||||
|
||||
public void beforeComponentProcess(INode node){
|
||||
|
||||
@@ -18,6 +18,56 @@ skeleton="../templates/slowly_change_dimension.skeleton"
|
||||
%>
|
||||
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
@@ -14,8 +14,57 @@ imports="
|
||||
"
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
@@ -7,8 +7,57 @@ imports="
|
||||
java.util.Map
|
||||
"
|
||||
%>
|
||||
|
||||
<%
|
||||
//TPS-3315
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String user_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
String localServiceName_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__LOCAL_SERVICE_NAME__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(localServiceName_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
//
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode) codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
|
||||
@@ -14,6 +14,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="../templates/Log4j/Log4jDBConnUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
@@ -99,17 +100,17 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
}
|
||||
%>
|
||||
String url_<%=cid%> = sbuilder_<%=cid%>.toString();
|
||||
<% if (!"SSO".equals(jdbcUrl)){
|
||||
String passwordFieldName = "__PASS__";
|
||||
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {%>
|
||||
final String decryptedPass_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
final String decryptedPass_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String dbUser_<%=cid %> = <%=userName%>;
|
||||
String dbPwd_<%=cid %> = decryptedPass_<%=cid%>;
|
||||
<% }
|
||||
<%
|
||||
String passwordFieldName = "__PASS__";
|
||||
|
||||
if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {%>
|
||||
final String decryptedPass_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
final String decryptedPass_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String dbUser_<%=cid %> = <%=userName%>;
|
||||
String dbPwd_<%=cid %> = decryptedPass_<%=cid%>;
|
||||
<%
|
||||
|
||||
log4jCodeGenerateUtil.connect(node);
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@
|
||||
|
||||
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="5"
|
||||
REPOSITORY_VALUE="USERNAME" REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')" GROUP="DB_CONFIG">
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') " GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="5"
|
||||
REPOSITORY_VALUE="PASSWORD" REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')" GROUP="DB_CONFIG">
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') " GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
MVN="mvn:commons-codec/commons-codec/1.6"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -6,6 +6,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/HelpClass/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
class ConnectionUtil extends DefaultConnectionUtil{
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
NUM_ROW="4"
|
||||
REPOSITORY_VALUE="USERNAME"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="JDBC_URL=='STANDARD'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -110,7 +109,6 @@
|
||||
NUM_ROW="4"
|
||||
REPOSITORY_VALUE="PASSWORD"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="JDBC_URL=='STANDARD'"
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -207,6 +205,7 @@
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO')" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO')" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Input/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBInputBeginUtil extends DefaultDBInputUtil{
|
||||
@@ -76,8 +77,7 @@ imports="
|
||||
|
||||
public void createConnection(INode node) {
|
||||
String jdbcUrl = ElementParameterParser.getValue(node, "__JDBC_URL__");
|
||||
if ("SSO".equals(jdbcUrl)) needUserAndPassword = false;
|
||||
super.createConnection(node, needUserAndPassword);
|
||||
super.createConnection(node);
|
||||
String useCursor= ElementParameterParser.getValue(node, "__USE_CURSOR__");
|
||||
if(("true").equals(useCursor)) {
|
||||
log4jCodeGenerateUtil.autoCommit(node,false);
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="USERNAME"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -131,7 +131,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="PASSWORD"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -288,6 +288,7 @@
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ imports="
|
||||
skeleton="../templates/db_output_bulk.skeleton"
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/Log4j/DBLogUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
@@ -221,11 +222,7 @@ if(("true").equals(useExistingConn)) {
|
||||
jdbcUrl = ElementParameterParser.getValue(ne, "__JDBC_URL__");
|
||||
}
|
||||
}
|
||||
if ("SSO".equals(jdbcUrl)){
|
||||
dbLog.conn().useExistConn("conn_"+cid+".getMetaData().getURL()", null);
|
||||
} else {
|
||||
dbLog.conn().useExistConn("conn_"+cid+".getMetaData().getURL()", "conn_"+cid+".getMetaData().getUserName()");
|
||||
}
|
||||
dbLog.conn().useExistConn("conn_"+cid+".getMetaData().getURL()", "conn_"+cid+".getMetaData().getUserName()");
|
||||
%>
|
||||
<%
|
||||
} else {
|
||||
@@ -261,23 +258,18 @@ if(("true").equals(useExistingConn)) {
|
||||
|
||||
|
||||
|
||||
<% if ("SSO".equals(jdbcUrl)){%>
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>);
|
||||
<%dbLog.conn().connTry(dbLog.var("url"), null);%>
|
||||
<%dbLog.conn().connDone(dbLog.var("url"));%>
|
||||
<% } else {%>
|
||||
String dbUser_<%=cid %> = <%=dbuser%>;
|
||||
<%
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
String dbUser_<%=cid %> = <%=dbuser%>;
|
||||
<%
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
|
||||
String dbPwd_<%=cid %> = decryptedPassword_<%=cid%>;
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>,dbUser_<%=cid%>,dbPwd_<%=cid%>);
|
||||
<%dbLog.conn().connTry(dbLog.var("url"), dbLog.var("dbUser"));%>
|
||||
<%dbLog.conn().connDone(dbLog.var("url"));%>
|
||||
<% }%>
|
||||
String dbPwd_<%=cid %> = decryptedPassword_<%=cid%>;
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>,dbUser_<%=cid%>,dbPwd_<%=cid%>);
|
||||
<%dbLog.conn().connTry(dbLog.var("url"), dbLog.var("dbUser"));%>
|
||||
<%dbLog.conn().connDone(dbLog.var("url"));%>
|
||||
|
||||
resourceMap.put("conn_<%=cid%>", conn_<%=cid%>);
|
||||
conn_<%=cid%>.setAutoCommit(false);
|
||||
<%
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="USERNAME"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -135,7 +135,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="PASSWORD"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -378,6 +378,7 @@
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
<DEFAULT>Redshift</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
REPOSITORY_VALUE="USERNAME" REQUIRED="true" GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
REPOSITORY_VALUE="PASSWORD" REQUIRED="true" GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -538,7 +538,7 @@
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-logging-1.1.3.jar"
|
||||
REQUIRED="true" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar"
|
||||
MVN="mvn:org.talend.libraries/commons-codec-1.6/6.0.0"
|
||||
MVN="mvn:commons-codec/commons-codec/1.6"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar"
|
||||
REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
|
||||
@@ -8,6 +8,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/DB/Row/HelpClass.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
|
||||
class DBRowBeginUtil extends DefaultDBRowUtil{
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="USERNAME"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -133,7 +133,7 @@
|
||||
NUM_ROW="5"
|
||||
REPOSITORY_VALUE="PASSWORD"
|
||||
REQUIRED="true"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -306,6 +306,7 @@
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ imports="
|
||||
"
|
||||
%>
|
||||
<%@ include file="../templates/Log4j/Log4jDBConnUtil.javajet"%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/DB/CheckContextPassword.javajet"%>
|
||||
<%
|
||||
CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
@@ -48,8 +49,7 @@ imports="
|
||||
jdbcUrl = ElementParameterParser.getValue(ne, "__JDBC_URL__");
|
||||
}
|
||||
}
|
||||
boolean needUserAndPassword = !"SSO".equals(jdbcUrl);
|
||||
log4jCodeGenerateUtil.useExistConnection(node, needUserAndPassword);
|
||||
log4jCodeGenerateUtil.useExistConnection(node);
|
||||
} else {
|
||||
%>
|
||||
String driverClass_<%=cid%> = "com.amazon.redshift.jdbc42.Driver";
|
||||
@@ -78,17 +78,16 @@ imports="
|
||||
%>
|
||||
String url_<%=cid%> = sbuilder_<%=cid%>.toString();
|
||||
<%
|
||||
if (!"SSO".equals(jdbcUrl)){
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {%>
|
||||
final String decryptedPass_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
final String decryptedPass_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String dbUser_<%=cid %> = <%=userName%>;
|
||||
String dbPwd_<%=cid %> = decryptedPass_<%=cid%>;
|
||||
<% }
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%if (ElementParameterParser.canEncrypt(node, passwordFieldName)) {%>
|
||||
final String decryptedPass_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(node, passwordFieldName)%>);
|
||||
<%} else {%>
|
||||
final String decryptedPass_<%=cid%> = <%= ElementParameterParser.getValue(node, passwordFieldName)%>;
|
||||
<%}%>
|
||||
String dbUser_<%=cid %> = <%=userName%>;
|
||||
String dbPwd_<%=cid %> = decryptedPass_<%=cid%>;
|
||||
<%
|
||||
log4jCodeGenerateUtil.connect(node);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
<DEFAULT>Redshift</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
<PARAMETER NAME="USER" FIELD="TEXT" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
REPOSITORY_VALUE="USERNAME" REQUIRED="true" GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') AND (JDBC_URL=='STANDARD')"
|
||||
<PARAMETER NAME="PASS" FIELD="PASSWORD" NUM_ROW="5" SHOW_IF="(USE_EXISTING_CONNECTION == 'false') "
|
||||
REPOSITORY_VALUE="PASSWORD" REQUIRED="true" GROUP="DB_CONFIG">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
@@ -281,6 +281,7 @@
|
||||
<IMPORT NAME="httpcore-4.4.9.jar" MODULE="httpcore-4.4.9.jar" MVN="mvn:org.apache.httpcomponents/httpcore/4.4.9" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="httpclient-4.5.5.jar" MODULE="httpclient-4.5.5.jar" MVN="mvn:org.apache.httpcomponents/httpclient/4.5.5" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="joda-time-2.8.1.jar" MODULE="joda-time-2.8.1.jar" MVN="mvn:joda-time/joda-time/2.8.1" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="commons-codec-1.6.jar" MODULE="commons-codec-1.6.jar" MVN="mvn:commons-codec/commons-codec/1.6" UrlPath="platform:/plugin/org.talend.libraries.apache.common/lib/commons-codec-1.6.jar" REQUIRED_IF="(JDBC_URL == 'SSO') AND (USE_EXISTING_CONNECTION == 'false')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
<RETURNS />
|
||||
|
||||
@@ -26,22 +26,17 @@ imports="
|
||||
connUtil.beforeComponentProcess(node);
|
||||
connUtil.createURL(node);
|
||||
%>
|
||||
<%
|
||||
if (!"SSO".equals(ElementParameterParser.getValue(node, "__JDBC_URL__"))){
|
||||
%>
|
||||
String dbUser_<%=cid%> = <%=(dbuser != null && dbuser.trim().length() == 0)? "null":dbuser%>;<%//the tSQLiteConnection component not contain user and pass return null%>
|
||||
|
||||
<%if(dbpass != null && dbpass.trim().length() == 0) {%>
|
||||
String dbPwd_<%=cid%> = null;
|
||||
<%} else {
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String dbPwd_<%=cid%> = decryptedPassword_<%=cid%>;
|
||||
<%}%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
String dbUser_<%=cid%> = <%=(dbuser != null && dbuser.trim().length() == 0)? "null":dbuser%>;<%//the tSQLiteConnection component not contain user and pass return null%>
|
||||
|
||||
<%if(dbpass != null && dbpass.trim().length() == 0) {%>
|
||||
String dbPwd_<%=cid%> = null;
|
||||
<%} else {
|
||||
String passwordFieldName = "__PASS__";
|
||||
%>
|
||||
<%@ include file="@{org.talend.designer.components.localprovider}/components/templates/password.javajet"%>
|
||||
String dbPwd_<%=cid%> = decryptedPassword_<%=cid%>;
|
||||
<%}%>
|
||||
|
||||
java.sql.Connection conn_<%=cid%> = null;
|
||||
<%@ include file="../Log4j/Log4jDBConnUtil.javajet"%>
|
||||
<%
|
||||
@@ -63,13 +58,8 @@ imports="
|
||||
<%connUtil.classForName(node);%>
|
||||
<%
|
||||
log4jCodeGenerateUtil.debugConnectionParams(node);
|
||||
if ("SSO".equals(ElementParameterParser.getValue(node, "__JDBC_URL__"))){
|
||||
log4jCodeGenerateUtil.connect_begin_noUser();
|
||||
connUtil.createConnection(node, false);
|
||||
} else {
|
||||
log4jCodeGenerateUtil.connect_begin();
|
||||
connUtil.createConnection(node);
|
||||
}
|
||||
log4jCodeGenerateUtil.connect_begin();
|
||||
connUtil.createConnection(node);
|
||||
|
||||
log4jCodeGenerateUtil.connect_end();
|
||||
%>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<%@jet%>
|
||||
<%
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument codeGenArgument_pwdCheck = (org.talend.designer.codegen.config.CodeGeneratorArgument)argument;
|
||||
org.talend.core.model.process.INode node_pwdCheck = (org.talend.core.model.process.INode)codeGenArgument_pwdCheck.getArgument();
|
||||
boolean useExistingConnection_pwdCheck = "true".equalsIgnoreCase(ElementParameterParser.getValue(node_pwdCheck,"__USE_EXISTING_CONNECTION__"));
|
||||
if(!useExistingConnection_pwdCheck) {
|
||||
String dbhost_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__HOST__");
|
||||
String dbuser_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__USER__");
|
||||
String dbport_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PORT__");
|
||||
String dbname_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__DBNAME__");
|
||||
String dbproperties_pwdCheck = ElementParameterParser.getValue(node_pwdCheck, "__PROPERTIES__");
|
||||
final class ValueChecker {
|
||||
|
||||
public boolean checkValueForPassword(String inputValue, org.talend.core.model.process.IContext context) {
|
||||
if(null == inputValue) {
|
||||
return false;
|
||||
}
|
||||
java.util.List<String> parsed = new java.util.ArrayList<String>();
|
||||
String value = inputValue.trim();
|
||||
while(org.talend.core.model.utils.ContextParameterUtils.containContextVariables(value)) {
|
||||
String nonQuoteStr = org.talend.core.utils.TalendQuoteUtils.filterQuote(value);
|
||||
String contextVar = org.talend.core.model.utils.ContextParameterUtils.getVariableFromCode(nonQuoteStr);
|
||||
parsed.add(contextVar);
|
||||
String curValue = org.talend.core.model.utils.ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX + contextVar;
|
||||
int index = value.indexOf(curValue);
|
||||
if(index != -1) {
|
||||
value = value.substring(index + curValue.length(), value.length());
|
||||
}
|
||||
}
|
||||
for(String parsedParam : parsed) {
|
||||
org.talend.core.model.process.IContextParameter param = context.getContextParameter(parsedParam);
|
||||
if(org.talend.core.model.utils.ContextParameterUtils.isPasswordType(param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
ValueChecker checker = new ValueChecker();
|
||||
org.talend.core.model.process.IContext context_pwdCheck = node_pwdCheck.getProcess().getContextManager().getDefaultContext();
|
||||
if(checker.checkValueForPassword(dbhost_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbport_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbname_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbproperties_pwdCheck, context_pwdCheck) || checker.checkValueForPassword(dbuser_pwdCheck, context_pwdCheck)) {
|
||||
%>
|
||||
if(true) {
|
||||
throw new RuntimeException("Password context variable is used in plain text field!");
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
@@ -73,7 +73,8 @@ imports="
|
||||
jdbcUrl = ElementParameterParser.getValue(ne, "__JDBC_URL__");
|
||||
}
|
||||
}
|
||||
boolean needUserAndPassword = !"SSO".equals(jdbcUrl);
|
||||
//TODO changeme
|
||||
boolean needUserAndPassword = true;
|
||||
log4jCodeGenerateUtil.useExistConnection(node, needUserAndPassword);
|
||||
} else {
|
||||
log4jCodeGenerateUtil.useExistConnection(node);
|
||||
|
||||
@@ -93,7 +93,7 @@ imports="
|
||||
<%this.setURL(node);%>
|
||||
<%
|
||||
log4jCodeGenerateUtil.debugConnectionParams(node);
|
||||
if ("SSO".equals(ElementParameterParser.getValue(node, "__JDBC_URL__")) || !needUserAndPassword){
|
||||
if (!needUserAndPassword){
|
||||
log4jCodeGenerateUtil.connect_begin_noUser();
|
||||
} else {
|
||||
log4jCodeGenerateUtil.connect_begin();
|
||||
|
||||
@@ -27,11 +27,7 @@ imports="
|
||||
String query_<%=cid %> = "";
|
||||
boolean whetherReject_<%=cid%> = false;
|
||||
<%
|
||||
if ("SSO".equals(ElementParameterParser.getValue(node, "__JDBC_URL__"))){
|
||||
dbRowBeginUtil.createConnection(node, false);
|
||||
} else {
|
||||
dbRowBeginUtil.createConnection(node);
|
||||
}
|
||||
dbRowBeginUtil.createConnection(node);
|
||||
%>
|
||||
resourceMap.put("conn_<%=cid%>", conn_<%=cid%>);
|
||||
<%
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
jdbcUrl = ElementParameterParser.getValue(ne, "__JDBC_URL__");
|
||||
}
|
||||
}
|
||||
needUserAndPassword = !"SSO".equals(jdbcUrl);
|
||||
//TODO changeme
|
||||
needUserAndPassword = true;
|
||||
this.afterUseExistConnection(node, needUserAndPassword);
|
||||
} else {
|
||||
this.afterUseExistConnection(node);
|
||||
|
||||
@@ -88,11 +88,7 @@ imports="
|
||||
|
||||
public void connect(INode node){
|
||||
beforeComponentProcess(node);
|
||||
if ("SSO".equals(ElementParameterParser.getValue(node, "__JDBC_URL__"))){
|
||||
connectWithSSO();
|
||||
} else {
|
||||
connect();
|
||||
}
|
||||
connect();
|
||||
}
|
||||
|
||||
public void connect(){
|
||||
@@ -103,14 +99,6 @@ imports="
|
||||
connect_end();
|
||||
}
|
||||
|
||||
public void connectWithSSO(){
|
||||
connect_begin_noUser();
|
||||
%>
|
||||
conn_<%=cid%> = java.sql.DriverManager.getConnection(url_<%=cid %>);
|
||||
<%
|
||||
connect_end();
|
||||
}
|
||||
|
||||
public void connect_begin(){
|
||||
logInfo(node,"debug",cid+" - Connection attempt to '\" + url_"+cid+" + \"' with the username '\" + dbUser_"+cid+" + \"'.");
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.components.localprovider</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core.generic</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.core</artifactId>
|
||||
|
||||
@@ -1948,7 +1948,7 @@ public class DataProcess implements IGeneratingProcess {
|
||||
}
|
||||
}
|
||||
|
||||
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS()) {
|
||||
if (duplicatedProcess.getComponentsType().equals(ComponentCategory.CATEGORY_4_DI.getName()) && PluginChecker.isTIS() && !Boolean.getBoolean("deactivate_extended_component_log")) {
|
||||
final String talendJobLogComponent = "tJobStructureCatcher";
|
||||
final String uid4TalendJobLogComponent = "talendJobLog";
|
||||
IComponent jobStructComponent = ComponentsFactoryProvider.getInstance().get(talendJobLogComponent, ComponentCategory.CATEGORY_4_DI.getName());
|
||||
|
||||
@@ -266,6 +266,9 @@ public class TextController extends AbstractElementPropertySectionController {
|
||||
* @param value
|
||||
*/
|
||||
private void checkTextError(IElementParameter param, Text labelText, Object value) {
|
||||
if (elem instanceof Node) {
|
||||
labelText.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());
|
||||
}
|
||||
// Only for job settings View.
|
||||
// job settings extra (feature 2710)
|
||||
if (param.getCategory() == EComponentCategory.STATSANDLOGS || param.getCategory() == EComponentCategory.EXTRA) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.2.1-SNAPSHOT</version>
|
||||
<version>7.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.dbmap</artifactId>
|
||||
|
||||
@@ -1325,6 +1325,7 @@ public abstract class DbGenerationManager {
|
||||
|
||||
protected String initExpression(DbMapComponent component, ExternalDbMapEntry dbMapEntry) {
|
||||
String quote = getQuote(component);
|
||||
String quto_mark = TalendQuoteUtils.QUOTATION_MARK;
|
||||
String expression = dbMapEntry.getExpression();
|
||||
if (expression != null) {
|
||||
List<Map<String, String>> itemNameList = null;
|
||||
@@ -1349,7 +1350,7 @@ public abstract class DbGenerationManager {
|
||||
itemNameList = mapParser2.parseInTableEntryLocations(expression);
|
||||
}
|
||||
|
||||
String quoParser = "[\\\\]?\\" + quote; //$NON-NLS-1$
|
||||
String quto_markParser = "[\\\\]?\\" + quto_mark; //$NON-NLS-1$
|
||||
for (Map<String, String> itemNamemap : itemNameList) {
|
||||
Set<Entry<String, String>> set = itemNamemap.entrySet();
|
||||
Iterator<Entry<String, String>> ite = set.iterator();
|
||||
@@ -1415,16 +1416,12 @@ public abstract class DbGenerationManager {
|
||||
}
|
||||
if (expression.trim().equals(tableValue + "." + oriName)) {
|
||||
expression = tableValue + "." + getColumnName(iconn, oriName, quote);
|
||||
if(TalendQuoteUtils.QUOTATION_MARK.equals(quote)){
|
||||
expression = expression.replaceAll(quoParser,"\\\\" +quote); //$NON-NLS-1$
|
||||
}
|
||||
expression = expression.replaceAll(quto_markParser,"\\\\" +quto_mark); //$NON-NLS-1$
|
||||
continue;
|
||||
}
|
||||
if (expression.trim().equals(originaltableName + "." + oriName)) {
|
||||
expression = originaltableName + "." + getColumnName(iconn, oriName, quote);
|
||||
if(TalendQuoteUtils.QUOTATION_MARK.equals(quote)){
|
||||
expression = expression.replaceAll(quoParser,"\\\\" +quote); //$NON-NLS-1$
|
||||
}
|
||||
expression = expression.replaceAll(quto_markParser,"\\\\" +quto_mark); //$NON-NLS-1$
|
||||
continue;
|
||||
}
|
||||
// if it is temp delived table, use label to generate sql
|
||||
@@ -1438,9 +1435,7 @@ public abstract class DbGenerationManager {
|
||||
}
|
||||
expression = expression.replaceFirst(tableValue + "\\." + co.getLabel(), //$NON-NLS-1$
|
||||
tableValue + "\\." + oriName); //$NON-NLS-1$
|
||||
if(TalendQuoteUtils.QUOTATION_MARK.equals(quote)){
|
||||
expression = replaceAuotes(expression, quoParser, quote);
|
||||
}
|
||||
expression = replaceAuotes(expression, quto_markParser, quto_mark);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user