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

control-service: add amazon rds ca certificates to data job image #2660

Merged
merged 4 commits into from
Sep 20, 2023

Conversation

mrMoZ1
Copy link
Contributor

@mrMoZ1 mrMoZ1 commented Sep 13, 2023

what:
Adding amazon rds ca certificates to secure job image

why:
Data job users require ca certificates to connect to amazon databases

testing:
building images locally and inspecting certificate output:
List truncated because of 100+ certificates
`38.45 subject=C = US, O = "Amazon Web Services, Inc.", OU = Amazon RDS, ST = WA, CN = Amazon RDS eu-west-1 Root CA RSA4096 G1, L = Seattle

38.46 subject=C = US, O = "Amazon Web Services, Inc.", OU = Amazon RDS, ST = WA, CN = Amazon RDS eu-central-1 Root CA RSA4096 G1, L = Seattle

38.46 subject=C = US, O = "Amazon Web Services, Inc.", OU = Amazon RDS, ST = WA, CN = Amazon RDS eu-north-1 Root CA RSA2048 G1, L = Seattle
`

@mrMoZ1 mrMoZ1 changed the title job-builder-secure: add amazon rds ca certificates to image control-service: add amazon rds ca certificates to image Sep 13, 2023
@mrMoZ1 mrMoZ1 changed the title control-service: add amazon rds ca certificates to image control-service: add amazon rds ca certificates to data job image Sep 13, 2023
@gabrielgeorgiev1
Copy link
Contributor

not sure I understand this change, if users need a particular certificate, is it not their responsibility to include it as part of their job or download it?

@mrMoZ1
Copy link
Contributor Author

mrMoZ1 commented Sep 14, 2023

not sure I understand this change, if users need a particular certificate, is it not their responsibility to include it as part of their job or download it?

Job users can't download or add anything in the secure images except for the tmp folders.

@antoniivanov
Copy link
Collaborator

antoniivanov commented Sep 14, 2023

not sure I understand this change, if users need a particular certificate, is it not their responsibility to include it as part of their job or download it?

Job users can't download or add anything in the secure images except for the tmp folders.

That's not 100% true.

A) They can download it to temp directory and then point REQUESTS_CA_BUNDLE (if they use requests library) or SSL_CERT_DIR (for openssl) to that location. Now they need to do that every execution and it's not very nice and good user experience.

B) user should install certifi in requrements.txt (https://pypi.org/project/certifi/) first. It provides Mozilla’s carefully curated collection of Root Certificates that is more extensive that the one that comes with default python version. It should be tried before resorting to adding more custom certificates.

C) Similarly to certifi if user can install aws-certifi (there is not such but could be created).

I would definitely want to know if certifi has been tried and works before proceeding with this change.

@mivanov1988
Copy link
Collaborator

not sure I understand this change, if users need a particular certificate, is it not their responsibility to include it as part of their job or download it?

Job users can't download or add anything in the secure images except for the tmp folders.

That's not 100% true.

A) They can download it to temp directory and then point REQUESTS_CA_BUNDLE (if they use requests library) or SSL_CERT_DIR (for openssl) to that location. Now they need to do that every execution and it's not very nice and good user experience.

B) user should install certifi in requrements.txt (https://pypi.org/project/certifi/) first. It provides Mozilla’s carefully curated collection of Root Certificates that is more extensive that the one that comes with default python version. It should be tried before resorting to adding more custom certificates.

C) Similarly to certifi if user can install aws-certifi (there is not such but could be created).

I would definitely want to know if certifi has been tried and works before proceeding with this change.

In order to speed up the process can you assist us with this matter? A customer is currently facing a blockage related to it.

Signed-off-by: mrMoZ1 <[email protected]>
@antoniivanov
Copy link
Collaborator

In order to speed up the process can you assist us with this matter? A customer is currently facing a blockage related to it.

I've approved it. But advice the user the try adding certifi to see if it would change anything.

@mrMoZ1
Copy link
Contributor Author

mrMoZ1 commented Sep 20, 2023

In order to speed up the process can you assist us with this matter? A customer is currently facing a blockage related to it.

I've approved it. But advice the user the try adding certifi to see if it would change anything.

The customer tried a few things to get this to work - one of them was installing the certifi library.

Here is what the customer tried on their own and it didn't work:

I can’t seem to get this working. The file system is read only and certificates are not an allowed file type that I can add to the data job. Even saving the certificate as a .txt the file gets recognized as a cert.

I even tried adding the certificate as a variable in python and creating an in memory file and it wouldn’t work.

Either we need to allow certificate files or I need these in the container already.

@mrMoZ1 mrMoZ1 merged commit 78df094 into main Sep 20, 2023
@mrMoZ1 mrMoZ1 deleted the person/mzhivkov/ca-certificate branch September 20, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants