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

bugfix: ignore dreamhost 'auth' bucket #208

Merged
merged 2 commits into from
Sep 15, 2023
Merged

bugfix: ignore dreamhost 'auth' bucket #208

merged 2 commits into from
Sep 15, 2023

Conversation

sa7mon
Copy link
Owner

@sa7mon sa7mon commented Sep 15, 2023

Not sure why, but trying to list the contents of a bucket named auth on Dreamhost returns a different type of error. Might be a different component of Openstack that receives the request?

Sending a GET to https://objects-us-east-1.dream.io/auth/ results in

HTTP/1.1 401 Unauthorized
content-length: 141
x-trans-id: tx00000bd4d41fac11b52eb-006503c7ee-d794c070-us-east-1-iad1
x-openstack-request-id: tx00000bd4d41fac11b52eb-006503c7ee-d794c070-us-east-1-iad1
accept-ranges: bytes
content-type: application/json; charset=utf-8
date: Fri, 15 Sep 2023 02:56:46 GMT

{"Code":"AccessDenied","RequestId":"tx00000bd4d41fac11b52eb-006503c7ee-d794c070-us-east-1-iad1","HostId":"d794c070-us-east-1-iad1-us-east-1"}

versus this response for any other bucket name

HTTP/1.1 404 Not Found
content-length: 239
x-amz-request-id: tx000001ca65fa2eb086d27-006503c7f4-d794c070-us-east-1-iad1
accept-ranges: bytes
content-type: application/xml
date: Fri, 15 Sep 2023 02:56:52 GMT

<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchBucket</Code><BucketName>auth2</BucketName><RequestId>tx000001ca65fa2eb086d27-006503c7f4-d794c070-us-east-1-iad1</RequestId><HostId>d794c070-us-east-1-iad1-us-east-1</HostId></Error>

This PR adds a list of "forbidden" bucket names to the Dreamhost provider. When encountered, these bucket names will be marked as "don't exist".

Closes #149

@sa7mon sa7mon linked an issue Sep 15, 2023 that may be closed by this pull request
@github-actions
Copy link

Code Coverage

Package Line Rate Complexity Health
github.com/sa7mon/s3scanner/bucket 90% 0
github.com/sa7mon/s3scanner/cmd/regioncheck 57% 0
github.com/sa7mon/s3scanner/cmd/s3scanner 19% 0
github.com/sa7mon/s3scanner/db 73% 0
github.com/sa7mon/s3scanner/permission 77% 0
github.com/sa7mon/s3scanner/provider 81% 0
github.com/sa7mon/s3scanner/worker 49% 0
Summary 64% (536 / 836) 0

@sa7mon sa7mon merged commit dfb2e01 into main Sep 15, 2023
7 of 8 checks passed
@sa7mon sa7mon deleted the 149 branch September 15, 2023 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some provider throws an error with bucket named 'auth'
1 participant