OIOIDWS.Net is a .Net-based reference implementation of the OIOIDWS 1.0.1a profile.
The OIOIDWS.Net components can be used by service providers to act as a Web
Service Consumer (WSC) or Web Service Producer (WSP), using the SOAP or
REST standard.
This is the codebase that the OIOIDWS.Net components are built from.
- Build: Contains script to create and publish
NuGetpackages: - Examples: Contains examples that illustrates how to use
OIOIDWS.Net.- Digst.OioIdws.Rest.Examples.AS: Example on how to run the Authentication Server in the
RESTvariant ofOIOIDWS.ASstands for Authorization Server and is the same term used in [OIO-IDWS-REST]. - Digst.OioIdws.Rest.Examples.Client: Example on how to run the
WSC/Clientin theRESTvariant ofOIOIDWSin the signature case scenario. Inapp.configit can be configured whether to use theDigst.OioIdws.Rest.Examples.ServerAndASCombinedexample orDigst.OioIdws.Rest.Examples.Servercombined withDigst.OioIdws.Rest.Examples.ASexample. - Digst.OioIdws.Rest.Examples.ClientNuget: Contains code that illustrates how to use
OIOIDWS.Net. - Digst.OioIdws.Rest.Examples.ServerAndASCombined: Same as
Digst.OioIdws.Rest.Examples.Clientbut based on the latest public availableNuGetpackage. - Digst.OioIdws.Rest.Examples.ServerAndASCombinedNuget: Example on how to run the
WSP/Serverin theRESTvariant ofOIOIDWSwhere theASis running in the same process. - Digst.OioIdws.Rest.Examples.Server: Same as
Digst.OioIdws.Rest.Examples.ServerCombinedbut based on the latest public availableNuGetpackage. - Digst.Oioidws.WscBootstrapExample: Example on how to run the
WSP/Serverin theRESTvariant ofOIOIDWS. - Digst.OioIdws.WscExample: Example on how to run the
WSC/Clientin theSOAPvariant ofOIOIDWSin the bootstrap token scenario. It shows how to build a smallSAML 2.0Service Provider (SP) that also acts as a Web Service Consumer (WSC). It requires theDigst.OioIdws.WspExampleto be up and running. See [OIO-BTP] for more information on configuring theSPto recieve bootstrap tokens. Note that when running the bootstrap scenario, the end-users' identity is what theWSPsees, whereas in the signature scenario, it is the identity of theWSCthat is seen by theWSP. The following things are already setup but is relevant to know when setting up your own combinedSP/WSCin production:- The
SPandWSCmust be registered with the same certificate in theNemLog-inadministration module.
- The
- Digst.OioIdws.WscExampleConfByCode: Same as
Digst.OioIdws.WscExamplebut configured with code instead ofApp.config. It's ideal to be used fordebugpurpouses. - Digst.OioIdws.WscLocalTokenExample: Like Digst.OioIdws.WscExample but uses a locally generated token. Thus, this example demonstrates the "Local Token case", where a local security token service issues a token, and NemLog-in STS is used to exchange this token for a valid WSP token. Using local tokens can remove the need to obtain and administer employee certificates for each employee. Instead, NemLog-in can be set up to trust tokens from a local STS. The example does not include a running local security token service (STS). Instead it creates tokens using a faked in-memory service. You can replace calls to this in-memory service to invoke e.g. a local STS such as (for example) a Microsoft Active Directory Federation Server (ADFS). The example uses a local STS that is configured with the policy set to "Local STS" in NemLog-in. Also, the WSP is configured to accept the NameID format X509SubjectName.
- Digst.OioIdws.WscExampleNuGet: Same as
Digst.OioIdws.WscExamplebut based on the latest public availableNuGetpackage. - Digst.OioIdws.WspExample: Example on how to run the
WSP/Serverin theSOAPvariant ofOIOIDWS. - Digst.OioIdws.WspExampleNuGet: Same as
Digst.OioIdws.WspExamplebut based on the latest public availableNuGetpackage. - Digst.OioIdws.Java: Contains examples that uses
Java (WSC/WSP) <-> .NET (WSC/WSP)- Digst.OioIdws.DotnetWscJavaWspExample: Example on how to run the
WSC/Clientin theSOAPvariant ofOIOIDWSin the signature case scenario against aJava WSP/Server. Requires that aJava WSP/Serveris up and running. CheckoutOIOIDWS.JavaandGuide to use Java WSP and .NET WSC(in theExamples\Digst.OioIdws.Javafolder) on how to do that. - Digst.OioIdws.DotnetWscJavaWspExampleConfByCode: Same as
Digst.OioIdws.DotnetWscJavaWspExamplebut configured with code instead ofApp.config. It's ideal to be used fordebugpurpouses. - service-hok:
Java WSPexample project taken from the lastestIDWS-JAVA-SOAP. For more information, please read theGuide to use Java WSP and .NET WSC(in theExamples\Digst.OioIdws.Javafolder). - system-user-scenario-hok:
Java WSCexample project taken from the lastestIDWS-JAVA-SOAPand adapted to work with theDigst.OioIdws.WspExampleproject. For more information, please read theGuide to use .NET WSP (+custom WSDL) and Java WSC(in theExamples\Digst.OioIdws.Javafolder).
- Digst.OioIdws.DotnetWscJavaWspExample: Example on how to run the
- Digst.OioIdws.Rest.Examples.AS: Example on how to run the Authentication Server in the
- Misc: Contains miscellaneous stuff
- Certificates: All certificates needed to run the examples.
- SOAP examples: Contains examples on requests and responses for both
OioWsTrustcommunication betweenWSC <-> STSand betweenWSC <-> WSP. - Specifications: All the specifications related to
OIOIDWSare located here inPDF. They are only placed here to document how the specifications were at the time of development. All specifications are named [XXX] and are also referenced by that name. - Token examples: Contains examples on
IdPissued bootstrap token andSTSissued access token.
- Setup: Contains
PowerShellscript to auto setup the development environment. - Source: Source code for the
OIOIDWS.Netframework- Digst.OioIdws.Common: Contains common stuff for the
SOAPvariant. - Digst.OioIdws.Soap: Contains the implementation of the [
OIO IDWS SOAP 1.1] specification. - Digst.OioIdws.OioWsTrust: Contains the implementation of the [
OIO-WST] specification. - Digst.OioIdws.Rest.Client: Contains the client implementation of the [
OIO-IDWS-REST] specification. It handles the communication betweenSTS,ASandWSP. - Digst.OioIdws.Rest.Common: Contains common stuff for the
RESTvariant. - Digst.OioIdws.Rest.Server: Contains the server and
ASimplementation of the [OIO-IDWS-REST] specification. TheASstores information from the security token and issues access tokens. TheWSPcontains the authentication middleware that logs the user into theWSP. - Digst.OioIdws.Wsc: Encapsulates the usage and configuration of
Digst.OioIdws.SoapandDigst.OioIdws.OioWsTrust. - Digst.OioIdws.Wsp: Encapsulates the usage and configuration of
Digst.OioIdws.Soap - Digst.OioIdws.Wsp.Wsdl: It's part of
Digst.OioIdws.Wspand provides cross-platform capabilities for the exposedServiceMetadata(WSDL) by the.NET WSP. Usage is optional, but highly recommened as it will ease and minimize the amout of manual task for non-.NET WSCconsuming the.NET WSP.
- Digst.OioIdws.Common: Contains common stuff for the
- Tests: Contains various unit and integration tests:
- Digst.OioIdws.Soap.LongRunningTest: Contains long running tests of
Digst.OioIdws.Soap. - Digst.OioIdws.Soap.Test: Contains tests of
Digst.OioIdws.Soap. - Digst.OioIdws.Soap.CrossTest: Contains cross-tests of
Digst.OioIdws.Soapcombined withDigst.OioIdws.Java. - Digst.OioIdws.OioWsTrust.Test: Contains tests of
Digst.OioIdws.OioWsTrust. - Digst.OioIdws.Rest.Server.Tests: Contains tests of
Digst.OioIdws.Rest.Server - Digst.OioIdws.Rest.SystemTests: Contains tests of
Digst.OioIdws.Rest.ClientandDigst.OioIdws.Rest.Server. - Digst.OioIdws.Test.Common: Common stuff user by the other test libaries.
- Digst.OioIdws.Soap.LongRunningTest: Contains long running tests of
- DEVELOPER-NOTES.md: Information relevant for developers of
OIOIDWS.Net(updates.htmlwhen saved inVisual Studio). - Digst.OioIdws.sln:
Visual Studio 2017solution file. - README.md: This file (updates
.htmlwhen saved inVisual Studio).
The source code contains everything you need to get a demonstration environment up and running, federating with NemLog-in IdP and NemLog-in STS.
The full documentation of OIOIDWS.Net is a combination of the various readme files, API documentation and the examples provided.
For a quick setup, you must do the following:
- Run the script
Setup\setup_prerequisites.ps1from an elevatedPowerShell. This installs all required certificates and performssslcertbindings to be able to host local websites usingHTTPS. - Open the solution
Digst.OioIdws.slninVisual Studio 2019 (Elevated mode)and build it (if you get errors on external dependencies, ensureNuGetpackages are being restored). - The external
IPaddress must be white listed atNETSin order to be able to make revocation check of the testFOCEScertificates. - Set the projects
Digst.OioIdws.Rest.Examples.ServerAndASCombined,Digst.OioIdws.WspExampleandDigst.Oioidws.WscBootstrapExampleas startup projects by right-clicking solution, selectproperties, selectingMultiple start projects. - For the web project, you must manually set the
Start URLthatIIS Expressuses. You do this by:- right click project
Digst.Oioidws.WscBootstrapExample, selectproperties, select the tabWeb, alter theStart Actionto the radio buttonStart URL, specifying https://oiosaml-net.dk:20002.
- right click project
- Run the solution which should start a
SOAP WSP,REST WSPand a combinedSOAP/REST WSC.
This should start one browser window for the SOAP/REST WSC Digst.Oioidws.WscBootstrapExample, and two console windows for Digst.OioIdws.WspExample and Digst.OioIdws.Rest.Examples.ServerAndASCombined.
In the web site you should now be able to log in using NemLog-in, and make SOAP or REST calls in either the bootstrap signature case scenario.
You must use an certificate employee certificate from the NemLog-In testportal.
As we have added cross-platform support, if you would like to execute the
example projects as well as the test projects, you will have to install the
JAVA JDK/JRE 1.8.2. Please follow the official guides on how to install
these components and don't forget to create a JAVA_HOME under
System Properties window > Environment Variables >
System variables and update the PATH (still in System variables)
with %JAVA_HOME%\bin.
If you have done these steps correctly, you should see the following if you
this from a cmd.exe:
Microsoft Windows [Version 10.0.16299.309]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\user>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_162
C:\Users\mon>"%JAVA_HOME%\bin\javac" -version
javac 1.8.0_162
C:\Users\user>