Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b008f0e72 | ||
|
|
8e68283df6 | ||
|
|
9862ee4aa4 | ||
|
|
5cb0735213 | ||
|
|
5018ba17c2 | ||
|
|
5eeb3f874b | ||
|
|
91f18604fe | ||
|
|
c3b560cd17 | ||
|
|
e7d93e0732 | ||
|
|
1684280216 | ||
|
|
e93e20fa7f | ||
|
|
7a42da7f2c | ||
|
|
f8400caea6 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.vs
|
||||
2
NSspi/.gitignore
vendored
Normal file
2
NSspi/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
@@ -42,11 +42,7 @@
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ByteWriter.cs" />
|
||||
@@ -84,7 +80,9 @@
|
||||
<Compile Include="SspiHandle.cs" />
|
||||
<Compile Include="TimeStamp.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="NSspi.nuspec" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
18
NSspi/NSspi.nuspec
Normal file
18
NSspi/NSspi.nuspec
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<package >
|
||||
<metadata>
|
||||
<id>NSspi</id>
|
||||
<version>0.1.3.0</version>
|
||||
<authors>Kevin Thompson</authors>
|
||||
<owners>Kevin Thompson</owners>
|
||||
<projectUrl>https://github.com/antiduh/nsspi</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>
|
||||
A C#/.Net interface to the Win32 SSPI authentication API,
|
||||
better known as Windows Integrated Authentication.
|
||||
</description>
|
||||
<language>C#</language>
|
||||
<releaseNotes>First release of NSspi.</releaseNotes>
|
||||
<copyright>Copyright 2017</copyright>
|
||||
</metadata>
|
||||
</package>
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.1.1.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.1.0")]
|
||||
[assembly: AssemblyVersion("0.1.3.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.2.0")]
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace NSspi
|
||||
protected SSPIException( SerializationInfo info, StreamingContext context )
|
||||
: base( info, context )
|
||||
{
|
||||
this.message = info.GetString( "messsage" );
|
||||
this.message = info.GetString("message");
|
||||
this.errorCode = (SecurityStatus)info.GetUInt32( "errorCode" );
|
||||
}
|
||||
|
||||
|
||||
2
NsspiDemo/.gitignore
vendored
Normal file
2
NsspiDemo/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
2
TestClient/.gitignore
vendored
Normal file
2
TestClient/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
2
TestProtocol/.gitignore
vendored
Normal file
2
TestProtocol/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
2
TestServer/.gitignore
vendored
Normal file
2
TestServer/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
@@ -1,5 +1,19 @@
|
||||
## Downloads ##
|
||||
|
||||
The latest release of NSspi is v0.1.1.
|
||||
|
||||
* [Source](https://github.com/antiduh/nsspi/archive/0.1.1.zip)
|
||||
* [Binaries](https://github.com/antiduh/nsspi/releases/download/0.1.1/nsspi-0.1.1-bin.zip)
|
||||
* [Nuget package](https://www.nuget.org/packages/NSspi)
|
||||
|
||||
You can also browse the list of [releases](https://github.com/antiduh/nsspi/releases).
|
||||
|
||||
|
||||
|
||||
## Introduction ##
|
||||
This projects provides a C# / .Net interface to the Windows Integrated Authentication API, better known as SSPI (Security Service Provider Interface). This allows a custom client / server system to authenticate users using their existing logon credentials. This allows a developer to provide Single-Sign-On in their application.
|
||||
|
||||
## Overview ##
|
||||
The API provides raw access to authentication tokens so that authentication can be easily integrated into any networking system - you can send the tokens over a socket, a remoting interface, or heck even a serial port if you want; they're just bytes. Clients and servers may exchange encrypted and signed messages, and the server can perform client impersonation.
|
||||
|
||||
The project is provided as a .Net 4.0 assembly, but can just as easily be upgraded to .Net 4.5 or later. The solution file can be opened by Visual Studio 2010 SP1, Visual Studio 2012, or later Visual Studio editions.
|
||||
@@ -8,7 +22,7 @@ The SSPI API provides an interface for real authentication protocols, such as Ke
|
||||
|
||||
The SSPI API exposes these packages using a common API, and so a program may invoke one or the other with only minor changes in implementation. SSPI also supports the 'negotiate' 'meta' package, that allows a client and server to decide dynamically which real security provider to use, and then itself provides a passthrough interface to the real package.
|
||||
|
||||
==== Usage ====
|
||||
## Usage ##
|
||||
|
||||
Typically, a client acquires some form of a credential, either from the currently logged on user's security context, by acquiring a username and password from the user, or by some other means. The server acquires a credential in a similar manner. Each uses their credentials to identify themselves to each other.
|
||||
|
||||
@@ -26,25 +40,19 @@ The project is broken up into 3 chunks:
|
||||
may be run on separate machines, that show how one might integrate SSPI into a custom
|
||||
application.
|
||||
|
||||
==== More information ====
|
||||
## More information ##
|
||||
|
||||
If you would like to understand the SSPI API, feel free to browse the following references:
|
||||
|
||||
MSDN documentation on the SSPI API
|
||||
http://msdn.microsoft.com/en-us/library/windows/desktop/aa374731(v=vs.85).aspx
|
||||
MSDN documentation on the SSPI API:<br/>
|
||||
[http://msdn.microsoft.com/en-us/library/windows/desktop/aa374731(v=vs.85).aspx](http://msdn.microsoft.com/en-us/library/windows/desktop/aa374731\(v=vs.85\).aspx)
|
||||
|
||||
MSDN article on SSPI along with a sample Managed C++ SSPI library and UI client/servers.
|
||||
http://msdn.microsoft.com/en-us/library/ms973911.aspx
|
||||
MSDN article on SSPI along with a sample Managed C++ SSPI library and UI client/servers.<br/>
|
||||
[http://msdn.microsoft.com/en-us/library/ms973911.aspx](http://msdn.microsoft.com/en-us/library/ms973911.aspx)
|
||||
|
||||
Relevant StackOverflow questions:
|
||||
"Client-server authentication - using SSPI?"
|
||||
- http://stackoverflow.com/questions/17241365/
|
||||
|
||||
"Validate Windows Identity Token"
|
||||
- http://stackoverflow.com/questions/11238141/
|
||||
|
||||
"How to deal with allocations in constrained execution regions?"
|
||||
- http://stackoverflow.com/questions/24442209/
|
||||
|
||||
"AcquireCredentialsHandle returns massive expiration time"
|
||||
- http://stackoverflow.com/questions/24478056/
|
||||
* [Client-server authentication - using SSPI?](http://stackoverflow.com/questions/17241365/)
|
||||
* [Validate Windows Identity Token](http://stackoverflow.com/questions/11238141/)
|
||||
* [How to deal with allocations in constrained execution regions?](http://stackoverflow.com/questions/24442209/)
|
||||
* [AcquireCredentialsHandle returns massive expiration time](http://stackoverflow.com/questions/24478056/)
|
||||
Reference in New Issue
Block a user