windows-authentication

How do we secure Swagger UI with Windows Authentication

让人想犯罪 __ 提交于 2021-02-19 06:11:12
问题 We have a .Net Core 2.2 Web Api that uses swagger ui to expose the Web Api definitions. We want to secure this endpoint to only users inside of a certain AD Group. We currently are using Both Windows and Anonymous Authentication. Problem is we cannot enforce Swagger to use Windows Authentication to block users. Any Ideas? 回答1: Although frustrating, the easiest path to securing the Swagger endpoint (via Swashbuckle) I've found thus far is just to put it under its own route and then use a

Java client call to Windows Integated Authentication web service

China☆狼群 提交于 2021-02-18 18:16:45
问题 I am writing a Java 1.5+ client that needs to fetch data from an IIS-hosted web service. I created a new web service client in Eclipse and used the Java Proxy client type and Apache Axis2 web service runtime when generating the client proxy. The web service itself runs on Windows 2003 and security is set to use only Windows Integrated Authentication. I have found many articles online that show how to connect successfully from a Java client to this IIS service, but everything I have seen seems

How to add claims to windows user

半腔热情 提交于 2021-02-18 05:42:07
问题 I have a dotnet core api app with windows app enabled. We have bunch of users which have special permission 'admin' and are stored in database, rest all have default permission 'user'. I want users to have extra claims who all are in database. Also I want to store more information like emailid, employee number(which I have to query from LDAP manually) What I thought is I will have one api, say api/auth which will capture the current user and add claims based on database and ldap query and

How to add claims to windows user

随声附和 提交于 2021-02-18 05:42:04
问题 I have a dotnet core api app with windows app enabled. We have bunch of users which have special permission 'admin' and are stored in database, rest all have default permission 'user'. I want users to have extra claims who all are in database. Also I want to store more information like emailid, employee number(which I have to query from LDAP manually) What I thought is I will have one api, say api/auth which will capture the current user and add claims based on database and ldap query and

IIS fails to pass windows credentials through to SQL Server for ASP.NET Core app

感情迁移 提交于 2021-02-09 08:59:10
问题 I work for a large company with an intranet and Windows AD logins for everyone. We have a number of internal SQL Server databases which allow us to log in using Windows authentication, one of which I'm trying to connect to through an ASP.NET Core application. I can connect to this database through SQL Server Management Studio and query the tables fine. I've followed the tutorial for an ASP.NET Core app using an existing database as closely as I possibly could, and created a single model class

How to get the authenticated user name in Python when fronting it with IIS HTTP PlatformHandler and using Windows auth?

久未见 提交于 2021-02-08 07:40:48
问题 HttpPlatformHandler supports forwarding the auth token by enabling the forwardWindowsAuthToken setting in the web.config. This sounds like a useful feature when needing to use Windows Integrated Authentication. The document on this is very vague and does not go into explaining how one could use this token to get the authenticated user name. If this setting is set to true, the token will be forwarded to the child process listening on %HTTP_PLATFORM_PORT% as a header 'X-IIS-WindowsAuthToken'

ASP.NET Core Identity with Windows Authentication

…衆ロ難τιáo~ 提交于 2021-02-06 10:13:12
问题 I'm using .NET Core 3.0 Preview6. We have an Intranet application with enabled Windows authentication which means that only valid AD users are allowed to use the application. However, we like to run our own authentication backend with ASP.NET Identity, because it works "out-of-the-box". I just added a column to AspNetUsers table with the user's Windows login. What I'd like to accomplish is that Windows users are automatically signed-in to the application with their Windows login. I already

Roles available with Windows Authentication

安稳与你 提交于 2021-02-05 17:41:28
问题 I'm trying to add Roles authentication to an Action in a Controller in an ASP.NET MVC application. The code looks something like this: [Authorize(Roles = "SomeRoleName")] public ActionResult Index() { bool inRole = User.IsInRole("Admin"); If I remove the Authorize attribute and put a breakpoint on the last line in that code sample, is there a way that I can inspect the objects and find out what roles are available? e.g. I call User.IsInRole("Admin) in the Immediate window and it will give me

Roles available with Windows Authentication

倾然丶 夕夏残阳落幕 提交于 2021-02-05 17:21:47
问题 I'm trying to add Roles authentication to an Action in a Controller in an ASP.NET MVC application. The code looks something like this: [Authorize(Roles = "SomeRoleName")] public ActionResult Index() { bool inRole = User.IsInRole("Admin"); If I remove the Authorize attribute and put a breakpoint on the last line in that code sample, is there a way that I can inspect the objects and find out what roles are available? e.g. I call User.IsInRole("Admin) in the Immediate window and it will give me

Login prompt in spite of having windows authentication enabled

匆匆过客 提交于 2021-02-05 09:39:40
问题 We have enabled Windows authentication (Anonymous access is disabled) in IIS but, I am getting prompt to enter user-credentials for application Checked for the providers under authentication and the order is correct as well. Any pointers would be helpful. For information is it a .NET application hosted on IIS 7.5 回答1: Not sure if this is old but i hope it may be helpful for someone like me in near future. In Windows Authentication feature, goto providers. Just ensure that the NTLM is the only