Skip to content

Commit

Permalink
remove
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang committed Nov 6, 2024
1 parent bc9d798 commit d74b1ae
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
Empty file added e2e_test/webhook/check.slt.part
Empty file.
21 changes: 21 additions & 0 deletions e2e_test/webhook/create_table.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

statement ok
create table github_sha1 (
data JSONB
) WITH (
connector = 'webhook',
) VALIDATE SECRET test_secret AS secure_compare(
headers->>'X-Hub-Signature',
hmac(test_secret, data, 'sha1')
);

statement ok
create table github_sha256 (
data JSONB
) WITH (
connector = 'webhook',
) VALIDATE SECRET test_secret AS secure_compare(
headers->>'X-Hub-Signature-256',
hmac(test_secret, data, 'sha256')
);

Empty file added e2e_test/webhook/sender.py
Empty file.
4 changes: 4 additions & 0 deletions e2e_test/webhook/webhook_source.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
statement ok
CREATE SECRET test_secret WITH ( backend = 'meta') AS 'TEST_WEBHOOK';

include ../create_table.slt.part
4 changes: 4 additions & 0 deletions src/frontend/src/webhook/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ pub(super) mod handlers {
Path((user, database, schema, table)): Path<(String, String, String, String)>,
body: Bytes,
) -> Result<()> {
println!(
"WKXLOG receive something: {:?}, database: {}, table: {}",
body, database, table
);
let session_mgr = SESSION_MANAGER
.get()
.expect("session manager has been initialized");
Expand Down

0 comments on commit d74b1ae

Please sign in to comment.