I have an on-premise ASP.Net Core Web API application running under IIS 10 on Windows Server 2016. Previously, this was secured using Windows Authentication, but it has now been converted such that users authenticate through Azure AD. Therefore authentication is now handled entirely by the app itself.
I'm unsure which IIS Authentication setting I should now use. In IIS, if I leave Windows Auth enabled, the user is presented with a dialog requesting username and password, which is obviously not required now that logon is handled via the standard Microsoft Online page. So I disabled Windows Auth and enabled Anonymous Authentication, figuring this would be the correct way to pass responsibility for authentication from IIS to the application.
This works, but I am concerned that enabling Anonymous Auth could present a security risk.
IS anyone able to advise on the correct IIS configuration when using Azure AD? Note that the website is not public-facing, it is internal to my organization.
EDIT: To clarify my thinking on the points raised below by Lex Li...
Since the authentication is all in the app now, if the app is written properly it will protect all the information. Your settings are the correct settings. when authenticating to AAD, IIS must be set to allow anonymous.
the API endpoint using either msal/adal libraries or your own, should implement checks to ensure the token from the user is a valid token. Today, the vast majority of websites and almost all APIs are secured using such methods, api endpoints take tokens as authentication, and is the accepted standard in todays world. they essentially all have "allow anonymous" / linux equivalent.