Commit 1c7db818 authored by Jun Matsushita's avatar Jun Matsushita

Comments on watch-url #11

parent 50468f77
## watch_policy
## watch-url
1. watch_policy receives GET to fetch policy? or watchs periodically?
2. watch_policy sends GET policy (ie. GET https://xxx.iilab.org/fetch/policies/theguardianproject/chatsecure)
(where is the configuration for the urls to retrieve?)
1. watch-url periodically (and on startup) queries its config - with list of URLs to watch and xpath) : `GET https://api.openintegrity.org/url/config/:agent-id`
2. watch-url follows `config` instructions to watch periodically the URLs? Which means for each:
- Fetch the latest ETag we have in the event store: `GET https://api.openintegrity.org/url/etag/https://guardianproject.info/home/data-usage-and-protection-policies/`
- Queries ETag Header from webserver.
- Compares and only proceed if the ETag has changed
3. watch-url asks `fetch-url` microservice to fetch url.
## fetch_policy
## fetch-url
1. fetch_policy receives GET request to retrieve html policy
2. fetch_policy sends GET policy to website policy (ie. GET https://chatsecure.org/privacy/)
3. fetch_policy stores policy html in fs (ie. policies/theguardianproject/chatsecure/privacy_sha.html)
4. fetch_policy sends GET policy to analize_policy (ie. GET https://xxx.iilab.org/analize/policies/theguardianproject/chatsecure)
1. fetch-url receives GET request to retrieve html policy
2. fetch-url sends GET policy to website policy (ie. GET https://chatsecure.org/privacy/)
3. fetch-url stores policy html in fs (ie. policies/theguardianproject/chatsecure/privacy_sha.html)
4. fetch-url sends GET policy to analize_policy (ie. GET https://xxx.iilab.org/analize/policies/theguardianproject/chatsecure)
## analize_policy
## analyse-policy
1. analyze_policy receives GET policy
2. analize_policy look if the sha of the html file is in the store (ie. policies/theguardianproject/chatsecure/privacy_sha.html)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment