-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-18620: Add authentication protocol data (#1385)
* CORE-18620: Add authentication protocol data * Add more common fields * Add specific revocation mode enum * Rename header to common details * Rename field * Set the version to the correct version
- Loading branch information
Showing
11 changed files
with
370 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ources/avro/net/corda/data/p2p/crypto/protocol/AuthenticatedEncryptionSessionDetails.avsc
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,23 @@ | ||
{ | ||
"type": "record", | ||
"name": "AuthenticatedEncryptionSessionDetails", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "outboundSecretKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "outboundNonce", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"name": "inboundSecretKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "inboundNonce", | ||
"type": "bytes" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
...c/main/resources/avro/net/corda/data/p2p/crypto/protocol/AuthenticatedSessionDetails.avsc
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,15 @@ | ||
{ | ||
"type": "record", | ||
"name": "AuthenticatedSessionDetails", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "outboundSecretKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "inboundSecretKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
} | ||
] | ||
} |
106 changes: 106 additions & 0 deletions
106
...esources/avro/net/corda/data/p2p/crypto/protocol/AuthenticationProtocolCommonDetails.avsc
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,106 @@ | ||
{ | ||
"type": "record", | ||
"name": "AuthenticationProtocolCommonDetails", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "sessionId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "ourMaxMessageSize", | ||
"type": "int" | ||
}, | ||
{ | ||
"name": "session", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.protocol.Session" | ||
] | ||
}, | ||
{ | ||
"name": "myPrivateDHKey", | ||
"type": [ | ||
"null", | ||
"string" | ||
] | ||
}, | ||
{ | ||
"name": "myPublicDHKey", | ||
"type": [ | ||
"null", | ||
"bytes" | ||
] | ||
}, | ||
{ | ||
"name": "peerPublicDHKey", | ||
"type": [ | ||
"null", | ||
"string" | ||
] | ||
}, | ||
{ | ||
"name": "sharedDHSecret", | ||
"type": [ | ||
"null", | ||
"bytes" | ||
] | ||
}, | ||
{ | ||
"name": "selectedMode", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.ProtocolMode" | ||
] | ||
}, | ||
{ | ||
"name": "sharedHandshakeSecrets", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.protocol.SharedHandshakeSecrets" | ||
] | ||
}, | ||
{ | ||
"name": "initiatorHelloMessage", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.InitiatorHelloMessage" | ||
] | ||
}, | ||
{ | ||
"name": "responderHelloMessage", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.ResponderHelloMessage" | ||
] | ||
}, | ||
{ | ||
"name": "initiatorHelloToResponderHelloBytes", | ||
"type": [ | ||
"null", | ||
"bytes" | ||
] | ||
}, | ||
{ | ||
"name": "initiatorHandshakePayloadBytes", | ||
"type": [ | ||
"null", | ||
"bytes" | ||
] | ||
}, | ||
{ | ||
"name": "responderHandshakePayloadBytes", | ||
"type": [ | ||
"null", | ||
"bytes" | ||
] | ||
}, | ||
{ | ||
"name": "agreedMaxMessageSize", | ||
"type": [ | ||
"null", | ||
"int" | ||
] | ||
} | ||
] | ||
} |
56 changes: 56 additions & 0 deletions
56
...urces/avro/net/corda/data/p2p/crypto/protocol/AuthenticationProtocolInitiatorDetails.avsc
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,56 @@ | ||
{ | ||
"type": "record", | ||
"name": "AuthenticationProtocolInitiatorDetails", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "protocolCommonDetails", | ||
"type": "net.corda.data.p2p.crypto.protocol.AuthenticationProtocolCommonDetails" | ||
}, | ||
{ | ||
"name": "step", | ||
"type": { | ||
"type": "enum", | ||
"name": "InitiatorStep", | ||
"symbols" : [ | ||
"INIT", | ||
"SENT_MY_DH_KEY", | ||
"RECEIVED_PEER_DH_KEY", | ||
"GENERATED_HANDSHAKE_SECRETS", | ||
"SENT_HANDSHAKE_MESSAGE", | ||
"RECEIVED_HANDSHAKE_MESSAGE", | ||
"SESSION_ESTABLISHED" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "supportedModes", | ||
"type": { | ||
"type": "array", | ||
"items": "net.corda.data.p2p.crypto.ProtocolMode" | ||
} | ||
}, | ||
{ | ||
"name": "ourPublicKey", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "groupId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "certificateCheckMode", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.protocol.CheckCertificate" | ||
] | ||
}, | ||
{ | ||
"name": "initiatorHandshakeMessage", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.InitiatorHandshakeMessage" | ||
] | ||
} | ||
] | ||
} |
56 changes: 56 additions & 0 deletions
56
...urces/avro/net/corda/data/p2p/crypto/protocol/AuthenticationProtocolResponderDetails.avsc
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,56 @@ | ||
{ | ||
"type": "record", | ||
"name": "AuthenticationProtocolResponderDetails", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "protocolCommonDetails", | ||
"type": "net.corda.data.p2p.crypto.protocol.AuthenticationProtocolCommonDetails" | ||
}, | ||
{ | ||
"name": "step", | ||
"type": { | ||
"type": "enum", | ||
"name": "ResponderStep", | ||
"symbols" : [ | ||
"INIT", | ||
"RECEIVED_PEER_DH_KEY", | ||
"SENT_MY_DH_KEY", | ||
"GENERATED_HANDSHAKE_SECRETS", | ||
"RECEIVED_HANDSHAKE_MESSAGE", | ||
"VALIDATED_ENCRYPTED_EXTENSIONS", | ||
"SENT_HANDSHAKE_MESSAGE", | ||
"SESSION_ESTABLISHED" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "handshakeIdentityData", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.protocol.HandshakeIdentityData" | ||
] | ||
}, | ||
{ | ||
"name": "responderHandshakeMessage", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.ResponderHandshakeMessage" | ||
] | ||
}, | ||
{ | ||
"name": "encryptedExtensions", | ||
"type": [ | ||
"null", | ||
"net.corda.data.p2p.crypto.internal.InitiatorEncryptedExtensions" | ||
] | ||
}, | ||
{ | ||
"name": "initiatorPublicKey", | ||
"type": [ | ||
"null", | ||
"string" | ||
] | ||
} | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
...o-schema/src/main/resources/avro/net/corda/data/p2p/crypto/protocol/CheckCertificate.avsc
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,26 @@ | ||
{ | ||
"type": "record", | ||
"name": "CheckCertificate", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "truststore", | ||
"type": { | ||
"type": "array", | ||
"items": "string" | ||
} | ||
}, | ||
{ | ||
"name": "revocationCheckMode", | ||
"type": { | ||
"type": "enum", | ||
"name": "RevocationCheckMode", | ||
"symbols" : [ | ||
"OFF", | ||
"SOFT_FAIL", | ||
"HARD_FAIL" | ||
] | ||
} | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
...ema/src/main/resources/avro/net/corda/data/p2p/crypto/protocol/HandshakeIdentityData.avsc
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,19 @@ | ||
{ | ||
"type": "record", | ||
"name": "HandshakeIdentityData", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "initiatorPublicKeyHash", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"name": "responderPublicKeyHash", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"name": "groupId", | ||
"type": "string" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
...avro-schema/src/main/resources/avro/net/corda/data/p2p/crypto/protocol/SecretKeySpec.avsc
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,15 @@ | ||
{ | ||
"type": "record", | ||
"name": "SecretKeySpec", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "algorithm", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "key", | ||
"type": "bytes" | ||
} | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
data/avro-schema/src/main/resources/avro/net/corda/data/p2p/crypto/protocol/Session.avsc
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,22 @@ | ||
{ | ||
"type": "record", | ||
"name": "Session", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "sessionId", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "maxMessageSize", | ||
"type": "int" | ||
}, | ||
{ | ||
"name": "details", | ||
"type": [ | ||
"net.corda.data.p2p.crypto.protocol.AuthenticatedSessionDetails", | ||
"net.corda.data.p2p.crypto.protocol.AuthenticatedEncryptionSessionDetails" | ||
] | ||
} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
...ma/src/main/resources/avro/net/corda/data/p2p/crypto/protocol/SharedHandshakeSecrets.avsc
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,31 @@ | ||
{ | ||
"type": "record", | ||
"name": "SharedHandshakeSecrets", | ||
"namespace": "net.corda.data.p2p.crypto.protocol", | ||
"fields": [ | ||
{ | ||
"name": "initiatorAuthKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "responderAuthKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "initiatorEncryptionKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "responderEncryptionKey", | ||
"type": "net.corda.data.p2p.crypto.protocol.SecretKeySpec" | ||
}, | ||
{ | ||
"name": "initiatorNonce", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"name": "responderNonce", | ||
"type": "bytes" | ||
} | ||
] | ||
} |
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