You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,7 @@ All third-party contributions to this project must be accompanied by a signed co
16
16
17
17
All submissions should come in the form of pull requests and need to be reviewed by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/) for more information on sending pull requests.
18
18
19
+
All submissions must include unit tests for any new functionality or bug fixes. If you are adding a new feature, please include a test that demonstrates the feature.
20
+
S3Mock uses Unit tests for function coverage, Spring Boot tests for component coverage, and integration tests against the Docker container artefact for end-to-end coverage. Please ensure that your code is covered by at least one of these test types.
21
+
19
22
Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when submitting a pull request!
*[Start using the command-line](#start-using-the-command-line)
@@ -26,6 +27,7 @@
26
27
*[Start using Docker compose](#start-using-docker-compose)
27
28
*[Simple example](#simple-example)
28
29
*[Expanded example](#expanded-example)
30
+
*[Start using self-signed SSL certificate](#start-using-self-signed-ssl-certificate)
29
31
*[S3Mock Java](#s3mock-java)
30
32
*[Start using the JUnit4 Rule](#start-using-the-junit4-rule)
31
33
*[Start using the JUnit5 Extension](#start-using-the-junit5-extension)
@@ -39,6 +41,9 @@
39
41
*[Build & Run](#build--run)
40
42
*[Java](#java)
41
43
*[Kotlin](#kotlin)
44
+
*[Governance model](#governance-model)
45
+
*[Vulnerability reports](#vulnerability-reports)
46
+
*[Security](#security)
42
47
*[Contributing](#contributing)
43
48
*[Licensing](#licensing)
44
49
<!-- TOC -->
@@ -190,9 +195,18 @@ For instance, S3Mock does not verify the HTTP verb that the presigned uri was cr
190
195
191
196
S3 SDKs can be used to create presigned URLs pointing to S3Mock if they're configured for path-style access. See the "Usage of..." section above for links to examples on how to use the SDK with presigned URLs.
192
197
198
+
#### Self-signed SSL certificate
199
+
200
+
S3Mock supports connections via HTTP and HTTPS. It includes a self-signed SSL certificate which is rejected by most HTTP clients by default.
201
+
To use HTTPS, the self-signed certificate must be accepted by the client.
202
+
203
+
On command line, this can be done by setting the `--no-verify-ssl` option in the AWS CLI or by using the `--insecure` option in cURL, see below.
204
+
205
+
Java and Kotlin SDKs can be configured to trust any SSL certificate, see links to `S3Client` creation above.
206
+
193
207
### Usage of AWS CLI
194
208
195
-
S3Mock can be used with the AWS CLI. Setting the `--endpoint-url` enables path-style access.
209
+
S3Mock can be used with the AWS CLI. Setting the `--endpoint-url` enables path-style access, `--no-verify-ssl` is needed for HTTPS access.
As long as the requests work with the S3 API, they will work with S3Mock as well.
233
+
### Usage of plain HTTP / HTTPS with cURL
234
+
235
+
As long as the requests work with the S3 API, they will work with S3Mock as well. Use `--insecure` to ignore SSL errors.
217
236
218
237
Examples:
219
238
@@ -229,7 +248,12 @@ curl --request PUT --upload-file ./my-file http://localhost:9090/my-test-bucket/
229
248
230
249
Get object
231
250
```shell
232
-
curl --request GET http://localhost:9090/my-test-bucket/my-file
251
+
curl --request GET http://localhost:9090/my-test-bucket/my-file -O
252
+
```
253
+
254
+
Get object using HTTPS
255
+
```shell
256
+
curl --insecure --request GET https://localhost:9191/my-test-bucket/my-file -O
233
257
```
234
258
235
259
### S3Mock configuration options
@@ -272,7 +296,7 @@ Example with configuration via environment variables:
272
296
273
297
#### Start using the Fabric8 Docker-Maven-Plugin
274
298
275
-
Our [integration tests](integration-tests) are using the Amazon S3 Client to verify the server functionality against the S3Mock. During the Maven build, the Docker image is started using the [docker-maven-plugin](https://dmp.fabric8.io/) and the corresponding ports are passed to the JUnit test through the `maven-failsafe-plugin`. See [`BucketV2IT`](integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/BucketV2IT.kt) as an example on how it's used in the code.
299
+
Our [integration tests](integration-tests) are using the Amazon S3 Client to verify the server functionality against the S3Mock. During the Maven build, the Docker image is started using the [docker-maven-plugin](https://dmp.fabric8.io/) and the corresponding ports are passed to the JUnit test through the `maven-failsafe-plugin`. See [`BucketIT`](integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/BucketIT.kt) as an example on how it's used in the code.
276
300
277
301
This way, one can easily switch between calling the S3Mock or the real S3 endpoint and this doesn't add any additional Java dependencies to the project.
278
302
@@ -385,6 +409,51 @@ $ ls locals3root/my-test-bucket
385
409
bucketMetadata.json
386
410
```
387
411
412
+
#### Start using self-signed SSL certificate
413
+
414
+
S3Mock includes a self-signed SSL certificate:
415
+
416
+
```shell
417
+
$ curl -vvv --insecure --request GET https://localhost:9191/my-test-bucket/my-file -O
`S3Mock`Java libraries are released and published to the Sonatype Maven Repository and subsequently published to
@@ -575,9 +644,23 @@ This repo is built with Java 17, output is _currently_ bytecode compatible with
575
644
### Kotlin
576
645
The [Integration Tests](integration-tests) are built in Kotlin.
577
646
647
+
## Governance model
648
+
649
+
The project owner and leads makes all final decisions. See the `developers` section in the [pom.xml](pom.xml) for a list of leads.
650
+
651
+
## Vulnerability reports
652
+
653
+
S3Mock uses GitHub actions to produce an SBOM and to check dependencies for vulnerabilities. All vulnerabilities are evaluated and fixed if possible.
654
+
Vulnerabilities may also be reported through the GitHub issue tracker.
655
+
656
+
## Security
657
+
658
+
S3Mock is not intended to be used in production environments. It is a mock server that is meant to be used in development and testing environments only. It does not implement all security features of AWS S3, and should not be used as a replacement for AWS S3 in production.
659
+
It is implemented using [Spring Boot](https://github.com/spring-projects/spring-boot), which is a Java framework that is designed to be secure by default.
660
+
578
661
## Contributing
579
662
580
-
Contributions are welcomed! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.
663
+
Contributions are welcome! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.
0 commit comments