Skip to content

Commit

Permalink
Merge pull request #1 from Sustainsys/master
Browse files Browse the repository at this point in the history
Sync from fork
  • Loading branch information
stevenna authored Nov 24, 2019
2 parents 782ac71 + 2967605 commit 5454d19
Show file tree
Hide file tree
Showing 677 changed files with 96,980 additions and 8,364 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Report a (non-security) bug

---

# Security issues

If you have found a bug that you think might be security related, please *DO NOT OPEN A PUBLIC ISSUE*. Send an e-mail to [email protected] instead. Normally you should get a response by the next business day.

## Non Security Issues

### Information needed
1. What nuget packages are you using
2. What is the expected behaviour
3. What happens instead.

### Additional info
Please include
* .Net Framework your application is compiled against (e.g. `net472`, `netcoreap2.1`)
* .Net Framework installed. This might be different than above. You can compile with net452, but have 4.7.2 installed.
* Version of Asp.Net MVC / Asp.NET Core used.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Feature request
about: Suggest a new feature

---


14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/support-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Support Request
about: Instructions on how to get support

---

## Commercial Support
Commercial support is available for the library. The standard support package is a yearly subscription that gives you next-business-day e-mail support, preview releases of security fixes and access to remote pair programming. Please mail [email protected] for further information.

