Skip to content

HADOOP-16916: ABFS: Delegation SAS generator for integration with Ranger #1965

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 6 commits into from

Conversation

ThomasMarquardt
Copy link
Contributor

Previously we only had a SASGenerator class which generated Service SAS, but I need to add DelegationSASGenerator. I broke SASGenerator out into a base class and two subclasses ServiceSASGenerator and DelegationSASGenreator. The code in ServiceSASGenerator is copied from SASGenerator but the DelegationSASGenrator code is new. The DelegationSASGenerator code demonstrates how to use Delegation SAS with minimal permissions, as would be used
by an authorization service such as Apache Ranger. Adding this to the tests helps us lock in this behavior.

Added a MockDelegationSASTokenProvider for testing User Delegation SAS.

Enable the Check Access API by default and fix the ITestAzureBlobFileSystemCheckAccess tests to assume oauth client ID so that they are ignored when that is not configured.

To improve performance, AbfsInputStream/AbfsOutputStream re-use SAS tokens until the expiry is within 120 seconds. After this a new SAS will be requested. The default period of 120 seconds can be changed using the configuration setting "fs.azure.sas.token.renew.period.for.streams".

The SASTokenProvider operation names were updated to correspond better with the ADLS Gen2 REST API, since these operations must be provided tokens with appropriate SAS parameters to succeed.

Support for the version 2.0 AAD authentication endpoint was added to AzureADAuthenticator.

The getFileStatus method was mistakenly calling the ADLS Gen2 Get Properties API which requires read permission while the getFileStatus call only requires execute permission. ADLS Gen2 Get Status API is supposed to be used for this purpose, so the underlying AbfsClient.getPathStatus API was updated with a includeProperties parameter which is set to false for getFileStatus and true for getXAttr.

Added SASTokenProvider support for delete recursive.

Fixed bugs in AzureBlobFileSystem where public methods were not validating the Path by calling makeQualified. This is necessary to avoid passing null paths and to convert relative paths into absolute paths.

Canonicalized the path used for root path internally so that root path can be used with SAS tokens, which requires that the path in the URL and the path in the SAS token match. Internally the code was using "//" instead of "/" for the root path, sometimes. Also related to this, the AzureBlobFileSystemStore.getRelativePath API was updated so that we no longer remove and then add back a preceding forward / to paths.

All tests passing against my eastus2euap account:

