forked from minio/minio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: information disclosure bug in preconditions GET (minio#19810)
precondition check was being honored before, validating if anonymous access is allowed on the metadata of an object, leading to metadata disclosure of the following headers. ``` Last-Modified Etag x-amz-version-id Expires: Cache-Control: ``` although the information presented is minimal in nature, and of opaque nature. It still simply discloses that an object by a specific name exists or not without even having enough permissions.
- Loading branch information
1 parent
9d20dec
commit e0fe7cc
Showing
19 changed files
with
91 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ function start_minio_3_node() { | |
export MINIO_ERASURE_SET_DRIVE_COUNT=6 | ||
export MINIO_CI_CD=1 | ||
|
||
start_port=$2 | ||
start_port=$1 | ||
args="" | ||
for i in $(seq 1 3); do | ||
args="$args http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/1/ http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/2/ http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/3/ http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/4/ http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/5/ http://127.0.0.1:$((start_port + i))${WORK_DIR}/$i/6/" | ||
|
@@ -37,7 +37,8 @@ function start_minio_3_node() { | |
pid3=$! | ||
disown $pid3 | ||
|
||
sleep "$1" | ||
export MC_HOST_myminio="http://minio:[email protected]:$((start_port + 1))" | ||
/tmp/mc ready myminio | ||
|
||
if ! ps -p $pid1 1>&2 >/dev/null; then | ||
echo "server1 log:" | ||
|
@@ -99,18 +100,23 @@ function __init__() { | |
|
||
## version is purposefully set to '3' for minio to migrate configuration file | ||
echo '{"version": "3", "credential": {"accessKey": "minio", "secretKey": "minio123"}, "region": "us-east-1"}' >"$MINIO_CONFIG_DIR/config.json" | ||
|
||
if [ ! -f /tmp/mc ]; then | ||
wget --quiet -O /tmp/mc https://dl.minio.io/client/mc/release/linux-amd64/mc && | ||
chmod +x /tmp/mc | ||
fi | ||
} | ||
|
||
function perform_test() { | ||
start_minio_3_node 120 $2 | ||
start_minio_3_node $2 | ||
|
||
echo "Testing Distributed Erasure setup healing of drives" | ||
echo "Remove the contents of the disks belonging to '${1}' erasure set" | ||
|
||
rm -rf ${WORK_DIR}/${1}/*/ | ||
|
||
set -x | ||
start_minio_3_node 120 $2 | ||
start_minio_3_node $2 | ||
|
||
rv=$(check_online) | ||
if [ "$rv" == "1" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,18 @@ MINIO=("$PWD/minio" --config-dir "$MINIO_CONFIG_DIR" server) | |
GOPATH=/tmp/gopath | ||
|
||
function start_minio_3_node() { | ||
for i in $(seq 1 3); do | ||
rm "${WORK_DIR}/dist-minio-server$i.log" | ||
done | ||
|
||
export MINIO_ROOT_USER=minio | ||
export MINIO_ROOT_PASSWORD=minio123 | ||
export MINIO_ERASURE_SET_DRIVE_COUNT=6 | ||
export MINIO_CI_CD=1 | ||
|
||
first_time=$(find ${WORK_DIR}/ | grep format.json | wc -l) | ||
|
||
start_port=$2 | ||
start_port=$1 | ||
args="" | ||
for d in $(seq 1 3 5); do | ||
args="$args http://127.0.0.1:$((start_port + 1))${WORK_DIR}/1/${d}/ http://127.0.0.1:$((start_port + 2))${WORK_DIR}/2/${d}/ http://127.0.0.1:$((start_port + 3))${WORK_DIR}/3/${d}/ " | ||
|
@@ -42,9 +46,11 @@ function start_minio_3_node() { | |
pid3=$! | ||
disown $pid3 | ||
|
||
sleep "$1" | ||
export MC_HOST_myminio="http://minio:[email protected]:$((start_port + 1))" | ||
/tmp/mc ready myminio | ||
|
||
[ ${first_time} -eq 0 ] && upload_objects $start_port | ||
[ ${first_time} -eq 0 ] && upload_objects | ||
[ ${first_time} -ne 0 ] && sleep 120 | ||
|
||
if ! ps -p $pid1 1>&2 >/dev/null; then | ||
echo "server1 log:" | ||
|
@@ -127,10 +133,6 @@ function __init__() { | |
} | ||
|
||
function upload_objects() { | ||
start_port=$1 | ||
|
||
/tmp/mc alias set myminio http://127.0.0.1:$((start_port + 1)) minio minio123 --api=s3v4 | ||
/tmp/mc ready myminio | ||
/tmp/mc mb myminio/testbucket/ | ||
for ((i = 0; i < 20; i++)); do | ||
echo "my content" | /tmp/mc pipe myminio/testbucket/file-$i | ||
|
@@ -140,15 +142,15 @@ function upload_objects() { | |
function perform_test() { | ||
start_port=$2 | ||
|
||
start_minio_3_node 120 $start_port | ||
start_minio_3_node $start_port | ||
|
||
echo "Testing Distributed Erasure setup healing of drives" | ||
echo "Remove the contents of the disks belonging to '${1}' node" | ||
|
||
rm -rf ${WORK_DIR}/${1}/*/ | ||
|
||
set -x | ||
start_minio_3_node 120 $start_port | ||
start_minio_3_node $start_port | ||
|
||
check_heal ${1} | ||
rv=$? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/minio/minio/docs/debugging/pprofgoparser | ||
|
||
go 1.19 | ||
go 1.21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/minio/minio/docs/debugging/reorder-disks | ||
|
||
go 1.19 | ||
go 1.21 | ||
|
||
require github.com/minio/pkg/v2 v2.0.6 | ||
require github.com/minio/pkg/v3 v3.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github.com/minio/pkg/v2 v2.0.6 h1:n+PpbSMaJK1FfQkP55l1y0wj5Hi9R5w2DtGhxiGdP9I= | ||
github.com/minio/pkg/v2 v2.0.6/go.mod h1:Z9Z/LzhTIxZ6zhPeW658vmLRilRek3zBOqNB9j+lxSY= | ||
github.com/minio/pkg/v3 v3.0.1 h1:qts6g9rYjAdeomRdwjnMc1IaQ6KbaJs3dwqBntXziaw= | ||
github.com/minio/pkg/v3 v3.0.1/go.mod h1:53gkSUVHcfYoskOs5YAJ3D99nsd2SKru90rdE9whlXU= |
Oops, something went wrong.