Skip to content
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

feat: update codis fe / proxy with tls; topom updated #2383

Open
wants to merge 18 commits into
base: unstable
Choose a base branch
from

Conversation

kolinfluence
Copy link

codis fe / proxy tls + topom update

@github-actions github-actions bot added 🧹 Updates This will not be worked on Invalid PR Title labels Feb 1, 2024
@kolinfluence kolinfluence changed the title codis fe / proxy tls + topom update feat: update codis fe / proxy with tls; topom updated Feb 2, 2024
@sprappcom
Copy link

@AlexStocks please look into it.

codis/config/dashboard.toml Outdated Show resolved Hide resolved
codis/pkg/proxy/.proxy.go.swo Outdated Show resolved Hide resolved
codis/admin/.codis-fe-admin.sh.swo Outdated Show resolved Hide resolved
codis/cert.pem Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better not to provide the public key file. Instead, you can add a generation command in the readme.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@machinly the public key file is definitely a dummy one.
you put "filesystem" as default, surely a dummy version is fine right? ... maybe you can modify with error message generated when there's no cert / key files present after you merge this and delete them. will that do fine?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not modify the default configuration

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you only pull what is needed?

codis/key.pem Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better not to provide the private key file. Instead, you can add a generation command in the readme.

jodis_name = ""
jodis_addr = ""
jodis_name = "etcd"
jodis_addr = "127.0.0.1:2379"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not modify the default parameter values

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you only pull what is needed?

@@ -25,8 +25,10 @@ const DefaultConfig = `
# Set Coordinator, only accept "zookeeper" & "etcd" & "filesystem".
# for zookeeper/etcd, coorinator_auth accept "user:password"
# Quick Start
coordinator_name = "filesystem"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not modify the default parameter values

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you only pull what is needed?

codis/pkg/models/store.go Outdated Show resolved Hide resolved
# slow command list e.g. hgetall, mset
slow_cmd_list = ""
# quick command list
quick_cmd_list = "get,set"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not modify the default configuration

CODIS_FE_ADDR="0.0.0.0:9090"
CODIS_FE_TLS=1
CODIS_FE_TLS_KEY="/usr/local/src/pika/codis/key.pem"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment this code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help add the rest?

@kolinfluence
Copy link
Author

noted. will revert.

@github-actions github-actions bot added the ✏️ Feature New feature or request label Mar 14, 2024
@kolinfluence
Copy link
Author

@machinly pls check again, i've done all. sorry for the issues.
for code generation, do provide what examples you think is good. for the cert is just dummy test like your "filesystem" thing.

@luky116
Copy link
Collaborator

luky116 commented Apr 21, 2024

codis-fe cannot access, have you tried in you local env?
image

@luky116
Copy link
Collaborator

luky116 commented Apr 21, 2024

proxy cannot connect?

image

@luky116
Copy link
Collaborator

luky116 commented Apr 21, 2024

Judging from your code, you want to add the TLS protocol to the redis protocol port of the proxy layer. If so, can dashboard and fe not add TLS? Because they interact through the http protocol, the proxy's redis protocol port is only responsible for the user's redis client connection.

@kolinfluence
Copy link
Author

kolinfluence commented Apr 21, 2024

@luky116 sorry was busy playing with lru benchmark tests update here so a bit lagged behind on pika (but it's on my radar daily).
https://github.com/cloudxaas/gocache/tree/main/lrux/bytes
need fast lru. (promoting it coz may be able to be used in codis too and would hope for improvement to make it faster, kind of applicable to cache)

back to your question...

  1. the dashboard and fe is added for remote users to the dashboard and fe. it's optional configuration parameter. if you set tls = true, then it will do the tls feature, else wont affect performance at runtime.

  2. it'll be useful for wider adoption considering a lot of dev can remotely access their dashboard / fe etc knowing it's more secure. basically it wont affect the runtime performance.

  3. dashboard and fe why not add tls to interact with https protocol too?
    ok i see your point. so maybe we can also do a tlsfe = 1, tlsdashboard = 1, tlspika = 1 etc kind of parameter too. we can allow http/https to run concurrently without affecting performance and the fe/dashboard choosing which to connect to.

good?

@kolinfluence
Copy link
Author

kolinfluence commented Apr 21, 2024

proxy cannot connect?

image

you need to use redis-cli with secure tls to connect put
redis-cli --tls
as option parameter

pls remember it will only use tls for proxy if it's set to true. so accordingly, we will need to put tls-something for everything else etc where we want tls to have. so maybe tls-pika = true in future when pika has tls? but proxy shld definitely have tls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0.0 ✏️ Feature New feature or request 🧹 Updates This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants