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

S3 client: add IAM configuration #221

Merged
merged 6 commits into from
Sep 4, 2023

Conversation

yankovs
Copy link
Contributor

@yankovs yankovs commented Aug 10, 2023

This PR adds the ability to support IAM authentication using a iam_auth boolean option in the [s3] section of karton.ini, much like in MWDB.

Testing was done on karton-core v5.2 and mwdb-core v2.8.2, by omitting the access_key and secret_key from karton.ini and making sure everything is functional:

  • File upload to mwdb
  • File reanalysis
  • Making new kartons

This PR is marked as draft because the configuration wizard of Karton seems like an ancient piece of code and I'm not sure if I should add this option to it or not

@psrok1 psrok1 self-requested a review September 1, 2023 16:43
@psrok1
Copy link
Member

psrok1 commented Sep 1, 2023

@yankovs I think you don't need to bother of this karton.main. It's just a very simple utility and no need to cover all configuration options.

I'm also pre-approving your changes, code looks good!

When you feel ready with the PR, rebase your branch as I fixed some CI issues in the meantime.

@yankovs yankovs marked this pull request as ready for review September 2, 2023 05:46
@yankovs
Copy link
Contributor Author

yankovs commented Sep 2, 2023

Mhm, seems like mypy doesn't like botocore since it doesn't have typings 🤔.
I've tried adding botocore-stubs to project requirements and it seems to solve the issue, but I'm not sure if this a good solution since you could also probably disable mypy altogether (like in mwdb-core) or manually disable errors for botocore.

@psrok1
Copy link
Member

psrok1 commented Sep 4, 2023

botocore-stubs looks ok. Actually I'm amazed that someone managed to make such quality typings for botocore 😄 We don't really want to disable mypy as it helped many times to avoid errors.

@psrok1 psrok1 merged commit 1c67dee into CERT-Polska:master Sep 4, 2023
6 checks passed
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.

2 participants