Commit Graph

161 Commits

Author SHA1 Message Date
Orne Brocaar
2c06edd6ff Add auto conversion for SEC1 EC keys to PKCS#8.
Fixes #386.
2024-03-27 09:50:18 +00:00
Orne Brocaar
56336fa685 Update dependencies. 2024-03-19 12:41:18 +00:00
Orne Brocaar
c426e48b8d Update dependencies + fix check / clippy feedback. 2024-03-19 12:15:48 +00:00
Orne Brocaar
a78bc226f6 Update redis crate.
This version solves inconsistent pipeline output types when using
multiplexed async connections.
2024-03-19 10:38:08 +00:00
Orne Brocaar
06bcca147c Update tonic. 2024-03-19 10:38:08 +00:00
Orne Brocaar
26cef0b2ca Update rustls / tls functions. 2024-03-19 10:38:08 +00:00
Orne Brocaar
8c875c3bf1 Bump version to 4.7.0 2024-03-13 10:44:21 +00:00
Orne Brocaar
519f53940e Bump version to 4.7.0-test.4 2024-02-27 16:48:40 +00:00
Orne Brocaar
098f8db4c6 Migrate device-sessions from Redis to PostgreSQL.
This migrates the device-sessions from Redis into PostgreSQL. This fixes
a performance issue in case the same DevAddr is reused many times
(e.g. devices rejoining very often or a NetID with small DevAddr space).

There were two issues:

The Redis key containing the DevAddr -> DevEUIs mapping could contain
DevEUIs that no longer used the DevAddr. This mapping would only expire
from the Redis database after none of the devices would use the DevAddr
for more than the configured device_session_ttl.

The other issue with the previous approach was that on for example a
Type 7 NetID, a single DevAddr could be re-used multiple times. As each
device-session could be stored on a different Redis Cluster instance,
there was no option to retrieve all device-sessions at once. Thus a high
re-usage of a single DevAddr would cause an increase in Redis queries.

Both issues are solved by moving the device-session into PostgreSQL
as the DevAddr is a column of the device record and thus filtering on
this DevAddr would always result in the devices using that DevAddr, as
well all device-sessions for a DevAddr can be retrieved by a single
query.

Note that to migrate the device-sessions, you must run:

chirpstack -c path/to/config migrate-device-sessions-to-postgres

A nice side-effect is that a PostgreSQL backup / restore will also
restore the device connectivity.

