Skip to content

Commit

Permalink
[fix] remove some sensitive info (apache#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
caijunhui81 committed Feb 17, 2022
1 parent 62f77b9 commit 2a15312
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 50 deletions.
2 changes: 1 addition & 1 deletion manager/conf/manager.conf
Expand Up @@ -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
Expand Up @@ -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);

}
Expand Down
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion manager/doc/Doris Manager Server 接口文档.md
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions manager/doris-manager/config/webpack.dev.config.js
Expand Up @@ -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",
Expand Down
Expand Up @@ -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端口无法访问,请检查后重新输入";
Expand Down
Expand Up @@ -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地址无法访问,请检查后重新输入";
Expand Down
Expand Up @@ -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端口无法访问,请检查后重新输入";
Expand Down
Expand Up @@ -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 = "用户名/密码错误,请检查后重新输入";
Expand Down
Expand Up @@ -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权限,请更换其他具备权限用户";
Expand Down
Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2a15312

Please sign in to comment.