@@ -63,74 +63,39 @@ def error!(message, code)
6363 end
6464
6565 it "rejects request with empty string type" do
66- endpoint_config = { auth : { type : "" } }
67-
68- expect do
69- instance . validate_auth! ( payload , headers , endpoint_config )
70- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
66+ # TODO
7167 end
7268 end
7369
7470 context "with missing secret configuration" do
7571 it "rejects request with missing secret_env_key" do
76- endpoint_config = { auth : { type : "hmac" } }
77-
78- expect do
79- instance . validate_auth! ( payload , headers , endpoint_config )
80- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
72+ # TODO
8173 end
8274
8375 it "rejects request with nil secret_env_key" do
84- endpoint_config = { auth : { type : "hmac" , secret_env_key : nil } }
85-
86- expect do
87- instance . validate_auth! ( payload , headers , endpoint_config )
88- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
76+ # TODO
8977 end
9078
9179 it "rejects request with empty secret_env_key" do
92- endpoint_config = { auth : { type : "hmac" , secret_env_key : "" } }
93-
94- expect do
95- instance . validate_auth! ( payload , headers , endpoint_config )
96- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
80+ # TODO
9781 end
9882
9983 it "rejects request with whitespace-only secret_env_key" do
100- endpoint_config = { auth : { type : "hmac" , secret_env_key : " " } }
101-
102- expect do
103- instance . validate_auth! ( payload , headers , endpoint_config )
104- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
84+ # TODO
10585 end
10686
10787 it "rejects request with non-string secret_env_key" do
108- endpoint_config = { auth : { type : "hmac" , secret_env_key : 123 } }
109-
110- expect do
111- instance . validate_auth! ( payload , headers , endpoint_config )
112- end . to raise_error ( StandardError , /authentication configuration incomplete/ )
88+ # TODO
11389 end
11490 end
11591
11692 context "with missing environment variable" do
11793 it "uses generic error message for missing secrets" do
118- endpoint_config = { auth : { type : "hmac" , secret_env_key : "NONEXISTENT_SECRET" } }
119-
120- expect do
121- instance . validate_auth! ( payload , headers , endpoint_config )
122- end . to raise_error ( StandardError , /authentication secret not configured/ )
94+ # TODO
12395 end
12496
12597 it "does not leak the environment variable name in error" do
126- endpoint_config = { auth : { type : "hmac" , secret_env_key : "SUPER_SECRET_WEBHOOK_KEY" } }
127-
128- expect do
129- instance . validate_auth! ( payload , headers , endpoint_config )
130- end . to raise_error do |error |
131- expect ( error . message ) . not_to include ( "SUPER_SECRET_WEBHOOK_KEY" )
132- expect ( error . message ) . to include ( "authentication secret not configured" )
133- end
98+ # TODO
13499 end
135100 end
136101
0 commit comments