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
NuGet
packages: - 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
REST
variant ofOIOIDWS
.AS
stands 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/Client
in theREST
variant ofOIOIDWS
in the signature case scenario. Inapp.config
it can be configured whether to use theDigst.OioIdws.Rest.Examples.ServerAndASCombined
example orDigst.OioIdws.Rest.Examples.Server
combined withDigst.OioIdws.Rest.Examples.AS
example. - 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.Client
but based on the latest public availableNuGet
package. - Digst.OioIdws.Rest.Examples.ServerAndASCombinedNuget: Example on how to run the
WSP/Server
in theREST
variant ofOIOIDWS
where theAS
is running in the same process. - Digst.OioIdws.Rest.Examples.Server: Same as
Digst.OioIdws.Rest.Examples.ServerCombined
but based on the latest public availableNuGet
package. - Digst.Oioidws.WscBootstrapExample: Example on how to run the
WSP/Server
in theREST
variant ofOIOIDWS
. - Digst.OioIdws.WscExample: Example on how to run the
WSC/Client
in theSOAP
variant ofOIOIDWS
in the bootstrap token scenario. It shows how to build a smallSAML 2.0
Service Provider (SP
) that also acts as a Web Service Consumer (WSC
). It requires theDigst.OioIdws.WspExample
to be up and running. See [OIO-BTP
] for more information on configuring theSP
to recieve bootstrap tokens. Note that when running the bootstrap scenario, the end-users' identity is what theWSP
sees, whereas in the signature scenario, it is the identity of theWSC
that is seen by theWSP
. The following things are already setup but is relevant to know when setting up your own combinedSP/WSC
in production:- The
SP
andWSC
must be registered with the same certificate in theNemLog-in
administration module.
- The
- Digst.OioIdws.WscExampleConfByCode: Same as
Digst.OioIdws.WscExample
but configured with code instead ofApp.config
. It's ideal to be used fordebug
purpouses. - 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.WscExample
but based on the latest public availableNuGet
package. - Digst.OioIdws.WspExample: Example on how to run the
WSP/Server
in theSOAP
variant ofOIOIDWS
. - Digst.OioIdws.WspExampleNuGet: Same as
Digst.OioIdws.WspExample
but based on the latest public availableNuGet
package. - Digst.OioIdws.Java: Contains examples that uses
Java (WSC/WSP) <-> .NET (WSC/WSP)
- Digst.OioIdws.DotnetWscJavaWspExample: Example on how to run the
WSC/Client
in theSOAP
variant ofOIOIDWS
in the signature case scenario against aJava WSP/Server
. Requires that aJava WSP/Server
is up and running. CheckoutOIOIDWS.Java
andGuide to use Java WSP and .NET WSC
(in theExamples\Digst.OioIdws.Java
folder) on how to do that. - Digst.OioIdws.DotnetWscJavaWspExampleConfByCode: Same as
Digst.OioIdws.DotnetWscJavaWspExample
but configured with code instead ofApp.config
. It's ideal to be used fordebug
purpouses. - service-hok:
Java WSP
example project taken from the lastestIDWS-JAVA-SOAP
. For more information, please read theGuide to use Java WSP and .NET WSC
(in theExamples\Digst.OioIdws.Java
folder). - system-user-scenario-hok:
Java WSC
example project taken from the lastestIDWS-JAVA-SOAP
and adapted to work with theDigst.OioIdws.WspExample
project. For more information, please read theGuide to use .NET WSP (+custom WSDL) and Java WSC
(in theExamples\Digst.OioIdws.Java
folder).
- 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
OioWsTrust
communication betweenWSC <-> STS
and betweenWSC <-> WSP
. - Specifications: All the specifications related to
OIOIDWS
are 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
IdP
issued bootstrap token andSTS
issued access token.
- Setup: Contains
PowerShell
script to auto setup the development environment. - Source: Source code for the
OIOIDWS.Net
framework- Digst.OioIdws.Common: Contains common stuff for the
SOAP
variant. - 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
,AS
andWSP
. - Digst.OioIdws.Rest.Common: Contains common stuff for the
REST
variant. - Digst.OioIdws.Rest.Server: Contains the server and
AS
implementation of the [OIO-IDWS-REST
] specification. TheAS
stores information from the security token and issues access tokens. TheWSP
contains the authentication middleware that logs the user into theWSP
. - Digst.OioIdws.Wsc: Encapsulates the usage and configuration of
Digst.OioIdws.Soap
andDigst.OioIdws.OioWsTrust
. - Digst.OioIdws.Wsp: Encapsulates the usage and configuration of
Digst.OioIdws.Soap
- Digst.OioIdws.Wsp.Wsdl: It's part of
Digst.OioIdws.Wsp
and 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 WSC
consuming 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.Soap
combined 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.Client
andDigst.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.html
when saved inVisual Studio
). - Digst.OioIdws.sln:
Visual Studio 2017
solution file. - README.md: This file (updates
.html
when 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.ps1
from an elevatedPowerShell
. This installs all required certificates and performssslcert
bindings to be able to host local websites usingHTTPS
. - Open the solution
Digst.OioIdws.sln
inVisual Studio 2019 (Elevated mode)
and build it (if you get errors on external dependencies, ensureNuGet
packages are being restored). - The external
IP
address must be white listed atNETS
in order to be able to make revocation check of the testFOCES
certificates. - Set the projects
Digst.OioIdws.Rest.Examples.ServerAndASCombined
,Digst.OioIdws.WspExample
andDigst.Oioidws.WscBootstrapExample
as startup projects by right-clicking solution, selectproperties
, selectingMultiple start projects
. - For the web project, you must manually set the
Start URL
thatIIS Express
uses. You do this by:- right click project
Digst.Oioidws.WscBootstrapExample
, selectproperties
, select the tabWeb
, alter theStart Action
to the radio buttonStart URL
, specifying https://oiosaml-net.dk:20002.
- right click project
- Run the solution which should start a
SOAP WSP
,REST WSP
and 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>