0

I want to use API Gateway for its mutual TLS capability and add it to an existing .net fx 4.8 web application hosted in IIS which is fronted by and AWS ALB:-

client browser -> apigw -> alb -> ec2

I have configured the apigw method to return html and to use proxy integration, but I am having issues in a couple of places:-

  • any request made to a subfolder of the mapped path returns {"message":"Missing Authentication Token"}
  • images are not being returned (tested by using the iis home page on the root

In the absence of any api auth being configured, I understand that the missing token response could indicate a bad url. I am new to apigw so I may be missing something obvious, but I cannot believe I would have to map every single possible path available in our web app in the apigw config - there are simply too many!

I have read a few articles/messages talking about handling images but these either refer to using s3 as the store or, in the case of the image being the only thing in the response, configuring the apigw to return an image content type. In this case of a .net web app which will return html and images, I have not found any advice.

So my question is (before I spend way too long trying to make this work!), is it possible or even advisable to front a .net fx web app with an aws api gateway?

danrockcoll
  • 173
  • 2
  • 10

1 Answers1

1

You need to configure "Catch-all Path Variables" in API Gateway, as described here.

Mark B
  • 183,023
  • 24
  • 297
  • 295
  • Thanks Mark! I did see references to proxy+, but I thought it was referring to something else. I will try it out now, fingers crossed! But as to my original question, do you think this solution is still viable when using something like an aspnet mvc web app? – danrockcoll Mar 08 '21 at 13:59
  • I don't know why an ASP.NET MVC web app would be any different than any other web app as far as being able to proxy it with something like this. You may run into issues proxying binary responses like images. – Mark B Mar 08 '21 at 14:05
  • great stuff, that worked! but unfortunately it only got me as far as the next error :( the web app seems to run fine, but as soon as i enable mtls, i get chrome not even prompting for the client cert and firefox does prompt but then has a redirect failure (postman gets the errconnreset error!). i'm going to mark it as answered anyways and then raise a different thread if i can't figure it out :) – danrockcoll Mar 08 '21 at 16:47