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

INS-12991: Redis authentication support #101

Merged
merged 98 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
e1b601c
Rebase authentication support
XA21X Aug 6, 2021
8023027
Fix RUST_LOG env overrides
XA21X Aug 9, 2021
8e0b6af
Log test connections errors
XA21X Aug 9, 2021
b3b5270
Seperate volumes for redis-cluster-auth tests
XA21X Aug 12, 2021
4c44b9e
Address or reword minor TODOs
XA21X Aug 12, 2021
bed7711
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Aug 26, 2021
fa30a4d
Remove unnecessary Docker volumes
XA21X Aug 26, 2021
5559b0e
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Aug 30, 2021
839c0c7
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Sep 1, 2021
f08f862
Extract dispatch_message
XA21X Sep 2, 2021
30678df
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
7e80a9c
Extract immediate_responder
XA21X Sep 2, 2021
7f86ea9
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
f00c0dc
Implement base authentication support
XA21X Sep 2, 2021
c9cea14
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
613c681
Remove upstream-only authentication
XA21X Sep 2, 2021
50b6100
Add missing util module
XA21X Sep 2, 2021
1890602
Inline rebuild_slot_map_from_addresses
XA21X Sep 2, 2021
4fb55dd
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
cb073d8
Fix log message
XA21X Sep 2, 2021
f196062
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
184b3a1
Fix log message and formatting
XA21X Sep 2, 2021
1cf977e
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 2, 2021
20cc06f
Replace answered TODO
XA21X Sep 2, 2021
ff59778
Exclude replicas from AllMasters routing
XA21X Sep 3, 2021
41e782f
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 3, 2021
c0281bc
Remove TransformError from parse_slots
XA21X Sep 3, 2021
0ed382a
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 3, 2021
79fe31f
Use NoopAuthenticator as default
XA21X Sep 3, 2021
8644693
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 3, 2021
adcf82d
Replace ref Frame with slice
XA21X Sep 6, 2021
a419bb3
Fix clippy
XA21X Sep 6, 2021
5e5f18e
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 6, 2021
a0712e5
Clippy fixes
XA21X Sep 6, 2021
b5b7669
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 6, 2021
1f04aba
Clippy fixes
XA21X Sep 6, 2021
26c703a
Improve upstream Redis error passthrough
XA21X Sep 6, 2021
644a7fb
Inline ResponseFuturesOrdered
XA21X Sep 6, 2021
2710e5f
Tweak names, comments, logging
XA21X Sep 7, 2021
9be5925
Include fix for random slot default
XA21X Sep 7, 2021
ec48af7
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
46c1dd6
Add test_parse_slots
XA21X Sep 7, 2021
7a6c22a
Merge remote-tracking branch 'origin' into auth-refactor
XA21X Sep 7, 2021
54c8321
Use fmt_channels for RedisCluster
XA21X Sep 7, 2021
58402eb
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
c26a65d
Migrate missed changes from #101
XA21X Sep 7, 2021
1202869
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
7887ef2
Extend flaky test timeout
XA21X Sep 7, 2021
eb0d003
Remove Fmt wrapper
XA21X Sep 7, 2021
06f92df
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
0d02aad
Move dispatch_message for cleaner diff
XA21X Sep 7, 2021
cf353fd
Move stale connection detection from #101
XA21X Sep 7, 2021
8e8f9ec
Bump version to 0.0.22
XA21X Sep 7, 2021
189d1d9
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
b47f882
Add slot rebuild warning comment
XA21X Sep 7, 2021
b1e8e5c
Tweak for cleaner diff
XA21X Sep 7, 2021
fc9f836
Migrate missed changes from #101 again
XA21X Sep 7, 2021
4c334cf
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 7, 2021
1363e0a
Tweak for cleaner diff again
XA21X Sep 7, 2021
636df1f
Extend timeout again to prevent flaky test
XA21X Sep 8, 2021
bb5c6c3
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 8, 2021
0de6734
Remove unnecessary move
XA21X Sep 8, 2021
77737eb
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 8, 2021
789fce1
Bump version to v0.0.23
XA21X Sep 9, 2021
9e5bfd3
Bump version to v0.0.23
XA21X Sep 9, 2021
93fde89
Link to issue instead of RFC
XA21X Sep 9, 2021
2a23168
Combined PR feedback
XA21X Sep 9, 2021
805da46
Merge remote-tracking branch 'origin/main' into auth-refactor
XA21X Sep 9, 2021
554bf2b
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 9, 2021
676ee86
Merge branch 'INS-12991-auth-support' of github.com:shotover/shotover…
XA21X Sep 9, 2021
91091ff
Revert bail to context
XA21X Sep 9, 2021
d2edfff
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 9, 2021
dac5dc0
Fix routing ACL to AllNodes
XA21X Sep 9, 2021
08ead3b
Revert one new connection limit
XA21X Sep 9, 2021
7baa747
Merge branch 'auth-refactor' into INS-12991-auth-support
XA21X Sep 9, 2021
2d83dd5
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Sep 10, 2021
9688ddf
Cleanup
XA21X Sep 10, 2021
91278ea
Address PR feedback
XA21X Sep 14, 2021
d5cc9bf
Simplify build_connections
XA21X Sep 14, 2021
3da4d16
Refactor build_connections
XA21X Sep 14, 2021
5a6c870
Combine matches
XA21X Sep 15, 2021
b22ee71
Re-add parallel fetch slot map
XA21X Sep 15, 2021
3b8e4c2
Improve on_auth error handling
XA21X Sep 15, 2021
a14044b
Simplify test_cluster_auth_redis
XA21X Sep 15, 2021
c32d169
Re-add minimal auth mixing test
XA21X Sep 15, 2021
25db114
Tweak error logging
XA21X Sep 15, 2021
fabe2fb
Set default connection timeout to 3s
XA21X Sep 15, 2021
da76a9f
Add AUTH too many args check
XA21X Sep 15, 2021
ae4e108
Simplify on_auth error handling
XA21X Sep 16, 2021
b0da836
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Sep 16, 2021
6dfaaab
Clean up test_cluster_auth_redis
XA21X Sep 16, 2021
f7ab249
Disable rebuild_connections on first message
XA21X Sep 16, 2021
b76d859
Remove unnecessary collect
XA21X Sep 16, 2021
f3e347b
Make user less confusing in auth test
XA21X Sep 16, 2021
f1f4b99
Remove unnecessary transpose
XA21X Sep 16, 2021
56d16b1
Merge remote-tracking branch 'origin/main' into INS-12991-auth-support
XA21X Sep 19, 2021
d424c03
Remove unused strict_close_mode
XA21X Sep 19, 2021
65a55ef
Clippy fix unnecesary clone
XA21X Sep 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shotover-proxy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shotover-proxy"
version = "0.0.21"
version = "0.0.23"
authors = ["Ben <ben@instaclustr.com>"]
edition = "2018"

