Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3400384
D7671.id25859.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
13 KB
Referenced Files
None
Subscribers
None
D7671.id25859.diff
View Options
diff --git a/keyserver/addons/rust-node-addon/src/identity_client/mod.rs b/keyserver/addons/rust-node-addon/src/identity_client/mod.rs
--- a/keyserver/addons/rust-node-addon/src/identity_client/mod.rs
+++ b/keyserver/addons/rust-node-addon/src/identity_client/mod.rs
@@ -5,7 +5,7 @@
use identity_client::identity_client_service_client::IdentityClientServiceClient;
use identity_client::{
- DeviceKeyUpload, IdentityKeyInfo, RegistrationFinishRequest,
+ ContentKeyInfo, DeviceKeyUpload, RegistrationFinishRequest,
RegistrationStartRequest,
};
use lazy_static::lazy_static;
diff --git a/keyserver/addons/rust-node-addon/src/identity_client/register_user.rs b/keyserver/addons/rust-node-addon/src/identity_client/register_user.rs
--- a/keyserver/addons/rust-node-addon/src/identity_client/register_user.rs
+++ b/keyserver/addons/rust-node-addon/src/identity_client/register_user.rs
@@ -27,12 +27,12 @@
.start(&password)
.map_err(|_| Error::from_status(Status::GenericFailure))?;
let device_key_upload = DeviceKeyUpload {
- device_key_info: Some(IdentityKeyInfo {
+ device_key_info: Some(ContentKeyInfo {
payload: signed_identity_keys_blob.payload,
payload_signature: signed_identity_keys_blob.signature,
social_proof: None,
}),
- identity_upload: Some(identity_client::PreKey {
+ content_upload: Some(identity_client::PreKey {
pre_key: String::new(),
pre_key_signature: String::new(),
}),
@@ -40,7 +40,7 @@
pre_key: String::new(),
pre_key_signature: String::new(),
}),
- onetime_identity_prekeys: Vec::new(),
+ onetime_content_prekeys: Vec::new(),
onetime_notif_prekeys: Vec::new(),
};
let registration_start_request = Request::new(RegistrationStartRequest {
diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs
--- a/services/identity/src/client_service.rs
+++ b/services/identity/src/client_service.rs
@@ -66,9 +66,9 @@
pub device_id_key: String,
pub key_payload: String,
pub key_payload_signature: String,
- pub identity_prekey: String,
- pub identity_prekey_signature: String,
- pub identity_onetime_keys: Vec<String>,
+ pub content_prekey: String,
+ pub content_prekey_signature: String,
+ pub content_onetime_keys: Vec<String>,
pub notif_prekey: String,
pub notif_prekey_signature: String,
pub notif_onetime_keys: Vec<String>,
@@ -107,22 +107,22 @@
device_key_upload:
Some(client_proto::DeviceKeyUpload {
device_key_info:
- Some(client_proto::IdentityKeyInfo {
+ Some(client_proto::ContentKeyInfo {
payload,
payload_signature,
social_proof: _social_proof,
}),
- identity_upload:
+ content_upload:
Some(client_proto::PreKey {
- pre_key: identity_prekey,
- pre_key_signature: identity_prekey_signature,
+ pre_key: content_prekey,
+ pre_key_signature: content_prekey_signature,
}),
notif_upload:
Some(client_proto::PreKey {
pre_key: notif_prekey,
pre_key_signature: notif_prekey_signature,
}),
- onetime_identity_prekeys,
+ onetime_content_prekeys,
onetime_notif_prekeys,
}),
} = message
@@ -139,9 +139,9 @@
device_id_key: key_info.primary_identity_public_keys.ed25519,
key_payload: payload,
key_payload_signature: payload_signature,
- identity_prekey,
- identity_prekey_signature,
- identity_onetime_keys: onetime_identity_prekeys,
+ content_prekey,
+ content_prekey_signature,
+ content_onetime_keys: onetime_content_prekeys,
notif_prekey,
notif_prekey_signature,
notif_onetime_keys: onetime_notif_prekeys,
@@ -314,22 +314,22 @@
device_key_upload:
Some(client_proto::DeviceKeyUpload {
device_key_info:
- Some(client_proto::IdentityKeyInfo {
+ Some(client_proto::ContentKeyInfo {
payload,
payload_signature,
social_proof: _social_proof,
}),
- identity_upload:
+ content_upload:
Some(client_proto::PreKey {
- pre_key: identity_prekey,
- pre_key_signature: identity_prekey_signature,
+ pre_key: content_prekey,
+ pre_key_signature: content_prekey_signature,
}),
notif_upload:
Some(client_proto::PreKey {
pre_key: notif_prekey,
pre_key_signature: notif_prekey_signature,
}),
- onetime_identity_prekeys,
+ onetime_content_prekeys,
onetime_notif_prekeys,
}),
} = message
@@ -353,9 +353,9 @@
device_id_key: key_info.primary_identity_public_keys.ed25519,
key_payload: payload,
key_payload_signature: payload_signature,
- identity_prekey,
- identity_prekey_signature,
- identity_onetime_keys: onetime_identity_prekeys,
+ content_prekey,
+ content_prekey_signature,
+ content_onetime_keys: onetime_content_prekeys,
notif_prekey,
notif_prekey_signature,
notif_onetime_keys: onetime_notif_prekeys,
@@ -446,22 +446,22 @@
device_key_upload:
Some(client_proto::DeviceKeyUpload {
device_key_info:
- Some(client_proto::IdentityKeyInfo {
+ Some(client_proto::ContentKeyInfo {
payload,
payload_signature,
social_proof: Some(social_proof),
}),
- identity_upload:
+ content_upload:
Some(client_proto::PreKey {
- pre_key: identity_prekey,
- pre_key_signature: identity_prekey_signature,
+ pre_key: content_prekey,
+ pre_key_signature: content_prekey_signature,
}),
notif_upload:
Some(client_proto::PreKey {
pre_key: notif_prekey,
pre_key_signature: notif_prekey_signature,
}),
- onetime_identity_prekeys,
+ onetime_content_prekeys,
onetime_notif_prekeys,
}),
} = message
@@ -473,9 +473,9 @@
device_id_key: key_info.primary_identity_public_keys.ed25519,
key_payload: payload,
key_payload_signature: payload_signature,
- identity_prekey,
- identity_prekey_signature,
- identity_onetime_keys: onetime_identity_prekeys,
+ content_prekey,
+ content_prekey_signature,
+ content_onetime_keys: onetime_content_prekeys,
notif_prekey,
notif_prekey_signature,
notif_onetime_keys: onetime_notif_prekeys,
diff --git a/services/identity/src/constants.rs b/services/identity/src/constants.rs
--- a/services/identity/src/constants.rs
+++ b/services/identity/src/constants.rs
@@ -54,9 +54,9 @@
"keyPayload";
pub const USERS_TABLE_DEVICES_MAP_KEY_PAYLOAD_SIGNATURE_ATTRIBUTE_NAME: &str =
"keyPayloadSignature";
-pub const USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_ATTRIBUTE_NAME: &str =
+pub const USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_ATTRIBUTE_NAME: &str =
"identityPreKey";
-pub const USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_SIGNATURE_ATTRIBUTE_NAME:
+pub const USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_SIGNATURE_ATTRIBUTE_NAME:
&str = "identityPreKeySignature";
pub const USERS_TABLE_DEVICES_MAP_IDENTITY_ONETIME_KEYS_ATTRIBUTE_NAME: &str =
"identityOneTimeKeys";
diff --git a/services/identity/src/database.rs b/services/identity/src/database.rs
--- a/services/identity/src/database.rs
+++ b/services/identity/src/database.rs
@@ -24,10 +24,10 @@
ACCESS_TOKEN_TABLE_VALID_ATTRIBUTE, NONCE_TABLE,
NONCE_TABLE_CREATED_ATTRIBUTE, NONCE_TABLE_PARTITION_KEY, USERS_TABLE,
USERS_TABLE_DEVICES_ATTRIBUTE,
+ USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_ATTRIBUTE_NAME,
+ USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_SIGNATURE_ATTRIBUTE_NAME,
USERS_TABLE_DEVICES_MAP_DEVICE_TYPE_ATTRIBUTE_NAME,
USERS_TABLE_DEVICES_MAP_IDENTITY_ONETIME_KEYS_ATTRIBUTE_NAME,
- USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_ATTRIBUTE_NAME,
- USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_SIGNATURE_ATTRIBUTE_NAME,
USERS_TABLE_DEVICES_MAP_KEY_PAYLOAD_ATTRIBUTE_NAME,
USERS_TABLE_DEVICES_MAP_KEY_PAYLOAD_SIGNATURE_ATTRIBUTE_NAME,
USERS_TABLE_DEVICES_MAP_NOTIF_ONETIME_KEYS_ATTRIBUTE_NAME,
@@ -820,19 +820,19 @@
AttributeValue::S(flattened_device_key_upload.key_payload_signature),
),
(
- USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_ATTRIBUTE_NAME.to_string(),
- AttributeValue::S(flattened_device_key_upload.identity_prekey),
+ USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_ATTRIBUTE_NAME.to_string(),
+ AttributeValue::S(flattened_device_key_upload.content_prekey),
),
(
- USERS_TABLE_DEVICES_MAP_IDENTITY_PREKEY_SIGNATURE_ATTRIBUTE_NAME
+ USERS_TABLE_DEVICES_MAP_CONTENT_PREKEY_SIGNATURE_ATTRIBUTE_NAME
.to_string(),
- AttributeValue::S(flattened_device_key_upload.identity_prekey_signature),
+ AttributeValue::S(flattened_device_key_upload.content_prekey_signature),
),
(
USERS_TABLE_DEVICES_MAP_IDENTITY_ONETIME_KEYS_ATTRIBUTE_NAME.to_string(),
AttributeValue::L(
flattened_device_key_upload
- .identity_onetime_keys
+ .content_onetime_keys
.into_iter()
.map(AttributeValue::S)
.collect(),
diff --git a/shared/protos/identity_client.proto b/shared/protos/identity_client.proto
--- a/shared/protos/identity_client.proto
+++ b/shared/protos/identity_client.proto
@@ -39,13 +39,13 @@
// Called by clients to get all device keys associated with a user in order
// to open a new channel of communication on any of their devices.
// Specially, this will return the following per device:
- // - Identity keys
+ // - Content keys
// - PreKey (including preKey signature)
// - One-time PreKey
rpc GetOutboundKeysForUser(OutboundKeysForUserRequest) returns
(OutboundKeysForUserResponse) {}
// Called by receivers of a communication request. The reponse will only
- // return identity and prekeys per device, but will not contain one-time keys.
+ // return content and prekeys per device, but will not contain one-time keys.
rpc GetInboundKeysForUser(InboundKeysForUserRequest) returns
(InboundKeysForUserResponse) {}
// Called by clients to get required keys for opening a connection
@@ -75,15 +75,15 @@
}
// Key information needed for starting a X3DH session
-message IdentityKeyInfo {
- // JSON payload containing Olm Identity keys
- // Sessions for users will contain both IdentityKeys and NotifKeys
- // For keyservers, this will only contain IdentityKeys
+message ContentKeyInfo {
+ // JSON payload containing Olm Content keys
+ // Sessions for users will contain both ContentKeys and NotifKeys
+ // For keyservers, this will only contain ContentKeys
string payload = 1;
// Payload signed with the signing ed25519 key
string payloadSignature = 2;
// Signed message used for SIWE
- // This correlates a given wallet with the identity of a device
+ // This correlates a given wallet with the content of a device
optional string socialProof = 3;
}
@@ -98,10 +98,10 @@
// Bundle of information needed for creating an initial message using X3DH
message DeviceKeyUpload {
- IdentityKeyInfo deviceKeyInfo = 1;
- PreKey identityUpload = 2;
+ ContentKeyInfo deviceKeyInfo = 1;
+ PreKey contentUpload = 2;
PreKey notifUpload = 3;
- repeated string onetimeIdentityPrekeys = 4;
+ repeated string onetimeContentPrekeys = 4;
repeated string onetimeNotifPrekeys = 5;
}
@@ -114,7 +114,7 @@
DeviceKeyUpload deviceKeyUpload = 3;
}
-// Messages sent from a client to Identity Service
+// Messages sent from a client to Content Service
message RegistrationFinishRequest {
// Identifier to correlate RegisterStart session
string sessionID = 1;
@@ -122,7 +122,7 @@
bytes opaqueRegistrationUpload = 2;
}
-// Messages sent from Identity Service to client
+// Messages sent from Content Service to client
message RegistrationStartResponse {
// Identifier used to correlate start request with finish request
string sessionID = 1;
@@ -234,16 +234,16 @@
// Information needed when establishing communication to someone else's device
message OutboundKeyInfo {
- IdentityKeyInfo identityInfo = 1;
- PreKey identityPrekey = 2;
+ ContentKeyInfo contentInfo = 1;
+ PreKey contentPrekey = 2;
PreKey notifPrekey = 3;
- optional string onetimeIdentityPrekey = 4;
+ optional string onetimeContentPrekey = 4;
optional string onetimeNotifPrekey = 5;
}
// Information needed by a device to establish communcation when responding
// to a request.
-// The device receiving a request only needs the identity and prekeys.
+// The device receiving a request only needs the content and prekeys.
message OutboundKeysForUserRequest {
oneof identifier {
string username = 1;
@@ -259,8 +259,8 @@
// GetInboundKeysForUser
message InboundKeyInfo {
- IdentityKeyInfo identityInfo = 1;
- PreKey identityPrekey = 2;
+ ContentKeyInfo contentInfo = 1;
+ PreKey contentPrekey = 2;
PreKey notifPrekey = 3;
}
@@ -280,9 +280,9 @@
// Information needed when establishing communication to a keyserver
message KeyserverSessionInfo {
- IdentityKeyInfo identityInfo = 1;
- PreKey identityPrekeys = 2;
- optional string onetimeIdentityPrekey = 3;
+ ContentKeyInfo contentInfo = 1;
+ PreKey contentPrekeys = 2;
+ optional string onetimeContentPrekey = 3;
}
// All keyserver must be registered with an existing user.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 7:13 AM (20 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610763
Default Alt Text
D7671.id25859.diff (13 KB)
Attached To
Mode
D7671: [Identity] Use content to describe main olm account
Attached
Detach File
Event Timeline
Log In to Comment