-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ssl support for graph daemon (#364)
- Loading branch information
Klay
authored
Oct 13, 2021
1 parent
a19546e
commit 34626a7
Showing
35 changed files
with
1,214 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Copyright (c) 2021 vesoft inc. All rights reserved. | ||
* | ||
* This source code is licensed under Apache 2.0 License, | ||
* attached with Common Clause Condition 1.0, found in the LICENSES directory. | ||
*/ | ||
|
||
package com.vesoft.nebula.client.graph.data; | ||
|
||
public class CASignedSSLParam extends SSLParam { | ||
private String caCrtFilePath; | ||
private String crtFilePath; | ||
private String keyFilePath; | ||
|
||
public CASignedSSLParam(String caCrtFilePath, String crtFilePath, String keyFilePath) { | ||
super(SignMode.CA_SIGNED); | ||
this.caCrtFilePath = caCrtFilePath; | ||
this.crtFilePath = crtFilePath; | ||
this.keyFilePath = keyFilePath; | ||
} | ||
|
||
public String getCaCrtFilePath() { | ||
return caCrtFilePath; | ||
} | ||
|
||
public String getCrtFilePath() { | ||
return crtFilePath; | ||
} | ||
|
||
public String getKeyFilePath() { | ||
return keyFilePath; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Copyright (c) 2021 vesoft inc. All rights reserved. | ||
* | ||
* This source code is licensed under Apache 2.0 License, | ||
* attached with Common Clause Condition 1.0, found in the LICENSES directory. | ||
*/ | ||
|
||
package com.vesoft.nebula.client.graph.data; | ||
|
||
public abstract class SSLParam { | ||
public enum SignMode { | ||
NONE, | ||
SELF_SIGNED, | ||
CA_SIGNED | ||
} | ||
|
||
private SignMode signMode; | ||
|
||
public SSLParam(SignMode signMode) { | ||
this.signMode = signMode; | ||
} | ||
|
||
public SignMode getSignMode() { | ||
return signMode; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Copyright (c) 2021 vesoft inc. All rights reserved. | ||
* | ||
* This source code is licensed under Apache 2.0 License, | ||
* attached with Common Clause Condition 1.0, found in the LICENSES directory. | ||
*/ | ||
|
||
package com.vesoft.nebula.client.graph.data; | ||
|
||
public class SelfSignedSSLParam extends SSLParam { | ||
private String crtFilePath; | ||
private String keyFilePath; | ||
private String password; | ||
|
||
public SelfSignedSSLParam(String crtFilePath, String keyFilePath, String password) { | ||
super(SignMode.SELF_SIGNED); | ||
this.crtFilePath = crtFilePath; | ||
this.keyFilePath = keyFilePath; | ||
this.password = password; | ||
} | ||
|
||
public String getCrtFilePath() { | ||
return crtFilePath; | ||
} | ||
|
||
public String getKeyFilePath() { | ||
return keyFilePath; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.