Comments (7)
@marad Can you provide more concrete & full code example for this failure? As I cannot reproduce this issue.
from s3mock.
@shuttie Ok, I've found the cause of my problems. In my code I need to create connection with:
val clientConfig = new ClientConfiguration()
clientConfig.setSignerOverride("S3SignerType")
val client = new AmazonS3Client(credentials, clientConfig)
And this signer override is causing the files to be empty. Is there a way to support other signing algorithms in s3mock?
from s3mock.
Sure, I'll create small example code and send it here.
from s3mock.
@shuttie The problem is, really that the files are stored empty in the temporary directory when putting objects. Setting signer type is one way to achieve this. I'm suspecting other ways but will investigate later.
from s3mock.
@marad, I had a similar problem using S3Mock for Presigned URLs. I originally used AnonymousAWSCredentials
in my tests but the code path for presigned URLs requires an access key. I found your earlier comment and switched to BasicAWSCredentials
and overrode the signer per your comment and repro'd the same "zero bytes" problem.
It turns out that "S3SignerType"
is incorrect. Both "AWS3SignerType"
and "NoOpSignerType"
work for me. I also can verify that the files are no longer zero bytes in size.
from s3mock.
We experience the same issue, caused by using S3SignerType
. I suggest to change the name of this issue accordingly, and I'd appreciate a fix.
from s3mock.
The code expects the PUT payload after a chunk signature (example below). According to https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html this seems to be specific to V4. With V2 the client only sends the raw data, causing s3mock to fail because of the missing chunk signature.
V4:
org.apache.http.wire - http-outgoing-0 >> "3;chunk-signature=0d1d8b31c94d5e4effc1acb4a97632ae10355cf018fb454eb5400faa5be61bec[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "FOO[\r][\n]"
org.apache.http.wire - http-outgoing-0 >> "0;chunk-signature=4b2cc53ba80357f42d34d77d596cc47552d586bfa71fb506c0ecf94d9854723e[\r][\n]"
V2 is just org.apache.http.wire - http-outgoing-0 >> "FOO"
.
The failing logic is in S3ChunkedProtocolStage
. In PutObject
the S3ChunkedProtocolStage
seems to be hardcoded in completeSigned
.
from s3mock.
Related Issues (20)
- S3.multipartCopy internal server error. HOT 1
- Bucket name should not contain '/'
- Versioning HOT 2
- Use correct default maxkeys size to trigger expected pagination
- Poor performance on Linux compared to Windows
- Increase file upload size config
- Need documentation on structure of S3MOCK_DATA_DIR HOT 2
- putObject() overrides lastModified in ObjectMetaData HOT 1
- Batch delete API (DeleteObjects) doesn't URL-encode object keys like single-object APIs
- Mime-Type change HOT 1
- Put Object fails when streaming
- Issue #47 Missed Max Keys on Response
- `Not Implemented` exception when working with `multipartCopy`
- java.lang.ClassNotFoundException: scala.$less$colon$less HOT 4
- response-content-disposition header is not respected
- missing uploadPartCopy?
- Is there an active fork for this project? HOT 3
- It's time to fix the build and upgrade libraries HOT 2
- S3Mock causes some S3Client calls to block for 30 seconds
- Encoding issue in listObjects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3mock.