Signed-off-by: zyphlar zyphlar@noreply.codeberg.org
Add meta server description #25
zyphlar-patch-1 into main Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
Fixes #6
Maybe add how it can be used later e.g. scalability opportunities?
@ -3,0 +6,4 @@
Note that currently our download routine chunks the files and requests multiple chunks at a time from all available servers, so more servers in each list is better. The app will evaluate the health of each server and direct chunk requests accordingly, but won't request multiple chunks from the same server at the same time.
The upstream Metaserver has additional capabilities like telling the app to display donation buttons or a Christmas tree, but that seems intrusive.
We fully removed this from the app
I'm not sure what's the point of mentioning OM's implementation at all, as ours is a complete re-implementation.
I've reworded this. I think it's good and important to highlight ways that we're respecting privacy and security, to be transparent and also reduce fears anyone may have after digging around upstream.
@ -3,0 +8,4 @@
The upstream Metaserver has additional capabilities like telling the app to display donation buttons or a Christmas tree, but that seems intrusive.
Currently there is no capability for giving an app newer maps than it was built for. Apps are shipped with a countries.txt file that dictates every possible map and its checksum, which is quite secure, but also limiting. The meta server would need to be extended to list compatible map versions for each app version, and provide secure verification info, to improve on this.
The meta server would need to be extended to list compatible map versions for each app version, and provide secure verification info, to improve on this.
I'd drop this sentence, IMO its debatable.
IMO this repo's issues section is more suitable for discussing future plans, rather than stating them in the README.md
@ -2,1 +2,4 @@
## Description
When the main app in the field checks for map updates, it needs to download the map files from nearby servers that hopefully have the desired files. Also, these servers can change over time, so they shouldn't be hardcoded into the app. So the first step is to ask for this list of CDNs, and the second step is to actually connect to one or more CDN servers to get the map files.
Isnt this incorrect?
Also, these servers can change over time, so they shouldn't be hardcoded into the app.
Since if this list gets another server added to it, will it even work on the app?
because its not in the private.h:
#define DEFAULT_URLS_JSON "[ \"https://cdn-us-2.comaps.tech/\", \"https://comaps.firewall-gateway.de/\", \"https://cdn-fi-1.comaps.app/\", \"https://comaps-cdn.s3-website.cloud.ru/\" ]"
sry if i am getting something wrong
DEFAULT_URLS_JSON is used only when the metaserver is unreachable.
the full server list in private.h is a fallback which is used only if the app can't get the latest and georegion-tailored list from the metaserver
e.g. we might add new CDNs for South America region and clients will be able to download from them without waiting for the next app update (which will update the list in private.h)
oh nice, understood it wrong way around, that these where the only valid/safe cdn's, so if the metaserver would be compromised the app would not start requests to domains that are unsafe
actually you make a good point that metaserver could be potentially compromised (and CDN nodes too, of course)
we need to think of potential consequences and what we can do about it
@pastk wrote in #25 (comment):
actually you make a good point that metaserver could be potentially compromised (and CDN nodes too, of course)
we need to think of potential consequences and what we can do about it
Isn't app rejects MWMs that do not match the hash from countries.txt?
It does reject them.
But it'd try to download them first (hit the urls). So theoretically someone could replace CDN urls to make clients to hit them. DDOS attack by CoMaps users? :)))
Ultimately any online component to the app is a service, and the service needs to be trustworthy. A dns-based DoS due to HTTP GET requests for specific files that won't exist on most targets is a pretty small edge case I think.
A bigger issue is malicious MWMs crafted to buffer overflow a device, but it's correct that the checksum in countries.txt prevents this. So if we move to fully online updates, maybe what we do is embed a signing public key in the app instead, and then sign map updates? Or just sign a new countries.txt for the app to download, and then the files themselves probably don't need further checking.
Isn't app rejects MWMs that do not match the hash from countries.txt?
We use sha1 for hashing which was broken and is not considered cryptographically secure any more. But the computational effort for forging a file with the same hash is still immense.
@x7z4w wrote in #25 (comment):
Maybe add how it can be used later e.g. scalability opportunities?
What are you thinking about? The code is pretty simple, the main improvement would be instructing apps to download map files that they don't have a countries.txt for (essentially giving them a new countries.txt) which is pretty well described I think.
Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
@ -3,0 +6,4 @@
Note that currently our download routine chunks the files and requests multiple chunks at a time from all available servers, so more servers in each list is better. The app will evaluate the health of each server and direct chunk requests accordingly, but won't request multiple chunks from the same server at the same time.
Upstream features that allowed the metaserver to control donation buttons etc have been removed from CoMaps and are not present in this metaserver.
"Upstream" sounds like this is a fork.
As @pastk said, it doesn't make sense to mention this at all.
I guess my question is, the metaserver concept exists due to OM, and it serves various purposes there, but these purposes are intentionally limited and privacy-preserving, and I don't know anywhere better to talk about that. I would be concerned, knowing the history, if I was a user
Then at least make it explicit Unlike Organic Maps meta-server
Because some people reading this won't understand what "upstream" is. Could be some 3party lib for example.
Signed-off-by: zyphlar <zyphlar@noreply.codeberg.org>
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?