## Free Support
If you want help for free, please ask on Stack Overflow and tag your question with `sustainsys.saml2`. Many common questions have already [been asked and have an answer](https://stackoverflow.com/questions/tagged/sustainsys-saml2)

## No issues here
Issues requesting support are no longer accepted here on the issue tracker. Don't file an issue. It will be closed without further actions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,6 @@ NDependOut

#ReadTheDocs
docs/_build
docs/.vscode
docs/.vscode
/opencovertests.xml
/GeneratedReports
9 changes: 4 additions & 5 deletions CodeCoverage.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ Included items must then not match any entries in the exclude list to remain inc
<!-- Match assembly file paths: -->
<ModulePaths>
<Include>
<!-- Matches full, lowercase path. First ensure we're in the test directory, to avoid
"sustainsys.saml2" matching the repo directory. Then select the right files.-->
<ModulePath>.*tests.*sustainsys.saml2.*</ModulePath>
</Include>
<Exclude>
<ModulePath>.*tests\.dll</ModulePath>
<ModulePath>.*testhelpers\.dll</ModulePath>
<ModulePath>.*fluentassertions.*\.dll</ModulePath>
</Exclude>
<Exclude />
</ModulePaths>

<!-- Match attributes on any code element: -->
Expand Down
191 changes: 26 additions & 165 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,165 +1,26 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
*******************************************************************************
* THIS LICENSE APPLIES TO VERSIONS 2.0.0 AND ABOVE ONLY. FOR PREVIOUS *
* VERSIONS PLEASE SEE https://github.com/Sustainsys/Saml2/blob/v1.0.0/LICENSE *
*******************************************************************************

MIT License

Copyright (c) 2018 Sustainsys AB and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
70 changes: 4 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build status](https://ci.appveyor.com/api/projects/status/kf9r7lh4mh28rg2d?branch=master&svg=true&passingText=master%20-%20OK&failingText=master%20-%20Failed!&pendingText=master%20-%20Pending...)](https://ci.appveyor.com/project/Sustainsys/Saml2)
[![Coverage Status](https://coveralls.io/repos/github/Sustainsys/Saml2/badge.svg?branch=master)](https://coveralls.io/github/Sustainsys/Saml2?branch=master)
[![Build status](https://ci.appveyor.com/api/projects/status/kf9r7lh4mh28rg2d?branch=master&svg=true&passingText=master%20-%20OK&failingText=master%20-%20Failed!&pendingText=master%20-%20Pending...)](https://ci.appveyor.com/project/Sustainsys/Saml2)<!-- Skip for now, disabled due to build server problems [![Coverage status](https://coveralls.io/repos/github/Sustainsys/Saml2/badge.svg?branch=master)](https://coveralls.io/github/Sustainsys/Saml2?branch=master) -->
[![Docs status](https://readthedocs.org/projects/saml2/badge/?version=latest)](https://saml2.sustainsys.com)
[![Join the chat at https://gitter.im/Susatinsys/Saml2](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Sustainsys/Saml2)
Sustainsys.Saml2
=============
Expand All @@ -10,67 +10,5 @@ to act as a SAML2 Service Provider (SP). The library was previously named Kentor
Sustainsys.Saml2 is open sourced and contributions are welcome, please see
[contributing guidelines](CONTRIBUTING.md) for info on coding standards etc.

## Using
The Saml2 library can be used through three different ways:

* An Http Module, loaded into the IIS pipeline. The module is compatible with ASP.NET web
forms sites.
* An ASP.NET MVC Controller for better integration and error handling in ASP.NET Applications.
* An Owin Middleware to use with the Owin Pipeline or for integration with ASP.NET Identity.
* An ASP.NET Core2 Handler for use with ASP.NET Core 2.x applications.

Note that the Owin & ASP.NET Core2 modules enables SAML identity providers to be integrated within
[IdentityServer3](https://github.com/IdentityServer/IdentityServer3) and
[IdentityServer4](https://github.com/IdentityServer/IdentityServer4) packages. Review
[this document](docs/IdentityServer3Okta.md) to see how to configure Saml2
with IdentityServer3 and Okta to add Okta as an identity provider to an IdentityServer3 project.
There is also a SampleIdentityServer3 project in the Saml2 repository.

There are five nuget packages available. The core
[Sustainsys.Saml2](https://www.nuget.org/packages/Sustainsys.Saml2/) contains the core
functionality. The [Sustainsys.Saml2.HttpModule](https://www.nuget.org/packages/Sustainsys.Saml2.HttpModule/)
contains an IIS Http Module.
The [Sustainsys.Saml2.Mvc](https://www.nuget.org/packages/Sustainsys.Saml2.Mvc/)
package contains the MVC controller. The [Sustainsys.Saml2.Owin](https://www.nuget.org/packages/Sustainsys.Saml2.Owin/)
package contains the Owin middleware. Finally the [Sustainsys.Saml2.AspNetCore2](https://nuget.org/packages/Sustainsys.Saml2.AspNetCore2)
contains a Saml2 authentication handler for ASP.NET Core 2.x.

Once the nuget packages are installed you must provide configuration either through code
or through `web.config` sections.
See [configuration](docs/Configuration.md) for details.

## Troubleshooting

* Check the [issues archive](https://github.com/SustainsysIT/Saml2/issues).
* Check the [SAML2 specification](http://saml.xml.org/saml-specifications), starting with the core section.
* Log your actual SAML2 conversation with [SAML Chrome Panel](https://chrome.google.com/webstore/detail/saml-chrome-panel/paijfdbeoenhembfhkhllainmocckace) or [SAML Tracer for Firefox](https://addons.mozilla.org/sv-se/firefox/addon/saml-tracer/).
* Connect an `ILoggerAdapter` to your `SPOptions.Logger`. If you are using the OWIN middleware this is done for you automatically and you can see the output in the OWIN/Katana logging.
* Last but not least, download the Saml2 source and check out what's really happening.

## Saml2AuthenticationModule
The Saml2AuthenticationModule provides Saml2 authentication to IIS web sites. In many cases it should just be
[configured](docs/Configuration.md) in and work without any code written in the application
at all (even though [providing an own ClaimsAuthenticationManager](docs/ClaimsAuthenticationManager.md)
for claims translation is highly recommended).

## Mvc Controller
The MVC package contains an MVC controller that will be accessible in your application just
by installing the package in the application. For MVC applications a controller is preferred
over using the authentication module as it integrates with MVC's error handling.

## Owin Middleware
The Owin middleware is modeled after the external authentication modules for social login
(such as Google, Facebook, Twitter). This allows easy integration with ASP.NET Identity
for keeping application specific user and role information. See the
[Owin Middleware](docs/OwinMiddleware.md) page for information on how to set up and use the middleware.

## ASP.NET Core 2 Handler
The ASP.NET Core 2 Handler is compatbile with the ASP.NET Core 2.0 authentication model.

## Stub Idp
The solution also contains a stub (i.e. dummy) identity provider that can be used for testing.
Download the solution, or use the instance that's provided for free at https://stubidp.sustainsys.com.

## Protocol Classes
The protocol handling classes are available as a public API as well, making it possible to
reuse some of the internals for writing your own service provider or identity provider.
## Documentation
Complete documentation is available at [our documentation site](https://saml2.sustainsys.com).
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64422/",
"applicationUrl": "http://localhost:5500/",
"sslPort": 44342
}
},
Expand All @@ -18,11 +18,10 @@
},
"SampleAspNetCore2ApplicationNETFramework": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:64423/"
"applicationUrl": "http://localhost:5500/"
}
}
}
}
Loading

0 comments on commit 5454d19

Please sign in to comment.