Closes #362 and #74.
2024-02-27 16:17:15 +00:00
dependabot[bot]
4ce886b21d
Bump unsafe-libyaml from 0.2.9 to 0.2.10 (#341)
Bumps [unsafe-libyaml](https://github.com/dtolnay/unsafe-libyaml) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/dtolnay/unsafe-libyaml/releases)
- [Commits](https://github.com/dtolnay/unsafe-libyaml/compare/0.2.9...0.2.10)

---
updated-dependencies:
- dependency-name: unsafe-libyaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 15:55:03 +00:00
Orne Brocaar
be26e60111 Bump version to 4.7.0-test.3 2024-01-12 09:19:50 +00:00
Orne Brocaar
e1334f647d Bump version to 4.7.0-test.2 2024-01-11 15:42:16 +00:00
Orne Brocaar
cc47958839 Bump version to 4.7.0-test.1 2024-01-11 12:48:18 +00:00
Orne Brocaar
9198d7d51b Implement Clerk as authentication backend (OAuth2). 2023-12-19 13:49:16 +00:00
Orne Brocaar
f45d12519c Update deadpool-redis dependency.
This deprecates the deadpool-redis-cluster crate in favor of the
deadpool-redis crate with cluster feature.
2023-12-18 10:04:05 +00:00
Orne Brocaar
fcd0ef2ca5 Update rcgen dependency. 2023-12-18 09:56:23 +00:00
Orne Brocaar
fb29d7f58d Update rdkafka dependency. 2023-12-11 11:37:12 +00:00
Orne Brocaar
f0987af114 Update prometheus-client. 2023-12-11 11:33:19 +00:00
Orne Brocaar
691cee7beb Upgrade jsonwebtoken dependency.
Since v9 setting the audience is mandatory.
2023-12-11 11:23:52 +00:00
Orne Brocaar
0ff05a9285 Update dependencies (cargo update). 2023-12-11 11:10:06 +00:00
Orne Brocaar
2774c51ea2 Refactor client-cert generator to use rustls/rcgen.
This refactors the last bit of code that depends on the OpenSSL C
library. Note that the openssl-probe does not depend on OpenSSL, it only
tries to detect the CA certificate directory on the host system.
2023-12-11 10:55:36 +00:00
Orne Brocaar
53a570b0b0 Update httpmock (dev dep) to 0.7.0-rc.1.
This version removes the isahc depencency, which causes openssl to be
added as a dependency. Version 0.7 makes this dependency optional.
2023-12-11 10:55:36 +00:00
Orne Brocaar
5b6d037469 Refactor gateway MQTT backend to use rumqttc. 2023-12-11 10:55:36 +00:00
Orne Brocaar
17f0d8c495 Refactor MQTT integration to use rumqttc. 2023-12-11 10:55:36 +00:00
Orne Brocaar
345d0d8462 Refactor code to use async redis. 2023-12-11 10:55:36 +00:00
Orne Brocaar
8e2eda3d5b Refactor code to use diesel-async.
This still depends on unreleased diesel and diesel-async code. As soon
as new diesel and diesel-async code has been released, we can remove
the [patch.crates-io] from Cargo.toml.
2023-12-11 10:55:35 +00:00
Orne Brocaar
8e3f2aa3d2 Bump chirpstack_integration version. 2023-12-07 09:22:19 +00:00
Orne Brocaar
f647949c05 Bump version to 4.6.0 2023-12-07 09:13:36 +00:00
Orne Brocaar
20e28407d0 Bump version to 4.6.0-test.4 2023-11-28 13:01:40 +00:00
Orne Brocaar
20ab51052d Update dependencies. 2023-11-23 15:27:20 +00:00
Orne Brocaar
f13a5f492c Bump version to 4.6.0-test.3 2023-11-22 11:28:00 +00:00
Orne Brocaar
5fd56e7e3c Bump version to 4.6.0-test.2 2023-11-20 12:33:52 +00:00
Orne Brocaar
64277b1d9f Simplify AWS SNS integration / reduce dependencies.
This removes the aws-sdk-sns crate (+ dependencies) and refactors the
AWS SNS integration to use reqwest for the API call + aws-sign-v4 for
creating the AWS request signature.
2023-11-09 13:22:10 +00:00
Orne Brocaar
4d2f9828bb Log outgoing Backend Interfaces requests. 2023-11-02 11:50:16 +00:00
Orne Brocaar
091909e8ea Bump version to 4.6.0-test.1 2023-10-26 15:38:37 +01:00
Orne Brocaar
fda489d315 Add chirpstack_integration crate.
This crate can be used to build external ChirpStack integrations.
The plan is to move all non-HTTP based integrations to external
repositories. The reason is that these integrations usually require
quite some external dependencies as these rely on their own SDKs.
2023-10-13 11:38:56 +01:00
Orne Brocaar
503beaa2fd Bump version to 4.5.1 2023-10-05 10:20:32 +01:00
Orne Brocaar
a402b487f8 Update dependencies. 2023-09-18 16:22:05 +01:00
Orne Brocaar
4ebee8d614 Bump version to 4.5.0 2023-09-11 16:58:25 +01:00
Orne Brocaar
81ac49ff8f Bump version to 4.5.0-test.3 2023-09-07 16:53:20 +01:00
Orne Brocaar
f06f11334e Bump version to 4.5.0-test.2 2023-09-05 12:14:35 +01:00
Orne Brocaar
295cd5e4b1 Bump version to 4.5.0-test.1 2023-09-04 15:06:38 +01:00
dependabot[bot]
81df990fd0
Bump redis from 0.23.1 to 0.23.3 (#269)
Bumps [redis](https://github.com/redis-rs/redis-rs) from 0.23.1 to 0.23.3.
- [Release notes](https://github.com/redis-rs/redis-rs/releases)
- [Commits](https://github.com/redis-rs/redis-rs/compare/redis-0.23.1...redis-0.23.3)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 14:12:06 +01:00
Orne Brocaar
cd57929b43 Update dependencies. 2023-09-04 14:10:27 +01:00
Orne Brocaar
d3b2d6a824 chirpstack: Update rdkafka dependency. 2023-08-08 13:29:42 +01:00
Orne Brocaar
e2d82134de Update dependencies. 2023-08-08 11:53:56 +01:00
Orne Brocaar
7ff12f5ae7 Bump version to 4.4.3 2023-07-24 11:54:31 +01:00
Orne Brocaar
f66186bb7b Bump version to 4.4.2 2023-07-14 10:56:00 +01:00
Orne Brocaar
57ab993a88 Update dependencies. 2023-07-13 11:39:20 +01:00
Orne Brocaar
9d543603d5 Bump version to 4.4.1 2023-07-05 11:18:51 +01:00