nic-6443 opened a new pull request, #13785:
URL: https://github.com/apache/apisix/pull/13785

   ### Description
   
   `sls-logger` performed `sock:sslhandshake(true, nil, false)` — no SNI and 
TLS certificate verification disabled — with no schema option to enable it. 
Meanwhile every RFC5424 record carries the plaintext Aliyun `access_key_id` / 
`access_key_secret` in its STRUCTURED-DATA. An on-path attacker between the 
gateway and the Aliyun SLS endpoint could present any certificate, complete the 
handshake, and capture the long-lived AccessKey plus all logged data.
   
   This adds an `ssl_verify` boolean option (default `true`) and passes the 
configured `host` as the SNI, so the log server's certificate is verified by 
default. Users terminating TLS at an untrusted/self-signed endpoint can opt out 
with `ssl_verify: false`.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (Aliyun SLS 
uses a publicly-trusted certificate; only untrusted/self-signed endpoints need 
`ssl_verify: false`)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to