I’m trying to setup a connection between my application and the simple notification service (SNS) from AWS. This is proving to be troublesome because of the way AWS manages these subscriptions.
To subscribe AWS first sends a subscription token to the endpoint (in indicium) that will receive the SNS notifications. The endpoint in my application then needs to reply with the SNS-token to verify the subscription.
To send the subscription token, AWS sends two messages: One without authentication and then one with authentication based on the header that is received in response of the first message.
The endpoint in my application needs to respond to the first message without authentication with a 401 code with a header that specifies the type of authentication that is expected*:
WWW-Authenticate: Basic realm=“<application>” .
Indicium automatically responds with a 401 code and the header:
WWW-Authenticate: Indicium realm=“<application>”
Even when using a message protocol-independent web service I haven’t been able to manipulate the headers attached to authentication. Is there a way to manage this anyway and make indicium compatible with AWS SNS?
Best answer by Anne BuitView original