$ mvn -T 1C -Dparallel-tests=abfs -Dscale -DtestsThreadCount=8 clean verify
[INFO] Tests run: 56, Failures: 0, Errors: 0, Skipped: 0
[WARNING] Tests run: 424, Failures: 0, Errors: 0, Skipped: 33
[WARNING] Tests run: 206, Failures: 0, Errors: 0, Skipped: 24

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 11s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 22m 18s trunk passed
+1 💚 compile 0m 27s trunk passed
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 shadedclient 16m 7s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 23s trunk passed
+0 🆗 spotbugs 0m 50s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 48s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 26s the patch passed
+1 💚 compile 0m 22s the patch passed
+1 💚 javac 0m 22s the patch passed
-0 ⚠️ checkstyle 0m 14s hadoop-tools/hadoop-azure: The patch generated 13 new + 9 unchanged - 0 fixed = 22 total (was 9)
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 15m 13s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 20s the patch passed
-1 ❌ findbugs 0m 56s hadoop-tools/hadoop-azure generated 2 new + 0 unchanged - 0 fixed = 2 total (was 0)
_ Other Tests _
+1 💚 unit 1m 18s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 28s The patch does not generate ASF License warnings.
63m 22s
Reason Tests
FindBugs module:hadoop-tools/hadoop-azure
Comparison of String parameter using == or != in org.apache.hadoop.fs.azurebfs.utils.CachedSASToken.update(String) At CachedSASToken.java:== or != in org.apache.hadoop.fs.azurebfs.utils.CachedSASToken.update(String) At CachedSASToken.java:[line 165]
Inconsistent synchronization of org.apache.hadoop.fs.azurebfs.utils.CachedSASToken.sasToken; locked 57% of time Unsynchronized access at CachedSASToken.java:57% of time Unsynchronized access at CachedSASToken.java:[line 187]
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/1/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 386730bf0db9 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1824aee
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/1/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/1/artifact/out/new-findbugs-hadoop-tools_hadoop-azure.html
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/1/testReport/
Max. process+thread count 308 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 11s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 45s trunk passed
+1 💚 compile 0m 28s trunk passed
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 shadedclient 16m 20s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 23s trunk passed
+0 🆗 spotbugs 0m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 46s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 26s the patch passed
+1 💚 compile 0m 22s the patch passed
+1 💚 javac 0m 22s the patch passed
-0 ⚠️ checkstyle 0m 14s hadoop-tools/hadoop-azure: The patch generated 3 new + 9 unchanged - 0 fixed = 12 total (was 9)
+1 💚 mvnsite 0m 26s the patch passed
-1 ❌ whitespace 0m 0s The patch 1 line(s) with tabs.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 15m 8s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 20s the patch passed
-1 ❌ findbugs 0m 56s hadoop-tools/hadoop-azure generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚 unit 1m 17s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
62m 56s
Reason Tests
FindBugs module:hadoop-tools/hadoop-azure
Inconsistent synchronization of org.apache.hadoop.fs.azurebfs.utils.CachedSASToken.sasToken; locked 57% of time Unsynchronized access at CachedSASToken.java:57% of time Unsynchronized access at CachedSASToken.java:[line 187]
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 44fcdc588544 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1824aee
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
whitespace https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/artifact/out/whitespace-tabs.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/artifact/out/new-findbugs-hadoop-tools_hadoop-azure.html
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/testReport/
Max. process+thread count 316 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 11s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 30s trunk passed
+1 💚 compile 0m 28s trunk passed
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 shadedclient 16m 21s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 22s trunk passed
+0 🆗 spotbugs 0m 50s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 47s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 27s the patch passed
+1 💚 compile 0m 22s the patch passed
+1 💚 javac 0m 22s the patch passed
-0 ⚠️ checkstyle 0m 14s hadoop-tools/hadoop-azure: The patch generated 3 new + 9 unchanged - 0 fixed = 12 total (was 9)
+1 💚 mvnsite 0m 24s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 15m 27s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 19s the patch passed
+1 💚 findbugs 0m 53s the patch passed
_ Other Tests _
+1 💚 unit 1m 18s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 28s The patch does not generate ASF License warnings.
62m 59s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/3/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 70cf3a39394d 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1824aee
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/3/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/3/testReport/
Max. process+thread count 308 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor

Well, this is a big patch :)

I hope to merge #1956 in on Tuesday Apr 20; it'll break your arg passing to the streams, but its designed to reduce future merge conflict (e.g. #1946)

@ThomasMarquardt
Copy link
Contributor Author

Thanks for the heads-up, and I'll update this after PR 1956 is merged. Yes, this is a big patch and all of it is related to enabling Delegation SAS support for Apache Ranger. I considered breaking it up into multiple JIRAs but some changes have dependencies between each other. Most of it is testing.

@steveloughran
Copy link
Contributor

ok, conflicting patch is in

@ThomasMarquardt
Copy link
Contributor Author

Thanks for the update, I merged and pushed the update.

All tests passing against my eastus2euap account:

