Compare commits

..

9 Commits

Author SHA1 Message Date
kjwang
c57d0ba772 TUP-36748 Studio send request to wrong data center when token invalid (#5633)
* TUP-36748 Studio send request to wrong data center when token invalid
https://jira.talendforge.org/browse/TUP-36748

* TUP-36748 Studio send request to wrong data center when token invalid
https://jira.talendforge.org/browse/TUP-36748
2022-09-23 19:37:13 +08:00
kjwang
b390f938c8 Fix TUP-36740 When open tmc login page, we should encode all the (#5631)
parameters in URL
https://jira.talendforge.org/browse/TUP-36740
2022-09-22 20:32:39 +08:00
Samuel ANTOINE
c9d5fda28b feat(TBD-13810): add dynamic schema on tFileInputDelimited (release (#5622)
feat(TBD-13810): add dynamic schema on tFileInputDelimited
2022-09-22 11:34:19 +02:00
sbliu
4a04edee4a feat(TUP-36340) fix problem that still show missing orai18n jar . (#5615)
fix problem that after select 'Support NLS' checkbox and press finish button show missing orai18n jar .
2022-09-21 17:12:01 +08:00
kjwang
2047bf8b13 Fix TUP-36723 can not list project when use old way to fetch from token (#5613)
Fix TUP-36723 can not list project when use old way to fetch from token
https://jira.talendforge.org/browse/TUP-36723
2022-09-21 17:03:28 +08:00
kjwang
96fc7eb574 kjwang/Fix TUP-36721 Only display SSO page for Talend Studio (#5611)
kjwang/Fix TUP-36721 Only display SSO page for Talend Studio
https://jira.talendforge.org/browse/TUP-36721
2022-09-21 14:57:17 +08:00
kjwang
7d361371d2 Fix: TUP-36714 Improve the code for SSO feature (#5608)
* Fix: TUP-36714 Improve the code for SSO feature
https://jira.talendforge.org/browse/TUP-36714
2022-09-20 18:15:31 +08:00
zshen-talend
4e0527d80c fix(TDQ-19700):snowflake type don't should show on the combo list of DB wizard (#5606) 2022-09-19 17:56:43 +08:00
kjwang
e0eb2d5356 TUP-32606 Support SSO on Studio
TUP-32606 Support SSO on Studio
https://jira.talendforge.org/browse/TUP-32606
2022-09-16 15:37:54 +08:00
7 changed files with 47 additions and 43 deletions

View File

@@ -225,7 +225,7 @@ public class DuplicateAction extends AContextualAction {
// update the property of the node repository object
// sourceNode.getObject().setProperty(updatedProperty);
String initNameValue = "SPL33x_" + item.getProperty().getDisplayName(); //$NON-NLS-1$
String initNameValue = "Copy_of_" + item.getProperty().getDisplayName(); //$NON-NLS-1$
CopyObjectAction copyObjectAction = CopyObjectAction.getInstance();

View File

@@ -222,32 +222,6 @@ public class ContextUtils {
}
return parameterType;
}
// TUP-36519:For possible duplicate internalid scenario(TUP-36667) after several times' renaming in joblet. Loop all and find the nearest
// one.
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem, String paraName) {
if (contextType == null || uuId == null) {
return null;
}
ContextParameterType parameterType = null;
for (ContextParameterType param : (List<ContextParameterType>) contextType.getContextParameter()) {
String paramId = null;
if (isFromContextItem) {
paramId = ResourceHelper.getUUID(param);
} else {
paramId = param.getInternalId();
}
if (uuId.equals(paramId)) {
parameterType = param;
if (paraName != null && StringUtils.equals(paraName, param.getName())) {
break;
}
}
}
return parameterType;
}
public static ContextParameterType getContextParameterTypeById(ContextType contextType, final String uuId,
boolean isFromContextItem) {
@@ -872,7 +846,7 @@ public class ContextUtils {
if (item != null) {
final ContextType repoContextType = ContextUtils.getContextTypeByName(item, contextType.getName());
ContextParameterType repoContextParam = ContextUtils.getContextParameterTypeById(repoContextType,
paramLink.getId(), item instanceof ContextItem, contextParameterType.getName());
paramLink.getId(), item instanceof ContextItem);
if (repoContextParam != null
&& !StringUtils.equals(repoContextParam.getName(), contextParameterType.getName())) {
renamedMap.put(repoContextParam.getName(), contextParameterType.getName());
@@ -941,7 +915,7 @@ public class ContextUtils {
if (item != null) {
ContextType contextType = ContextUtils.getContextTypeByName(item, context.getName());
ContextParameterType repoParameterType = ContextUtils.getContextParameterTypeById(contextType,
parameterLink.getId(), item instanceof ContextItem, parameterType.getName());
parameterLink.getId(), item instanceof ContextItem);
if (repoParameterType != null
&& !StringUtils.equals(repoParameterType.getName(), parameterType.getName())) {
renamedMap.put(repoParameterType.getName(), parameterType.getName());
@@ -1001,7 +975,7 @@ public class ContextUtils {
ContextParameterType contextParameterType = null;
if (paramLink != null && paramLink.getId() != null && contextType != null) {
contextParameterType = getContextParameterTypeById(contextType, paramLink.getId(),
contextItem instanceof ContextItem, paramName);
contextItem instanceof ContextItem);
}
if (contextParameterType != null) {// Compare use UUID
if (!StringUtils.equals(contextParameterType.getName(), paramName)) {

View File

@@ -16,7 +16,10 @@ public class SparkBatchMetadataTalendTypeFilter extends SparkMetadataTalendTypeF
"tFileInputParquet",
"tFileOutputParquet",
"tJDBCInput",
"tJDBCOutput", "tLogRow", "tSqlRow"
"tJDBCOutput",
"tLogRow",
"tSqlRow",
"tFileInputDelimited"
);
public SparkBatchMetadataTalendTypeFilter(INode node) {

View File

@@ -359,9 +359,7 @@ public abstract class RepositoryUpdateManager {
List<UpdateResult> checkedResults = null;
if (parameter == null) { // update all job
// TUP-36519: comment out the filter for only opening job
// checkedResults = filterSpecialCheckedResult(results);
checkedResults = results;
checkedResults = filterSpecialCheckedResult(results);
} else { // filter
checkedResults = filterCheckedResult(results);
}

View File

@@ -983,7 +983,6 @@ DatabaseForm.helpInfo.installDriverLink.label=Installer un pilote
DatabaseForm.redshift.driverVersion=Version du pilote
DatabaseForm.redshift.driverVersion.tip=S\u00E9lectionnez un pilote Redshift
DatabaseForm.redshift.useStringAdditionParam=Utiliser un param\u00E8tre de cha\u00EEne de caract\u00E8res
DatabaseForm.supportnls=Support de NLS
DatabaseTableFilterForm.allSynonyms=Tous les synonymes
DatabaseTableFilterForm.edit=Modifier...
DatabaseTableFilterForm.editFilterName=Modifier le nom du filtre

View File

@@ -145,16 +145,16 @@ public class SSOClientUtil {
String dataCenter = TMCRepositoryUtil.getDefaultDataCenter();
StringBuffer urlSB = new StringBuffer();
urlSB.append(TMCRepositoryUtil.getBaseLoginURL(dataCenter)).append("?");
urlSB.append("client_id=").append(clientID).append("&");
urlSB.append("client_id=").append(URLEncoder.encode(clientID, StandardCharsets.UTF_8.name())).append("&");
urlSB.append("redirect_uri=")
.append(URLEncoder.encode(TMCRepositoryUtil.getRedirectURL(dataCenter), StandardCharsets.UTF_8.name()))
.append("&");
urlSB.append("scope=openid refreshToken&");
urlSB.append("response_type=code&");
urlSB.append("code_challenge_method=S256&");
urlSB.append("code_challenge=").append(codeChallenge).append("&");
urlSB.append("state=").append(callbackPort).append(SSOUtil.STATE_PARAM_SEPARATOR)
.append(TMCRepositoryUtil.getDefaultDataCenter());
urlSB.append("scope=").append(URLEncoder.encode("openid refreshToken", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("response_type=").append(URLEncoder.encode("code", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("code_challenge_method=").append(URLEncoder.encode("S256", StandardCharsets.UTF_8.name())).append("&");
urlSB.append("code_challenge=").append(URLEncoder.encode(codeChallenge, StandardCharsets.UTF_8.name())).append("&");
String state = String.valueOf(callbackPort) + SSOUtil.STATE_PARAM_SEPARATOR + TMCRepositoryUtil.getDefaultDataCenter();
urlSB.append("state=").append(URLEncoder.encode(state, StandardCharsets.UTF_8.name()));
return urlSB.toString();
}

View File

@@ -12,8 +12,16 @@
// ============================================================================
package org.talend.signon.util;
public class TMCRepositoryUtil {
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
public class TMCRepositoryUtil {
private static Logger LOGGER = Logger.getLogger(TMCRepositoryUtil.class);
public static final String REPOSITORY_CLOUD_US_ID = "cloud_us"; //$NON-NLS-1$
public static final String REPOSITORY_CLOUD_EU_ID = "cloud_eu"; //$NON-NLS-1$
@@ -45,6 +53,10 @@ public class TMCRepositoryUtil {
public static final String SUCCESS_REDIRECT_URL = "https://iam.%s.cloud.talend.com/idp/login-sso-success"; //$NON-NLS-1$
public static final String ONLINE_HELP_URL = "https://document-link.us.cloud.talend.com/ts_ug_launch-studio?version=%s&lang=%s&env=prd";
public static final String ORG_TALEND_WORKSPACE_PREF_NODE = "org.eclipse.ui.ide"; //$NON-NLS-1$
public static final String ORG_TALEND_RECENT_DATA_CENTERR = "org.talend.recent.datacenter";
public static String getBaseLoginURL(String dataCenter) {
if (dataCenter == null) {
@@ -55,11 +67,29 @@ public class TMCRepositoryUtil {
public static String getDefaultDataCenter() {
String defaultDataCenter = "us";
if (getRecentDataCenter() != null) {
defaultDataCenter = getRecentDataCenter();
}
if (System.getProperty(SSOClientUtil.DATA_CENTER_KEY) != null) {
defaultDataCenter = System.getProperty(SSOClientUtil.DATA_CENTER_KEY);
}
return defaultDataCenter;
}
public static void saveRecentDataCenter(String dataCenter) {
Preferences node = new ConfigurationScope().getNode(ORG_TALEND_WORKSPACE_PREF_NODE);
node.put(ORG_TALEND_RECENT_DATA_CENTERR, dataCenter);
try {
node.flush();
} catch (BackingStoreException e) {
LOGGER.error("failed to store workspace location in preferences :", e); //$NON-NLS-1$
}
}
public static String getRecentDataCenter() {
Preferences node = new ConfigurationScope().getNode(ORG_TALEND_WORKSPACE_PREF_NODE);
return node.get(ORG_TALEND_RECENT_DATA_CENTERR, null);
}
public static String getCloudAdminURL(String dataCenter) {
return String.format(ADMIN_URL, dataCenter);