issue_comments: 460079795
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/ACEmulator/ACE/pull/1390#issuecomment-460079795 | https://api.github.com/repos/ACEmulator/ACE/issues/1390 | 460079795 | MDEyOklzc3VlQ29tbWVudDQ2MDA3OTc5NQ== | 10608427 | 2019-02-03T19:18:43Z | 2019-02-13T13:56:07Z | MEMBER | ### Character Backup/Export/Import: ### [Definitions] Player - Person that exists in real life Character - In-game avatar created/controlled by the player Source - Server that the character in question resides on at the start of the action Target - Server or location that the caracter in question resides on at the end of the action Backup - Action involving a user storing a local copy of a character Transfer - Action involving a user migrating a character from a source to a target in which after the action, the character is no longer available on the source. Copy - Action involving a user copying a character from a source to a target in which after the action, the character is available on both locations. ### [Objectives] - Allow players to backup their characters - Allow server operators to maintain a trust network to transfer characters safely, and without external manipulation - Allow players (developers, sandbox, etc..) to copy their characters to an untrusted target. ### [Facts] A server maintains a private RSA key and distributes their public RSA key. - These keys can be provided by the server owner via the config file - If the user is unable to provide their own keys, ACE can generate them automatically - The private key is used to sign character packages to provide proof of origin - The private key should not be shared, and should be kept secure - The public key should be available via the api and is used to verify authenticity - A server operator can use the same RSA key pairs for multiple servers in their control A server can maintain separate options for import vs export. - In most cases, import will be more restrited than export. ### [Character Snapshot Format] - Should be the same format no matter what the export scenario - Includes the entire player biota as it exists in the database - TODO: Describe serilization process. - Character records are not included (these describe UI settings, etc..) - Includes a copy of the public key - TODO: Describe signature process - Entire payload should be compressed in a zip named with the following format: YYYY-MM-DD HH:MM:SS [Server Name] - [Character Name].zip - Compressed .zip payload should be able to be opened using windows explorer. ### [Requirements] - Character must be in logged off state on source server, and must be owned by player ### [Backup] - Allows a player to backup a character onto their local storage **Configured by:** - bool AllowCharacterBackup **Process:** - User opens up a web browser to the source api server and nagivates to backup character - The "Character Snapshot" is downloaded - This can be consumed from a web browser, plugin, or application ### [Export/Import] - Allows a player to copy a character onto a target server - Allows a player to transfer a character from the source server to the target server - Preventing exploit is managed by configuration using trusted servers **Configured by:** - List TrustedServers - bool AllowUntrustExport - bool AllowUntrustImport **Process inside trust:** 1. Via Web API, player makes a request on the source server to start a character transfer 1a. A unique token is generated for this request 1b. A character transfer request record is created 1c. Character is placed into a "frozen" state 1d. Character snapshot is packaged 1e. Unique token is supplied as a result 2. Via Web API, player makes a request to the target server to complete the character transfer - Player must include source server: address, user name, user password, unique token - Player may provide new character name. If none provided, existing character name is used as default 2a. Character slot count and name collision checks are run. On failure, request is rejected (with error message) 2b. If source server is not listed as trust, request is rejected (with error message) 2c. Target queries source and downloads packaged snapshot 2c.1. Source server verifies target is in trusted list 2d. Cryptographic verification of the snapshot is performed. On failure, request is rejected (with error message) 2e. Target server adds the character to the players account in a (locked pending deletion) state == AT ANY POINT BEFORE NOW, CHARACTER CAN STILL BE UNLOCKED ON SOURCE == 2f. Target queries source server to delete character identified by token. 2f.1. Source server verifies target is in trusted list 2f.2. Source server permanently deletes character and responds with result 2g. If deletion success, character is unlocked **Process outside trust (untrust):** 1. Via Web API, player makes a request on the source server to start a character copy 1a. A unique token is generated for this request 1b. A character transfer request record is created 1c. 1d. Character snapshot is packaged 1e. Unique token is supplied as a result 2. Via Web API, player makes a request to the target server to complete the character copy - Player must include source server: address, user name, user password, unique token - Player may provide new character name. If none provided, existing character name is used as default 2a. Character slot count and name collision checks are run. On failure, request is rejected (with error message) 2b. 2c. Target queries source and downloads packaged snapshot 2d. Cryptographic verification of the snapshot is performed. On failure, request is rejected (with error message) 2e. Target server adds the character to the players account 2f. 2g. Difference between trust and untrust: Untrust removes 1c Untrust removes 2b Untrust changes 2c Untrust changes 2e Untrust removes 2f Untrust removes 2g | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 403614766 |