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

Request without required Headers for STS and IAM #8617

Open
naveenpaul1 opened this issue Dec 20, 2024 · 0 comments
Open

Request without required Headers for STS and IAM #8617

naveenpaul1 opened this issue Dec 20, 2024 · 0 comments
Labels

Comments

@naveenpaul1
Copy link
Contributor

Environment info

  • NooBaa Version: VERSION
  • Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify

Actual behavior

  1. When missing request header info Noobaa and AWS return different error responses. Noobaa should mirror the same behaviour as AWS

Current Noobaa response when header missing location

**STS**
naveenpaul:~$ curl https://localhost:7443 --http1.0 -H 'Host:' -v --insecure
< HTTP/1.1 500 Internal Server Error
< Server: NooBaa/5.18.0
< x-amz-request-id: m4wi292f-ad0mr5-16lv
< x-amz-id-2: m4wi292f-ad0mr5-16lv
<?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalFailure</Code><Message>The request processing has failed because of an unknown error, exception or failure.</Message><Resource>/</Resource><RequestId>m4wi292f-ad0mr5-16lv</Request

**IAM**
curl https://localhost:7446 --http1.0 -H 'Host:' -v --insecure
< HTTP/1.1 400 Bad Request
< Server: NooBaa/5.18.0
< x-amz-request-id: m4wi116n-ch3045-k0o
< x-amz-id-2: m4wi116n-ch3045-k0o
< Content-Type: text/xml
< Content-Length: 268
<?xml version="1.0" encoding="UTF-8"?><ErrorResponse><Error><Type>Sender</Type><Code>InvalidParameterValue</Code><Message>An invalid or out-of-range value was supplied for the input parameter.</Message></Error><RequestId>m4wi116n-ch3045-k

Expected behavior

  1. Noobaa should have the AWS behaviour.
    AWS error response
**STS**
curl https://sts.us-east-2.amazonaws.com --http1.1 -H 'Host:' -v
< HTTP/1.1 400 Bad Request
< Content-Length: 0
< Date: Fri, 20 Dec 2024 08:36:07 GMT
< Connection: close

**IAM**
curl https://iam.amazonaws.com --http1.1 -H 'Host:' -v
< HTTP/1.1 400 Bad Request
< Content-Length: 0
< Date: Fri, 20 Dec 2024 08:38:30 GMT
< Connection: close

Steps to reproduce

  1. start Noobaa with valid sts and iam port
    node src/cmd/nsfs --https_port_sts 7443 --https_port_iam 7446
  2. and run above curl command to get the error response

More information - Screenshots / Logs / Other output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant