48 Commits

Author SHA1 Message Date
talves ec1486a6eb feat: update cf.pub key and cache file path
The private key that encrypts the file in `https://rpki.cloudflare.com/rpki.json` is being rotated.
In order to avoid any downtime, we created a second file with the new encryption key in `https://rpki.cloudflare.com/v2/rpki.json`.
In this PR, we update the path for the cache file, so we use the newly encrypted v2/rpki.json, and also the new public key in cf.pub that matches it.

The old file will also need to be updated so we can deprecate the old encryption keys.
You need to download this new release to make sure your code does not break when the key is updated. Alternatively, you can continue to use the release you are using now and simply update cf.pub and pass the -cache flag with the correct url.

DEADLINE: 18-03-2024 !!!!
2024-02-29 11:13:18 +00:00
Maximilian Wilhelm 9f01dca95f Always expose rpki_refresh metrics for sucessful http calls
For successful HTTP calls there were cases where no 'rpki_refresh' metric was
  exposed, as FetchFile() return'ed without the bool return value set to true.
  As the bool return value mainly seems to indicate that a file was successfully
  fetch from an HTTP URL, the same behavior can be achieve by using the HTTP
  status code to expose the metric.

  This also contains some drive-by clean-ups.

Signed-off-by: Maximilian Wilhelm <maximilian@cloudflare.com>
2023-07-11 15:42:26 +02:00
Louis Poinsignon 24a2b45435 fix build flags 2020-11-23 15:14:07 -08:00
Louis Poinsignon 53e60e542e fix ssh rtrmon issues 2020-11-23 15:14:07 -08:00
Louis Poinsignon cced326b97 fix dockerfiles 2020-11-23 15:14:07 -08:00
Louis Poinsignon 5eab7fd59a Prometheus 2020-11-23 15:11:56 -08:00
Louis Poinsignon 6c18d81f8f rtrmon: improve metadata 2020-11-23 15:11:56 -08:00
Louis Poinsignon 98803cd72d Add RTRmon, a tool to compare different RTR/JSON outputs 2020-11-23 15:11:56 -08:00
Louis Poinsignon 369b19fbc9 rtrdump to have build-time version number 2020-10-26 08:28:54 -07:00
Louis 78f7a6e604 Merge pull request #72 from cloudflare/bug/close-connections
Bugfix: make sure to close http connections
2020-07-07 11:15:16 -07:00
John Bampton fea0197495 Fix spelling 2020-07-02 17:36:26 +10:00
Louis Poinsignon 2d9e8a0cee Bugfix: make sure to close http connections 2020-06-29 17:19:19 -07:00
Louis Poinsignon 09ff1dc23c Add mime/accept parameter #62 2020-06-09 14:40:13 -07:00
Louis 107c06a4d6 More debug options on GoRTR 2020-06-05 17:58:58 -07:00
Louis Poinsignon 98513b9b3f Add message logging for RTRdump (option to skip data PDUs) 2020-06-05 17:13:48 -07:00
lspgn fb7be39c6a Merge pull request #56 from cloudflare/feature/json-serials
Serial control
2020-03-30 13:36:05 -07:00
lspgn 787998d680 Merge pull request #55 from cloudflare/feature/cli-control-refresh
Options to set session ID and timers via CLI #52
2020-03-30 13:26:49 -07:00
Louis Poinsignon 19fe0f80ab Add docker-compose for integration testing
* Will mount a GoRTR with a basic rpki.json and slurm.json
* Run rtrdump
2020-03-30 13:15:50 -07:00
Louis Poinsignon b4f0245713 Serial control
* Set three modes of operating serial:
  * Default: serials will start at 0 and increment at every change
  * Beginning: serial will be set to the value found in the JSON then increment at every change
  * Full: serial will be set based on the value found in the JSON at each refresh
2020-03-29 18:07:59 -07:00
Louis Poinsignon 14a278569f Options to set session ID and timers via CLI
* Also fixes a session ID bug where the variable was never random
* Introduces the following flags: `rtr.sessionid`. `rtr.refresh`, `rtr.retry` and `rtr.expire`

Resolves issue #52
2020-03-27 16:53:29 -07:00
Ties de Kock 156a388f65 Add ETag/If-Not-Modified support
* Send If-Not-Modified header, save ETags.
  * Add metrics for HTTP response code and last request timestamp.
