Skip to content
Permalink
Browse files
[fix] remove some sensitive info (#3)
  • Loading branch information
caijunhui81 committed Feb 17, 2022
1 parent 62f77b9 commit 2a1531215e7450ecd0ace46abde872bdec98c510
Showing 14 changed files with 15 additions and 50 deletions.
@@ -51,7 +51,7 @@ MB_DB_TYPE=mysql

# The name of the current Doris manage service instance is as follows by default and
# can be customized and modified according to the actual situation
# DS_SITE_NAME=Baidu-Doris-Manager
# DS_SITE_NAME=test-Doris-Manager

# The language of the current Doris manage service instance is Chinese (zh) by default, and can support zh and en
# DS_SITE_LOCALE=zh
@@ -108,7 +108,7 @@ public static RequestConfig timeout() {
}

public static void main(String[] args) {
String rResult = sendGetRequest("http://www.baidu.com", new HashMap<>());
String rResult = sendGetRequest("http://www.test.com", new HashMap<>());
System.out.println(rResult);

}
@@ -37,6 +37,6 @@ public static boolean telnet(String host, int port) {
}

public static void main(String[] args) {
telnet("www.baidu.com", 11111);
telnet("www.test.com", 11111);
}
}
@@ -50,7 +50,7 @@
``` json
{
"clusterId":"1",
"packageUrl":"https://palo-cloud-repo-bd.bd.bcebos.com/baidu-doris-release/PALO-0.15.1-rc03-no-avx2-binary.tar.gz",
"packageUrl":"https://localhost/doris-release/PALO-0.15.1-rc03-no-avx2-binary.tar.gz",
"installDir":"/usr/local/doris",
"hosts":["10.10.10.11"],
"user":"root",
@@ -20,9 +20,9 @@ const path = require("path");
const { merge } = require("webpack-merge");
const { webpack } = require("webpack");

const SERVER_QA = 'http://st01-meg-lijiu02-403.st01.baidu.com:8090';
const SERVER_QA = 'http://127.0.0.1:8090';

const SERVER_RD = 'http://www.baidu.com:8080';
const SERVER_RD = 'http://127.0.0.1:8080';
module.exports = merge(webpackBaseConfig, {
mode: "development",
devtool: "eval-source-map",
@@ -17,13 +17,6 @@

package org.apache.doris.stack.exception;

/**
* Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
*
* @Author: songchuanyuan@baidu.com
* @Description:
* @Date: 2021/10/18
*/
public class DorisHttpPortErrorException extends Exception {

public static final String MESSAGE = "HTTP端口无法访问,请检查后重新输入";
@@ -17,13 +17,6 @@

package org.apache.doris.stack.exception;

/**
* Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
*
* @Author: songchuanyuan@baidu.com
* @Description:
* @Date: 2021/10/18
*/
public class DorisIpErrorException extends Exception {

public static final String MESSAGE = "IP地址无法访问,请检查后重新输入";
@@ -17,13 +17,6 @@

package org.apache.doris.stack.exception;

/**
* Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
*
* @Author: songchuanyuan@baidu.com
* @Description:
* @Date: 2021/10/18
*/
public class DorisJdbcPortErrorException extends Exception {

public static final String MESSAGE = "JDBC端口无法访问,请检查后重新输入";
@@ -17,13 +17,6 @@

package org.apache.doris.stack.exception;

/**
* Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
*
* @Author: songchuanyuan@baidu.com
* @Description:
* @Date: 2021/10/18
*/
public class DorisUerOrPassErrorException extends Exception {

public static final String MESSAGE = "用户名/密码错误,请检查后重新输入";
@@ -17,13 +17,6 @@

package org.apache.doris.stack.exception;

/**
* Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
*
* @Author: songchuanyuan@baidu.com
* @Description:
* @Date: 2021/10/18
*/
public class DorisUserNoPermissionException extends Exception {

public static final String MESSAGE = "用户不具备集群Admin权限,请更换其他具备权限用户";
@@ -205,7 +205,7 @@ public void initSuperUser() {
public void testLogin() throws Exception {
log.debug("test login.");
String passwd = "ewe232";
String userName = "cai@baidu.com";
String userName = "cai@xxx.com";
int userId = 1;
when(environment.getProperty(PropertyDefine.LOGIN_DELAY_TIME_PROPERTY)).thenReturn("300000");
when(environment.getProperty(PropertyDefine.MAX_LOGIN_FAILED_TIMES_PROPERTY)).thenReturn("10");
@@ -696,7 +696,7 @@ public void testResetPassword() throws Exception {
@Transactional
public void testForgetPassword() throws Exception {
log.debug("test forget password.");
String email = "{\"email\":\"sss@baidu.com\"}";
String email = "{\"email\":\"sss@xxx.com\"}";
String hostName = "ss";
when(ldapComponent.enabled()).thenReturn(true);
// ldap user can't be reseted password
@@ -717,7 +717,7 @@ public void testForgetPassword() throws Exception {
Assert.assertEquals(ResetPasswordTokenException.MESSAGE, e.getMessage());
}
// mock user
when(userRepository.getByEmail("sss@baidu.com")).thenReturn(Lists.newArrayList(userEntity));
when(userRepository.getByEmail("sss@xxx.com")).thenReturn(Lists.newArrayList(userEntity));
String resetTokenStr = UuidUtil.newUuid();
// mock reset password token
when(utilService.resetUserToken(userEntity, false)).thenReturn(resetTokenStr);
@@ -311,7 +311,7 @@ public void testAddUser() throws Exception {
int userId = 2;
int defaultGroupId = 3;
int allUserGroupId = 4;
String email = "caijunhui@baidu.com";
String email = "XXX@aa.com";
UserAddReq userAddReq = new UserAddReq();
when(ldapComponent.enabled()).thenReturn(true);
// request exception
@@ -434,7 +434,7 @@ public void testAddUser() throws Exception {
public void testUpdateUser() throws Exception {
log.debug("test update user.");
String name = "name";
String email = "caijunhui@baidu.com";
String email = "XXX@aa.com";
int userId = 1;
int requestId = 2;
int groupId = 3;
@@ -680,7 +680,7 @@ public void testSendInvite() throws Exception {
invitor.setId(requestId);
CoreUserEntity user = new CoreUserEntity();
user.setId(userId);
user.setEmail("9943094@baidu.com");
user.setEmail("9943094@xxx.com");
user.setFirstName("first");
// mock Invitor
when(userRepository.findById(requestId)).thenReturn(Optional.of(invitor));
@@ -45,7 +45,7 @@ private ApiInfo apiInfo() {
// title
.title("Doris-Manager server RESTful API")
// Creator
.contact(new Contact("songchuanyuan", " ", "songchuanyuan@baidu.com"))
.contact(new Contact("test", " ", "test@xxx.com"))
// version
.version("0.2")
// description
@@ -165,7 +165,7 @@ public void createStudioUserSpaceTest() {
String clusterName = "doris1";
createReq.setName(clusterName);
UserSpaceCreateReq.UserAdminInfo userAdminInfo = new UserSpaceCreateReq.UserAdminInfo();
userAdminInfo.setEmail("test@baidu.com");
userAdminInfo.setEmail("test@xxx.com");
userAdminInfo.setName("test");
userAdminInfo.setPassword("test@123");
createReq.setUser(userAdminInfo);
@@ -309,7 +309,7 @@ public void createLdapUserSpaceTest() {
String clusterName = "doris1";
createReq.setName(clusterName);
UserSpaceCreateReq.UserAdminInfo userAdminInfo = new UserSpaceCreateReq.UserAdminInfo();
userAdminInfo.setEmail("test@baidu.com");
userAdminInfo.setEmail("test@xxx.com");
createReq.setUser(userAdminInfo);

// After initialization, use LDAP authentication

0 comments on commit 2a15312

Please sign in to comment.