Skip to content

Conversation

sumangala-patki
Copy link
Contributor

@sumangala-patki sumangala-patki commented Sep 15, 2021

PR introduces use of different customer-provided keys per encrypted file, superseding the global key use in HADOOP-17536.

Adding ABFS driver support for an EncryptionContextProvider plugin to retrieve encryption information, the implementation for which should be provided by the client. When encryption is activated for an account, file creation will involve ABFS driver fetching an encryption context and encryption key from the provider. These will be sent as request headers to the server, which handles encryption/decryption. The server will store the encryption context as system metadata for a file. Any subsequent REST calls to the server to access data or user metadata will require sending the encryption key headers. The encryption context of a file can be obtained through response headers of a GetPathStatus call, and then used to fetch the encryption key from the encryption provider.

New configs:
fs.azure.encryption.encoded.client-provided-key: Server side encryption key encoded in Base6format
fs.azure.encryption.encoded.client-provided-key-sha: SHA256 hash of encryption key encoded in Base64format
fs.azure.encryption.context.provider.type: Custom EncryptionContextProvider type

Copy link

@mariosmeim-db mariosmeim-db left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. I left a few comments.

this.clientProvidedEncryptionKey = getBase64EncodedString(encryptionKey);
this.clientProvidedEncryptionKeySHA = getBase64EncodedString(
getSHA256Hash(encryptionKey));
this.clientProvidedEncryptionKey = EncryptionAdapter.getBase64EncodedString(encryptionKey);
Copy link

@mariosmeim-db mariosmeim-db Nov 3, 2021

Choose a reason for hiding this comment

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

Shouldn't the encryption key passed in the configuration already be base 64 encoded? This is how it works e.g. for azCopy. Also, the header will required base 64 encoded values. Maybe it would be more consistent if the configuration for the global key also expected base 64 encoded key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

driver needs to send two request headers:

  1. Base 64 encoded key
  2. Base 64 encoded (SHA256 hash of key)
    As the second header requires the original key to compute the SHA256, the config needs to accept the key without the encoding

Choose a reason for hiding this comment

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

Well, it can just accept the encoded key and decode it. I am not sure which one is the best way, I was just pointing out that azCopy requires the encoded key instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

azCopy takes precomputed values as configs, i.e., both the encoded key value and the encoded SHA256 hash of the key are required as input. ABFS driver currently computes these headers from the original key provided. Both of these methods are quite similar, hence would like to know your opinion on whether you see a value add in the driver change (to switch to the 2 precomputed key values for configs)

Choose a reason for hiding this comment

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

I am advocating in favor of the encoded version of the key for the following reasons:

  • it might be easier to manage base 64 encoded strings in the configuration
  • in ingestion flows where users use azCopy to upload data and then use the ABFS client to access them, they would need to provide both encoded (azCopy) and unencoded (this PR) version of the key.

Alternatively, we could also use both precomputed values (key and sha) in the provided configuration for the client.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have modified to accept encoded version, but will require both pre-computed key and SHA hash value as configs

} else if (encryptionAdapter == null) {
// get encryption context from GetPathStatus response header
encryptionAdapter = new EncryptionAdapter(encryptionContextProvider,
new Path(path).toUri().getPath(),

Choose a reason for hiding this comment

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

Should we add some error handling and logging around this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

return encryptionKey;
}

public SecretKey fetchEncryptionContextAndComputeKeys() throws IOException {

Choose a reason for hiding this comment

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

Perhaps it should be more explicit in the naming that this is used to create a new encryption context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed

}

public SecretKey fetchEncryptionContextAndComputeKeys() throws IOException {
encryptionContext = provider.getEncryptionContext(path);
Copy link

@mariosmeim-db mariosmeim-db Nov 3, 2021

Choose a reason for hiding this comment

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

If I understand correctly, this will only be reached when creating a new file, and will therefore make the provider create a new encryption context. Perhaps we could add a null check on the encryptionContext here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added check


default: return; // no client-provided encryption keys
}
requestHeaders.add(new AbfsHttpHeader(X_MS_ENCRYPTION_KEY, encodedKey));

Choose a reason for hiding this comment

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

Should there be some kind of validation of the values of the headers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are null checks for the encryption key values (both Global and EncryptionContext types) used to compute the headers, and the sha256hash/base64encoding are standard functions so we can probably skip the check there

String encodedKey, encodedKeySHA256;
switch (encryptionType) {
case GLOBAL_KEY:
encodedKey = clientProvidedEncryptionKey;

Choose a reason for hiding this comment

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

Did you consider creating an implementation of EncryptionContextProvider for the global key case, just for consistency between the two types? In that case, would the EncryptionAdapter still be required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EncryptionContextProvider currently supports only the non-global case, and is not initialized when encryption is of global type. They are mutually exclusive, and so encryptionAdapter passed by api to the addEncryptionKeyRequestHeaders method will be null in the global scenario. As the global key is provided in the config, it can directly be added to the headers without going through the encryption framework

}
}

