windows-authentication

How to provide ntlm authentication while calling any url?

时光怂恿深爱的人放手 提交于 2019-12-28 07:02:29
问题 I have a hosted url which authenticates using ntlm (windows Integrated authentication). I am on windows and using java 1.8 URL url = new URL("someUrl"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setInstanceFollowRedirects(false); con.setRequestProperty("Content-Type", "application/json"); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { // read response ... in.close(); }else{ System.out

Cross Domain SQL Server Logins Using Windows Authentication

人盡茶涼 提交于 2019-12-28 05:27:24
问题 I have a SQL Server 2005 named instance using Windows Authentication with domain groups serving as logins. The domain structures are as follows: Forest1 Forest2 / \ | Domain1 Domain2 Domain3 Objects are organized in the following domains: Forest1.Domain1 Users Global Groups Forest1.Domain2 SQL Server Instance Domain Local Groups (serving as Logins) Forest2.Domain3 Users Global Groups All my users exist in Domain1 and Domain3 but the SQL Server box exists in Domain2 . As such, my logins are

Connection string using Windows Authentication

坚强是说给别人听的谎言 提交于 2019-12-28 02:28:07
问题 I am creating a website, but in the database I use windows authentication. I know that you use this for SQL authentication <connectionStrings> <add name="NorthwindContex" connectionString="data source=localhost; initial catalog=northwind;persist security info=True; user id=sa;password=P@ssw0rd" providerName="System.Data.SqlClient" /> </connectionStrings> How do I modify this to work with windows authentication? 回答1: Replace the username and password with Integrated Security=SSPI; So the

How to connect to SQL Server with Windows authentication from Node.JS using knex module

北战南征 提交于 2019-12-25 17:16:15
问题 I am trying to connect SQL Server using knex with Windows Authentication from my node.js application. Config: { client: 'mssql', connection: { database: 'MyDBName', host: 'xx.xx.xx.xxx', server: 'MY-SERVER_NAME\\SQLEXPRESS', options: { encrypt: false, trustedConnection: true, }, }, } I didn't add username and password in the config as I have added trustedConnection: true for Windows Authentication . But I am getting the following error: Login failed for user ''. Even if I add add username and

ASP.NET Windows authentication to another Active Directory domain

自作多情 提交于 2019-12-25 12:08:22
问题 We have ASP.NET web application running on Server1. Server1 is in Windows Active Directory domain Domain1. We would like to have users setup in Domain2 to be able to access our web application using Windows Authentication against Domain2. ANY user who can authenticate to Domain2 should be able to access our application. Domain1 and Domain2 are on the same LAN but there is no trust or any other relationship between these 2 domains. Computers from Domain1 can route to and access computers from

Override HttpContext.Current.User.Identity.Name

三世轮回 提交于 2019-12-25 12:00:24
问题 I am trying to hook into the Web Forms ASP.NET pipeline and extend the HttpContext.Current.User.Identity in such a way that the Name property returns a custom implementation. One possible approach which I have found in another answer that it is possible to add new properties by adding claims. The two questions I have are: Where to add the claims in the ASP.NET Web Forms pipeline? And Is it possible to override the existing Name property? 回答1: You can implement the PostAuthenticate event in

java security exception : checksum failed

杀马特。学长 韩版系。学妹 提交于 2019-12-25 02:29:32
问题 I am using http://webmoli.com/2009/08/29/single-sign-on-in-java-platform/ for SSO in java. I have KDC Windows server 2008, in that i have created spn by using setspn command for testsso user. And using testsso@MYDOMAIN.COM as principal in jaas.con. I have Tomcat server in Windows 7 machine(within AD). In this i have created one servlet as of jsp(from webmoli itself). I sending browser request for that servlet from 3rd machine Windows XP(within AD). But i get checksum failed error. Stacktrace

How to change registry keys for DefaultAppPool?

℡╲_俬逩灬. 提交于 2019-12-25 01:55:42
问题 Worker process of our ASP.NET application runs as DefaultAppPool which does not have access to registry keys of logged-on user and cannot debug VBScript invoked from C#. Can I add registry keys to DefaultAppPool user account? 回答1: DefaultAppPool is not an account, it's an app pool. Inside that app pool you can define which account it runs under (advanced settings / Identity) Assign it a windows account that has sufficient privileges. Normally you would create a windows account especially for

Difference between CURLAUTH_NEGOTIATE in PHP libcurl VS. --negotiate in cURL 7.57.0

蓝咒 提交于 2019-12-25 01:54:37
问题 Can anyone shed some light on the different between CURLAUTH_NEGOTIATE in PHP libcurl (PHP 5.6.4 running on Windows with libcurl v7.39.0) and --negotiate in cURL 7.57.0? The following request using cURL 7.57.0 via the command line works: curl --negotiate -u MYDOMAIN\myuser:mypass http://myip:myport/mywebservice.svc When I try the code below using PHP 5.6.4 (running on Windows) with libcurl v7.39.0 the remote web server returns a 401.2 error: <?php //Set vars $url = "http://myip:myport

How to create users and store them in a database and link them to windows authentication logins

久未见 提交于 2019-12-25 01:53:12
问题 What I want: An intranet application where only people who are logged in can see the application... and an Admin and Member role. 1: I have created an MVC 5.0 web application (for intranet). It has a Home view with a home controller... I have an Admin view with an admin controller. The home page has a link (well it's not a link yet but whatever) on it that is conditional: @if(User.IsInRole("Admin")){ <li>Admin</li> @*Will be link to admin controller action*@ } I would like to create 1 user