$ mvn -T 1C -Dparallel-tests=abfs -Dscale -DtestsThreadCount=8 clean verify
[INFO] Tests run: 58, Failures: 0, Errors: 0, Skipped: 0
[WARNING] Tests run: 424, Failures: 0, Errors: 0, Skipped: 33
[WARNING] Tests run: 206, Failures: 0, Errors: 0, Skipped: 24

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 19m 45s trunk passed
+1 💚 compile 0m 30s trunk passed
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 33s trunk passed
+1 💚 shadedclient 19m 2s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 25s trunk passed
+0 🆗 spotbugs 1m 2s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 1s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 32s the patch passed
+1 💚 compile 0m 28s the patch passed
+1 💚 javac 0m 28s the patch passed
-0 ⚠️ checkstyle 0m 19s hadoop-tools/hadoop-azure: The patch generated 2 new + 9 unchanged - 0 fixed = 11 total (was 9)
+1 💚 mvnsite 0m 33s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 18m 37s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 24s the patch passed
+1 💚 findbugs 1m 7s the patch passed
_ Other Tests _
+1 💚 unit 1m 32s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
68m 2s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/4/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 148baa8fa3e6 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 264e49c
Default Java Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/4/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/4/testReport/
Max. process+thread count 412 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 22m 0s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 18m 47s trunk passed
+1 💚 compile 0m 32s trunk passed
+1 💚 checkstyle 0m 25s trunk passed
+1 💚 mvnsite 0m 35s trunk passed
+1 💚 shadedclient 14m 42s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 26s trunk passed
+0 🆗 spotbugs 0m 51s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 50s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 27s the patch passed
+1 💚 compile 0m 23s the patch passed
+1 💚 javac 0m 23s the patch passed
-0 ⚠️ checkstyle 0m 17s hadoop-tools/hadoop-azure: The patch generated 2 new + 9 unchanged - 0 fixed = 11 total (was 9)
+1 💚 mvnsite 0m 26s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 13m 58s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 24s the patch passed
+1 💚 findbugs 0m 56s the patch passed
_ Other Tests _
+1 💚 unit 1m 24s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
78m 40s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/5/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux a50f7dec6d2d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 74d4a18
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/5/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/5/testReport/
Max. process+thread count 413 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/5/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 26m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 10 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 17s trunk passed
+1 💚 compile 0m 27s trunk passed
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 shadedclient 16m 18s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 23s trunk passed
+0 🆗 spotbugs 0m 50s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 47s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 26s the patch passed
+1 💚 compile 0m 22s the patch passed
+1 💚 javac 0m 22s the patch passed
-0 ⚠️ checkstyle 0m 15s hadoop-tools/hadoop-azure: The patch generated 2 new + 9 unchanged - 0 fixed = 11 total (was 9)
+1 💚 mvnsite 0m 25s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 15m 26s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 20s the patch passed
+1 💚 findbugs 0m 52s the patch passed
_ Other Tests _
+1 💚 unit 1m 19s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
87m 59s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/6/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 15cf2a075751 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 8dace8f
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/6/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/6/testReport/
Max. process+thread count 309 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/6/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 22m 13s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 18m 39s trunk passed
+1 💚 compile 0m 31s trunk passed
+1 💚 checkstyle 0m 25s trunk passed
+1 💚 mvnsite 0m 34s trunk passed
+1 💚 shadedclient 14m 50s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 29s trunk passed
+0 🆗 spotbugs 0m 52s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 49s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 27s the patch passed
+1 💚 compile 0m 24s the patch passed
+1 💚 javac 0m 24s the patch passed
-0 ⚠️ checkstyle 0m 17s hadoop-tools/hadoop-azure: The patch generated 2 new + 9 unchanged - 0 fixed = 11 total (was 9)
+1 💚 mvnsite 0m 27s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 13m 52s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 23s the patch passed
+1 💚 findbugs 0m 55s the patch passed
_ Other Tests _
+1 💚 unit 1m 23s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 31s The patch does not generate ASF License warnings.
78m 50s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/7/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux e315f73ce033 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / e877118
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/7/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/7/testReport/
Max. process+thread count 449 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/7/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@snvijaya snvijaya left a comment

Choose a reason for hiding this comment

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

Minor comments added. Also latest Yetus has 2 checkstyle issues for parameter count. Please check.

Previously we only had a SASGenerator class which generated Service SAS, but I need to add DelegationSASGenerator.
I broke SASGenerator out into a base class and two subclasses ServiceSASGenerator and DelegationSASGenreator.  The
code in ServiceSASGenerator is copied from SASGenerator but the DelegationSASGenrator code is new.
The DelegationSASGenerator code demonstrates how to use Delegation SAS with minimal permissions, as would be used
by an authorization service such as Apache Ranger.  Adding this to the tests helps us lock in this behavior.

Added a MockDelegationSASTokenProvider for testing User Delegation SAS.

Enable the Check Access API by default and fix the ITestAzureBlobFileSystemCheckAccess tests to assume oauth
client ID so that they are ignored when that is not configured.

To improve performance, AbfsInputStream/AbfsOutputStream re-use SAS tokens until the expiry is within 120 seconds.
After this a new SAS will be requested.  The default period of 120 seconds can be changed using the configuration
setting "fs.azure.sas.token.renew.period.for.streams".

The SASTokenProvider operation names were updated to correspond better with the ADLS Gen2 REST API, since these
operations must be provided tokens with appropriate SAS parameters to succeed.

