Local Security Authority, LSA, API
Contents
- Overview - General Scoping Information
- Scenarios - Delegation is not working
- Custom Authentication Package.aspx) - Sub Authentication Package.aspx)
- Unable to convert a SID to a name or vice versa, 1332 or ERROR\NONE\MAPPED, STATUS\NONE\MAPPED or STATUS\SOME\NOT_MAPPED, or System.Security.Principal.IdentityNotMappedException - The trust relationship between the primary domain and the trusted domain failed")
- Ticket Granting Tickets (TGT)&action=edit&redlink=1 "curated:Windows SDK - Ticket Granting Tickets (TGT) (page does not exist)") - Kerberos Ticket Logon")
- LsaLogonUser") - MSCHAP")
- SmartCard Logon") - Concepts
- Glossary - Other Resources
- Champion
Overview
LSA Authentication describes the parts of the Local Security Authority (LSA) that applications can use to authenticate and log users on to the local system. It also describes how to create and call authentication packages and security packages.
General Scoping Information
The first step in handling a Windows SDK support incident is to work with the customer to define the following sections in MSSolve if the information is not already available. Each section below contains basic questions you can ask the customer that will help with defining the issue.
If information is already provided, confirm with the customer that the information is accurate.
Problem Description
- Ask the customer to provide a complete description of the issue. Is the customer:
- Requesting assistance with troubleshooting an application crash?
- Requesting assistance with troubleshooting an application hang?
- Requesting assistance with troubleshooting an application performance issue?
- Requesting assistance with troubleshooting a unexpected behavior or a failure when calling a Windows API.
- Requesting assistance with how to use a Windows API or feature.
- If the customer is requesting assistance with troubleshooting an application crash, has the customer collected and uploaded a full memory dump of the faulting process? If no, work with the customer to collect a full memory dump of the process when the application crashes.
- If the customer is requesting assistance with troubleshooting an application hang, has the customer collected and uploaded any data when the application is hung? This can include periodic dumps of the process, call stacks, etc. If no, work with the customer to collect data regarding the hung process. {link to process for collecting data for a hung process}
- If the customer is requesting assistance with troubleshooting an application performance issue, what is the nature of the performance issue (CPU, disk, network, etc.). Work with the customer to collect data relevant to the type of performance issue the customer is encountering. {link to process for collecting performance data}
- If the customer is requesting assistance with troubleshooting a unexpected behavior or a failure when calling a Windows API, identify the Windows API. What is the error code that is being returned from the API/GetLastError? Describe the unexpected behavior?
Scope Agreement
- What is the customer's goal for this support incident?
- What would be considered a successful resolution to the issue?
Environment
- What version(s) of Windows? Are the systems fully patched?
- What .NET Framework version does the application use?
- What development tool was used to build the application?
- What programming languages were used to develop the application?
- Virtualization?
- If this is a new problem, what changed in the application code or environment that triggered the problem?
Data Collection Info
- How capture a full dump of a crashing process using Windows Error Reporting - How to capture a kernel dump using LiveKD
Once you have obtained a problem description, refer to the following sections for additional information.
Scenarios
Delegation is not working
- Is delegation properly configured?
- Are you accessing a file server? If yes, refer to KB2602377 .
Custom Authentication Package
The documentation implies that an ISV could write their own custom Authentication Package. Over the years, many ISVs have failed when trying to create their own packages because all the required interfaces are NOT documented. No ISV has been successful in implementing a package. It appears that we may have introduced the Negotiate Authentication Package to address some of these issues.
Sub Authentication Package
ISVs should avoid taking too much time in their SubAuth DLL because it blocks the authentication itself.
Unable to convert a SID to a name or vice versa, 1332 or ERROR_NONE_MAPPED, STATUS_NONE_MAPPED or STATUS_SOME_NOT_MAPPED, or System.Security.Principal.IdentityNotMappedException
Refer to How to resolve a System.Security.Principal.IdentityNotMappedException?
The trust relationship between the primary domain and the trusted domain failed
This is a very common error when converting a Security Identifier (SID) to a readable name. This can apply to users or groups.
Ticket Granting Tickets (TGT)
Kerberos Ticket Logon
LsaLogonUser
MSCHAP
SmartCard Logon
Concepts
No concepts have been identified at this point. Please contribute to this workflow if you get any issues in this area.
Glossary
- Authentication Packages
A DLL that encapsulates the authentication logic used to determine whether to permit a user to log on. LSA authenticates a user logon by sending the request to an authentication package. The authentication package then examines the logon information and either authenticates or rejects the user logon attempt.
- Kerberos
The Kerberos authentication package is used when logging on to a network
- Kerberos S4U (Service For User, S4U2self)
The S4U2Self Kerberos extension can be used to initialize a user's token with the user ID with a valid Windows account in Active Directory. The password associated with the user ID is not required. This feature allows you to transition from any authentication protocol into the Kerberos authentication protocol. This operation is accomplished by using the ticket-granting ticket (TGT) of a service account to request a service ticket for itself. The service account in this case is the one associated with the Web service that performs the protocol transition. The service ticket that is returned from the ticket-granting service (TGS) contains identity and principal information for the user whose ID was sent with the request.
- Locally Unique Identifier
(LUID) A 64-bit value that is guaranteed to be unique on the operating system that generated it until the system is restarted.
- Logon Session
A logon session begins whenever a user logs on to a computer. All processes in a logon session have the same primary access token. The access token contains information about the security context of the logon session, including the user's SID, the logon identifier, and the logon SID.
- LSA_STRING
The LSA_STRING structure is used by Local Security Authority (LSA) functions to specify an ANSI string. Note that strings returned by the LSA may not be null-terminated. When the Length structure member is zero and the MaximumLength structure member is 1, the Buffer structure member must not be an empty string or contain solely a null character.
- LSASS.exe
Local Security Authority Subsystem Services (LSASS). This is a protected process.
- MS-CHAP
MS-CHAP is the Microsoft version of the Challenge-Handshake Authentication Protocol, CHAP. The protocol exists in two versions, MS-CHAPv1 (defined in RFC 2433) and MS-CHAPv2 (defined in RFC 2759).
- MSV1_0
The MSV1_0 authentication package for local machine logons that do not require custom authentication.
- Resource Based Delegation
See Kerberos Constrained Delegation Overview
- Security Protocol
A specification that defines security-related data objects and rules about how the objects are used to maintain security on a computer system.
- Service For User To Proxy (S4U2proxy)
The S4U2Proxy Kerberos extension provides an implementation of constrained delegation that allows you to use a Kerberos service ticket instead of a TGT to request another service ticket. Delegation is considered to be constrained because the identity (service account) that is used to request the service ticket must be configured to access a specific service.
Other Resources
- MSDN documentation
LSA Authentication documentation Using LSA Policy Security Glossary
- Contacts
MCS/PSS WinNT Winlogon/Security Forum Product Security Discussion Forum