gmessages/libgm/gmproto/authentication.proto

256 lines
5.7 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package authentication;
2023-07-17 13:51:31 +00:00
option go_package = "../gmproto";
2023-07-17 23:57:20 +00:00
import "util.proto";
import "pblite.proto";
2023-07-17 23:57:20 +00:00
enum BrowserType {
UNKNOWN_BROWSER_TYPE = 0;
OTHER = 1;
CHROME = 2;
FIREFOX = 3;
SAFARI = 4;
OPERA = 5;
IE = 6;
EDGE = 7;
}
enum DeviceType {
UNKNOWN_DEVICE_TYPE = 0;
WEB = 1;
TABLET = 2;
PWA = 3;
}
message BrowserDetails {
string userAgent = 1;
2023-07-17 23:57:20 +00:00
BrowserType browserType = 2;
2023-07-16 13:19:33 +00:00
string OS = 3;
DeviceType deviceType = 6;
}
2023-07-17 23:57:20 +00:00
message Device {
int64 userID = 1;
string sourceID = 2;
string network = 3;
}
message ConfigVersion {
int32 Year = 3;
int32 Month = 4;
int32 Day = 5;
int32 V1 = 7;
int32 V2 = 9;
}
message SignInGaiaRequest {
message Inner {
message DeviceID {
int32 unknownInt1 = 1; // 3
string deviceID = 2; // messages-web-{uuid without dashes}
}
message Data {
bytes someData = 3; // maybe an encryption key?
}
DeviceID deviceID = 1;
Data someData = 36 [(pblite.pblite_binary) = true];
}
AuthMessage authMessage = 1;
Inner inner = 2;
int32 unknownInt3 = 3;
string network = 4;
}
message SignInGaiaResponse {
message Header {
uint64 unknownInt2 = 2;
int64 unknownTimestamp = 4;
}
message DeviceData {
message DeviceWrapper {
Device device = 1;
}
DeviceWrapper deviceWrapper = 1;
repeated RPCGaiaData.UnknownContainer.Item2.Item1 unknownItems2 = 2;
repeated RPCGaiaData.UnknownContainer.Item4 unknownItems3 = 3;
// index 4 is some unknown field with no real data
}
Header header = 1;
string maybeBrowserUUID = 2 [(pblite.pblite_binary) = true];
DeviceData deviceData = 3;
TokenData tokenData = 4;
}
message GaiaPairingRequestContainer {
string pairingAttemptID = 1;
BrowserDetails browserDetails = 2;
int64 startTimestamp = 3;
bytes data = 4;
}
message GaiaPairingResponseContainer {
int32 finishErrorType = 1;
int32 finishErrorCode = 2;
int32 unknownInt3 = 3; // For init, 1
string sessionUUID = 4;
bytes data = 5;
}
message RevokeGaiaPairingRequest {
string pairingAttemptID = 1;
}
message RPCGaiaData {
message UnknownContainer {
message Item2 {
message Item1 {
string destOrSourceUUID = 1 [(pblite.pblite_binary) = true];
int32 unknownInt4 = 4; // 1 for destination device, 6 for local device?
string languageCode = 5;
uint64 unknownBigInt7 = 7;
}
repeated Item1 item1 = 1;
}
message Item4 {
message Item8 {
int32 unknownInt1 = 1; // present for destination device?
int32 unknownTimestamp = 2; // present for destination device?
bytes unknownBytes = 3; // present for local device?
}
string destOrSourceUUID = 1 [(pblite.pblite_binary) = true];
int32 unknownInt3 = 3; // 1 for destination device, 6 for local device?
int32 unknownInt4 = 4; // always 6?
int64 unknownTimestampMicroseconds = 7; // maybe device creation ts?
Item8 item8 = 8 [(pblite.pblite_binary) = true];
}
Item2 item2 = 2;
int64 unknownTimestampMicroseconds = 3; // pairing timestamp?
repeated Item4 item4 = 4;
}
int32 command = 1; // 9
UnknownContainer maybeServerData = 108;
}
message AuthenticationContainer {
2023-07-17 23:57:20 +00:00
AuthMessage authMessage = 1;
BrowserDetails browserDetails = 3;
oneof data {
KeyData keyData = 4;
CurrentDeviceData deviceData = 5;
}
}
2023-07-17 23:57:20 +00:00
message AuthMessage {
string requestID = 1;
string network = 3;
bytes tachyonAuthToken = 6;
2023-07-17 23:57:20 +00:00
ConfigVersion configVersion = 7;
}
message RevokeRelayPairingRequest {
AuthMessage authMessage = 1;
Device browser = 2;
}
message RevokeRelayPairingResponse {
// field 1 is an object with an unknown int64 in field 2
}
message RegisterRefreshRequest {
message NestedEmptyArr {
util.EmptyArr emptyArr = 9;
}
AuthMessage messageAuth = 1;
Device currBrowserDevice = 2;
int64 unixTimestamp = 3;
bytes signature = 4;
NestedEmptyArr emptyRefreshArr = 13;
int32 messageType = 16;
}
message RegisterRefreshResponse {
TokenData tokenData = 2;
2023-07-17 23:57:20 +00:00
}
message RegisterPhoneRelayResponse {
CoordinateMessage coordinates = 1;
Device browser = 2;
bytes pairingKey = 3;
int64 validFor = 4;
TokenData authKeyData = 5;
2023-07-17 23:57:20 +00:00
string responseID = 6;
}
message CoordinateMessage {
int64 coord1 = 2;
}
message RefreshPhoneRelayResponse {
CoordinateMessage coordinates = 1;
bytes pairKey = 2;
int64 validFor = 3;
}
message WebEncryptionKeyResponse {
CoordinateMessage coordinates = 1;
bytes key = 2;
}
2023-09-04 11:24:45 +00:00
message ErrorResponse {
int64 type = 1; // 5?
string message = 2;
repeated ErrorClass class = 3;
message ErrorClass {
string class = 1;
// 2: {1: 1}
}
}
message ECDSAKeys {
int64 field1 = 1; // idk?
bytes encryptedKeys = 2;
}
2023-07-17 23:57:20 +00:00
message CurrentDeviceData {
authentication.Device browser = 1;
}
message KeyData {
2023-07-17 23:57:20 +00:00
Device mobile = 1;
ECDSAKeys ecdsaKeys = 6;
WebAuthKey webAuthKeyData = 2;
2023-07-17 23:57:20 +00:00
Device browser = 3;
}
message WebAuthKey {
bytes webAuthKey = 1;
int64 validFor = 2;
}
2023-07-15 13:25:54 +00:00
message URLData {
bytes pairingKey = 1;
bytes AESKey = 2;
bytes HMACKey = 3;
}
message TokenData {
bytes tachyonAuthToken = 1;
int64 TTL = 2;
}
message PairedData {
2023-07-17 23:57:20 +00:00
Device mobile = 1;
TokenData tokenData = 2;
2023-07-17 23:57:20 +00:00
Device browser = 3;
}
message RevokePairData {
2023-07-17 23:57:20 +00:00
Device revokedDevice = 1;
}