Support for the version 2.0 AAD authentication endpoint was added to AzureADAuthenticator.

The getFileStatus method was mistakenly calling the ADLS Gen2 Get Properties API which requires read permission
while the getFileStatus call only requires execute permission.  ADLS Gen2 Get Status API is supposed to be used
for this purpose, so the underlying AbfsClient.getPathStatus API was updated with a includeProperties
parameter which is set to false for getFileStatus and true for getXAttr.

Added SASTokenProvider support for delete recursive.

Fixed bugs in AzureBlobFileSystem where public methods were not validating the Path by calling makeQualified.  This is
necessary to avoid passing null paths and to convert relative paths into absolute paths.

Canonicalized the path used for root path internally so that root path can be used with SAS tokens, which requires
that the path in the URL and the path in the SAS token match.  Internally the code was using
"//" instead of "/" for the root path, sometimes.  Also related to this, the AzureBlobFileSystemStore.getRelativePath
API was updated so that we no longer remove and then add back a preceding forward / to paths.
1) Reverting default version back to 2018-11-09. To run
ITestAzureBlobFileSystemDelegationSAS.testList you need to temporariliy set this
to 2019-12-12 due to a server-side bug that will be fixed in the weeks to come.

2) AzureBlobFileSystem.getFileStatus is currently calling the GetAccessControl
REST API.  My previous PR fixed this to call GetStatus REST API, but the
fix depends on a server-side bug that will not be available for a few weeks.
Instead we'll postpone this until later, can continue calling GetAccessControl
for now.

With these changes, all tests are passing.

Results for my production account in USWest2 without Delegation SAS tests:
Tests run: 63, Failures: 0, Errors: 0, Skipped: 0
Tests run: 432, Failures: 0, Errors: 0, Skipped: 41
Tests run: 206, Failures: 0, Errors: 0, Skipped: 24

Results for my test account in eastus2euap with Delegation SAS tests:
Tests run: 63, Failures: 0, Errors: 0, Skipped: 0
Tests run: 432, Failures: 0, Errors: 0, Skipped: 33
Tests run: 206, Failures: 0, Errors: 0, Skipped: 24
…ge when hierarchical namespace is disabled. It turns out that when it is disabled, the directory query parameter used by the List Paths API must not start with a forward slash '/'. The continuation token is also affected by this, so I have fixed both of these issues.

I also discovered that ITestAzureBlobFileSystemAuthorization tests that use
ACLs were missing Assume.assumeTrue(this.getFileSystem().getIsNamespaceEnabled())
so I have added that.

Finally, I have changed the default for fs.azure.enable.check.access back to false
and we will wait for the next release of ADLS Gen2 REST API before changing this
to true.
java*
javax*
any non-org.apache imports
any org.apache.* imports
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 8s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 11 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 3s trunk passed
+1 💚 compile 0m 27s trunk passed
+1 💚 checkstyle 0m 20s trunk passed
+1 💚 mvnsite 0m 30s trunk passed
+1 💚 shadedclient 16m 11s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 22s trunk passed
+0 🆗 spotbugs 0m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 48s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 26s the patch passed
+1 💚 compile 0m 21s the patch passed
+1 💚 javac 0m 21s the patch passed
-0 ⚠️ checkstyle 0m 14s hadoop-tools/hadoop-azure: The patch generated 2 new + 9 unchanged - 0 fixed = 11 total (was 9)
+1 💚 mvnsite 0m 25s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 2s The patch has no ill-formed XML file.
+1 💚 shadedclient 15m 15s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 20s the patch passed
+1 💚 findbugs 0m 54s the patch passed
_ Other Tests _
+1 💚 unit 1m 18s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
62m 3s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/8/artifact/out/Dockerfile
GITHUB PR #1965
JIRA Issue HADOOP-16916
Optional Tests dupname asflicense xml compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint
uname Linux 887bc1c2afbc 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / bd342be
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/8/artifact/out/diff-checkstyle-hadoop-tools_hadoop-azure.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/8/testReport/
Max. process+thread count 310 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1965/8/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ThomasMarquardt
Copy link
Contributor Author

commit b214bbd
Author: Thomas Marquardt tmarq@microsoft.com
Date: Tue May 12 17:32:52 2020 +0000

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.

4 participants