-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] ChatQnA Security Assessment (It is not a Security Audit) #1220
Comments
@arun-gupta |
I was having a discussion with folks in the CNCF AI/ML working group. @dehatideep offered to help out with the security review of the OPEA samples. This is a result of that. That is all the context that I can provide. It would be useful to look at these recommendations and see how we can improve the security of ChatQnA, and possibly other samples. |
The assessment is really helpful! We will review it carefully and take some actions. BR, |
Yes, definitely we'll review these recommendations and improve GenAI examples, I believe not only ChatQnA, but also other examples. |
We are starting to fix problems pointed out by you. Would you please help for some details in ChatQnA security Assessment: ChatQnA/docker_compose/install_docker.sh
I did not get your point. Would you please give some more details. Thanks!
Do you mean non-default should be https? |
Install prerequisitessudo apt-get -y install ca-certificates curl Create the directory for the Docker GPG keysudo install -m 0755 -d /etc/apt/keyrings Add Docker's official GPG keysudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc Set permissions for the GPG keysudo chmod a+r /etc/apt/keyrings/docker.asc
[Deep] If you have a rule (say an iptable firewall, it is not there though) where this port 8888 is accessible only internally (localhost/127.0.0.1), then it is fine but as it exists today, an external host, say 10.11.12.13 may call it like: http://10.11.12.13:8888/v1/chatqna and this opens the door for spoofing/MITM attack because connection is insecure. It should all be https, particularly if this port can be accessed by external machines. Basically you have to create an https server instead of http and that would require a TLS certificates, which you can generate locally. This would be a self-signed cert but at least transport pipe would be opaque. |
Thank you for your explanation in detail! I checked the installation of docker. It seems this script copied from docker website Just keep it unchanged if there is no potential issue. For the https interfaces. Yes, we agree with you. The problem is we cannot sign certificates. OPEA is a reference design. We plan to put the https interface implementation to the customized implementation stage. |
#1220 (comment) Coming to http vs https pipe, your ref design must have https IMO. You can always generate a self-signed certificate for the server with the advice that customized implementation must install their CA Signed cert installed on the server and make Signer cert available to users, just the way Docker public key is brought in the first case above. When server is running default self-signed server, clients can skip cert verification. Note that self-signed cert is also a problem, given it cant be verified, so client doesn't know if connection is spoofed, however it ensures that pipe is opaque to everyone else. I have no opinion if you want to defer it to customized implementation, just add comments somewhere, else people simply clone the repo and the issue remains buried there. |
@dehatideep I'll add some comments in README to keep everyone aware and be noticed about https secure connection here. |
Tagging @kdruckman for awareness |
GenAIExamples/ChatQnA/docker_compose/install_docker.sh I would like to remove it. Any comment? |
Priority
Undecided
OS type
Other (Please let us know in description)
Hardware type
CPU-other (Please let us know in description)
Installation method
Deploy method
Running nodes
Single Node
What's the version?
2b2c7ee
Description
ChatQnA security Assessment:
https://docs.google.com/document/d/1df20UOmqJ_30VW5i6MajxXbJn3KhwVHfxYo3oGt2W5o/edit?usp=sharing
Reproduce steps
See the security assessment details. These are based upon code reading.
Raw log
The text was updated successfully, but these errors were encountered: