Skip to content

The authorization header contains a token with a wrong audience #4

@prabhugsp

Description

@prabhugsp

I tried to use the tool to obtain the token for certain time.

I am not sure what should be the publisher and hubname so I left them empty and generated the token,

The Header looks like this in my request,

	<set-header name="Authorization" exists-action="skip">
		<value><![CDATA[SharedAccessSignature sr=https%3a%2f%2fenterpriseabc.servicebus.windows.net%2fpublishers%2f%2fmessages&sig=lkBJfO43mmYtWhwJcNxdK9YC2%2b1lXOWXpXdNdftnG90%3d&se=1498963116&skn=RootManageSharedAccessKey]]></value>
		<!-- for multiple headers with the same name add additional value elements -->
	</set-header>

Now when I test this using Developer Portal, I get this below error -

401 InvalidAudience: The authorization header contains a token with a wrong audience. TrackingId:0a8bdd15-e087-446f-bd69-4a08e9a34ce4_G31, SystemTracker:enterpriseabc.servicebus.windows.net:myendpoint/Order, Timestamp:6/11/2017 6:34:56 AM

When I removed the "%2fpublishers%2f%2fmessages" part from the header like shown below: I get a different error:

	<set-header name="Authorization" exists-action="skip">
		<value><![CDATA[SharedAccessSignature sr=https%3a%2f%2fenterpriseabc.servicebus.windows.net&sig=lkBJfO43mmYtWhwJcNxdK9YC2%2b1lXOWXpXdNdftnG90%3d&se=1498963116&skn=RootManageSharedAccessKey]]></value>
		<!-- for multiple headers with the same name add additional value elements -->
	</set-header>
401 InvalidSignature: The token has an invalid signature. TrackingId:799c3ad2-bb4e-4a55-bffd-f90c885023b8_G31, SystemTracker:enterpriseabc.servicebus.windows.net:myendpoint/Order, Timestamp:6/11/2017 6:37:29 AM

Is the Publisher and HubName Mandatory? If it isnt so what I am missing here..
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions