Skip to content

[charts][trino] allow catalogs creation using secrets #297

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

Closed
wants to merge 26 commits into from

Conversation

luismacosta
Copy link

@luismacosta luismacosta commented Jan 27, 2025

[charts][trino] allow catalogs creation using secrets

Purpose: allow catalogs creation using secrets or configMap
Why: avoid having passwords exposed as plain text in configMap
Tests: https://github.com/trinodb/charts/blob/00b2d04c650567ac58d1acd3754dd91d20371968/tests/trino/test-catalogs-secrets-values.yaml

@nineinchnick @mosabua can you please review? Thanks
cla sent today via email

Copy link

cla-bot bot commented Jan 27, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
Copy link

cla-bot bot commented Jan 27, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@nineinchnick
Copy link
Member

Check the CI workflow runs for errors

Copy link

cla-bot bot commented Jan 27, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
Copy link

cla-bot bot commented Jan 27, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@mosabua
Copy link
Member

mosabua commented Jan 27, 2025

What is the motivation and need for this change? Also .. is this a breaking change (which is bad in my opinion) or does it duplicate and allow both setups (which is also bad)

@luismacosta
Copy link
Author

luismacosta commented Jan 27, 2025

I would like to avoid having passwords in the configmap and use secrets instead

@mosabua
Copy link
Member

mosabua commented Jan 27, 2025

You can do that already .. there is no need to have the whole catalog as secret

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

5 similar comments
Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jan 28, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

3 similar comments
Copy link

cla-bot bot commented Feb 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@luismacosta
Copy link
Author

luismacosta commented Feb 3, 2025

Hello @nineinchnick

I've applied the changes requested
In order to allow both ConfigMap or Secret, for catalogs creation, this valuation had to be changed:

{{- if or .Values.catalogs .Values.additionalCatalogs}}

Copy link

cla-bot bot commented Feb 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

6 similar comments
Copy link

cla-bot bot commented Feb 3, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Feb 4, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot cla-bot bot added the cla-signed label Feb 19, 2025
Copy link

cla-bot bot commented Feb 19, 2025

The cla-bot has been summoned, and re-checked this pull request!

@luismacosta
Copy link
Author

@nineinchnick Can you please review this PR? Thanks.

@nineinchnick
Copy link
Member

So the main change here is to store catalogs in secrets, instead of a configmap? I don't think adding a second property is a good way to solve this. Using a secret is not more secure than using a configmap, and makes debugging harder, since you have to decode its contents. Think about how users will need to pick which property to use.

@luismacosta luismacosta changed the title [charts][trino] add additionalSecrets [charts][trino] allow catalogs creation using secrets Mar 2, 2025
@luismacosta
Copy link
Author

luismacosta commented Mar 2, 2025

So the main change here is to store catalogs in secrets, instead of a configmap? I don't think adding a second property is a good way to solve this. Using a secret is not more secure than using a configmap, and makes debugging harder, since you have to decode its contents. Think about how users will need to pick which property to use.

Users can configure the catalogs using configMap or secret. Regarding secrets not being more secure than confiMap, well I could disagree, configMaps are typically used for non-sensitive configuration data, while secrets are used for storing sensitive information. I would rather to avoid having passwords exposed in configMaps. Having the need to decode its contents, does not seems to be an obstacle for debugging.

@chcro
Copy link

chcro commented Mar 12, 2025

I use a single secret read as envFrom:secretRef. It has all of the catalogs secrets. The catalogs config reads the envvars. Something like this in the catalog: s3.aws-access-key=${ENV:CATALOG_S3ACCESSKEY}

This also works well fro use of dynamic catalogs if you use shared credentials to multiple data sources.

@luismacosta
Copy link
Author

luismacosta commented Mar 12, 2025

I use a single secret read as envFrom:secretRef. It has all of the catalogs secrets. The catalogs config reads the envvars. Something like this in the catalog: s3.aws-access-key=${ENV:CATALOG_S3ACCESSKEY}

This also works well fro use of dynamic catalogs if you use shared credentials to multiple data sources.

The idea is to avoid having multiple env vars for the catalogs passwords. Each catalog is a different database, each username has a different password. And the chart currently does not allow the creation of extra secrets.

@luismacosta
Copy link
Author

luismacosta commented Mar 13, 2025

Hello @nineinchnick @mosabua

Considering #316, Should I close this PR? Or do you want to allow this possibility?

@luismacosta luismacosta reopened this Mar 14, 2025
@luiscosta18
Copy link

luiscosta18 commented Mar 26, 2025

@nineinchnick, as discussed via slack, secrets should not be managed in the chart. This PR can be closed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants