• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    C#
  • License
    Mozilla Public Li...
  • Created almost 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fork of SAML2 library on codeplex. This library removes dependencies on Asp.net

SAML2

Fork of SAML2 library on codeplex. This library removes dependencies on Asp.net

This project now consists of three libraries

  1. SAML2.Core: This contains all the core logic from the original SAML2 library on codeplex and remains similar in style and structure. Configuration has been changed to no longer be married to System.Configuration. Filewatchers on metadata were problematic and have been removed on the belief that this additional functionality can be provided outside the core library
  2. SAML2.AspNet: This contains all the ASP.Net bits from the original library including the configuration. This has not been tested, but theoretically SAML2.AspNet + Saml2.Core should be equivalent to the original single library on codeplex (minus the filewatchers)
  3. Owin.Security.Saml: This contains an OWIN middleware implementation of SAMLP Service Provider. This library is the main driver for this effort.

Project Status

The project is currently usable for a Service Provider using redirect binding against a Shibboleth server and is likely usable for other SAMLP IdPs using Redirect binding. The included SelfHostOwinSPExample project provides a usable example against a live server at https://www.testshib.org. Other bindings can likely be added quickly (PRs welcome!).

There remains some cleanup to be done on the Owin side (e.g. configuration) and a number of general warts in the core library (e.g. logging) that were brought over from the original.

Configuring Owin

        appBuilder.UseSamlAuthentication(new Owin.Security.Saml.SamlAuthenticationOptions
        {
            Configuration = config,                     // Saml2 Core configuration
            RedirectAfterLogin = "/my application URI", // Temporary, will auto-detect later. PRs welcome
        });

Configuring the Saml2 Core Library

        var myconfig = new Saml2Configuration
        {
            ServiceProvider = new ServiceProvider
            {
                SigningCertificate = new X509Certificate2(FileEmbeddedResource("cert.pfx"), "pass", MachineKeySet),
                Server = "https://localhost:44333/myapp",
                Id = "https://localhost:44333/myapp"       // EntityId used in SAMLP to identify this SP
            },
            AllowedAudienceUris = new List<Uri>(new[] { new Uri("https://localhost:44333/myapp") })
        };
        // The following URLs are based on the defaults used by the middleware above
        myconfig.ServiceProvider.Endpoints.AddRange(new[] {
            new ServiceProviderEndpoint(EndpointType.SignOn, "/myapp/saml2/login", "/core"),
            new ServiceProviderEndpoint(EndpointType.Logout, "/myapp/saml2/logout", "/core"),
            new ServiceProviderEndpoint(EndpointType.Metadata, "/myapp/saml2/metadata")
        });
        myconfig.IdentityProviders.AddByMetadata("IdPMetadataFile.xml");
        myconfig.IdentityProviders.First().OmitAssertionSignatureCheck = true;
        myconfig.LoggingFactoryType = "SAML2.Logging.DebugLoggerFactory";
        return myconfig;

More Repositories

1

Convert-SQL-Server-to-SQLite

Fork of code from http://www.codeproject.com/KB/database/convsqlservertosqlite.aspx
C#
42
star
2

aws-sdk-for-zig

readonly mirror of https://git.lerch.org/lobo/aws-sdk-for-zig
Zig
34
star
3

Visual-Studio-Settings

18
star
4

Critical-Path-Extension-Method-for-.NET

C#
15
star
5

InstallCert

Fork of Andreas Sterbenz's InstallCert.java from Google Code@https://code.google.com/p/java-use-examples/source/browse/trunk/src/com/aw/ad/util/InstallCert.java
Java
11
star
6

Bulk-rdl-uploader-for-SSRS-reports

Uploads all RDL files in a directory to a single folder in SQL Server Reporting Services. Tested with 2005, should work with 2008. If you don't want to pull/compile, the latest release version of the binary is in the downloads section.
C#
8
star
7

basic-auth-api-gateway

API Gateway authorizer function for processing basic auth
JavaScript
6
star
8

userstyles-aws-dark

Dark theme for stylish as posted on userstyles.org
CSS
4
star
9

lambda-zig

readonly mirror of https://git.lerch.org/lobo/lambda-zig
Zig
4
star
10

Base36-and-Base32-.NET-Implementations

C#
3
star
11

FormsAuth

C#
2
star
12

eduSpring

IoC Implementations using Spring.NET
C#
2
star
13

mariadb-for-constrained-memory

A mariadb image configured for low memory virtual machines. Runs on AWS EC2 t2.nano instances
2
star
14

cadaver

C
2
star
15

SqlValidator

Check Validity of SQL Server Stored Procedures/Views/Functions/Triggers
C#
2
star
16

vcsh_mdlrc

Ruby
1
star
17

tt-rss-on-aws

Cloudformation scripts to provide a server for tt-rss.
Shell
1
star
18

ddwrt-wifi-hang-workaround

1
star
19

NativeProbing

Probing support for architecture-specific native DLLs in .Net
C#
1
star
20

PortableShortcuts

Will add a bunch of start menu items corresponding to executables
C#
1
star
21

Cassette.LessJsNode

Cassette plugin for processing less with Node and the original less JavaScript
C#
1
star
22

python37-decompilers

readonly mirror of https://git.lerch.org/lobo/python37-decompilers
Python
1
star