Windows authentication on swagger api endpoint in IIS - api

I currently have a .net core api setup to use swagger. I need to protect the swagger documents with windows authentication. Since there isn't an actual swagger folder with swagger html files, it seems like i can't setup the authentication through IIS manager. Is there any way to do this?

Related

Is there support for Certificate Authentication in Swagger UI?

Is there support for Client Certificate Authentication in Swagger UI? If yes, could someone provide an example of enabling it in a solution using asp.net core 5 and Swashbuckle, or point me to a url which has a good example of the same.

How to programmatically discover all API urls in ASP.NET Core application

I am writing a Windows service in ASP.NET Core 5 that hosts web service API's (i.e. controllers).
At the end of the startup sequence, I would like write to the log file a list of all web service API URL's that exist in the service. Is there a way to programmatically find and list all valid web service API's?

Using Windows Authentication with Azure Service Fabric with ASP.NET Core

I want to use an ASP.NET Core Web API Service that should run in Azure Service Fabric. Is it possible to use Windows Authentication to secure the web Service?
I want to prevent that the user who uses this needs to log into the System manually.
Only when using WebListener. Kestrel doesn't support it, because it is a cross platform implementation.
Here's an example.

How to use asp.net core as a backend authenticate with active directory

I'm using angular2 as a front-end. My Back-end is ASP.NET Core and I am using it as a Restful Web API. How can I authenticate credentials from angular against a local active directory?
Depending on the version of ASP.NET you could implement the ASP.NET Membership or Identity which can connect to AD.
You should easily find various examples of these.
I have recently looked at Auth0, which means you can integrate a variety of ways, front or back-end.
see: https://auth0.com
(not affiliated)

Using WCF to create a RESTful Web Service that requires authentication and uses JSON as input/output format

I want to port an existing ASP.NET Web Service to WCF so the resulting Web Service (1) is RESTful, (2) uses JSON as its request/response format, (3) has a custom authentication mechanism.
After a lot of googling, random coding, and wanting to hit my head against the wall, I found that...
A webHttpBinding has to be used to make the Web Service RESTful. But...
webHttpBinding does not support HTTPS hosts.
webHttpBinding does not support UserName authentication.
webHttpBinding does not even support message security.
An endpoint behavior with <enableWebScript/> has to be used to support ASP.NET AJAX. But...
What is "ASP.NET" AJAX?
What if I want to consume the Web Service using "regular" AJAX?
And, most importantly...
Can WCF do what I want to do in first place?
If not, what other platforms could I use?
I've written WCF service that does both SOAP and REST with XML and JSON, and custom auth. I've pushed the custom authentication into HTTP module, which does basic auth over https. See Custom HTTP Basic Authentication for ASP.NET Web Services on .NET 3.5/VS 2008 and WCF POX, JSON and SOAP Coexist.
In the setup you describe, the web servier (i.e. IIS) will be responsible for encryption (HTTPS) and authentication (e.g. basic authentiction). IIS can be extended with a custom authentication mechanism (just google for "IIS module handler").
It's a bit strange that it has to be delegated to IIS and is not part of WCF. But it's no problem at all.