-
-
Notifications
You must be signed in to change notification settings - Fork 596
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] gRPC API Has No Authentication #858
Comments
Hello, generally it's expected – GRPC comes without auth by default. It's possible to protect it with API key, see: https://centrifugal.dev/docs/server/server_api#grpc-api-key-authorization Probably the decision was like this because there was no common default way to make auth with GRPC and it runs on separate port. It's also possible to configure mTLS - this is not very well documented at this point - but basically for Centrifugo v5 using |
Oh, sorry, I missed adding that. I was thinking it was the same API key for the rest: grpc_api_key: admin. Thanks! |
@FZambia, thanks a lot for your help. God bless you. |
The API for getting info in gRPC has no authentication at all. I can call the info through gRPC and get the result without requiring authentication, but when I call the info API, it requires authentication.
my Centrifugo configruation is
When I call the REST API localhost:8000/api/info, it requires an X-API-Key and returns a 401 Unauthorized error if the key is not provided. However, when I call the gRPC info service on localhost:10000, I can get the info without any error.
Versions
Centrifugo version is 5.4.1
Operating system is windows , docker
Steps to Reproduce
docker run --rm --ulimit nofile=262144:262144 -v C:\Users\user\centrifugo:/centrifugo --network my-net --net host -p 8000:8000 -p 10000:10000 centrifugo/centrifugo:v5 centrifugo -c config.json
Expected behavior
When calling gRPC methods without providing an API key, it should return a 401 Unauthorized error
The text was updated successfully, but these errors were encountered: