Skip to content

Commit 1d0b33e

Browse files
authored
Add strong password related configs (#15675)
* Add enforce_strong_password * Refacotr getPasswordChangeTime * remove unused config in CN * fix it * multiple fixes * fix test * fix its * record password history in IoTDB time precision * fix tests * fix IT & error message & minimum password length * fix tests * spotless * fix tests * fix it * fix tests * add debug output * fix test * remove config entrance * fix it * fix test * fix IT * change default password * fix tests * format * fix test * format * Create password history for the first login of an old user. Hint the expiration time after login. * log welcome message in jdbc * fix tests * fix its * fix its * fix tests * fix tests * fix tests * fix tests * spotless * fix tests * spotless * fix tests * fix tests * fix tests * spotless * fix writing redundant password history * fix skipped password history creation * add HashDistributionPolicy for tests * fix test * fix it * fix test * fix test * fix tests * add logs * fix test * Fix message when password is reused shortly * Fix cannot create password history for root * spotless * update default password * fix tests
1 parent ee9d7d1 commit 1d0b33e

290 files changed

Lines changed: 3404 additions & 1496 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ mvn clean package -DskipTests
133133
Mark `iotdb-core/antlr/target/generated-sources/antlr4` and `iotdb-protocol/thrift-datanode/target/generated-sources/thrift` as `Source Root`.
134134

135135
* Server main function:`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode`, can be started in debug mode.
136-
* Cli:`iotdb-client/cli/src/main/java/org/apache/iotdb/cli/`,Use Cli for linux and WinCli for windows, you can start directly with the parameter "`-h 127.0.0.1 -p 6667 -u root -pw root`"
136+
* Cli:`iotdb-client/cli/src/main/java/org/apache/iotdb/cli/`,Use Cli for linux and WinCli for windows, you can start directly with the parameter "`-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011`"
137137
* Server rpc implementation (mainly used for cli and server communication, generally start interruption point here):`iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/TSServiceImpl`
138138
* all jdbc statements:`executeStatement(TSExecuteStatementReq req)`
139139
* jdbc query:`executeQueryStatement(TSExecuteStatementReq req)`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ Users can start 1C1D IoTDB by the start-standalone script under the sbin folder.
334334
335335
IoTDB offers different ways to interact with server, here we introduce the basic steps of using Cli tool to insert and query data.
336336
337-
After installing IoTDB, there is a default user 'root', its default password is also 'root'. Users can use this
337+
After installing IoTDB, there is a default user 'root', its default password is 'IoTDB@2011'. Users can use this
338338
default user to login Cli to use IoTDB. The start-up script of Cli is the start-cli script in the folder sbin. When executing the script, user should assign
339-
IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p 6667 -u root -pw -root".
339+
IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011".
340340
341341
Here is the command for starting the Cli:
342342

README_ZH.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ git checkout rel/x.x
209209
210210
IoTDB提供了与服务器交互的不同方式,这里我们将介绍使用 Cli 工具插入和查询数据的基本步骤。
211211
212-
安装 IoTDB 后,有一个默认的用户`root`,它的默认密码也是`root`。用户可以使用这个
212+
安装 IoTDB 后,有一个默认的用户`root`,它的默认密码是`IoTDB@2011`。用户可以使用这个
213213
默认用户登录 Cli 并使用 IoTDB。Cli 的启动脚本是 sbin 文件夹中的 start-cli 脚本。
214-
在执行脚本时,用户应该指定 IP,端口,USER_NAME 和 密码。默认参数为`-h 127.0.0.1 -p 6667 -u root -pw root`。
214+
在执行脚本时,用户应该指定 IP,端口,USER_NAME 和 密码。默认参数为`-h 127.0.0.1 -p 6667 -u root -pw IoTDB@2011`。
215215
216216
217217
下面是启动 Cli 的命令:

example/client-cpp-example/src/AlignedTimeseriesSessionExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void deleteStorageGroups() {
339339
int main() {
340340
LOG_LEVEL = LEVEL_DEBUG;
341341

342-
session = new Session("127.0.0.1", 6667, "root", "root");
342+
session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
343343

344344
cout << "session open\n" << endl;
345345
session->open(false);

example/client-cpp-example/src/SessionExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void queryLast() {
376376
int main() {
377377
LOG_LEVEL = LEVEL_DEBUG;
378378

379-
session = new Session("127.0.0.1", 6667, "root", "root");
379+
session = new Session("127.0.0.1", 6667, "root", "IoTDB@2011");
380380
session->open(false);
381381

382382
cout << "setStorageGroup: root.sg1\n" << endl;

example/client-cpp-example/src/TableModelSessionExample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int main() {
9999
->host("127.0.0.1")
100100
->rpcPort(6667)
101101
->username("root")
102-
->password("root")
102+
->password("IoTDB@2011")
103103
->build();
104104

105105

@@ -165,7 +165,7 @@ int main() {
165165
->host("127.0.0.1")
166166
->rpcPort(6667)
167167
->username("root")
168-
->password("root")
168+
->password("IoTDB@2011")
169169
->database("db1")
170170
->build();
171171

example/jdbc/src/main/java/org/apache/iotdb/JDBCCharsetExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void main(String[] args) throws Exception {
4141

4242
try (final Connection connection =
4343
DriverManager.getConnection(
44-
"jdbc:iotdb://127.0.0.1:6667?charset=GB18030", "root", "root");
44+
"jdbc:iotdb://127.0.0.1:6667?charset=GB18030", "root", "IoTDB@2011");
4545
final IoTDBStatement statement = (IoTDBStatement) connection.createStatement()) {
4646

4747
final String insertSQLWithGB18030 =
@@ -63,7 +63,7 @@ private static void outputResult(String charset) throws SQLException {
6363
System.out.println("[Charset: " + charset + "]");
6464
try (final Connection connection =
6565
DriverManager.getConnection(
66-
"jdbc:iotdb://127.0.0.1:6667?charset=" + charset, "root", "root");
66+
"jdbc:iotdb://127.0.0.1:6667?charset=" + charset, "root", "IoTDB@2011");
6767
final IoTDBStatement statement = (IoTDBStatement) connection.createStatement()) {
6868
outputResult(statement.executeQuery("select ** from root"), Charset.forName(charset));
6969
} catch (IoTDBSQLException e) {

example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
3939
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
4040
try (Connection connection =
4141
DriverManager.getConnection(
42-
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
42+
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "IoTDB@2011");
4343
Statement statement = connection.createStatement()) {
4444

4545
// set JDBC fetchSize

example/jdbc/src/main/java/org/apache/iotdb/PrepareStatementDemo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class PrepareStatementDemo {
3737
public static void main(String[] args) throws ClassNotFoundException, SQLException {
3838
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
3939
try (Connection connection =
40-
DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
40+
DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "IoTDB@2011");
4141
PreparedStatement preparedStatement =
4242
connection.prepareStatement(
4343
"insert into root.ln.wf01.wt01(timestamp,status,temperature) values(?,?,?)")) {

example/jdbc/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void main(String[] args) throws ClassNotFoundException, SQLExcepti
6969
Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
7070
try (Connection connection =
7171
DriverManager.getConnection(
72-
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "root");
72+
"jdbc:iotdb://127.0.0.1:6667?version=V_1_0", "root", "IoTDB@2011");
7373
Statement statement = connection.createStatement()) {
7474

7575
// set JDBC fetchSize

0 commit comments

Comments
 (0)