chirpstack/api/rust/src/integration.rs
Orne Brocaar 41d00cb651 Implement end-to-end app payload encryption.
This implements end-to-end encryption between the end-device and
end-application. The encrypted AppSKey or SessionKeyID is forwarded to
the end-application which should be able to decrypt or request the
AppSKey to decrypt the uplink payload. As well the end-application will
be able to enqueue encrypted application payloads.

Using this mechanism, ChirpStack will never have access to the uplink
and downlink application-payloads.
2023-10-05 13:06:09 +01:00

39 lines
1.2 KiB
Rust
Vendored

include!(concat!(env!("OUT_DIR"), "/integration/integration.rs"));
#[cfg(feature = "json")]
include!(concat!(
env!("OUT_DIR"),
"/integration/integration.serde.rs"
));
#[allow(clippy::from_over_into)]
impl Into<String> for LogLevel {
fn into(self) -> String {
match self {
LogLevel::Info => "INFO",
LogLevel::Warning => "WARNING",
LogLevel::Error => "ERROR",
}
.to_string()
}
}
#[allow(clippy::from_over_into)]
impl Into<String> for LogCode {
fn into(self) -> String {
match self {
LogCode::Unknown => "UNKNOWN",
LogCode::DownlinkPayloadSize => "DOWNLINK_PAYLOAD_SIZE",
LogCode::UplinkCodec => "UPLINK_CODEC",
LogCode::DownlinkCodec => "DOWNLINK_CODEC",
LogCode::Otaa => "OTAA",
LogCode::UplinkFCntReset => "UPLINK_F_CNT_RESET",
LogCode::UplinkMic => "UPLINK_MIC",
LogCode::UplinkFCntRetransmission => "UPLINK_F_CNT_RETRANSMISSION",
LogCode::DownlinkGateway => "DOWNLINK_GATEWAY",
LogCode::RelayNewEndDevice => "RELAY_NEW_END_DEVICE",
LogCode::FCntDown => "F_CNT_DOWN",
}
.to_string()
}
}