Skip to content

Add parameter to enable reading KMS URL from key material - #3745

Open
ggershinsky wants to merge 4 commits into
apache:masterfrom
ggershinsky:kms-url
Open

Add parameter to enable reading KMS URL from key material#3745
ggershinsky wants to merge 4 commits into
apache:masterfrom
ggershinsky:kms-url

Conversation

@ggershinsky

Copy link
Copy Markdown
Contributor

No description provided.

if (null == kmsInstanceURL) {
throw new ParquetCryptoRuntimeException(
"KMS instance URL is missing both in properties and file key material");
kmsInstanceURL = KmsClient.KMS_INSTANCE_URL_DEFAULT;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to change this line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent throwing an exception for most of the current users. Today, this exception is never thrown in practice, because the writer always fills the url value (set or default) in the key material, so the reader always gets something, either from properties or from the key material. Now that we skip reading the url from key material by default, the existing readers that don't use the property value, will get an exception. So to prevent it and to preserve the current interface, we drop the exception, and return the KMS_INSTANCE_URL_DEFAULT value (which is given to the readers today, from the key material).

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