[ 
https://issues.apache.org/jira/browse/HADOOP-19257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877872#comment-17877872
 ] 

Steve Loughran commented on HADOOP-19257:
-----------------------------------------

{code}
leBadInnerAuth(org.apache.hadoop.fs.s3a.auth.ITestAssumeRole)  Time elapsed: 
4.182 s  <<< FAILURE!
java.lang.AssertionError: 
 Expected to find 'not a valid key=value pair (missing equal-sign) in 
Authorization header' but got unexpected exception: 
org.apache.hadoop.fs.s3a.AWSBadRequestException: Instantiate 
org.apache.hadoop.fs.s3a.auth.AssumedRoleCredentialProvider on /: 
software.amazon.awssdk.services.sts.model.StsException: Invalid key=value pair 
(missing equal-sign) in Authorization header (hashed with SHA-256 and encoded 
with Base64): 'DTx9cxRMo1i10t+l2nWpU+lMmdZ09dt/1H8+836IGIw='. (Service: Sts, 
Status Code: 400, Request ID: 
bc15c303-50d1-442f-8964-bd03866d27a4):IncompleteSignature: Invalid key=value 
pair (missing equal-sign) in Authorization header (hashed with SHA-256 and 
encoded with Base64): 'DTx9cxRMo1i10t+l2nWpU+lMmdZ09dt/1H8+836IGIw='. (Service: 
Sts, Status Code: 400, Request ID: bc15c303-50d1-442f-8964-bd03866d27a4)
        at 
org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:259)
        at 
org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(S3AUtils.java:686)
        at 
org.apache.hadoop.fs.s3a.auth.CredentialProviderListFactory.createAWSV2CredentialProvider(CredentialProviderListFactory.java:299)
        at 
org.apache.hadoop.fs.s3a.auth.CredentialProviderListFactory.buildAWSProviderList(CredentialProviderListFactory.java:245)
        at 
org.apache.hadoop.fs.s3a.auth.CredentialProviderListFactory.createAWSCredentialProviderList(CredentialProviderListFactory.java:144)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem.bindAWSClient(S3AFileSystem.java:1068)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:714)
        at 
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3452)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:519)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:361)
        at 
org.apache.hadoop.fs.s3a.auth.ITestAssumeRole.lambda$expectFileSystemCreateFailure$0(ITestAssumeRole.java:150)
        at 
org.apache.hadoop.fs.s3a.S3ATestUtils.lambda$interceptClosing$0(S3ATestUtils.java:664)
        at 
org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:498)
        at 
org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384)
        at 
org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:453)
        at 
org.apache.hadoop.fs.s3a.S3ATestUtils.interceptClosing(S3ATestUtils.java:662)
        at 
org.apache.hadoop.fs.s3a.auth.ITestAssumeRole.expectFileSystemCreateFailure(ITestAssumeRole.java:148)
        at 
org.apache.hadoop.fs.s3a.auth.ITestAssumeRole.testAssumeRoleBadInnerAuth(ITestAssumeRole.java:276)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
        at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.lang.Thread.run(Thread.java:750)
Caused by: software.amazon.awssdk.services.sts.model.StsException: Invalid 
key=value pair (missing equal-sign) in Authorization header (hashed with 
SHA-256 and encoded with Base64): 
'DTx9cxRMo1i10t+l2nWpU+lMmdZ09dt/1H8+836IGIw='. (Service: Sts, Status Code: 
400, Request ID: bc15c303-50d1-442f-8964-bd03866d27a4)
        at 
software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handleErrorResponse(CombinedResponseHandler.java:125)
        at 
software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handleResponse(CombinedResponseHandler.java:82)
        at 
software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handle(CombinedResponseHandler.java:60)
        at 
software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handle(CombinedResponseHandler.java:41)
        at 
software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:50)
        at 
software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:38)
        at 
software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:
{code}


> S3A: ITestAssumeRole.testAssumeRoleBadInnerAuth failure
> -------------------------------------------------------
>
>                 Key: HADOOP-19257
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19257
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3, test
>    Affects Versions: 3.4.0, 3.4.1
>            Reporter: Steve Loughran
>            Priority: Minor
>
> Not sure when this changed, but I've only just noticed today while setting up 
> a new test config.
> The test {{testAssumeRoleBadInnerAuth}} is failing because the error string 
> coming back from STS is slightly different.
> {code}
> [ERROR] 
> testAssumeRoleBadInnerAuth(org.apache.hadoop.fs.s3a.auth.ITestAssumeRole)  
> Time elapsed: 4.182 s  <<< FAILURE!
> java.lang.AssertionError: 
>  Expected to find 'not a valid key=value pair (missing equal-sign) in 
> Authorization header' but got unexpected exception: 
> org.apache.hadoop.fs.s3a.AWSBadRequestException: Instantiate 
> org.apache.hadoop.fs.s3a.auth.AssumedRoleCredentialProvider on /: 
> software.amazon.awssdk.services.sts.model.StsException: Invalid key=value 
> pair (missing equal-sign) 
> {code}
> Rather than change the string to look for, lets just remove the string so it 
> it less brittle in future



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to