@@ -264,7 +264,7 @@ fn is_valid_for_webhook(
264
264
let id = webhook. identity . id . to_string ( ) ;
265
265
move |when| {
266
266
when. path ( path)
267
- . header ( "x-oxide-webhook -id" , id)
267
+ . header ( "x-oxide-receiver -id" , id)
268
268
. header_exists ( "x-oxide-delivery-id" )
269
269
. header_exists ( "x-oxide-signature" )
270
270
. header ( "content-type" , "application/json" )
@@ -514,8 +514,8 @@ async fn test_event_delivery(cptestctx: &ControlPlaneTestContext) {
514
514
} )
515
515
. to_string ( ) ;
516
516
when. method ( POST )
517
- . header ( "x-oxide-event -class" , "test.foo" )
518
- . header ( "x-oxide-event -id" , id. to_string ( ) )
517
+ . header ( "x-oxide-alert -class" , "test.foo" )
518
+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
519
519
. and ( is_valid_for_webhook ( & webhook) )
520
520
. is_true ( signature_verifies (
521
521
webhook. config . secrets [ 0 ] . id ,
@@ -627,8 +627,8 @@ async fn test_multiple_secrets(cptestctx: &ControlPlaneTestContext) {
627
627
let mock = server
628
628
. mock_async ( |when, then| {
629
629
when. method ( POST )
630
- . header ( "x-oxide-event -class" , "test.foo" )
631
- . header ( "x-oxide-event -id" , id. to_string ( ) )
630
+ . header ( "x-oxide-alert -class" , "test.foo" )
631
+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
632
632
. and ( is_valid_for_webhook ( & webhook) )
633
633
// There should be a signature header present for all three
634
634
// secrets, and they should all verify the contents of the
@@ -716,8 +716,8 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
716
716
srv_bar
717
717
. mock_async ( move |when, then| {
718
718
when. method ( POST )
719
- . header ( "x-oxide-event -class" , "test.foo.bar" )
720
- . header ( "x-oxide-event -id" , bar_alert_id. to_string ( ) )
719
+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
720
+ . header ( "x-oxide-alert -id" , bar_alert_id. to_string ( ) )
721
721
. and ( is_valid_for_webhook ( & webhook) )
722
722
. is_true ( signature_verifies (
723
723
webhook. config . secrets [ 0 ] . id ,
@@ -757,8 +757,8 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
757
757
srv_baz
758
758
. mock_async ( move |when, then| {
759
759
when. method ( POST )
760
- . header ( "x-oxide-event -class" , "test.foo.baz" )
761
- . header ( "x-oxide-event -id" , baz_alert_id. to_string ( ) )
760
+ . header ( "x-oxide-alert -class" , "test.foo.baz" )
761
+ . header ( "x-oxide-alert -id" , baz_alert_id. to_string ( ) )
762
762
. and ( is_valid_for_webhook ( & webhook) )
763
763
. is_true ( signature_verifies (
764
764
webhook. config . secrets [ 0 ] . id ,
@@ -800,10 +800,10 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
800
800
. mock_async ( move |when, then| {
801
801
when. method ( POST )
802
802
. header_matches (
803
- "x-oxide-event -class" ,
803
+ "x-oxide-alert -class" ,
804
804
"test\\ .foo\\ .ba[rz]" ,
805
805
)
806
- . header_exists ( "x-oxide-event -id" )
806
+ . header_exists ( "x-oxide-alert -id" )
807
807
. and ( is_valid_for_webhook ( & webhook) )
808
808
. is_true ( signature_verifies (
809
809
webhook. config . secrets [ 0 ] . id ,
@@ -883,8 +883,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
883
883
} )
884
884
. to_string ( ) ;
885
885
when. method ( POST )
886
- . header ( "x-oxide-event -class" , "test.foo" )
887
- . header ( "x-oxide-event -id" , id. to_string ( ) )
886
+ . header ( "x-oxide-alert -class" , "test.foo" )
887
+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
888
888
. and ( is_valid_for_webhook ( & webhook) )
889
889
. is_true ( signature_verifies (
890
890
webhook. config . secrets [ 0 ] . id ,
@@ -962,8 +962,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
962
962
} )
963
963
. to_string ( ) ;
964
964
when. method ( POST )
965
- . header ( "x-oxide-event -class" , "test.foo" )
966
- . header ( "x-oxide-event -id" , id. to_string ( ) )
965
+ . header ( "x-oxide-alert -class" , "test.foo" )
966
+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
967
967
. and ( is_valid_for_webhook ( & webhook) )
968
968
. is_true ( signature_verifies (
969
969
webhook. config . secrets [ 0 ] . id ,
@@ -1032,8 +1032,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
1032
1032
} )
1033
1033
. to_string ( ) ;
1034
1034
when. method ( POST )
1035
- . header ( "x-oxide-event -class" , "test.foo" )
1036
- . header ( "x-oxide-event -id" , id. to_string ( ) )
1035
+ . header ( "x-oxide-alert -class" , "test.foo" )
1036
+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
1037
1037
. and ( is_valid_for_webhook ( & webhook) )
1038
1038
. is_true ( signature_verifies (
1039
1039
webhook. config . secrets [ 0 ] . id ,
@@ -1116,7 +1116,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
1116
1116
server
1117
1117
. mock_async ( move |when, then| {
1118
1118
when. method ( POST )
1119
- . header ( "x-oxide-event -class" , "probe" )
1119
+ . header ( "x-oxide-alert -class" , "probe" )
1120
1120
. and ( is_valid_for_webhook ( & webhook) )
1121
1121
. is_true ( signature_verifies (
1122
1122
webhook. config . secrets [ 0 ] . id ,
@@ -1170,7 +1170,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
1170
1170
server
1171
1171
. mock_async ( move |when, then| {
1172
1172
when. method ( POST )
1173
- . header ( "x-oxide-event -class" , "probe" )
1173
+ . header ( "x-oxide-alert -class" , "probe" )
1174
1174
. and ( is_valid_for_webhook ( & webhook) )
1175
1175
. is_true ( signature_verifies (
1176
1176
webhook. config . secrets [ 0 ] . id ,
@@ -1219,7 +1219,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
1219
1219
server
1220
1220
. mock_async ( move |when, then| {
1221
1221
when. method ( POST )
1222
- . header ( "x-oxide-event -class" , "probe" )
1222
+ . header ( "x-oxide-alert -class" , "probe" )
1223
1223
. and ( is_valid_for_webhook ( & webhook) )
1224
1224
. is_true ( signature_verifies (
1225
1225
webhook. config . secrets [ 0 ] . id ,
@@ -1289,10 +1289,10 @@ async fn test_probe_resends_failed_deliveries(
1289
1289
server
1290
1290
. mock_async ( move |when, then| {
1291
1291
when. method ( POST )
1292
- . header ( "x-oxide-event -class" , "test.foo" )
1292
+ . header ( "x-oxide-alert -class" , "test.foo" )
1293
1293
// either event
1294
1294
. header_matches (
1295
- "x-oxide-event -id" ,
1295
+ "x-oxide-alert -id" ,
1296
1296
format ! ( "({event1_id})|({event2_id})" ) ,
1297
1297
)
1298
1298
. and ( is_valid_for_webhook ( & webhook) )
@@ -1363,7 +1363,7 @@ async fn test_probe_resends_failed_deliveries(
1363
1363
} )
1364
1364
. to_string ( ) ;
1365
1365
when. method ( POST )
1366
- . header ( "x-oxide-event -class" , "probe" )
1366
+ . header ( "x-oxide-alert -class" , "probe" )
1367
1367
. and ( is_valid_for_webhook ( & webhook) )
1368
1368
. is_true ( signature_verifies (
1369
1369
webhook. config . secrets [ 0 ] . id ,
@@ -1381,10 +1381,10 @@ async fn test_probe_resends_failed_deliveries(
1381
1381
server
1382
1382
. mock_async ( move |when, then| {
1383
1383
when. method ( POST )
1384
- . header ( "x-oxide-event -class" , "test.foo" )
1384
+ . header ( "x-oxide-alert -class" , "test.foo" )
1385
1385
// either event
1386
1386
. header_matches (
1387
- "x-oxide-event -id" ,
1387
+ "x-oxide-alert -id" ,
1388
1388
format ! ( "({event1_id})|({event2_id})" ) ,
1389
1389
)
1390
1390
. and ( is_valid_for_webhook ( & webhook) )
@@ -1453,8 +1453,8 @@ async fn test_api_resends_failed_deliveries(
1453
1453
server
1454
1454
. mock_async ( move |when, then| {
1455
1455
when. method ( POST )
1456
- . header ( "x-oxide-event -class" , "test.foo" )
1457
- . header ( "x-oxide-event -id" , event1_id. to_string ( ) )
1456
+ . header ( "x-oxide-alert -class" , "test.foo" )
1457
+ . header ( "x-oxide-alert -id" , event1_id. to_string ( ) )
1458
1458
. and ( is_valid_for_webhook ( & webhook) )
1459
1459
. is_true ( signature_verifies (
1460
1460
webhook. config . secrets [ 0 ] . id ,
@@ -1513,8 +1513,8 @@ async fn test_api_resends_failed_deliveries(
1513
1513
server
1514
1514
. mock_async ( move |when, then| {
1515
1515
when. method ( POST )
1516
- . header ( "x-oxide-event -class" , "test.foo" )
1517
- . header ( "x-oxide-event -id" , event1_id. to_string ( ) )
1516
+ . header ( "x-oxide-alert -class" , "test.foo" )
1517
+ . header ( "x-oxide-alert -id" , event1_id. to_string ( ) )
1518
1518
. and ( is_valid_for_webhook ( & webhook) )
1519
1519
. is_true ( signature_verifies (
1520
1520
webhook. config . secrets [ 0 ] . id ,
@@ -1592,8 +1592,8 @@ async fn subscription_add_test(
1592
1592
} )
1593
1593
. to_string ( ) ;
1594
1594
when. method ( POST )
1595
- . header ( "x-oxide-event -class" , "test.foo.bar" )
1596
- . header ( "x-oxide-event -id" , id2. to_string ( ) )
1595
+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
1596
+ . header ( "x-oxide-alert -id" , id2. to_string ( ) )
1597
1597
. and ( is_valid_for_webhook ( & webhook) )
1598
1598
. is_true ( signature_verifies (
1599
1599
webhook. config . secrets [ 0 ] . id ,
@@ -1724,8 +1724,8 @@ async fn subscription_remove_test(
1724
1724
} )
1725
1725
. to_string ( ) ;
1726
1726
when. method ( POST )
1727
- . header ( "x-oxide-event -class" , "test.foo.bar" )
1728
- . header ( "x-oxide-event -id" , id1. to_string ( ) )
1727
+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
1728
+ . header ( "x-oxide-alert -id" , id1. to_string ( ) )
1729
1729
. and ( is_valid_for_webhook ( & webhook) )
1730
1730
. is_true ( signature_verifies (
1731
1731
webhook. config . secrets [ 0 ] . id ,
@@ -1805,8 +1805,8 @@ async fn subscription_remove_test(
1805
1805
} )
1806
1806
. to_string ( ) ;
1807
1807
when. method ( POST )
1808
- . header ( "x-oxide-event -class" , "test.foo" )
1809
- . header ( "x-oxide-event -id" , id3. to_string ( ) )
1808
+ . header ( "x-oxide-alert -class" , "test.foo" )
1809
+ . header ( "x-oxide-alert -id" , id3. to_string ( ) )
1810
1810
. and ( is_valid_for_webhook ( & webhook) )
1811
1811
. is_true ( signature_verifies (
1812
1812
webhook. config . secrets [ 0 ] . id ,
0 commit comments