2020-03-02 10:25:39 +01:00
Louis Poinsignon 60f8a6fe84 Filter and assertion implementation (#34)
* Possibility to read a slurm file (rfc8416) from an http/https endpoint or from a file
* Filters prefixes and adds new ones contained in the configuration
* Can output a new rpki.json which contains the updated prefixes and sign it (other GoRTR can consome from it)
2019-11-05 12:39:19 -08:00
Louis Poinsignon e312c7905b Fix potential panic risk for #36 2019-11-05 11:46:11 -08:00
Louis Poinsignon bfba8695a0 Fix broken bypass of ssh key (#30) 2019-10-16 09:56:07 -07:00
Louis Poinsignon fd99867fdf Boolean flag info
* Update README
* Add detail in flag description for verify
2019-09-17 11:45:18 -07:00
Louis Poinsignon 41d8bbc13c Fix environment variable typo (#26) 2019-08-22 13:58:53 -07:00
Louis Poinsignon f1f5715274 Proxy update
Pass the user-agent in the CONNECT header
2019-07-31 14:44:06 -07:00
Louis Poinsignon ccb697c700 Packaging GoRTR
* Travis-CI now automatically compiles GoRTR for Linux, Mac OS and Windows
* Version number inserted at build time based on tag
* Packages deb/rpm
* Publishes into GitHub Releases
2019-07-31 12:54:44 -07:00
Louis Poinsignon 3c08cff55c Running go fmt project-wide 2019-07-30 17:19:07 -07:00
Vincent Bernat 6e14867f1b Trigger refresh early on SIHGUP
When receiving SIGHUP, trigger a refresh of the cache. This is useful
when we need an immediate update of the cache without having a very
low refresh interval.
2019-07-28 23:09:56 +02:00
Louis Poinsignon e80b003056 Bugfix of envvar name 2019-04-11 16:35:38 -07:00
Louis Poinsignon b6f49611c3 Small update
* SSH now allows key authentication (small API changes)
* User agent contains version
* README specifies notes for SSH implementation
2019-04-11 16:31:04 -07:00
Louis Poinsignon 8672363e36 Go fmt 2019-04-05 15:42:54 -07:00
Louis Poinsignon 79b7ec03ea Bump version 2019-04-05 15:40:39 -07:00
Louis Poinsignon 3cf0a35f2a Protocol update:
* Add SSH support in library.
* GoRTR and RTRdump to use SSH with user/password or without auth
* Updated README with simple compatilibty matrix,
  SSH configuration, Cisco configuration.
2019-04-05 15:27:57 -07:00
lspgn 156817d906 Merge pull request #16 from cloudflare/louis/useragent
User-Agent feature
2019-03-20 14:03:15 -07:00
Louis Poinsignon 3a1851d0e2 User-Agent option for HTTP request #14 2019-03-16 17:55:46 -07:00
Louis Poinsignon 9ef4da50f2 Bump versions 2018-11-12 21:01:26 -08:00
Louis Poinsignon 358d920ec7 Bugfix on default PDU 2018-11-12 21:00:55 -08:00
Louis Poinsignon ae09564516 Go fmt 2018-11-12 20:59:38 -08:00
Louis Poinsignon 94d9ce55fd Refactor server, logging options 2018-11-12 20:58:18 -08:00
Louis Poinsignon eb025127a0 Finalized handler 2018-11-12 20:45:28 -08:00
Louis Poinsignon 8f6f16dbd0 RTRdump: dump the content of a RTR server in JSON format 2018-11-12 19:10:39 -08:00
Zhaofeng Li 77dfa29c03 Fix ASN parsing on 32-bit platforms
ASNs are 32-bit unsigned integers. However, `strconv.Atoi` will return
32-bit or 64-bit signed integers depending on the platform. It's best to
use `ParseUint` directly.
2018-11-12 14:40:40 -08:00
Louis Poinsignon bdc3984231 Fixes #9: segfault when incomplete packet 2018-10-22 17:00:39 +01:00
Jerome Fleury 08c3eca11d bind on tcp46 *, add some debug messages, fix README 2018-09-14 12:58:34 -07:00
Louis Poinsignon 61783cb17c Fix fetch issue for some webservers (#4) 2018-09-13 17:09:39 -07:00
Louis Poinsignon c1a96dbfdf Refactoring:
* Moved app in cmd directory
* Moved structures into "file" package
* Inserted cryptographic checks (signature) and validity checks
2018-09-13 14:41:09 -07:00