-
Notifications
You must be signed in to change notification settings - Fork 633
feat: enforce some props to be secret on RisingWave Cloud #21248
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
prop_iter: impl Iterator<Item = &'a str>, | ||
) -> ConnectorResult<()> { | ||
for prop in prop_iter { | ||
IcebergCommon::enforce_one(prop)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the enforce_secret_on_cloud implementation for IcebergProperties, secret enforcement is performed twice (once via IcebergCommon::enforce_one and again via Self::enforce_one). Consider consolidating these calls to avoid redundant validations.
IcebergCommon::enforce_one(prop)?; |
Copilot uses AI. Check for mistakes.
@@ -85,6 +85,7 @@ parking_lot = { workspace = true } | |||
parquet = { workspace = true } | |||
paste = "1" | |||
pg_bigdecimal = { git = "https://github.com/risingwavelabs/rust-pg_bigdecimal", rev = "0b7893d88894ca082b4525f94f812da034486f7c" } | |||
phf = { version = "0.11", features = ["macros"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyway to disable this on cloud, if some unforseen circumstance is encountered, and for already created source, will this affect backwards compatbility?
I am considering following the issue suggested |
Does this mean that in RWC, they must always create connection for source and sinks, and cannot fill in the fields inline? |
I don't mean that. Using CONNECTION and filling inline are two alternatives. Users can grant us using CONNECTION, it does not expose the credentials in plaintext. |
Co-authored-by: tab <[email protected]>
I support enforcing secret also when creating CONNECTION. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/connector/src/source/iceberg/mod.rs:77
- [nitpick] The enforcement loop calls both IcebergCommon::enforce_one(prop) and Self::enforce_one(prop) for every property. Consider reviewing if both checks are necessary or if the logic can be consolidated to avoid potential redundancy.
for prop in prop_iter { IcebergCommon::enforce_one(prop)?; Self::enforce_one(prop)?; }
src/connector/src/source/cdc/mod.rs:150
- [nitpick] The empty implementation for EnforceSecretOnCloud in CdcProperties may bypass secret enforcement. Consider either implementing the intended checks or documenting why enforcement is intentionally omitted.
impl<T: CdcSourceTypeTrait> EnforceSecretOnCloud for CdcProperties<T> {} // todo: enforce jdbc like properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Cargo.lock changes
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
Highest Release Version: 2.3
What's changed and what's your intention?
as title, relate https://linear.app/risingwave-labs/issue/CLOUD-3897/%5Bdiscussion%5D-enforce-secret-for-sensitive-fields-on-cloud
Enforce sensitive fields to be SECRET when create SOURCE/SINK(in #21269)/CONNECTION
For cluster matching BOTH condition:
hosted on cloud: by setting ENV(removed in feat: check SecretManagement available when enforce secret #21407)RISINGWAVE_CLOUD
enforce_secret_on_cloud
set totrue
true
for new clustersThen the kernel will do such enforcement.
manually test loacally
resolve #20946
Checklist
Documentation
Release note
Introduce new system setting
enforce_secret_on_cloud
(default tofalse
for open source, on-prem and byoc, default totrue
for cloud-hosted instance)detect ENV
RISINGWAVE_CLOUD
as the signal for the instance is running on RisingWave Cloudenforce SECRET props:
comes from #21352
enforce secrets for new create CONNECTION