Browse Source
* finished issue#7527 (#7561) Co-authored-by: 时光 <caizhedong@cai-inc.com> * [Fix-7713] Handling the sensitive data in the log (#7728) * add a feature to handle sensitive data * [cherry-pick-2.0.3]fix-#7740-upgrade_sql #7761 * [cherry-pick-2.0.3][Fix-7203] Remedy the issue about importing a process json file * [cherry-pick-2.0.3][Fix-7857] The user won't be allowed to disable their own account Co-authored-by: 时光 <41109695+yikeshiguang@users.noreply.github.com> Co-authored-by: 时光 <caizhedong@cai-inc.com> Co-authored-by: calvin <jianghuachinacom@163.com> Co-authored-by: uh001 <96870549+uh001@users.noreply.github.com>2.0.7-release
wind
2 years ago
committed by
GitHub
9 changed files with 124 additions and 8 deletions
@ -0,0 +1,42 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You 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. |
||||||
|
*/ |
||||||
|
|
||||||
|
package org.apache.dolphinscheduler.api.aspect; |
||||||
|
|
||||||
|
import org.junit.Assert; |
||||||
|
import org.junit.jupiter.api.Test; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author Hua Jiang |
||||||
|
*/ |
||||||
|
|
||||||
|
public class AccessLogAspectTest { |
||||||
|
|
||||||
|
private AccessLogAspect accessLogAspect = new AccessLogAspect(); |
||||||
|
|
||||||
|
@Test |
||||||
|
public void testHandleSensitiveData() { |
||||||
|
String data = "userPassword='7ad2410b2f4c074479a8937a28a22b8f', email='xxx@qq.com', database='null', userName='root', password='root', other='null'"; |
||||||
|
String expected = "userPassword='********************************', email='xxx@qq.com', database='null', userName='root', password='****', other='null'"; |
||||||
|
|
||||||
|
String actual = accessLogAspect.handleSensitiveData(data); |
||||||
|
|
||||||
|
Assert.assertEquals(expected, actual); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue