-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev 0.9.1 #284
Dev 0.9.1 #284
Conversation
thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pay attention to security compliance, hide IP, password, etc
@@ -17,11 +17,11 @@ | |||
|
|||
wds.linkis.test.mode=true | |||
|
|||
wds.linkis.server.mybatis.datasource.url=jdbc:mysql://127.0.0.1:3306/ | |||
wds.linkis.server.mybatis.datasource.url=jdbc:mysql://192.168.10.180:3306/dss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hide IP, password, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your cubmits.
Some suggestions for modification are pended. The biggest problem is the design of Command and AbsComand. I feel that the interface in Command is not universal.
//增加是否超级用户表示 0-不是超级用户 1-是超级用户 | ||
private int isSuperUser = 0; | ||
|
||
public int getIsSuperUser() { | ||
return isSuperUser; | ||
} | ||
public void setIsSuperUser(int isSuperUser) { | ||
this.isSuperUser = isSuperUser; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the code style, isSupperUser should use Boolean
public static void main(String[] args) throws Exception { | ||
// System.out.println(redirectUrlFormat("http://127.0..0.1:8090/qualitis/api/v1/redirect","http://127.0..0.1:8090/#/projects/list?id={projectId}&flow=true")); | ||
|
||
WorkSpacePath workSpacePath = new WorkSpacePath(); | ||
workSpacePath.setWorkspaceRootPath("/"); | ||
System.out.println(convertToMap(workSpacePath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should remove test code
@@ -25,6 +25,15 @@ | |||
private String username; | |||
private String name; | |||
private Boolean isFirstLogin; | |||
//增加是否超级用户表示 0-不是超级用户 1-是超级用户 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment need use English
//是否超级用户登录 | ||
if(username.equals(superUserName)){ | ||
dssUser.setIsSuperUser(1); | ||
}else{ | ||
dssUser.setIsSuperUser(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using magic values, use Boolean can avoid it
LOGGER.info("开始读取用户token文件"); | ||
Properties properties = new Properties(); | ||
try { | ||
properties.load(AzkabanSecurityService.class.getClassLoader().getResourceAsStream(AzkabanConstant.TOKEN_FILE_NAME)); | ||
userToken = properties; | ||
} catch (IOException e) { | ||
LOGGER.error("读取文件失败:",e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't print the Chinese log only, but can only print the English log.
String path = DSSUserManagerConfig.METASTORE_HDFS_PATH + "/"+dbName+".db"; | ||
bashCommand = getResource(DSSUserManagerConfig.METASTORE_SCRIPT_PAHT); | ||
args = new String[]{ userName,dbName,path, | ||
DSSUserManagerConfig.KERBEROS_REALM,DSSUserManagerConfig.KERBEROS_ADMIN,DSSUserManagerConfig.KERBEROS_KEYTAB_PATH,DSSUserManagerConfig.KEBBEROS_ENABLE_SWITCH}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if cluster not open kerberos, maybe this code cann't running, please check it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have used parameters: DSSUserManagerConfig.KERBEROS_ ENABLE_ Switch controls it
RestTemplate restTemplate = new RestTemplate(); | ||
String schedulisUrl = DSSUserManagerConfig.SCHEDULER_ADDRESS; | ||
String url = new StringBuilder().append(schedulisUrl) | ||
.append("/luban/schedule/system") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this url suggest to modify, make the url configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. It has been revised
@@ -0,0 +1,39 @@ | |||
package com.webank.wedatasphpere.dss.user.conf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all user-manager model file need to add License.
/*
- Copyright 2019 WeBank
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*/
@Override | ||
public String authorization(AuthorizationBody body) throws IOException,DocumentException, Exception { return Command.SUCCESS; } | ||
public String toMessage(String msg) { | ||
return this.getClass().getSimpleName() + "模块开始执行:"+ msg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace Chinese by English
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. It has been revised
@@ -28,4 +28,6 @@ | |||
public static final String EMVEDDEDFLOWID = "\"embeddedFlowId\":"; | |||
public static final String VERSION_FORMAT = "%06d"; | |||
public static final String VERSION_PREFIX = "v"; | |||
public static final String SUPER_USER_LOGIN_ERROR = "没有创建权限,请使用超级用户登录"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please replace Chinese by English
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
Stream close
Version 0.9.1 code, to achieve user to create modules