Expand Down
26 changes: 0 additions & 26 deletions shotover-proxy/examples/redis-cluster-auth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2230:6379"
volumes:
- redis-cluster_data-0:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -14,8 +12,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2231:6379"
volumes:
- redis-cluster_data-1:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -24,8 +20,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2232:6379"
volumes:
- redis-cluster_data-2:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -34,8 +28,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2233:6379"
volumes:
- redis-cluster_data-3:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -44,8 +36,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2234:6379"
volumes:
- redis-cluster_data-4:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -54,8 +44,6 @@ services:
image: docker.io/bitnami/redis-cluster:6.0-debian-10
ports:
- "2235:6379"
volumes:
- redis-cluster_data-5:/bitnami/redis/data
environment:
- 'REDIS_PASSWORD=shotover'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
Expand All @@ -75,17 +63,3 @@ services:
- 'REDIS_CLUSTER_REPLICAS=1'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
- 'REDIS_CLUSTER_CREATOR=yes'

volumes:
redis-cluster_data-0:
driver: local
redis-cluster_data-1:
driver: local
redis-cluster_data-2:
driver: local
redis-cluster_data-3:
driver: local
redis-cluster_data-4:
driver: local
redis-cluster_data-5:
driver: local
14 changes: 10 additions & 4 deletions shotover-proxy/examples/redis-cluster-auth/topology.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ sources:
chain_config:
redis_chain:
- RedisCluster:
first_contact_points: ["redis://127.0.0.1:2230/", "redis://127.0.0.1:2231/", "redis://127.0.0.1:2232/", "redis://127.0.0.1:2233/", "redis://127.0.0.1:2234/", "redis://127.0.0.1:2235/"]
named_topics:
testtopic: 5
first_contact_points:
[
"127.0.0.1:2230",
"127.0.0.1:2231",
"127.0.0.1:2232",
"127.0.0.1:2233",
"127.0.0.1:2234",
"127.0.0.1:2235",
]
source_to_chain_mapping:
redis_prod: redis_chain
redis_prod: redis_chain
10 changes: 0 additions & 10 deletions shotover-proxy/src/transforms/redis_transforms/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::io;

use crate::transforms::util::cluster_connection_pool::NoopError;
use crate::transforms::util::ConnectionError;

pub mod redis_cache;
Expand Down Expand Up @@ -69,12 +68,3 @@ impl From<ConnectionError<TransformError>> for TransformError {
}
}
}

impl From<ConnectionError<NoopError>> for TransformError {
fn from(error: ConnectionError<NoopError>) -> Self {
match error {
ConnectionError::IO(e) => TransformError::IO(e),
ConnectionError::Authenticator(_) => unimplemented!(),
}
}
}
Loading