public EncryptionContextProvider initializeEncryptionContextProvider() {

Choose a reason for hiding this comment

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

Since the actual call to initialize() takes place in https://github.com/apache/hadoop/pull/3440/files#diff-94925ffd3b21968d7e6b476f7e85f68f5ea326f186262017fad61a5a6a3815cbR1630, maybe this should be renamed to createEncryptionContextProvider.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed


try {
String configKey = FS_AZURE_ENCRYPTION_CONTEXT_PROVIDER_TYPE;
if (get(configKey) == null) {
Copy link

@mariosmeim-db mariosmeim-db Nov 16, 2021

Choose a reason for hiding this comment

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

Should this config be strictly per account? Else it might cause problems with instantiating a file system with no intend to use encryption. It will try to create a provider for it anyway. Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, keeping it account-agnostic would cause other accounts to instantiate EncryptionContextProvider (ECP) as well. Have made the provider config account-specific. However, each account that uses ECP will need to have its own account-specific entry in the config file

public void computeKeys() throws IOException {
SecretKey key = getEncryptionKey();
Preconditions.checkNotNull(key, "Encryption key should not be null.");
encodedKey = getBase64EncodedString(new String(key.getEncoded(),
Copy link

@mariosmeim-db mariosmeim-db Nov 18, 2021

Choose a reason for hiding this comment

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

Why not just getBase64EncodedString(key.getEncoded())? I mean, won't new String(key.getEncoded(),StandardCharsets.UTF_8) basically give us a a key of length !=32?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

modified to getBase64(byte[] encoded)
Conversion to String was followed by conversion back to bytes. It did not alter the value but was an unnecessary step, so has been removed

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 7s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 8 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 38m 18s trunk passed
+1 💚 compile 0m 46s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 0m 38s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 0m 29s trunk passed
+1 💚 mvnsite 0m 43s trunk passed
+1 💚 javadoc 0m 36s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 32s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 13s trunk passed
+1 💚 shadedclient 24m 23s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 24m 43s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 36s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 0m 39s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 0m 33s the patch passed
+1 💚 blanks 0m 1s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 19s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 14 new + 5 unchanged - 0 fixed = 19 total (was 5)
+1 💚 mvnsite 0m 36s the patch passed
+1 💚 javadoc 0m 26s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 23s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
-1 ❌ spotbugs 1m 19s /new-spotbugs-hadoop-tools_hadoop-azure.html hadoop-tools/hadoop-azure generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 💚 shadedclient 24m 8s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 15s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 34s The patch does not generate ASF License warnings.
101m 39s
Reason Tests
SpotBugs module:hadoop-tools/hadoop-azure
org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey.getEncoded() may expose internal representation by returning EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:by returning EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:[line 122]
new org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey(EncryptionAdapter, byte[]) may expose internal representation by storing an externally mutable object into EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:internal representation by storing an externally mutable object into EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:[line 107]
Should org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey be a static inner class? At EncryptionAdapter.java:inner class? At EncryptionAdapter.java:[lines 106-128]
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/19/artifact/out/Dockerfile
GITHUB PR #3440
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux 35aa25ebde13 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f6bb16f
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/19/testReport/
Max. process+thread count 519 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/19/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 2s codespell was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 9 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 45m 44s trunk passed
+1 💚 compile 1m 8s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 compile 0m 58s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 checkstyle 0m 46s trunk passed
+1 💚 mvnsite 1m 13s trunk passed
+1 💚 javadoc 0m 48s trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 49s trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 spotbugs 1m 41s trunk passed
+1 💚 shadedclient 27m 18s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 27m 39s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 38s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javac 0m 39s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
+1 💚 javac 0m 35s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 19s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 9 new + 5 unchanged - 0 fixed = 14 total (was 5)
+1 💚 mvnsite 0m 38s the patch passed
+1 💚 javadoc 0m 34s the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04
+1 💚 javadoc 0m 32s the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
-1 ❌ spotbugs 1m 37s /new-spotbugs-hadoop-tools_hadoop-azure.html hadoop-tools/hadoop-azure generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)
+1 💚 shadedclient 26m 20s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 46s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 48s The patch does not generate ASF License warnings.
117m 54s
Reason Tests
SpotBugs module:hadoop-tools/hadoop-azure
org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey.getEncoded() may expose internal representation by returning EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:by returning EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:[line 123]
new org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey(EncryptionAdapter, byte[]) may expose internal representation by storing an externally mutable object into EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:internal representation by storing an externally mutable object into EncryptionAdapter$ABFSSecretKey.secret At EncryptionAdapter.java:[line 108]
Should org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter$ABFSSecretKey be a static inner class? At EncryptionAdapter.java:inner class? At EncryptionAdapter.java:[lines 107-129]
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/20/artifact/out/Dockerfile
GITHUB PR #3440
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell
uname Linux 2e7394752d37 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 04a73e0
Default Java Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/20/testReport/
Max. process+thread count 593 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/20/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@saxenapranav
Copy link
Contributor

saxenapranav commented Jan 5, 2023

yetus run for commit 0cd8c8c

#5261 (comment)

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 57s   Docker mode activated.
      _ Prechecks _  
+1 💚 dupname 0m 1s   No case conflicting files found.
+0 🆗 codespell 0m 1s   codespell was not available.
+0 🆗 detsecrets 0m 1s   detect-secrets was not available.
+1 💚 @author 0m 0s   The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s   The patch appears to include 13 new or modified test files.
      _ trunk Compile Tests _  
+1 💚 mvninstall 42m 0s   trunk passed
+1 💚 compile 0m 41s   trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 34s   trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 33s   trunk passed
+1 💚 mvnsite 0m 41s   trunk passed
-1 ❌ javadoc 0m 37s /branch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in trunk failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 28s   trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 14s   trunk passed
+1 💚 shadedclient 23m 29s   branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 23m 46s   Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
      _ Patch Compile Tests _  
+1 💚 mvninstall 0m 31s   the patch passed
+1 💚 compile 0m 33s   the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 33s   the patch passed
+1 💚 compile 0m 27s   the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 27s   the patch passed
+1 💚 blanks 0m 0s   The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 17s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 10 new + 7 unchanged - 0 fixed = 17 total (was 7)
+1 💚 mvnsite 0m 31s   the patch passed
-1 ❌ javadoc 0m 23s /patch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in the patch failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 21s   the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 5s   the patch passed
+1 💚 shadedclient 23m 1s   patch has no errors when building and testing our client artifacts.
      _ Other Tests _  
+1 💚 unit 1m 56s   hadoop-azure in the patch passed.
+1 💚 asflicense 0m 33s   The patch does not generate ASF License warnings.
    101m 59s    

This message was automatically generated.

Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5261/6/artifact/out/Dockerfile
GITHUB PR #5261
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux db564bc38f70 4.15.0-200-generic #211 SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 0cd8c8c
Default Java Private Build-1.8.0_352-8u352-ga-120.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1
20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5261/6/testReport/
Max. process+thread count 614 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-5261/6/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org/
This message was automatically generated.

Failed because of javadocs. Other task were successful.

@saxenapranav
Copy link
Contributor

HNS-OAuth

[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestAccountConfiguration.testConfigPropNotFound:386->testMissingConfigKey:399 Expected a org.apache.hadoop.fs.azurebfs.contracts.exceptions.TokenAccessProviderException to be thrown, but got the result: : "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider"
[ERROR] Errors:
[ERROR] TestExponentialRetryPolicy.testOperationOnAccountIdle:216 » AccessDenied Opera...
[INFO]
[ERROR] Tests run: 111, Failures: 1, Errors: 1, Skipped: 1
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestAzureBlobFileSystemLease.testAcquireRetry:336 » TestTimedOut test timed o...
[ERROR] ITestAzureBlobFileSystemOauth.testBlobDataContributor:84 » AccessDenied Operat...
[ERROR] ITestAzureBlobFileSystemOauth.testBlobDataReader:143 » AccessDenied Operation ...
[INFO]
[ERROR] Tests run: 576, Failures: 0, Errors: 3, Skipped: 71
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestAbfsTerasort.test_120_terasort:262->executeStage:206 » IO The ownership o...
[INFO]
[ERROR] Tests run: 335, Failures: 0, Errors: 1, Skipped: 54

HNS-SharedKey

[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestAccountConfiguration.testConfigPropNotFound:386->testMissingConfigKey:399 Expected a org.apache.hadoop.fs.azurebfs.contracts.exceptions.TokenAccessProviderException to be thrown, but got the result: : "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider"
[ERROR] Errors:
[ERROR] TestExponentialRetryPolicy.testOperationOnAccountIdle:216 » AccessDenied Opera...
[INFO]
[ERROR] Tests run: 111, Failures: 1, Errors: 1, Skipped: 2
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] ITestAzureBlobFileSystemRandomRead.testSkipBounds:218->Assert.assertTrue:42->Assert.fail:89 There should not be any network I/O (elapsedTimeMs=40).
[ERROR] Errors:
[ERROR] ITestAzureBlobFileSystemLease.testAcquireRetry:329 » TestTimedOut test timed o...
[INFO]
[ERROR] Tests run: 576, Failures: 1, Errors: 1, Skipped: 26
[INFO] Results:
[INFO]
[WARNING] Tests run: 335, Failures: 0, Errors: 0, Skipped: 41

NonHNS-SharedKey

[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestAccountConfiguration.testConfigPropNotFound:386->testMissingConfigKey:399 Expected a org.apache.hadoop.fs.azurebfs.contracts.exceptions.TokenAccessProviderException to be thrown, but got the result: : "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider"
[ERROR] Errors:
[ERROR] TestExponentialRetryPolicy.testOperationOnAccountIdle:216 » AccessDenied Opera...
[INFO]
[ERROR] Tests run: 111, Failures: 1, Errors: 1, Skipped: 2
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestAzureBlobFileSystemLease.testAcquireRetry:344->lambda$testAcquireRetry$6:345 » TestTimedOut
[INFO]
[ERROR] Tests run: 560, Failures: 0, Errors: 1, Skipped: 269
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] ITestAbfsTerasort.test_110_teragen:244->executeStage:211->Assert.assertEquals:647->Assert.failNotEquals:835->Assert.fail:89 teragen(1000, abfs://testcontainer@pranavsaxenanonhns.dfs.core.windows.net/ITestAbfsTerasort/sortin) failed expected:<0> but was:<1>
[ERROR] Errors:
[ERROR] ITestAbfsJobThroughManifestCommitter.test_0420_validateJob » OutputValidation ...
[ERROR] ITestAbfsManifestCommitProtocol.testCommitLifecycle » OutputValidation abfs:/... [ERROR] ITestAbfsManifestCommitProtocol.testCommitterWithDuplicatedCommit » OutputValidation [ERROR] ITestAbfsManifestCommitProtocol.testConcurrentCommitTaskWithSubDir » OutputValidation [ERROR] ITestAbfsManifestCommitProtocol.testMapFileOutputCommitter » OutputValidation ... [ERROR] ITestAbfsManifestCommitProtocol.testOutputFormatIntegration » OutputValidation [ERROR] ITestAbfsManifestCommitProtocol.testParallelJobsToAdjacentPaths » OutputValidation [ERROR] ITestAbfsManifestCommitProtocol.testTwoTaskAttemptsCommit » OutputValidation ...
[INFO]
[ERROR] Tests run: 335, Failures: 1, Errors: 8, Skipped: 46

AppendBlob-HNS-OAuth

[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestAccountConfiguration.testConfigPropNotFound:386->testMissingConfigKey:399 Expected a org.apache.hadoop.fs.azurebfs.contracts.exceptions.TokenAccessProviderException to be thrown, but got the result: : "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider"
[ERROR] Errors:
[ERROR] TestExponentialRetryPolicy.testOperationOnAccountIdle:216 » AccessDenied Opera...
[INFO]
[ERROR] Tests run: 111, Failures: 1, Errors: 1, Skipped: 1
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestAzureBlobFileSystemLease.testAcquireRetry:329 » TestTimedOut test timed o...
[ERROR] ITestAzureBlobFileSystemOauth.testBlobDataContributor:84 » AccessDenied Operat...
[ERROR] ITestAzureBlobFileSystemOauth.testBlobDataReader:143 » AccessDenied Operation ...
[INFO]
[ERROR] Tests run: 576, Failures: 0, Errors: 3, Skipped: 71
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestAbfsTerasort.test_120_terasort:262->executeStage:206 » IO The ownership o...
[INFO]
[ERROR] Tests run: 335, Failures: 0, Errors: 1, Skipped: 54

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 59s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 13 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 41m 14s trunk passed
+1 💚 compile 0m 39s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 32s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 30s trunk passed
+1 💚 mvnsite 0m 39s trunk passed
-1 ❌ javadoc 0m 36s /branch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in trunk failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 29s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 11s trunk passed
+1 💚 shadedclient 23m 2s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 23m 19s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 30s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 33s the patch passed
+1 💚 compile 0m 28s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 28s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 16s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 10 new + 7 unchanged - 0 fixed = 17 total (was 7)
+1 💚 mvnsite 0m 31s the patch passed
-1 ❌ javadoc 0m 23s /patch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in the patch failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 21s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 5s the patch passed
+1 💚 shadedclient 23m 2s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 57s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
100m 25s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/10/artifact/out/Dockerfile
GITHUB PR #3440
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 3db4ac2103d3 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 0cd8c8c
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/10/testReport/
Max. process+thread count 604 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/10/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 8s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 1s The patch appears to include 13 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 40m 59s trunk passed
+1 💚 compile 0m 40s trunk passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 compile 0m 35s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 checkstyle 0m 31s trunk passed
+1 💚 mvnsite 0m 40s trunk passed
-1 ❌ javadoc 0m 37s /branch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in trunk failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 30s trunk passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 12s trunk passed
+1 💚 shadedclient 23m 22s branch has no errors when building and testing our client artifacts.
-0 ⚠️ patch 23m 39s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 30s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04
+1 💚 javac 0m 33s the patch passed
+1 💚 compile 0m 28s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 javac 0m 28s the patch passed
+1 💚 blanks 0m 1s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 17s /results-checkstyle-hadoop-tools_hadoop-azure.txt hadoop-tools/hadoop-azure: The patch generated 10 new + 7 unchanged - 0 fixed = 17 total (was 7)
+1 💚 mvnsite 0m 32s the patch passed
-1 ❌ javadoc 0m 24s /patch-javadoc-hadoop-tools_hadoop-azure-jdkUbuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.txt hadoop-azure in the patch failed with JDK Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04.
+1 💚 javadoc 0m 21s the patch passed with JDK Private Build-1.8.0_352-8u352-ga-1~20.04-b08
+1 💚 spotbugs 1m 7s the patch passed
+1 💚 shadedclient 23m 10s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 58s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
101m 8s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/11/artifact/out/Dockerfile
GITHUB PR #3440
Optional Tests dupname asflicense codespell detsecrets compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle
uname Linux 79d0929ea6ca 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b718b3c
Default Java Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.17+8-post-Ubuntu-1ubuntu220.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_352-8u352-ga-1~20.04-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/11/testReport/
Max. process+thread count 601 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3440/11/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@saxenapranav
Copy link
Contributor

saxenapranav commented Jan 9, 2023

There, i've just spent a couple of hours going through it. big piece of work.

In this current design, the EncryptionAdapter is either null or non null; if non null it is used to do the encryption/decryption, which is a bit scattered through the code

There's another strategy: move the work into the EncryptionAdapter itself, with a an abstract EncryptionAdapter base class, a NoEncryptionAdapter for when its not used (make this a singleton) and then the ContextEncryptionAdapter which uses the EncryptionContextProvider, conains the keys etc and where you can push the work

I'm worried that AbfsClient will call getPathStatus() on any operation when it things it needs the header, including getPathStatus itself. I think that code needs to be restricted only to those calls where it absolutely needs that header (do delete and flush really need it?), and that getPathStatus is explicitly excluded.

Finally, is the new api live?

In the method addEncryptionKeyRequestHeaders of AbfsClient.java, encryptionAdapter is always going to be non-null object. when encryptionType==ENCRYPTION_CONTEXT. Hence, we would not need to call getPathStatus in this method. And as there is no logic when encryptionAdapter is null, have not made the change for EncryptionAdapter base class and having NoEncryptionAdapter child class.

@saxenapranav
Copy link
Contributor

@steveloughran , requesting you to kindly review the PR please.

Regards.

@saxenapranav
Copy link
Contributor

saxenapranav commented Jan 19, 2023

@mukund-thakur , @mehakmeet requesting you to kindly review the PR. Thanks.

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.

6 participants