Page MenuHomePhabricator

D11549.diff
No OneTemporary

D11549.diff

diff --git a/keyserver/addons/rust-node-addon/src/identity_client/get_inbound_keys_for_user.rs b/keyserver/addons/rust-node-addon/src/identity_client/get_inbound_keys_for_user.rs
--- a/keyserver/addons/rust-node-addon/src/identity_client/get_inbound_keys_for_user.rs
+++ b/keyserver/addons/rust-node-addon/src/identity_client/get_inbound_keys_for_user.rs
@@ -43,7 +43,6 @@
let inbound_key_info_response = InboundKeyInfoResponse {
payload: device_inbound_key_info.payload,
payload_signature: device_inbound_key_info.payload_signature,
- social_proof: device_inbound_key_info.social_proof,
content_prekey: device_inbound_key_info.content_prekey,
content_prekey_signature: device_inbound_key_info.content_prekey_signature,
notif_prekey: device_inbound_key_info.notif_prekey,
diff --git a/keyserver/addons/rust-node-addon/src/identity_client/login.rs b/keyserver/addons/rust-node-addon/src/identity_client/login.rs
--- a/keyserver/addons/rust-node-addon/src/identity_client/login.rs
+++ b/keyserver/addons/rust-node-addon/src/identity_client/login.rs
@@ -36,7 +36,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: signed_identity_keys_blob.payload,
payload_signature: signed_identity_keys_blob.signature,
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: content_prekey,
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
@@ -141,7 +141,6 @@
pub struct DeviceInboundKeyInfo {
pub payload: String,
pub payload_signature: String,
- pub social_proof: Option<String>,
pub content_prekey: String,
pub content_prekey_signature: String,
pub notif_prekey: String,
@@ -159,7 +158,6 @@
let IdentityKeyInfo {
payload,
payload_signature,
- social_proof,
} = identity_info;
let content_prekey = key_info
@@ -183,7 +181,6 @@
Ok(Self {
payload,
payload_signature,
- social_proof,
content_prekey: content_prekey_value,
content_prekey_signature,
notif_prekey: notif_prekey_value,
@@ -196,7 +193,6 @@
pub struct InboundKeyInfoResponse {
pub payload: String,
pub payload_signature: String,
- pub social_proof: Option<String>,
pub content_prekey: String,
pub content_prekey_signature: String,
pub notif_prekey: String,
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
@@ -29,7 +29,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: signed_identity_keys_blob.payload,
payload_signature: signed_identity_keys_blob.signature,
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: content_prekey,
diff --git a/lib/types/identity-service-types.js b/lib/types/identity-service-types.js
--- a/lib/types/identity-service-types.js
+++ b/lib/types/identity-service-types.js
@@ -29,7 +29,6 @@
export type OutboundKeyInfoResponse = {
+payload: string,
+payloadSignature: string,
- +socialProof: ?string,
+contentPrekey: string,
+contentPrekeySignature: string,
+notifPrekey: string,
@@ -43,7 +42,6 @@
export type InboundKeyInfoResponse = {
+payload: string,
+payloadSignature: string,
- +socialProof?: ?string,
+contentPrekey: string,
+contentPrekeySignature: string,
+notifPrekey: string,
@@ -57,7 +55,6 @@
+contentInitializationInfo: OlmSessionInitializationInfo,
+notifInitializationInfo: OlmSessionInitializationInfo,
+payloadSignature: string,
- +socialProof: ?string,
};
export const deviceOlmOutboundKeysValidator: TInterface<DeviceOlmOutboundKeys> =
tShape<DeviceOlmOutboundKeys>({
@@ -65,7 +62,6 @@
contentInitializationInfo: olmSessionInitializationInfoValidator,
notifInitializationInfo: olmSessionInitializationInfoValidator,
payloadSignature: t.String,
- socialProof: t.maybe(t.String),
});
export type UserDevicesOlmOutboundKeys = {
diff --git a/native/native_rust_library/src/identity/login.rs b/native/native_rust_library/src/identity/login.rs
--- a/native/native_rust_library/src/identity/login.rs
+++ b/native/native_rust_library/src/identity/login.rs
@@ -97,7 +97,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: key_payload,
payload_signature: key_payload_signature,
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: content_prekey,
@@ -151,7 +150,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: password_user_info.key_payload,
payload_signature: password_user_info.key_payload_signature,
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: password_user_info.content_prekey,
@@ -209,7 +207,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: wallet_user_info.key_payload,
payload_signature: wallet_user_info.key_payload_signature,
- social_proof: None, // The SIWE message and signature are the social proof
}),
content_upload: Some(Prekey {
prekey: wallet_user_info.content_prekey,
diff --git a/native/native_rust_library/src/identity/registration.rs b/native/native_rust_library/src/identity/registration.rs
--- a/native/native_rust_library/src/identity/registration.rs
+++ b/native/native_rust_library/src/identity/registration.rs
@@ -103,7 +103,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: password_user_info.key_payload,
payload_signature: password_user_info.key_payload_signature,
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: password_user_info.content_prekey,
@@ -163,7 +162,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: wallet_user_info.key_payload,
payload_signature: wallet_user_info.key_payload_signature,
- social_proof: None, // The SIWE message and signature are the social proof
}),
content_upload: Some(Prekey {
prekey: wallet_user_info.content_prekey,
diff --git a/native/native_rust_library/src/identity/x3dh.rs b/native/native_rust_library/src/identity/x3dh.rs
--- a/native/native_rust_library/src/identity/x3dh.rs
+++ b/native/native_rust_library/src/identity/x3dh.rs
@@ -161,7 +161,6 @@
struct OutboundKeyInfoResponse {
pub payload: String,
pub payload_signature: String,
- pub social_proof: Option<String>,
pub content_prekey: String,
pub content_prekey_signature: String,
pub notif_prekey: String,
@@ -177,7 +176,6 @@
struct InboundKeyInfoResponse {
pub payload: String,
pub payload_signature: String,
- pub social_proof: Option<String>,
pub content_prekey: String,
pub content_prekey_signature: String,
pub notif_prekey: String,
@@ -194,7 +192,6 @@
let IdentityKeyInfo {
payload,
payload_signature,
- social_proof,
} = identity_info;
let content_prekey =
@@ -219,7 +216,6 @@
Ok(Self {
payload,
payload_signature,
- social_proof,
content_prekey: content_prekey_value,
content_prekey_signature,
notif_prekey: notif_prekey_value,
@@ -249,7 +245,6 @@
let IdentityKeyInfo {
payload,
payload_signature,
- social_proof,
} = identity_info;
let content_prekey =
@@ -271,7 +266,6 @@
Ok(Self {
payload,
payload_signature,
- social_proof,
content_prekey: content_prekey_value,
content_prekey_signature,
notif_prekey: notif_prekey_value,
diff --git a/services/commtest/src/identity/device.rs b/services/commtest/src/identity/device.rs
--- a/services/commtest/src/identity/device.rs
+++ b/services/commtest/src/identity/device.rs
@@ -67,7 +67,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: example_payload.to_string(),
payload_signature: "foo".to_string(),
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: "content_prekey".to_string(),
@@ -150,7 +149,6 @@
device_key_info: Some(IdentityKeyInfo {
payload: example_payload.to_string(),
payload_signature: "foo".to_string(),
- social_proof: None,
}),
content_upload: Some(Prekey {
prekey: "content_prekey".to_string(),
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
@@ -109,7 +109,6 @@
pub struct OutboundKeys {
pub key_payload: String,
pub key_payload_signature: String,
- pub social_proof: Option<String>,
pub content_prekey: Prekey,
pub notif_prekey: Prekey,
pub content_one_time_key: Option<String>,
@@ -123,7 +122,6 @@
identity_info: Some(IdentityKeyInfo {
payload: db_keys.key_payload,
payload_signature: db_keys.key_payload_signature,
- social_proof: db_keys.social_proof,
}),
content_prekey: Some(db_keys.content_prekey.into()),
notif_prekey: Some(db_keys.notif_prekey.into()),
@@ -347,18 +345,6 @@
) -> Result<Option<OutboundKeys>, Error> {
use crate::grpc_services::protos::unauth::DeviceType as GrpcDeviceType;
- // DynamoDB doesn't have a way to "pop" a value from a list, so we must
- // first read in user info, then update one_time_keys with value we
- // gave to requester
- let mut user_info = self
- .get_item_from_users_table(user_id)
- .await?
- .item
- .ok_or(Error::MissingItem)?;
-
- let user_id: String = user_info.take_attr(USERS_TABLE_PARTITION_KEY)?;
- let social_proof: Option<String> =
- user_info.take_attr(USERS_TABLE_SOCIAL_PROOF_ATTRIBUTE_NAME)?;
let user_devices = self.get_current_devices(user_id).await?;
let maybe_keyserver_device = user_devices
.into_iter()
@@ -393,7 +379,6 @@
let outbound_payload = OutboundKeys {
key_payload: keyserver.device_key_info.key_payload,
key_payload_signature: keyserver.device_key_info.key_payload_signature,
- social_proof,
content_prekey: keyserver.content_prekey,
notif_prekey: keyserver.notif_prekey,
content_one_time_key,
diff --git a/services/identity/src/database/device_list.rs b/services/identity/src/database/device_list.rs
--- a/services/identity/src/database/device_list.rs
+++ b/services/identity/src/database/device_list.rs
@@ -264,9 +264,6 @@
Self {
payload: value.key_payload,
payload_signature: value.key_payload_signature,
- // social proof isn't stored in the devices table
- // it cannot be retrieved here
- social_proof: None,
}
}
}
diff --git a/shared/protos/identity_unauth.proto b/shared/protos/identity_unauth.proto
--- a/shared/protos/identity_unauth.proto
+++ b/shared/protos/identity_unauth.proto
@@ -82,9 +82,6 @@
string payload = 1;
// Payload signed with the signing ed25519 key
string payload_signature = 2;
- // Signed message used for SIWE
- // This correlates a given wallet with a device's content key
- optional string social_proof = 3;
}
// RegisterUser
diff --git a/web/grpc/identity-service-client-wrapper.js b/web/grpc/identity-service-client-wrapper.js
--- a/web/grpc/identity-service-client-wrapper.js
+++ b/web/grpc/identity-service-client-wrapper.js
@@ -174,7 +174,6 @@
oneTimeKey: keyserverInfo?.getOneTimeNotifPrekey(),
},
payloadSignature: identityInfo?.getPayloadSignature(),
- socialProof: identityInfo?.getSocialProof(),
};
if (!keyserverKeys.contentInitializationInfo.oneTimeKey) {
@@ -240,7 +239,6 @@
oneTimeKey: outboundKeysInfo.oneTimeNotifPrekey,
},
payloadSignature: identityInfo?.payloadSignature,
- socialProof: identityInfo?.socialProof,
};
try {
diff --git a/web/protobufs/identity-unauth-structs.cjs b/web/protobufs/identity-unauth-structs.cjs
--- a/web/protobufs/identity-unauth-structs.cjs
+++ b/web/protobufs/identity-unauth-structs.cjs
@@ -890,8 +890,7 @@
proto.identity.unauth.IdentityKeyInfo.toObject = function(includeInstance, msg) {
var f, obj = {
payload: jspb.Message.getFieldWithDefault(msg, 1, ""),
- payloadSignature: jspb.Message.getFieldWithDefault(msg, 2, ""),
- socialProof: jspb.Message.getFieldWithDefault(msg, 3, "")
+ payloadSignature: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
@@ -936,10 +935,6 @@
var value = /** @type {string} */ (reader.readString());
msg.setPayloadSignature(value);
break;
- case 3:
- var value = /** @type {string} */ (reader.readString());
- msg.setSocialProof(value);
- break;
default:
reader.skipField();
break;
@@ -983,13 +978,6 @@
f
);
}
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
- if (f != null) {
- writer.writeString(
- 3,
- f
- );
- }
};
@@ -1029,42 +1017,6 @@
};
-/**
- * optional string social_proof = 3;
- * @return {string}
- */
-proto.identity.unauth.IdentityKeyInfo.prototype.getSocialProof = function() {
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.identity.unauth.IdentityKeyInfo} returns this
- */
-proto.identity.unauth.IdentityKeyInfo.prototype.setSocialProof = function(value) {
- return jspb.Message.setField(this, 3, value);
-};
-
-
-/**
- * Clears the field making it undefined.
- * @return {!proto.identity.unauth.IdentityKeyInfo} returns this
- */
-proto.identity.unauth.IdentityKeyInfo.prototype.clearSocialProof = function() {
- return jspb.Message.setField(this, 3, undefined);
-};
-
-
-/**
- * Returns whether this field is set.
- * @return {boolean}
- */
-proto.identity.unauth.IdentityKeyInfo.prototype.hasSocialProof = function() {
- return jspb.Message.getField(this, 3) != null;
-};
-
-
/**
* List of repeated fields within this message type.
diff --git a/web/protobufs/identity-unauth-structs.cjs.flow b/web/protobufs/identity-unauth-structs.cjs.flow
--- a/web/protobufs/identity-unauth-structs.cjs.flow
+++ b/web/protobufs/identity-unauth-structs.cjs.flow
@@ -39,7 +39,6 @@
export type IdentityKeyInfoObject = {
payload: string,
payloadSignature: string,
- socialProof?: string,
};
declare export class IdentityKeyInfo extends Message {
@@ -49,11 +48,6 @@
getPayloadSignature(): string;
setPayloadSignature(value: string): IdentityKeyInfo;
- getSocialProof(): string;
- setSocialProof(value: string): IdentityKeyInfo;
- hasSocialProof(): boolean;
- clearSocialProof(): IdentityKeyInfo;
-
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): IdentityKeyInfoObject;
static toObject(includeInstance: boolean, msg: IdentityKeyInfo): IdentityKeyInfoObject;

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 4:52 AM (18 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685955
Default Alt Text
D11549.diff (14 KB)

Event Timeline