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

Add SCRAM tests #738

Merged
merged 64 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0558a06
fix all MONGO_OPLOG_URL
b1ron Jan 16, 2024
6db2539
FERRETDB_REPL_SET_NAME
b1ron Jan 16, 2024
be5a833
replSetName
b1ron Jan 16, 2024
5ad121e
add new service and create a root user with enableLocalhostAuthBypass
b1ron Jan 16, 2024
21d0ea0
remove unnecessary task and trim -secured
b1ron Jan 16, 2024
6a9cb99
add dotnet tests
b1ron Jan 16, 2024
37cfaf4
expected to break
b1ron Jan 16, 2024
054bfc4
add key file
b1ron Jan 16, 2024
668d216
fix config file
b1ron Jan 16, 2024
a52cd15
enable auth by default using a keyfile
b1ron Jan 16, 2024
fa0ffd5
fix workflow
b1ron Jan 16, 2024
80f19e5
should work
b1ron Jan 16, 2024
cef4bef
add directConnection
b1ron Jan 16, 2024
cf8ce36
add connect=replicaSet
b1ron Jan 16, 2024
bc86e6e
add replicaSet=rs0
b1ron Jan 16, 2024
edc58f3
fix
b1ron Jan 16, 2024
632c293
trick topology
b1ron Jan 16, 2024
cc6b115
python SCRAM-SHA-1
b1ron Jan 17, 2024
2d200fe
try
b1ron Jan 17, 2024
8ee7ab2
try
b1ron Jan 17, 2024
c794029
try
b1ron Jan 17, 2024
2eda99c
try
b1ron Jan 17, 2024
0403d77
revert conf
b1ron Jan 17, 2024
e013ee8
try
b1ron Jan 17, 2024
4732945
try
b1ron Jan 17, 2024
de52905
try
b1ron Jan 17, 2024
a2ea249
chown file by overwriting the entrypoint
b1ron Jan 18, 2024
927942c
remove key for now
b1ron Jan 18, 2024
a6f5505
w
b1ron Jan 18, 2024
2c5d4b9
add key
b1ron Jan 18, 2024
cb4bf71
ignore keyfile
b1ron Jan 18, 2024
cfcea45
ignore keyfile
b1ron Jan 18, 2024
c8d1df0
add link to stackoverflow
b1ron Jan 18, 2024
b23c8dd
use x.509 certs
b1ron Jan 18, 2024
5805b91
fix URIs
b1ron Jan 18, 2024
dd10170
fix TLS for mongo shell
b1ron Jan 19, 2024
da14d66
flags for legacy mongo shell for self signed certificates
b1ron Jan 19, 2024
a53800f
remove build .gitignore
b1ron Jan 19, 2024
1069d11
fixes
b1ron Jan 21, 2024
fe541cc
tweak config file
b1ron Jan 21, 2024
4a9ee7f
allowConnectionsWithoutCertificates for mTLS
b1ron Jan 21, 2024
0496789
fix scram-sha-1 tests
b1ron Jan 21, 2024
b3a96fb
add remaining tests
b1ron Jan 22, 2024
dad4e64
do not run them on CI yet
b1ron Jan 22, 2024
71a6b8b
fixes
b1ron Jan 22, 2024
70ecd5d
revert complete mess
b1ron Jan 22, 2024
c571be3
fixes
b1ron Jan 22, 2024
b791894
remove MONGO_INITDB_ROOT environment variables
b1ron Jan 22, 2024
5d804fb
fix Taskfile
b1ron Jan 22, 2024
341485e
format
b1ron Jan 22, 2024
461ee6f
stats
b1ron Jan 22, 2024
ea2c735
fix stats
b1ron Jan 24, 2024
4da95a2
fix stats
b1ron Jan 24, 2024
4641869
fix
b1ron Jan 24, 2024
6e84f4f
fixes
b1ron Jan 24, 2024
2d979b1
fix config files
b1ron Jan 24, 2024
0dc202e
revert changes to config.go
b1ron Jan 24, 2024
9eaf423
newline
b1ron Jan 25, 2024
d9ca445
Merge branch 'main' into scram
AlekSi Jan 26, 2024
448e0af
Taskfile
b1ron Jan 27, 2024
778758c
ignore error for roles that have not been impl yet
b1ron Jan 27, 2024
4b71904
enable new auth for sqlite
b1ron Jan 27, 2024
869f99c
Merge branch 'main' into scram
b1ron Jan 29, 2024
cf1a8d0
fix config
b1ron Jan 29, 2024
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
Prev Previous commit
Next Next commit
enable auth by default using a keyfile
  • Loading branch information
b1ron committed Jan 16, 2024
commit a52cd153e3135b1acc95fc88709226e25bb350a5
2 changes: 1 addition & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ tasks:
cmds:
- >
docker compose run --rm mongosh mongosh
'mongodb://host.docker.internal:27017/'
'mongodb://user:password@host.docker.internal:27017/'
--eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "localhost"}]})'
# this is true to prevent an already initialized error and no such command error for replSetInitiate
ignore_error: true
Expand Down
2 changes: 0 additions & 2 deletions cmd/dance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ func main() {
log.Fatal("-db is required")
}

*dbF = strings.TrimSuffix(*dbF, "-secured")

ctx, stop := notifyAppTermination(context.Background())
go func() {
<-ctx.Done()
Expand Down
25 changes: 2 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,6 @@ services:
command: --config /etc/mongod.conf
container_name: dance_mongodb
restart: unless-stopped
ulimits:
nproc: 64000
nofile:
soft: 64000
hard: 64000
ports:
- 27017:27017
environment:
# Always UTC+05:45. Set to catch timezone problems.
- TZ=Asia/Kathmandu
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./build/mongod.conf:/etc/mongod.conf

mongodb-secured:
build:
context: ./build/deps
dockerfile: mongo7.Dockerfile
command: --config /etc/mongod.conf
container_name: dance_mongodb_secured
restart: unless-stopped
ulimits:
nproc: 64000
nofile:
Expand All @@ -90,7 +68,8 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./build/mongod_secured.conf:/etc/mongod.conf
- ./build/mongod.conf:/etc/mongod.conf
- ./build/key:/etc/key

# never started normally, used only for mongosh, mongodump, etc.
mongosh:
Expand Down
Loading