Skip to content

Commit

Permalink
wip: regenerate tests files
Browse files Browse the repository at this point in the history
  • Loading branch information
David Ragot committed Nov 8, 2023
1 parent fc1636e commit f96582f
Show file tree
Hide file tree
Showing 41 changed files with 727 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,29 @@ data:
}
}
(audit) {
audit {
# Kafka publisher
publisher_kafka_broker {$PUBLISHER_KAFKA_BROKER:redpanda:29092}
publisher_kafka_enabled {$PUBLISHER_KAFKA_ENABLED:false}
publisher_kafka_tls_enabled {$PUBLISHER_KAFKA_TLS_ENABLED:false}
publisher_kafka_sasl_enabled {$PUBLISHER_KAFKA_SASL_ENABLED:false}
publisher_kafka_sasl_username {$PUBLISHER_KAFKA_SASL_USERNAME}
publisher_kafka_sasl_password {$PUBLISHER_KAFKA_SASL_PASSWORD}
publisher_kafka_sasl_mechanism {$PUBLISHER_KAFKA_SASL_MECHANISM}
publisher_kafka_sasl_scram_sha_size {$PUBLISHER_KAFKA_SASL_SCRAM_SHA_SIZE}
}
}
{
# Many directives manipulate the HTTP handler chain and the order in which
# those directives are evaluated matters. So the jwtauth directive must be
# ordered.
# c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order
order auth before basicauth
order versions after metrics
order audit after encode
}
:8000 {
Expand All @@ -45,6 +59,7 @@ data:
reverse_proxy 127.0.0.1:10002
import cors
import audit
}
@paymentsmatcher {
path /api/payments/payments*
Expand All @@ -55,6 +70,7 @@ data:
reverse_proxy 127.0.0.1:10003
import cors
import auth
import audit
}
@accountsmatcher {
path /api/payments/accounts*
Expand All @@ -65,6 +81,7 @@ data:
reverse_proxy 127.0.0.1:10003
import cors
import auth
import audit
}
@bank-accounts-readmatcher {
path /api/payments/bank-accounts*
Expand All @@ -75,6 +92,7 @@ data:
reverse_proxy 127.0.0.1:10003
import cors
import auth
import audit
}
@transfer-initiations-readmatcher {
path /api/paymentstransfer-initiations*
Expand All @@ -85,6 +103,7 @@ data:
reverse_proxy 127.0.0.1:10003
import cors
import auth
import audit
}
@payments-apimatcher {
Expand All @@ -96,6 +115,7 @@ data:
import cors
import auth
import audit
}
@connectorsmatcher {
path /api/payments/connectors*
Expand All @@ -105,6 +125,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@configsmatcher {
path /api/payments/configs*
Expand All @@ -114,6 +135,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@transfer-initiations-writematcher {
path /api/paymentstransfer-initiations*
Expand All @@ -124,6 +146,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@bank-accounts-writematcher {
path /api/payments/bank-accounts*
Expand All @@ -134,6 +157,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@payments-connectorsmatcher {
Expand All @@ -145,6 +169,7 @@ data:
import cors
import auth
import audit
}
@searchmatcher {
Expand All @@ -156,6 +181,7 @@ data:
import cors
import auth
import audit
}
@search-benthosmatcher {
Expand All @@ -167,6 +193,7 @@ data:
import cors
import auth
import audit
}
@walletsmatcher {
Expand All @@ -178,6 +205,7 @@ data:
import cors
import auth
import audit
}
@webhooksmatcher {
Expand All @@ -189,6 +217,7 @@ data:
import cors
import auth
import audit
}
handle /versions {
Expand All @@ -215,6 +244,7 @@ data:
handle {
reverse_proxy control:3000
import cors
import audit
}
}
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
apiVersion: v1
data:
gateway_audit.yaml: |
input:
event_bus:
topic: audit
consumer_group: search-audit
pipeline:
processors:
- log:
message: "receive message: ${! this }"
- switch_event_type:
events:
- label: AUDIT
processors:
- bloblang: |
root = {
"data": this.payload,
"kind": "AUDIT",
"when": this.date
}
meta id = "AUDIT-%s".format(this.payload.id)
meta action = "index"
output:
resource: elasticsearch
ledger_ingestion.yaml: |
---
input:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ spec:
value: gateway
- name: STACK
value: monopod-disabled-one-service
- name: BROKER
value: kafka
- name: PUBLISHER_KAFKA_ENABLED
value: "true"
- name: PUBLISHER_KAFKA_BROKER
value: kafka:1234
image: ghcr.io/formancehq/gateway:latest
imagePullPolicy: Always
name: gateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,29 @@ data:
}
}
(audit) {
audit {
# Kafka publisher
publisher_kafka_broker {$PUBLISHER_KAFKA_BROKER:redpanda:29092}
publisher_kafka_enabled {$PUBLISHER_KAFKA_ENABLED:false}
publisher_kafka_tls_enabled {$PUBLISHER_KAFKA_TLS_ENABLED:false}
publisher_kafka_sasl_enabled {$PUBLISHER_KAFKA_SASL_ENABLED:false}
publisher_kafka_sasl_username {$PUBLISHER_KAFKA_SASL_USERNAME}
publisher_kafka_sasl_password {$PUBLISHER_KAFKA_SASL_PASSWORD}
publisher_kafka_sasl_mechanism {$PUBLISHER_KAFKA_SASL_MECHANISM}
publisher_kafka_sasl_scram_sha_size {$PUBLISHER_KAFKA_SASL_SCRAM_SHA_SIZE}
}
}
{
# Many directives manipulate the HTTP handler chain and the order in which
# those directives are evaluated matters. So the jwtauth directive must be
# ordered.
# c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order
order auth before basicauth
order versions after metrics
order audit after encode
}
:8000 {
Expand All @@ -45,6 +59,7 @@ data:
reverse_proxy 127.0.0.1:10002
import cors
import audit
}
@ledgermatcher {
Expand All @@ -56,6 +71,7 @@ data:
import cors
import auth
import audit
}
@orchestrationmatcher {
Expand All @@ -67,6 +83,7 @@ data:
import cors
import auth
import audit
}
@paymentsmatcher {
path /api/payments/payments*
Expand All @@ -77,6 +94,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@accountsmatcher {
path /api/payments/accounts*
Expand All @@ -87,6 +105,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@bank-accounts-readmatcher {
path /api/payments/bank-accounts*
Expand All @@ -97,6 +116,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@transfer-initiations-readmatcher {
path /api/paymentstransfer-initiations*
Expand All @@ -107,6 +127,7 @@ data:
reverse_proxy 127.0.0.1:10004
import cors
import auth
import audit
}
@payments-apimatcher {
Expand All @@ -118,6 +139,7 @@ data:
import cors
import auth
import audit
}
@connectorsmatcher {
path /api/payments/connectors*
Expand All @@ -127,6 +149,7 @@ data:
reverse_proxy 127.0.0.1:10005
import cors
import auth
import audit
}
@configsmatcher {
path /api/payments/configs*
Expand All @@ -136,6 +159,7 @@ data:
reverse_proxy 127.0.0.1:10005
import cors
import auth
import audit
}
@transfer-initiations-writematcher {
path /api/paymentstransfer-initiations*
Expand All @@ -146,6 +170,7 @@ data:
reverse_proxy 127.0.0.1:10005
import cors
import auth
import audit
}
@bank-accounts-writematcher {
path /api/payments/bank-accounts*
Expand All @@ -156,6 +181,7 @@ data:
reverse_proxy 127.0.0.1:10005
import cors
import auth
import audit
}
@payments-connectorsmatcher {
Expand All @@ -167,6 +193,7 @@ data:
import cors
import auth
import audit
}
@searchmatcher {
Expand All @@ -178,6 +205,7 @@ data:
import cors
import auth
import audit
}
@search-benthosmatcher {
Expand All @@ -189,6 +217,7 @@ data:
import cors
import auth
import audit
}
@walletsmatcher {
Expand All @@ -200,6 +229,7 @@ data:
import cors
import auth
import audit
}
@webhooksmatcher {
Expand All @@ -211,6 +241,7 @@ data:
import cors
import auth
import audit
}
handle /versions {
Expand Down Expand Up @@ -239,6 +270,7 @@ data:
handle {
reverse_proxy control:3000
import cors
import audit
}
}
kind: ConfigMap
Expand Down
Loading

0 comments on commit f96582f

Please sign in to comment.