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

feat(repository): Add Custom Root CA option for S3 #2845

Merged
merged 11 commits into from
Mar 31, 2023
Merged

feat(repository): Add Custom Root CA option for S3 #2845

merged 11 commits into from
Mar 31, 2023

Conversation

babs
Copy link
Contributor

@babs babs commented Mar 21, 2023

Closes #1443

example:

kopia repository connect s3 \
  --access-key the-access-key \
  --secret-access-key the-secret-key \
  --bucket my-backup-bucket \
  --endpoint localhost:9000 \
  --root-ca-pem-base64=$(cat public.crt | base64 -w0)
ROOT_CA_PEM_BASE64=$(cat public.crt | base64 -w0)
kopia repository connect s3 \
  --access-key the-access-key \
  --secret-access-key the-secret-key \
  --bucket my-backup-bucket \
  --endpoint localhost:9000
kopia repository connect s3 \
  --access-key the-access-key \
  --secret-access-key the-secret-key \
  --bucket my-backup-bucket \
  --endpoint localhost:9000 \
  --root-ca-pem-path=public.crt

example:

```bash
kopia repository connect s3 \
  --access-key the-access-key \
  --secret-access-key the-secret-key \
  --bucket my-backup-bucket \
  --endpoint localhost:9000 \
  --rootca=$(cat public.crt|base64 -w0)
```
@babs babs changed the title Add Custom Root CA option feat(repository): Add Custom Root CA option for S3 Mar 21, 2023
cli/storage_s3.go Outdated Show resolved Hide resolved
* Lower case JSON option
* Handle file as well as inline
* Add env variable
* Standardize options names
@babs babs requested a review from jkowalski March 22, 2023 14:49
@codecov
Copy link

codecov bot commented Mar 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (7e9b3dc) 75.27% compared to head (ad88423) 75.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2845      +/-   ##
==========================================
+ Coverage   75.27%   75.31%   +0.04%     
==========================================
  Files         457      457              
  Lines       35901    35923      +22     
==========================================
+ Hits        27024    27057      +33     
+ Misses       6984     6976       -8     
+ Partials     1893     1890       -3     
Impacted Files Coverage Δ
cli/storage_s3.go 74.50% <100.00%> (+19.33%) ⬆️

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ntolia
Copy link
Collaborator

ntolia commented Mar 30, 2023

@jkowalski Do you have suggestions for testing this better? CLI tests are hard.

@babs
Copy link
Contributor Author

babs commented Mar 30, 2023

I've something almost ready :)
Give me some time to finish it and I'll update the PR this evening :)

@babs
Copy link
Contributor Author

babs commented Mar 30, 2023

I think this one should start to look nice :)

Note for myself, don't rely on platform message :)
cli/storage_s3.go Outdated Show resolved Hide resolved
cli/storage_s3_test.go Outdated Show resolved Hide resolved
@ntolia ntolia merged commit f17daee into kopia:master Mar 31, 2023
@babs babs deleted the feat-s3-custom-root-ca branch April 12, 2023 09:06
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.

FR: add support for custom CA certificates for S3
3 participants