sagikazarmark / curiefense-emissary-poc

An attempt to integrate Curiefense into Emissary Ingress
2 stars 0 forks source link

MaxMind database update #14

Open sagikazarmark opened 1 year ago

sagikazarmark commented 1 year ago

How is the MaxMind database handled at the moment? Is it updated? If so, how?

Do we need a custom update process?

tzuryby commented 1 year ago

free and open source distribution can work with the MaxMind GeoLite version, which updated by them periodically.

The premium service has a daily update.

sagikazarmark commented 1 year ago

The question is, how do we do that on the Curiefense side. For example: if I have a MaxMind subscription, how would I use those databases?

Do I upload them to a storage bucket/git repo?

Also, even the free version needs updating. How does that work?

tzuryby commented 1 year ago

the api for blobs - /b/ endpoint is designed for this one. to push push updates of maxmind.

curl -X 'GET' \
  'http://localhost:30000/api/v2/configs/master/b/' \
  -H 'accept: application/json'

Responds with

[
  {
    "name": "geolite2asn"
  },
  {
    "name": "geolite2country"
  },
  {
    "name": "geolite2city"
  }
]

Then you can use the PUT method to update with the new binaries (b64 encoded)

{"format": "base64", "blob": "maxmind-binary-encoded-content"}

sagikazarmark commented 1 year ago

Excellent, thank you!