From a1bf5db9320090e976bfee9620fb2de3d877a0d1 Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Tue, 10 Sep 2013 10:43:14 +0200 Subject: Update MOA-ID Specification (appendix) Bug fix: OA URL escape Verify Country-Code in Foreign Identities Mode (AT login not possible) --- id/server/doc/MOA_ID_1.5_Anhang.pdf | Bin 296723 -> 134176 bytes .../StartAuthentificationParameterParser.java | 2 +- .../id/auth/servlet/VerifyCertificateServlet.java | 12 +- .../protocols/saml1/SAML1AuthenticationServer.java | 12 +- .../moa/id/protocols/saml1/SAML1Protocol.java | 2 +- .../resources/properties/id_messages_de.properties | 165 +++++++++++---------- 6 files changed, 102 insertions(+), 91 deletions(-) (limited to 'id/server') diff --git a/id/server/doc/MOA_ID_1.5_Anhang.pdf b/id/server/doc/MOA_ID_1.5_Anhang.pdf index f2e5057c7..ed2743d3c 100644 Binary files a/id/server/doc/MOA_ID_1.5_Anhang.pdf and b/id/server/doc/MOA_ID_1.5_Anhang.pdf differ diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java index 58194361c..84e55435d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java @@ -44,7 +44,7 @@ public class StartAuthentificationParameterParser implements MOAIDAuthConstants{ // escape parameter strings target = StringEscapeUtils.escapeHtml(target); - oaURL = StringEscapeUtils.escapeHtml(oaURL); + //oaURL = StringEscapeUtils.escapeHtml(oaURL); bkuURL = StringEscapeUtils.escapeHtml(bkuURL); templateURL = StringEscapeUtils.escapeHtml(templateURL); useMandate = StringEscapeUtils.escapeHtml(useMandate); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java index 477d99220..ec05af5a1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java @@ -49,6 +49,7 @@ import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.id.util.ServletUtils; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.spss.util.CertificateUtils; /** * Servlet requested for getting the foreign eID @@ -158,8 +159,17 @@ public class VerifyCertificateServlet extends AuthServlet { ServletUtils.writeCreateXMLSignatureRequestOrRedirect(resp, session, createXMLSignatureRequestOrRedirect, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyCertificate"); } else { + + + String countrycode = CertificateUtils.getIssuerCountry(cert); + if (countrycode != null) { + if (countrycode.compareToIgnoreCase("AT") == 0) { + Logger.error("Certificate issuer country code is \"AT\". Login not support in foreign identities mode."); + throw new AuthenticationException("auth.22", null); + } + } + // Foreign Identities Modus - String createXMLSignatureRequest = AuthenticationServer.getInstance().createXMLSignatureRequestForeignID(session, cert); // build dataurl (to the GetForeignIDSerlvet) String dataurl = diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java index ee0b4e7e2..ede5f05d2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java @@ -32,7 +32,7 @@ import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.AuthenticationData; import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.storage.AssertionStorage; -import at.gv.egovernment.moa.id.util.IdentityLinkReSigner; +//import at.gv.egovernment.moa.id.util.IdentityLinkReSigner; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.Constants; @@ -197,12 +197,12 @@ public class SAML1AuthenticationServer extends AuthenticationServer { String ilAssertion = ""; if (saml1parameter.isProvideIdentityLink()) { if (session.getBusinessService()) { - IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance(); + //IdentityLinkReSigner identitylinkresigner = IdentityLinkReSigner.getInstance(); - Element resignedilAssertion = identitylinkresigner.resignIdentityLink(authData.getIdentityLink() - .getSamlAssertion()); - - ilAssertion = DOMUtils.serializeNode(resignedilAssertion); +// Element resignedilAssertion = identitylinkresigner.resignIdentityLink(authData.getIdentityLink() +// .getSamlAssertion()); +// +// ilAssertion = DOMUtils.serializeNode(resignedilAssertion); } else { ilAssertion = authData.getIdentityLink().getSerializedSamlAssertion(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java index a310b16ff..309b644d5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java @@ -72,7 +72,7 @@ public class SAML1Protocol implements IModulInfo, MOAIDAuthConstants { HttpServletResponse response, String action) throws MOAIDException { RequestImpl config = new RequestImpl(); String oaURL = (String) request.getParameter(PARAM_OA); - oaURL = StringEscapeUtils.escapeHtml(oaURL); + //oaURL = StringEscapeUtils.escapeHtml(oaURL); String target = (String) request.getParameter(PARAM_TARGET); target = StringEscapeUtils.escapeHtml(target); diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 877efcd4e..b9ee2c03e 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -8,13 +8,13 @@ # status messages included in of GetAuthenticationDataService 1200=Anfrage erfolgreich beantwortet -1201=Fehlerhaftes Requestformat\: mehr als 1 Request \uFFFDbergeben -1202=Fehlerhaftes Requestformat\: kein SAML-Artifakt \uFFFDbergeben -1203=Fehlerhaftes Requestformat\: mehr als 1 SAML-Artifakt \uFFFDbergeben +1201=Fehlerhaftes Requestformat\: mehr als 1 Request übergeben +1202=Fehlerhaftes Requestformat\: kein SAML-Artifakt übergeben +1203=Fehlerhaftes Requestformat\: mehr als 1 SAML-Artifakt übergeben 1204=Fehlerhaftes Requestformat 1205=Fehler beim Abholen der Anmeldedaten, fehlerhaftes SAML-Artifakt Format (SAML-Artifakt={0}): {1} 1206=Fehler beim Abholen der Anmeldedaten, unbekanntes SAML-Artifakt (SAML-Artifakt={0}) -1207=Zeit\u00FCberschreitung beim Abholen der Anmeldedaten (SAML-Artifakt\={0}) +1207=Zeitüberschreitung beim Abholen der Anmeldedaten (SAML-Artifakt\={0}) 1299=Interner Server-Fehler auth.00=Anmeldung an dieser Applikation wird nicht unterst\uFFFDtzt (URL\={0}) @@ -26,61 +26,62 @@ auth.05=Fehlender Parameter "{1}" beim Aufruf von "{0}" auth.06=Fehler beim Speichern der Anmeldedaten, fehlerhaftes SAML-Artifact Format (SAML-Artifact={0}) #auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen.
Hinweis: Bitte Dokumentation zu GenericConfiguration: "FrontendServlets.EnableHTTPConnection" beachten. auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen. -auth.08=In der B\u00FCrgerkartenumgebung ist ein Fehler aufgetreten\:
Fehlercode {0}\: {1} -auth.09=Zur Auswahlseite der B\u00FCrgertenumgebung (URL\={0}) konnte keine Verbindung hergestellt werden. \:
HTTP-Statuscode {1} +auth.08=In der Bürgerkartenumgebung ist ein Fehler aufgetreten\:
Fehlercode {0}\: {1} +auth.09=Zur Auswahlseite der Bürgertenumgebung (URL\={0}) konnte keine Verbindung hergestellt werden. \:
HTTP-Statuscode {1} auth.10=Fehler beim Aufruf von "{0}": Parameter "{1}" fehlt -auth.11=Die zentral gespeicherte Auswahlseite f\u00FCr B\u00FCrgerkartenumgebungen konnte nicht geladen werden. Bitte informieren Sie den Adminstrator des Servers und versuchen Sie die Anmeldung in einiger Zeit abermals.
URL "{0}" Interne Fehlermeldung\: {1} +auth.11=Die zentral gespeicherte Auswahlseite für Bürgerkartenumgebungen konnte nicht geladen werden. Bitte informieren Sie den Adminstrator des Servers und versuchen Sie die Anmeldung in einiger Zeit abermals.
URL "{0}" Interne Fehlermeldung\: {1} auth.12=Fehlerhafter Parameter "{1}" beim Aufruf von "{0}" -auth.13=Vollmachtenmodus f\u00FCr ausl\u00E4ndische B\u00FCrger wird nicht unterst\u00FCtzt. +auth.13=Vollmachtenmodus für ausländische Bürger wird nicht unterstützt. auth.14=Zertifikat konnte nicht ausgelesen werden. auth.15=Fehler bei Anfrage an Vollmachten Service. auth.16=Fehler bei Abarbeitung der Vollmacht in "{0}" -auth.17=Vollmachtenmodus f\u00FCr nicht-\u00F6ffentlichen Bereich wird nicht unterst\u00FCtzt. +auth.17=Vollmachtenmodus für nicht-öffentlichen Bereich wird nicht unterstützt. auth.18=Keine MOASessionID vorhanden -auth.19=Die Authentifizierung kann nicht passiv durchgef\u00FChrt werden. +auth.19=Die Authentifizierung kann nicht passiv durchgeführt werden. auth.20=No valid MOA session found. Authentification process is abourted. auth.21=Der Anmeldevorgang wurde durch den Benutzer abgebrochen. +auth.22=Die Bürgerkarte enthält keine Personenbindung oder die Personenbindung konnte nicht eruiert werden. init.00=MOA ID Authentisierung wurde erfolgreich gestartet -init.01=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround\: SSL ist m\u00F6glicherweise nicht verf\u00FCgbar +init.01=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround\: SSL ist möglicherweise nicht verfügbar init.02=Fehler beim Starten des Service MOA ID Authentisierung init.04=Fehler beim Datenbankzugriff mit der SessionID {0} config.00=MOA ID Konfiguration erfolgreich geladen: {0} config.01=Umgebungsvariable "moa.id.configuration" nicht gesetzt -config.02=Nicht klassifizierter Fehler in der Konfiguration (siehe Log-Datei f\u00FCr Details) -config.03=Fehler beim Einlesen der Konfiguration (siehe Log-Datei f\u00FCr Details) -config.04=Fehler beim Lesen der MOA ID Konfiguration; es wird weiterhin die urspr\u00FCngliche Konfiguration verwendet -config.05=Fehlerhafter Wert f\u00FCr "{0}" in der MOA ID Konfiguration -config.06=Doppelter Eintrag in der Konfiguration f\u00FCr die Online-Applikation gefunden: {0} +config.02=Nicht klassifizierter Fehler in der Konfiguration (siehe Log-Datei für Details) +config.03=Fehler beim Einlesen der Konfiguration (siehe Log-Datei für Details) +config.04=Fehler beim Lesen der MOA ID Konfiguration; es wird weiterhin die ursprüngliche Konfiguration verwendet +config.05=Fehlerhafter Wert für "{0}" in der MOA ID Konfiguration +config.06=Doppelter Eintrag in der Konfiguration für die Online-Applikation gefunden: {0} config.07=Klasse {0} kann nicht instanziert werden -config.08=Fehlender Wert f\u00FCr "{0}" in der MOA ID Konfiguration +config.08=Fehlender Wert für "{0}" in der MOA ID Konfiguration config.09=Fehler beim Erstellen von X509IssuerSerial (IssuerName={0}, SerialNumber={1}) config.10=Fehler in der MOA SPSS Konfiguration: {0} config.11=LoginParameterResolver konnte nicht konfiguriert werden {0} config.12=Standard DATA URL Prefix "{0}" wird anstatt des konfigurierten DATA URL Prefix verwendet config.13=Konfiguriertes DATA URL Prefix "{0}" muss mit http:// bzw. https:// beginnen config.14=LoginParameterResolver-Fehler: {0} -config.15=Das Personenbindungs-Trust-Profil (TrustProfileID = {0}) darf nicht f\u00FCr die Verifikation anderer Infoboxen verwendet werden. +config.15=Das Personenbindungs-Trust-Profil (TrustProfileID = {0}) darf nicht für die Verifikation anderer Infoboxen verwendet werden. config.16=MOA ID Proxy konnte nicht gestartet werden. Das Element ConnnectionParameter im allgemeinen Konfigurationsteil der MOA-ID-PROXY Konfigurationsdatei fehlt. config.17=Fehler beim initialisieren von Hibernate config.18=Keine MOA-ID 2.x Konfiguration gefunden. -config.19=Kein Schl�ssel f\u00FCr die Resignierung der Personenbindung gefunden. +config.19=Kein Schlüssel für die Resignierung der Personenbindung gefunden. parser.00=Leichter Fehler beim Parsen: {0} parser.01=Fehler beim Parsen: {0} parser.02=Schwerer Fehler beim Parsen: {0} -parser.03=Fehler beim Parsen oder Konvertieren eines ECDSA-Schl\u00FCssels\: {0} +parser.03=Fehler beim Parsen oder Konvertieren eines ECDSA-Schlüssels\: {0} parser.04=Fehler beim Serialisieren: {0} parser.05=Fehler beim Serialisieren: SAML-Attribute {0} (Namespace: {1}) konnte nicht serialsiert werden. -parser.06=Fehler beim Parsen\: {0}-InfoboxResponse nicht vollst\uFFFDndig ({1} im {2} fehlt) -parser.07=Fehler beim Parsen\: Assoziatives Array im {0}-InfoboxResponse enth\u00E4lt einen Schl\u00FCssel ohne zugeh\u00F6rigen Wert ("Key"-Element statt "Pair"-Element). +parser.06=Fehler beim Parsen\: {0}-InfoboxResponse nicht vollstündig ({1} im {2} fehlt) +parser.07=Fehler beim Parsen\: Assoziatives Array im {0}-InfoboxResponse enthält einen Schlüssel ohne zugehörigen Wert ("Key"-Element statt "Pair"-Element). builder.00=Fehler beim Aufbau der Struktur "{0}": {1} builder.01=Fehlerhaftes Template: Kennung "{0}" fehlt builder.02=Fehler beim Ausblenden von Stammzahlen -builder.03=Fehler beim Aufbau des HTML Codes f\u00FCr Vollmachten +builder.03=Fehler beim Aufbau des HTML Codes für Vollmachten service.00=Fehler beim Aufruf des Web Service: {0} service.01=Fehler beim Aufruf des Web Service: kein Endpoint @@ -94,108 +95,108 @@ cleaner.03=Abgelaufene Anmeldedaten zur SAML-Assertion ID {0} wurden aus dem Spe proxy.00=MOA ID Proxy wurde erfolgreich gestartet proxy.01=Unbekannter URL {0}, erwarteter URL auf {1} -proxy.02=Unbekannter URL {0}.
Es wurde keine Ãœbereinstimmung zum Attribut publicURLPrefix im Element 'OnlineApplication' der verwendeten MOA-ID Konfigurationsdatei gefunden. +proxy.02=Unbekannter URL {0}.
Es wurde keine Üœbereinstimmung zum Attribut publicURLPrefix im Element 'OnlineApplication' der verwendeten MOA-ID Konfigurationsdatei gefunden. proxy.04=URL {0} : {1} -proxy.05=Fehler beim Aufbauen der SSLSocketFactory f\u00FCr {0} \: {1} +proxy.05=Fehler beim Aufbauen der SSLSocketFactory für {0} \: {1} proxy.06=Fehler beim Starten des Service MOA ID Proxy proxy.07=Sie sind nicht bzw. nicht mehr angemeldet. Melden Sie sich bitte erneut an. -proxy.08=Kein URL-Mapping in der HttpSession verf\u00FCgbar (URL {0}) +proxy.08=Kein URL-Mapping in der HttpSession verfügbar (URL {0}) proxy.09=Fehler beim Aufruf des MOA-ID Auth API: {0} proxy.10=Fehler beim Weiterleiten (MOA-ID Proxy) proxy.11=Beim Weiterleiten der Verbindung zur Anwendung ist ein Fehler aufgetreten. -proxy.12=Fehler bei der Anmeldung.
Eine Anmeldung an der Anwendung {0} war nicht möglich.
Prüfen Sie bitte ihre Berechtigung. -proxy.13=Fehler beim Aufruf des LoginParameterResolvers zu URL-Pr\uFFFDfix\: {0} -proxy.14=

Folgende Ursachen k\u00F6nnen zu dem Fehler gef\u00FChrt haben\:

  1. Sie sind nicht mehr angemeldet (Verbindungen werden aus Sicherheitsgr\u00FCnden bei l\u00E4ngerer Inaktivit\u00E4t beendet.)
    Melden Sie sich bitte erneut an.
  2. Die Kommunikation mit dem Server schlug fehl.
-proxy.15=Auf die gew\u00FCnschte Seite kann nicht zugegriffen werden, Sie besitzen nicht die ben�tigte Berechtigung. +proxy.12=Fehler bei der Anmeldung.
Eine Anmeldung an der Anwendung {0} war nicht möglich.
Prüfen Sie bitte ihre Berechtigung. +proxy.13=Fehler beim Aufruf des LoginParameterResolvers zu URL-Präfix\: {0} +proxy.14=

Folgende Ursachen können zu dem Fehler geführt haben\:

  1. Sie sind nicht mehr angemeldet (Verbindungen werden aus Sicherheitsgründen bei längerer Inaktivität beendet.)
    Melden Sie sich bitte erneut an.
  2. Die Kommunikation mit dem Server schlug fehl.
+proxy.15=Auf die gewünschte Seite kann nicht zugegriffen werden, Sie besitzen nicht die benötigte Berechtigung. proxy.16=Fehler bei der Anmeldung.
Eine Anmeldung an der Anwendung {0} war nicht möglich. Die maximale Anzahl von {1} ungültigen Loginversuchen wurde überschritten.
Prüfen Sie bitte ihre Berechtigung. validator.00=Kein SAML:Assertion Objekt gefunden {0} validator.01=Im Subject kommt mehr als ein Element des Typs PhysicalPersonType vor {0} -validator.02=Das verwendete Schl\u00FCsselformat eines \u00F6ffentlichen Schl\u00FCssels ist unbekannt {0} -validator.03=Der Namespace eines \u00F6ffentlicher Schl\u00FCssels ist ung\u00FCltig {0} -validator.04=Es wurde ein SAML\:Attribut ohne \u00F6ffentlichen Schl\u00FCssel gefunden {0} +validator.02=Das verwendete Schlüsselformat eines öffentlichen Schlüssels ist unbekannt {0} +validator.03=Der Namespace eines öffentlicher Schlüssels ist ungültig {0} +validator.04=Es wurde ein SAML\:Attribut ohne öffentlichen Schlüssel gefunden {0} validator.05=Es wurde {0} keine DSIG:Signature gefunden -validator.06=Die Signatur ist ung\u00FCltig -validator.07=Das Zertifikat der Personenbindung ist ung\u00FCltig.
{0} -validator.08=Das Manifest ist ung\u00FCltig -validator.09=Die \u00F6ffentlichen Schl\u00FCssel des Identitiy Link stimmen nicht mit dem retournierten Zertifikat \u00FCberein +validator.06=Die Signatur ist ungültig +validator.07=Das Zertifikat der Personenbindung ist ungültig.
{0} +validator.08=Das Manifest ist ungültig +validator.09=Die öffentlichen Schlüssel des Identitiy Link stimmen nicht mit dem retournierten Zertifikat überein -validator.10=Anzahl der URLs zur Authentisierungskomponente ung\u00FCltig {0} -validator.11="Gesch�ftsbereich" wurde nicht in den SAML-Attributen gefunden {0} -validator.12=Der Namespace des SAML-Attributs "Gesch\\u00E4ftsbereich" ist ung\u00FCltig {0} -validator.13=Das Target des 'Gesch\u00E4ftsbereichs' ist ung\u00FCltig {0} +validator.10=Anzahl der URLs zur Authentisierungskomponente ungültig {0} +validator.11="Geschäftsbereich" wurde nicht in den SAML-Attributen gefunden {0} +validator.12=Der Namespace des SAML-Attributs "Geschäftsbereich" ist ungültig {0} +validator.13=Das Target des 'Geschäftsbereichs' ist ungültig {0} validator.14="OA" wurde nicht in den SAML-Attributen gefunden {0} -validator.15=Der Namespace des SAML-Attributs "OA" ist ung\u00FCltig {0} +validator.15=Der Namespace des SAML-Attributs "OA" ist ungültig {0} validator.16=Die vorkonfigurierte URL der OnlineApplikation ist fehlerhaft {0} -validator.17= Der SubjectDN-Name des von MOA-SP retournierten Zertifikats ist ung\u00FCltig {0} +validator.17= Der SubjectDN-Name des von MOA-SP retournierten Zertifikats ist ungültig {0} #validator.18= Der SubjectDN-Name des von MOA-SP retournierten Zertifikats ist nicht als g�ltiger SubjectDN-Name f�r eine Personenbindung konfiguriert. {0} wurde NICHT in der Konfiguration gefunden -validator.18= Das Zertifikat mit dem die Personenbindung signiert wurde, ist nicht zum Signieren der Personenbindung zul\u00E4ssig. Es konnte weder der SubjectDN ({0}) einem berechtigten Namen zugeordnet werden, noch enth�lt das Zertifikat die Erweiterung "Eigenschaft zur Ausstellung von Personenbindungen". +validator.18= Das Zertifikat mit dem die Personenbindung signiert wurde, ist nicht zum Signieren der Personenbindung zulässig. Es konnte weder der SubjectDN ({0}) einem berechtigten Namen zugeordnet werden, noch enthält das Zertifikat die Erweiterung "Eigenschaft zur Ausstellung von Personenbindungen". -validator.19=Das verwendete Zertifikat zum Signieren ist ung\u00FCltig.
{0} +validator.19=Das verwendete Zertifikat zum Signieren ist ungültig.
{0} -validator.21=Es konnte keine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw�rdigen Wurzelzertifikat konstruiert werden. -validator.22=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw\u00FCrdigen Wurzelzertifikat konnte konstruiert werden. F\u00FCr zumindest ein Zertifikat dieser Kette f\u00E4llt der Pr�fzeitpunkt nicht in das G\u00FCltigkeitsintervall. -validator.23=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw\u00FCrdigen Wurzelzertifikat konnte konstruiert werden. F\u00FCr alle Zertifikate dieser Kette f\u00E4llt der Pr\u00FCfzeitpunkt in das jeweilige G\u00FCltigkeitsintervall. F\u00FCr zumindest ein Zertifikat konnte der Zertifikatstatus nicht festgestellt werden. -validator.24=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw\u00FCrdigen Wurzelzertifikat konnte konstruiert werden. F\u00FCr alle Zertifikate dieser Kette f\u00E4llt der Pr\u00FCfzeitpunkt in das jeweilige G\u00FCltigkeitsintervall. Zumindest ein Zertifikat ist zum Pr\u00FCfzeitpunkt widerrufen. -validator.25=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw\u00FCrdigen Wurzelzertifikat konnte konstruiert werden. F\u00FCr alle Zertifikate dieser Kette f\u00E4llt der Pr\u00FCfzeitpunkt in das jeweilige G\u00FCltigkeitsintervall. Kein Zertifikat dieser Kette ist zum Pr\u00FCfzeitpunkt widerrufen. Zumindest ein Zertifikat ist zum Pr\u00FCfzeitpunkt gesperrt. +validator.21=Es konnte keine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konstruiert werden. +validator.22=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für zumindest ein Zertifikat dieser Kette fällt der Prüfzeitpunkt nicht in das Gültigkeitsintervall. +validator.23=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Für zumindest ein Zertifikat konnte der Zertifikatstatus nicht festgestellt werden. +validator.24=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Zumindest ein Zertifikat ist zum Prüfzeitpunkt widerrufen. +validator.25=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Kein Zertifikat dieser Kette ist zum Prüfzeitpunkt widerrufen. Zumindest ein Zertifikat ist zum Prüfzeitpunkt gesperrt. -validator.26=OA Applikation ist eine Wirtschaftsapplikation, trotzdem ist ein SAML-Attribut "Gesch\u00E4ftsbereich" enthalten +validator.26=OA Applikation ist eine Wirtschaftsapplikation, trotzdem ist ein SAML-Attribut "Geschäftsbereich" enthalten validator.27=OA Applikation ist keine Wirtschaftsapplikation, trotzdem ist ein SAML-Attribut "wbPK" enthalten validator.28=Fehlerhafter Wert im "wbPK" SAML-Attribut {0} validator.29=Fehler beim Auslesen des "wbPK" SAML-Attributs {0} -validator.30=Der Namespace des SAML-Attributs "wbPK" ist ung�ltig {0} +validator.30=Der Namespace des SAML-Attributs "wbPK" ist ungültig {0} validator.31="wbPK" wurde nicht in den SAML-Attributen gefunden {0} validator.32="Issuer" im AUTH-Block nicht vorhanden. -validator.33="Issuer"-Attribut im AUTH-Block ("{0}") stimmt nicht mit dem Namen in der Personenbindung ("{1}") \u00FCberein. -validator.34=Das Geburtsdatum ({0}) stimmt nicht mit dem in der Personenbindung ({1}) \u00FCberein. -validator.35=Der Namespace des SAML-Attributs "Geburtsdatum" ist ung\u00FCltig. -validator.36=Die Anzahl der SAML-Attribute im AUTH-Block wurde ver\u00E4ndert\: {0} statt der erwarteten {1} -validator.37=Die Reihenfolge der SAML-Attribute im AUTH-Block wurde ver\u00E4ndert\: Attribut "{0}" anstelle von Attribut "{1}" an der {2}. Position -validator.38=Der {0} des SAML-Attributs Nummer {1} ({2}) im AUTH-Block ist ung\u00FCltig\: "{3}" anstelle von "{4}" -validator.39=Der Austellungszeitpunkt (IssueInstant) im AUTH-Block wurde ver\u00E4ndert\: {0} anstelle von {1}. M\u00F6glicherweise wurde Ihre B\u00FCrgerkartenumgebung kompromittiert. Verwenden Sie Ihre B\u00FCrgerkarte bis auf weiteres nicht mehr, und setzen Sie sich umgehend mit dem Betreiber des Online-Dienstes, an dem Sie sich anmelden wollten, in Verbindung. - - -validator.40=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: {1} -validator.41=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Keine Konfigurationsparameter zur \uFFFDberpr\uFFFDfung der {0}-Infobox vorhanden. -validator.42=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Es konnte keine geeignete Applikation zur Verifikation der {0}-Infobox geladen werden. -validator.43=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Der InfoboxReadResponse f\uFFFDr die {0}-Infobox konnte nicht erfolgreich geparst werden. -validator.44=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: In der {0}-Infobox Pr\uFFFDfapplikation ist ein Fehler aufgetreten. -validator.45=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Der {1} des von der {0}-Infobox Pr\uFFFDfapplikation zur\uFFFDckgegebenen SAML-Attributes Nummer {2} ist {3}. -validator.46=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Der Wert des von der Pr\uFFFDfapplikation zur\uFFFDckgegebenen SAML-Attributes Nummer {1} ist ung\uFFFDltig. -validator.47=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Das von der Pr\uFFFDfapplikation zur\uFFFDckgegebene SAML-Attribut Nummer {1} kann nicht eindeutig zugeordnet werden. -validator.48={0}-Infobox wurde nicht von der BKU \uFFFDbermittelt\: F\uFFFDr die Anmeldung an dieser Online-Applikation ist die {0}-Infobox erforderlich. Bitte melden Sie sich erneut an, und selektieren Sie in Ihrer BKU die {0}-Infobox. +validator.33="Issuer"-Attribut im AUTH-Block ("{0}") stimmt nicht mit dem Namen in der Personenbindung ("{1}") überein. +validator.34=Das Geburtsdatum ({0}) stimmt nicht mit dem in der Personenbindung ({1}) überein. +validator.35=Der Namespace des SAML-Attributs "Geburtsdatum" ist ungültig. +validator.36=Die Anzahl der SAML-Attribute im AUTH-Block wurde verändert\: {0} statt der erwarteten {1} +validator.37=Die Reihenfolge der SAML-Attribute im AUTH-Block wurde verändert\: Attribut "{0}" anstelle von Attribut "{1}" an der {2}. Position +validator.38=Der {0} des SAML-Attributs Nummer {1} ({2}) im AUTH-Block ist ungültig\: "{3}" anstelle von "{4}" +validator.39=Der Austellungszeitpunkt (IssueInstant) im AUTH-Block wurde verändert\: {0} anstelle von {1}. Möglicherweise wurde Ihre Bürgerkartenumgebung kompromittiert. Verwenden Sie Ihre Bürgerkarte bis auf weiteres nicht mehr, und setzen Sie sich umgehend mit dem Betreiber des Online-Dienstes, an dem Sie sich anmelden wollten, in Verbindung. + + +validator.40=Überprüfung der {0}-Infobox fehlgeschlagen\: {1} +validator.41=Überprüfung der {0}-Infobox fehlgeschlagen\: Keine Konfigurationsparameter zur Überprüfung der {0}-Infobox vorhanden. +validator.42=Überprüfung der {0}-Infobox fehlgeschlagen\: Es konnte keine geeignete Applikation zur Verifikation der {0}-Infobox geladen werden. +validator.43=Überprüfung der {0}-Infobox fehlgeschlagen\: Der InfoboxReadResponse f\uFFFDr die {0}-Infobox konnte nicht erfolgreich geparst werden. +validator.44=Überprüfung der {0}-Infobox fehlgeschlagen\: In der {0}-Infobox Prüfapplikation ist ein Fehler aufgetreten. +validator.45=Überprüfung der {0}-Infobox fehlgeschlagen\: Der {1} des von der {0}-Infobox Prüfapplikation zurückgegebenen SAML-Attributes Nummer {2} ist {3}. +validator.46=Überprüfung der {0}-Infobox fehlgeschlagen\: Der Wert des von der Prüfapplikation zurückgegebenen SAML-Attributes Nummer {1} ist ungültig. +validator.47=Überprüfung der {0}-Infobox fehlgeschlagen\: Das von der Prüfapplikation zurückgegebene SAML-Attribut Nummer {1} kann nicht eindeutig zugeordnet werden. +validator.48={0}-Infobox wurde nicht von der BKU übermittelt\: Für die Anmeldung an dieser Online-Applikation ist die {0}-Infobox erforderlich. Bitte melden Sie sich erneut an, und selektieren Sie in Ihrer BKU die {0}-Infobox. validator.49=Beim Ermitteln der Personenbindungs-OID im Zertifikat, mit dem die Personenbindung signiert wurde, ist ein Fehler aufgetreten. -validator.50=Transformationskette in der Signatur stimmt mit keiner Transformationskette aus dem Pr\u00FCfprofil \u00FCberein. +validator.50=Transformationskette in der Signatur stimmt mit keiner Transformationskette aus dem Prüfprofil überein. -validator.60=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Vollmachtenpr\uFFFDfung ist f\uFFFDr diesen Typ von Vollmachten nicht aktiviert. Die \uFFFDbermittelte Vollmacht kann nicht f\uFFFDr eine Anmeldung verwendet werden. -validator.61=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: Vollmachtenpr\uFFFDfung ist f\uFFFDr diesen Typ von Vollmachten f\uFFFDr berufliche Parteienvertreter nicht aktiviert. Die \uFFFDbermittelte Vollmacht kann nicht f\uFFFDr eine Anmeldung verwendet werden. -validator.62=Fehler in der \uFFFDbermittlung\: keine prim\uFFFDre Vollmacht \uFFFDbergeben. -validator.63=Es ist ein Fehler bei der Formulargenerierung f\u00FCr berufliche Parteienvetretung aufgetreten. +validator.60=Überprüfung der {0}-Infobox fehlgeschlagen\: Vollmachtenprüfung ist für diesen Typ von Vollmachten nicht aktiviert. Die übermittelte Vollmacht kann nicht für eine Anmeldung verwendet werden. +validator.61=Überprüfung der {0}-Infobox fehlgeschlagen\: Vollmachtenprüfung ist für diesen Typ von Vollmachten für berufliche Parteienvertreter nicht aktiviert. Die übermittelte Vollmacht kann nicht für eine Anmeldung verwendet werden. +validator.62=Fehler in der Übermittlung\: keine primäre Vollmacht übergeben. +validator.63=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten. validator.64=Fehler beim Austausch von Vollmachtsdaten -validator.65=Es ist ein Fehler bei der Formulargenerierung f\u00FCr berufliche Parteienvetretung aufgetreten - kein Formular zur Anzeige vorhanden. -validator.66=\uFFFDberpr\uFFFDfung der {0}-Infobox fehlgeschlagen\: berufliche Parteienvetretung ist nicht konfiguriert. +validator.65=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten - kein Formular zur Anzeige vorhanden. +validator.66=Überprüfung der {0}-Infobox fehlgeschlagen\: berufliche Parteienvetretung ist nicht konfiguriert. -validator.67=Der Specialtext ({0}) stimmt nicht mit dem f\u00FCr diese Applikation hinterlegten Text ({1}) \u00FCberein. +validator.67=Der Specialtext ({0}) stimmt nicht mit dem für diese Applikation hinterlegten Text ({1}) überein. validator.68=SigningTime im AUTH-Block konnte nicht eruiert werden. validator.69=SigningTime im AUTH-Block und Serverzeit weichen zu stark ab ({0}). ssl.01=Validierung des SSL-Server-Endzertifikates hat fehlgeschlagen stork.00=STORK SAML AuthnRequest konnte nicht signiert werden -stork.01=STORK SAML AuthnRequest nicht g\u00FCltig +stork.01=STORK SAML AuthnRequest nicht gültig stork.02=STORK SAML AuthnRequest kann nicht an folgende URL geschickt werden: {0} stork.04=STORK SAML Response konnte nicht decodiert werden stork.05=STORK SAML Response Validierung fehlgeschlagen -stork.06=STORK SAML Response enth\uFFFDlt eine Fehlermeldung\: {0} -stork.07=Es existiert kein STORK AuthnRequest f\u00FCr diese STORK Response +stork.06=STORK SAML Response enthält eine Fehlermeldung\: {0} +stork.07=Es existiert kein STORK AuthnRequest für diese STORK Response stork.08=STORK SAML Assertion Validierung fehlgeschlagen -stork.09=Fehler beim \u00FCberpr\u00FCfen der STORK B\u00FCrgerInnen Signatur +stork.09=Fehler beim überprüfen der STORK BürgerInnen Signatur stork.10=Fehler in der Verbindung zum SZR-Gateway pvp2.00={0} ist kein gueltiger consumer service index -- cgit v1.2.3 From 3490573657837a16319d0eca654decd9b76b8916 Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Thu, 26 Sep 2013 13:28:41 +0200 Subject: Update trustprofiles and certstore (due to new A-Trust OCSP responder certificate deployed from 07.10.2013) --- .../FE4F09F5D1A4AADE9232D9E2D6B9A2552BC48A22 | Bin 0 -> 1147 bytes .../698563ECEE29232C5304487D972310F86650C3A6 | Bin 0 -> 1185 bytes .../A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer | Bin 0 -> 979 bytes .../A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer | Bin 0 -> 979 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 id/server/data/deploy/conf/moa-spss/certstore/88BBA52A5AF119284F03A7D0D1DA61934EE57A79/FE4F09F5D1A4AADE9232D9E2D6B9A2552BC48A22 create mode 100644 id/server/data/deploy/conf/moa-spss/certstore/E47BA33321A8A919414A123C91F5D253766AB078/698563ECEE29232C5304487D972310F86650C3A6 create mode 100644 id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer create mode 100644 id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-spss/certstore/88BBA52A5AF119284F03A7D0D1DA61934EE57A79/FE4F09F5D1A4AADE9232D9E2D6B9A2552BC48A22 b/id/server/data/deploy/conf/moa-spss/certstore/88BBA52A5AF119284F03A7D0D1DA61934EE57A79/FE4F09F5D1A4AADE9232D9E2D6B9A2552BC48A22 new file mode 100644 index 000000000..a699436ca Binary files /dev/null and b/id/server/data/deploy/conf/moa-spss/certstore/88BBA52A5AF119284F03A7D0D1DA61934EE57A79/FE4F09F5D1A4AADE9232D9E2D6B9A2552BC48A22 differ diff --git a/id/server/data/deploy/conf/moa-spss/certstore/E47BA33321A8A919414A123C91F5D253766AB078/698563ECEE29232C5304487D972310F86650C3A6 b/id/server/data/deploy/conf/moa-spss/certstore/E47BA33321A8A919414A123C91F5D253766AB078/698563ECEE29232C5304487D972310F86650C3A6 new file mode 100644 index 000000000..ebfbce9a0 Binary files /dev/null and b/id/server/data/deploy/conf/moa-spss/certstore/E47BA33321A8A919414A123C91F5D253766AB078/698563ECEE29232C5304487D972310F86650C3A6 differ diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer new file mode 100644 index 000000000..33e776369 Binary files /dev/null and b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer differ diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer new file mode 100644 index 000000000..33e776369 Binary files /dev/null and b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer differ -- cgit v1.2.3 From f93576f32f1d4bb4f3d0830c1fffb3c0a55d7616 Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Sun, 19 Jan 2014 22:12:00 +0100 Subject: Version update to 2.0.0 --- .../.settings/org.eclipse.wst.common.component | 6 ---- id/server/auth/src/main/webapp/iframeHandyBKU.html | 7 ++-- .../auth/src/main/webapp/iframeOnlineBKU.html | 9 +++-- id/server/auth/src/main/webapp/index.html | 38 ++++++++++------------ 4 files changed, 28 insertions(+), 32 deletions(-) (limited to 'id/server') diff --git a/id/server/auth/.settings/org.eclipse.wst.common.component b/id/server/auth/.settings/org.eclipse.wst.common.component index 9725f5b61..6299c8d17 100644 --- a/id/server/auth/.settings/org.eclipse.wst.common.component +++ b/id/server/auth/.settings/org.eclipse.wst.common.component @@ -1,11 +1,5 @@ - - uses - - - uses - uses diff --git a/id/server/auth/src/main/webapp/iframeHandyBKU.html b/id/server/auth/src/main/webapp/iframeHandyBKU.html index 0f6e1e282..b5936679f 100644 --- a/id/server/auth/src/main/webapp/iframeHandyBKU.html +++ b/id/server/auth/src/main/webapp/iframeHandyBKU.html @@ -8,11 +8,11 @@ - + + -
-  - - -
-
E-Gov Logo
-
-

Berufsmäßige Parteienvertretung

-
-
-Bitte beachten Sie -
-
-
-
-Stern  Feld muss ausgefüllt sein -
-
-Info  Ausfüllhilfe -
-
-Rufezeichen  Fehlerhinweis
-
 
+
+ +   + + +
+
+ E-Gov Logo +
+
+

Berufsmäßige Parteienvertretung

+
+
Bitte beachten Sie
+
+
+ Stern  Feld muss + ausgefüllt sein +
+
+ Info  Ausfüllhilfe +
+
+ Rufezeichen  + Fehlerhinweis +
+
 
-

Berufsmäßige Parteienvertretung einer natürlichen/juristischen Person -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Vertreter:
Vorname Stern -
Name Stern -
Geburtsdatum Stern - - - - -

- Ich bin berufsmäßig berechtigt für die nachfolgend genannte Person in deren Namen mit der Bürgerkarte einzuschreiten.
 

- Vertretene Person:
 natürliche Person: 
Vorname Stern Info -
Name Stern Info -
Geburtsdatum Stern - - - -  Info -
optional: -
Straße   -
Hausnummer  Info -
Einh. Nr.  Info -
Postleitzahl  Info -
Gemeinde  Info -
 
 juristische Person: 
Name Stern Info -
 Stern Info -
-
-

Bitte halten Sie Ihre Bürgerkartenumgebung bereit.

- - - -


- -
+

Berufsmäßige Parteienvertretung einer + natürlichen/juristischen Person

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vertreter:
Vorname Stern +
Name Stern +
Geburtsdatum Stern - -

Ich bin berufsmäßig + berechtigt für die nachfolgend genannte Person in deren + Namen mit der Bürgerkarte einzuschreiten.
 

Vertretene Person:
 natürliche + Person: 
Vorname Stern Info
Name Stern Info
Geburtsdatum Stern - -  Info
optional: +
Straße  
Hausnummer  Info +
Einh. Nr.  Info
Postleitzahl  Info
Gemeinde  Info
 
 juristische + Person: 
Name Stern Info
 Stern Info
+
+ +

+ Bitte halten Sie Ihre Bürgerkartenumgebung bereit. +

+

+ + +

+
+ +
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html index 801a2dbf1..d1ffa4f61 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html @@ -1,495 +1,435 @@ - - - - - - - - +*/ +input { + /*border:1px solid #000;*/ + cursor: pointer; +} + +#localBKU input { + /* color: #BUTTON_COLOR#; */ + border: 0px; + display: inline-block; +} + +#localBKU input:hover,#localBKU input:focus,#localBKU input:active { + text-decoration: underline; +} + +#installJava,#BrowserNOK { + clear: both; + font-size: 0.8em; + padding: 4px; +} + +.selectText { + +} + +.selectTextHeader { + +} + +.sendButton { + width: 30%; + margin-bottom: 1%; +} + +#leftcontent a { + text-decoration: none; + color: #000; + /* display:block;*/ + padding: 4px; +} + +#leftcontent a:hover,#leftcontent a:focus,#leftcontent a:active { + text-decoration: underline; + color: #000; +} + +.infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; +} + +.hell { + background-color: #MAIN_BACKGOUNDCOLOR#; + color: #MAIN_COLOR#; +} + +.dunkel { + background-color: #HEADER_BACKGROUNDCOLOR#; + color: #HEADER_COLOR#; +} + +.main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; +} + + - Anmeldung mittels Bürgerkarte oder Handy-Signatur - - -
-
-

Anmeldung an: #OAName#

-
-
-
-

#HEADER_TEXT#

-
-
-
-
- - - -
-
-
-
- OnlineBKU - -
-
- HandyBKU - -
-
-
-
- - - - - - - - - -
-
- - + +
+ + - - -
-
-
-
- - - + + + + + + + + + \ No newline at end of file diff --git a/id/server/idserverlib/src/main/resources/resources/templates/pvp_postbinding_template.html b/id/server/idserverlib/src/main/resources/resources/templates/pvp_postbinding_template.html index ccd85a38a..2f93428b5 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/pvp_postbinding_template.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/pvp_postbinding_template.html @@ -1,51 +1,48 @@ -## -## Velocity Template for SAML 2 HTTP-POST binding -## -## Velocity context may contain the following properties -## action - String - the action URL for the form -## RelayState - String - the relay state for the message -## SAMLRequest - String - the Base64 encoded SAML Request -## SAMLResponse - String - the Base64 encoded SAML Response - +## ## Velocity Template for SAML 2 HTTP-POST binding ## ## Velocity +context may contain the following properties ## action - String - the +action URL for the form ## RelayState - String - the relay state for the +message ## SAMLRequest - String - the Base64 encoded SAML Request ## +SAMLResponse - String - the Base64 encoded SAML Response + - - - - - -
Your login is being processed. Thank you for waiting.
- - - -
-
- #if($RelayState)#end - - #if($SAMLRequest)#end - - #if($SAMLResponse)#end - -
- -
- - + + + + + +
Your login is being processed. Thank you for + waiting.
+ + + +
+
+ #if($RelayState)#end #if($SAMLRequest)#end #if($SAMLResponse)#end + +
+ +
+ + \ No newline at end of file diff --git a/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html b/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html index cde1ac7a5..517f207ff 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html @@ -1,12 +1,13 @@ - - - CLICK to perform a redirect back to Online Application + CLICK to perform a + redirect back to Online Application diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html index b80d654cc..e75bef70c 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html @@ -1,617 +1,554 @@ - + - - - - - - Anmeldung an Online-Applikation +} + +#installJava,#BrowserNOK { + clear: both; + font-size: 0.8em; + padding: 4px; +} + +.selectText { + +} + +.selectTextHeader { + +} + +#leftcontent a { + text-decoration: none; + color: #000; + /* display:block;*/ + padding: 4px; +} + +#leftcontent a:hover,#leftcontent a:focus,#leftcontent a:active { + text-decoration: underline; + color: #000; +} + +.infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; +} + +.hell { + background-color: #MAIN_BACKGOUNDCOLOR#; + color: #MAIN_COLOR#; +} + +.dunkel { + background-color: #HEADER_BACKGROUNDCOLOR#; + color: #HEADER_COLOR#; +} + +.main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; +} + + + +Anmeldung an Online-Applikation -
- -
- - - -
-
-
-

- Anmeldeinformationen: -

-
- -
-

Anmeldung an: #OAName#

- - -
-
- - - - - -
-
-
-
- - - - - -
-
- -
+
+ +
+ + + +
+
+
+

+ Anmeldeinformationen:

+
+ +
+

Anmeldung an: #OAName#

+ + +
+
+ +
+
+
+
+ +
+
+
+
+
+ -
diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl index 5751b3e58..b3a8f8f5e 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl @@ -1,40 +1,53 @@ - - + + - + - + - + - - - + + + - - + + - + - + - + - + - + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl index 7368691b6..0cfea76eb 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl @@ -1,40 +1,52 @@ - - + + - + - + - + - - - + + + - - + + - + - + - + - + - + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd index d7a06d6e7..012b2e897 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd @@ -1,454 +1,528 @@ - - - - - - - - - - - - - - - - - - - Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements - - - - - - - - - - - - - - - - - - - Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil - - - - - - - - - - - - - - - - - - Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage - - - - Resultat, falls die Signaturerstellung erfolgreich war - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert - - - - - - - - - - - only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur. - - - - - - - - - - mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert - - - - - - - - - - - only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resultat, falls die Signaturerstellung gescheitert ist - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen. - - - - - Profilbezeichner für einen Transformationsweg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann. - - - - Der Transformationsparameter explizit angegeben. - - - - - Der Hashwert des Transformationsparameters. - - - - - - - - - - - - - - - - - - - - - - Explizite Angabe des Transformationswegs - - - - - - - Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird. - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Ermöglichung der Stapelsignatur durch + wiederholte Angabe dieses Elements + + + + + + + + + + + + + + + + + + + Auswahl: Entweder explizite Angabe des + Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit + der Signaturumgebung, oder Verweis auf ein benanntes Profil + + + + + + + + + + + + + + + + + + + Kardinalität 1..oo erlaubt die Antwort auf eine + Stapelsignatur-Anfrage + + + + Resultat, falls die Signaturerstellung + erfolgreich war + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mit diesem Profil wird eine Menge von + vertrauenswürdigen Wurzelzertifikaten spezifiziert + + + + + + + + + + + + only ds:X509Data and RetrievalMethod is + supported; QualifiedCertificate is included as + X509Data/any;publicAuthority is included as X509Data/any + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pro dsig:Reference-Element in der zu + überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element + erscheinen. Die Reihenfolge der einzelnen ReferenceInfo + Elemente entspricht jener der dsig:Reference Elemente in der + XML-Signatur. + + + + + + + + + + mit diesem Profil wird eine Menge von + vertrauenswürdigen Wurzelzertifikaten spezifiziert + + + + + + + + + + + + only ds:X509Data and ds:RetrievalMethod is + supported; QualifiedCertificate is included as X509Data/any; + PublicAuthority is included as X509Data/any + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Auswahl: Entweder explizite Angabe EINER + Transformationskette inklusive ggf. sinnvoller Supplements oder + Verweis auf ein benanntes Profil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Resultat, falls die Signaturerstellung gescheitert + ist + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ein oder mehrere Transformationswege können von + der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur + hat zumindest einem dieser Transformationswege zu entsprechen. Die + Angabe kann explizit oder als Profilbezeichner erfolgen. + + + + + + Profilbezeichner für einen Transformationsweg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Die Angabe des Transformationsparameters + (explizit oder als Hashwert) kann unterlassen werden, wenn die + Applikation von der Unveränderlichkeit des Inhalts der in + "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen + kann. + + + + Der Transformationsparameter explizit angegeben. + + + + + + Der Hashwert des Transformationsparameters. + + + + + + + + + + + + + + + + + + + + + + + Explizite Angabe des Transformationswegs + + + + + + + + Alle impliziten Transformationsparameter, die + zum Durchlaufen der oben angeführten Transformationskette bekannt + sein müssen, müssen hier angeführt werden. Das Attribut "URI" + bezeichnet den Transformationsparameter in exakt jener Weise, wie + er in der zu überprüfenden Signatur gebraucht wird. + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd index 251ef3e1a..a318d2952 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd @@ -1,60 +1,87 @@ - + - + - + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd index d3f148356..a22c831cc 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd @@ -1,28 +1,52 @@ - - - - - - + + + + + + - - - - - - - + + + + + + + - - + + @@ -31,43 +55,49 @@ - + - - + + - Antwort auf Personenbindung-Request + Antwort auf Personenbindung-Request + - - + + - + - simple type for dates (union), which may omit day and/or month + simple type for dates (union), which may omit day + and/or month - + - Allgemeiner Typ fuer ErrorResponse + Allgemeiner Typ fuer ErrorResponse + - - + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szrgw.wsdl b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szrgw.wsdl index 2a240d922..7f5e4f16e 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szrgw.wsdl +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szrgw.wsdl @@ -1,37 +1,51 @@ - + - + - + - + - - + + - + - + - + - + - + diff --git a/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml b/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml index 7896cb399..e5b5b2594 100644 --- a/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml +++ b/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml @@ -1,139 +1,265 @@ -id('signed-data')/node()C0hW5jQojphweuFzPb+CNkHwhe4=id('refetsi')/etsi:QualifyingProperties/etsi:SignedPropertiesBdsc7wAfyMyZ21ChcF+tRh3D7sU=lCz3hDQMbqRMmCieG3fQFax3f8JX86gDi7mf4h03J7vlJjSOJQ4Wh/3Kd81ntKuh -qFphj2cEhQYX08e6SeaU+7H7qdRa+xFRDRGav8L5x5xCUQT2SV+2/hx0C7UuJt+p -tewtbqVAcNxgKPlBuIzyXGOrBdiinp1KftEQoVCpPCI=MIIFJTCCBA2gAwIBAgICGTcwDQYJKoZIhvcNAQEFBQAwgaExCzAJBgNVBAYTAkFU -MUgwRgYDVQQKEz9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGlt -IGVsZWt0ci4gRGF0ZW52ZXJrZWhyIEdtYkgxIzAhBgNVBAsTGmEtc2lnbi1URVNU -LVByZW1pdW0tRW5jLTAxMSMwIQYDVQQDExphLXNpZ24tVEVTVC1QcmVtaXVtLUVu -Yy0wMTAeFw0wMzAyMTAxMzIwNThaFw0wNjAyMTAxMzIwNThaMGoxCzAJBgNVBAYT -AkFUMRwwGgYDVQQDExNUZXN0cGVyc29uIE1PQTQgQlJaMQwwCgYDVQQEEwNCUlox -GDAWBgNVBCoTD1Rlc3RwZXJzb24gTU9BNDEVMBMGA1UEBRMMNzkwMTg3NDYxNjMz -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDS/UW1/tZeCh7HHQmj8auUTEc4 -edAgRDkUVKOm0tF3kE3WZlhGDZL0p84xsdIKyI+bwDCMATATkQwDo/Xxn9jJMi4/ -t80bNyRsHk9giA0wcvz9NgmEcDwKNqawGsR9gNeK8TyIC8AuDkj1EwtkAObMvtp/ -Z1phi47x3JxDDfGDpQIDAQABo4ICHzCCAhswEwYDVR0jBAwwCoAIS7OAw3GTPNgw -JwYIKwYBBQUHAQMBAf8EGDAWMAgGBgQAjkYBATAKBggrBgEFBQcLATCBggYIKwYB -BQUHAQEEdjB0MCkGCCsGAQUFBzABhh1odHRwOi8vd3d3LmEtdHJ1c3QuYXQ6ODIv -b2NzcDBHBggrBgEFBQcwAoY7aHR0cDovL3d3dy5hLXRydXN0LmF0L2NlcnRzL2Et -c2lnbi1URVNULVByZW1pdW0tU2lnLTAxYS5jcnQwgZQGA1UdIASBjDCBiTB9BgYq -KAARAQQwczA1BggrBgEFBQcCARYpaHR0cDovL3d3dy5hLXRydXN0LmF0L2RvY3Mv -Y3AvYS1zaWduLVRFU1QwOgYIKwYBBQUHAgIwLhosRGllc2VzIFplcnRpZmlrYXQg -ZGllbnQgbnVyIHp1IFRlc3R6d2Vja2VuICEwCAYGBACLMAEBMG8GA1UdHwRoMGYw -ZKBioGCGXmxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9YS1zaWduLVRFU1QtUHJl -bWl1bS1FbmMtMDEsbz1BLVRydXN0LGM9QVQ/Y2VydGlmaWNhdGVyZXZvY2F0aW9u -bGlzdD8wEQYDVR0OBAoECE4DxL9ky4M+MA4GA1UdDwEB/wQEAwIGwDAgBgNVHREE -GTAXgRV0ZXN0cGVyc29uNEBicnouZ3YuYXQwCQYDVR0TBAIwADANBgkqhkiG9w0B -AQUFAAOCAQEAioVvsZN+NnQxXMTGdjKveTBMRTYzHflkSC8lI9XXltP5+mjIuoB2 -Tn6voovA8dXz9jTsnQt8f8ye0CL2bSS9UVD1jv8So3bavquW+HlkZBAZvL39APNL -PjUUnWn0QOnrQAJ6W47UwGAUgEw3KcBcJaEa4Xb/8kUj618xGzWl6X0mKsVpxkrf -+5Cj+nmwDqChll08/90MmhSY4M5FrvmQ9GjAN5FHVsk0FPp02tKCRzoBJtzpB1DW -KHlgiDHUAXy5eD0XI7PXebPNZ4InvY/jC/IH8PRLdJT249YQmUxZ4neTtFDvb8C1 -Qh6k725fh3hVxqX8ZwwWj9+iGQVk53K3CA== - -Überprüfung des Namen des Anmelde-Servers - - -

Prüfung der Identität des MOA-ID Servers

+ + + + + + + + id('signed-data')/node() + + + + C0hW5jQojphweuFzPb+CNkHwhe4= + + + + + id('refetsi')/etsi:QualifyingProperties/etsi:SignedProperties + + + + Bdsc7wAfyMyZ21ChcF+tRh3D7sU= + + + lCz3hDQMbqRMmCieG3fQFax3f8JX86gDi7mf4h03J7vlJjSOJQ4Wh/3Kd81ntKuh + qFphj2cEhQYX08e6SeaU+7H7qdRa+xFRDRGav8L5x5xCUQT2SV+2/hx0C7UuJt+p + tewtbqVAcNxgKPlBuIzyXGOrBdiinp1KftEQoVCpPCI= + + + MIIFJTCCBA2gAwIBAgICGTcwDQYJKoZIhvcNAQEFBQAwgaExCzAJBgNVBAYTAkFU + MUgwRgYDVQQKEz9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGlt + IGVsZWt0ci4gRGF0ZW52ZXJrZWhyIEdtYkgxIzAhBgNVBAsTGmEtc2lnbi1URVNU + LVByZW1pdW0tRW5jLTAxMSMwIQYDVQQDExphLXNpZ24tVEVTVC1QcmVtaXVtLUVu + Yy0wMTAeFw0wMzAyMTAxMzIwNThaFw0wNjAyMTAxMzIwNThaMGoxCzAJBgNVBAYT + AkFUMRwwGgYDVQQDExNUZXN0cGVyc29uIE1PQTQgQlJaMQwwCgYDVQQEEwNCUlox + GDAWBgNVBCoTD1Rlc3RwZXJzb24gTU9BNDEVMBMGA1UEBRMMNzkwMTg3NDYxNjMz + MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDS/UW1/tZeCh7HHQmj8auUTEc4 + edAgRDkUVKOm0tF3kE3WZlhGDZL0p84xsdIKyI+bwDCMATATkQwDo/Xxn9jJMi4/ + t80bNyRsHk9giA0wcvz9NgmEcDwKNqawGsR9gNeK8TyIC8AuDkj1EwtkAObMvtp/ + Z1phi47x3JxDDfGDpQIDAQABo4ICHzCCAhswEwYDVR0jBAwwCoAIS7OAw3GTPNgw + JwYIKwYBBQUHAQMBAf8EGDAWMAgGBgQAjkYBATAKBggrBgEFBQcLATCBggYIKwYB + BQUHAQEEdjB0MCkGCCsGAQUFBzABhh1odHRwOi8vd3d3LmEtdHJ1c3QuYXQ6ODIv + b2NzcDBHBggrBgEFBQcwAoY7aHR0cDovL3d3dy5hLXRydXN0LmF0L2NlcnRzL2Et + c2lnbi1URVNULVByZW1pdW0tU2lnLTAxYS5jcnQwgZQGA1UdIASBjDCBiTB9BgYq + KAARAQQwczA1BggrBgEFBQcCARYpaHR0cDovL3d3dy5hLXRydXN0LmF0L2RvY3Mv + Y3AvYS1zaWduLVRFU1QwOgYIKwYBBQUHAgIwLhosRGllc2VzIFplcnRpZmlrYXQg + ZGllbnQgbnVyIHp1IFRlc3R6d2Vja2VuICEwCAYGBACLMAEBMG8GA1UdHwRoMGYw + ZKBioGCGXmxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9YS1zaWduLVRFU1QtUHJl + bWl1bS1FbmMtMDEsbz1BLVRydXN0LGM9QVQ/Y2VydGlmaWNhdGVyZXZvY2F0aW9u + bGlzdD8wEQYDVR0OBAoECE4DxL9ky4M+MA4GA1UdDwEB/wQEAwIGwDAgBgNVHREE + GTAXgRV0ZXN0cGVyc29uNEBicnouZ3YuYXQwCQYDVR0TBAIwADANBgkqhkiG9w0B + AQUFAAOCAQEAioVvsZN+NnQxXMTGdjKveTBMRTYzHflkSC8lI9XXltP5+mjIuoB2 + Tn6voovA8dXz9jTsnQt8f8ye0CL2bSS9UVD1jv8So3bavquW+HlkZBAZvL39APNL + PjUUnWn0QOnrQAJ6W47UwGAUgEw3KcBcJaEa4Xb/8kUj618xGzWl6X0mKsVpxkrf + +5Cj+nmwDqChll08/90MmhSY4M5FrvmQ9GjAN5FHVsk0FPp02tKCRzoBJtzpB1DW + KHlgiDHUAXy5eD0XI7PXebPNZ4InvY/jC/IH8PRLdJT249YQmUxZ4neTtFDvb8C1 + Qh6k725fh3hVxqX8ZwwWj9+iGQVk53K3CA== + + + + + + Überprüfung des Namen des Anmelde-Servers + + +

Prüfung der Identität des MOA-ID Servers

-Bevor Sie sich in den folgenden Schritten an eine Online-Applikation anmelden, -wird empfohlen den Namen des Anmelde-Servers zu überprüfen. -Zu diesem Zweck identifiziert Ihr Webbrowser den Anmelde-Server mit Hilfe eines Zertifikates. -Ihre Aufgabe ist es zu überprüfen, ob das Server-Zertifikat von einem Unternehmen ausgestellt -wurde, dem Sie vertrauen. -

-Die folgenden Absätze beschreiben, wie Sie diese Überprüfung durchführen können. -Führen Sie jene Arbeitsschritte durch, die für den von Ihnen verwendeten Webbrowser zutreffend sind. -

-

Microsoft Internet Explorer 6.0

+ Bevor Sie sich in den folgenden Schritten an eine Online-Applikation + anmelden, + wird empfohlen den Namen des Anmelde-Servers zu überprüfen. + Zu diesem Zweck identifiziert Ihr Webbrowser den Anmelde-Server mit + Hilfe eines Zertifikates. + Ihre Aufgabe ist es zu überprüfen, ob das Server-Zertifikat von einem + Unternehmen ausgestellt + wurde, dem Sie vertrauen. +

+ Die folgenden Absätze beschreiben, wie Sie diese Überprüfung + durchführen können. + Führen Sie jene Arbeitsschritte durch, die für den von Ihnen verwendeten + Webbrowser zutreffend sind. +

+

Microsoft Internet Explorer 6.0

-
    -
  1. Öffnen Sie (durch Doppel-Klicken) das Symbol mit dem gelben Vorhangschloß am unteren Rand des Browsers.
  2. -
  3. Selektieren Sie im nun geöffnetem Fenster "Zertifikat" den Karteireiter "Zertifizierungspfad".
  4. -
  5. Öffnen Sie (durch Doppel-Klicken) das an oberster Stelle gereihte Zertifikat.
  6. -
  7. Überprüfen Sie ob als Aussteller dieses Zertifikat (Karteireiter "Details", Eintrag "Aussteller") -ein Unternehmen aufscheint, dem Sie vertrauen den Namen des Anmelde-Servers zu überprüfen.
  8. -
  9. Überprüfen Sie, ob dieses Zertifikat authentisch vom angegebene Unternehmen stammt. Dazu können Sie den -Fingerabdruck (Karteireiter "Details", unterster Eintrag) des Zertifikats überprüfen. Am Ende dieses Dokuments ist -eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und deren Fingerabdruck aufgelistet. -Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat -in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in der Liste übereinstimmt. -
      -
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und stimmt der Wert des Fingerabdrucks mit dem Wert -in der Liste überein, dann ist das Zertifikat authentisch und der Anmeldevorgang kann fortgesetzt werden.
    • -
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber stimmt der Wert des Fingerabdrucks nicht mit dem Wert -in der Liste überein, dann ist das Zertifikat nicht authentisch und der Anmeldevorgang muss abgebrochen werden.
    • -
    • Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten müssen Sie eine andere verlässliche Quelle für den -Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch ist, kann der Anmeldevorgang fortgesetzt werden.
    • -
  10. -
  11. Ist das in Schritt 3. geöffnete Zertifikat nicht im Internet Explorer installiert erscheint das Zertifikat mit -einem roten Kreuz. Sie können das Zertifikat installieren, indem Sie die Schaltfläche "Zertifikat installieren ..." -(Karteireiter "Allgemein") aktivieren. In der Folge werden alle von dieser Zertifizierungsstelle ausgestellten Zertifikate -vom Internet Explorer als vertrauenswürdig erkannt.
  12. -
-

Netscape Navigator 7.0

-
    -
  1. Öffnen Sie (durch Klicken) das Symbol mit dem Vorhangschloss am rechten, unteren Rand des Browsers
  2. -
  3. Aktivieren Sie die Schaltfläche "Anzeigen"
  4. -
  5. Selektieren Sie im nun geöffnetem Fenster "Zertifikatsanzeige" den Karteireiter "Detail".
  6. -
  7. Aktivieren Sie (durch Klicken) das an oberster Stelle gereihte Zertifikat.
  8. -
  9. Überprüfen Sie ob als Aussteller dieses Zertifikat (Eintrag "Aussteller") -ein Unternehmen aufscheint, dem Sie vertrauen den Namen des Anmelde-Servers zu überprüfen.
  10. -
  11. Überprüfen Sie, ob dieses Zertifikat authentisch vom angegebene Unternehmen stammt. Dazu können Sie den -Fingerabdruck des Zertifikats überprüfen. Am Ende dieses Dokuments ist -eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und deren Fingerabdruck aufgelistet. -Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat -in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in der Liste übereinstimmt. -
      -
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und stimmt der Wert des Fingerabdrucks mit dem Wert -in der Liste überein, dann ist das Zertifikat authentisch und der Anmeldevorgang kann fortgesetzt werden.
    • -
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber stimmt der Wert des Fingerabdrucks nicht mit dem Wert -in der Liste überein, dann ist das Zertifikat nicht authentisch und der Anmeldevorgang muss abgebrochen werden.
    • -
    • Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten müssen Sie eine andere verlässliche Quelle für den -Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch ist, kann der Anmeldevorgang fortgesetzt werden.
    • -
  12. -
  13. Ist das Aussteller-Zertifikat nicht im Netscape Navigator installiert können Sie das Zertifikat installieren, -indem Sie die "*.cer" Datei mit Netscape Navigator öffnen. In der Folge werden alle von dieser Zertifizierungsstelle -ausgestellten Zertifikate vom Internet Explorer als vertrauenswürdig erkannt.
  14. -
+
    +
  1. Öffnen Sie (durch Doppel-Klicken) das Symbol mit dem gelben + Vorhangschloß am unteren Rand des Browsers.
  2. +
  3. Selektieren Sie im nun geöffnetem Fenster + "Zertifikat" den Karteireiter + "Zertifizierungspfad".
  4. +
  5. Öffnen Sie (durch Doppel-Klicken) das an oberster Stelle + gereihte Zertifikat.
  6. +
  7. Überprüfen Sie ob als Aussteller dieses Zertifikat + (Karteireiter "Details", Eintrag "Aussteller") + ein Unternehmen aufscheint, dem Sie vertrauen den Namen des + Anmelde-Servers zu überprüfen.
  8. +
  9. Überprüfen + Sie, ob dieses Zertifikat authentisch vom angegebene Unternehmen + stammt. Dazu können Sie den + Fingerabdruck (Karteireiter "Details", unterster Eintrag) des + Zertifikats überprüfen. Am Ende dieses Dokuments ist + eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und + deren Fingerabdruck aufgelistet. + Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat + in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in + der Liste übereinstimmt. +
      +
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und + stimmt der Wert des Fingerabdrucks mit dem Wert + in der Liste überein, dann ist das Zertifikat authentisch und der + Anmeldevorgang kann fortgesetzt werden.
    • +
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber + stimmt der Wert des Fingerabdrucks nicht mit dem Wert + in der Liste überein, dann ist das Zertifikat nicht authentisch + und der Anmeldevorgang muss abgebrochen werden.
    • +
    • Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten + müssen Sie eine andere verlässliche Quelle für den + Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch + ist, kann der Anmeldevorgang fortgesetzt werden.
    • +
    +
  10. +
  11. Ist das in Schritt 3. geöffnete Zertifikat nicht im Internet + Explorer installiert erscheint das Zertifikat mit + einem roten Kreuz. Sie können das Zertifikat installieren, indem Sie + die Schaltfläche "Zertifikat installieren ..." + (Karteireiter "Allgemein") aktivieren. In der Folge + werden alle von dieser Zertifizierungsstelle ausgestellten + Zertifikate + vom Internet Explorer als vertrauenswürdig erkannt.
  12. +
+

Netscape Navigator 7.0

+
    +
  1. Öffnen Sie (durch Klicken) das Symbol mit dem Vorhangschloss am + rechten, unteren Rand des Browsers
  2. +
  3. Aktivieren Sie die Schaltfläche "Anzeigen"
  4. +
  5. Selektieren Sie im nun geöffnetem Fenster + "Zertifikatsanzeige" den Karteireiter + "Detail".
  6. +
  7. Aktivieren Sie (durch Klicken) das an oberster Stelle gereihte + Zertifikat.
  8. +
  9. Überprüfen Sie ob als Aussteller dieses Zertifikat (Eintrag + "Aussteller") + ein Unternehmen aufscheint, dem Sie vertrauen den Namen des + Anmelde-Servers zu überprüfen.
  10. +
  11. + Überprüfen Sie, ob dieses Zertifikat authentisch vom angegebene + Unternehmen stammt. Dazu können Sie den + Fingerabdruck des Zertifikats überprüfen. Am Ende dieses Dokuments ist + eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und + deren Fingerabdruck aufgelistet. + Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat + in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in + der Liste übereinstimmt. +
      +
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und + stimmt der Wert des Fingerabdrucks mit dem Wert + in der Liste überein, dann ist das Zertifikat authentisch und der + Anmeldevorgang kann fortgesetzt werden.
    • +
    • Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber + stimmt der Wert des Fingerabdrucks nicht mit dem Wert + in der Liste überein, dann ist das Zertifikat nicht authentisch + und der Anmeldevorgang muss abgebrochen werden.
    • +
    • Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten + müssen Sie eine andere verlässliche Quelle für den + Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch + ist, kann der Anmeldevorgang fortgesetzt werden.
    • +
    +
  12. +
  13. Ist das Aussteller-Zertifikat nicht im Netscape Navigator + installiert können Sie das Zertifikat installieren, + indem Sie die "*.cer" Datei mit Netscape Navigator öffnen. In + der Folge werden alle von dieser Zertifizierungsstelle + ausgestellten Zertifikate vom Internet Explorer als + vertrauenswürdig erkannt.
  14. +
-

Zertifikate und ihr Fingerabdruck

+

Zertifikate und ihr Fingerabdruck

- - - - - - - - - - -
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer111 (0x6f)
FingerabdruckSHA-1: e6 e6 fc 88 71 91 77 c9 b7 42 18 25 75 7c 5e 47 bc ac 85 f6
+ + + + + + + + + + + + + +
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer111 (0x6f)
FingerabdruckSHA-1: e6 e6 fc 88 71 91 77 c9 b7 42 18 25 75 7c 5e 47 bc ac + 85 f6
-

- - - - - - - - - - -
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer531 (0x213)
FingerabdruckSHA-1: 9e 05 12 dd 61 da 59 49 d1 d8 63 1c 3f 19 d7 5f 49 6c 37 33
+

+ + + + + + + + + + + + + +
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer531 (0x213)
FingerabdruckSHA-1: 9e 05 12 dd 61 da 59 49 d1 d8 63 1c 3f 19 d7 5f 49 6c + 37 33
-

- - - - - - - - - - -
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer536 (0x0218)
FingerabdruckSHA-1: 0f 5a 03 42 f5 cd 44 87 99 c3 c6 d1 78 60 7e 3f 2b 5b cb 8f
+

+ + + + + + + + + + + + + +
AusstellerCN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT
Seriennummer536 (0x0218)
FingerabdruckSHA-1: 0f 5a 03 42 f5 cd 44 87 99 c3 c6 d1 78 60 7e 3f 2b 5b + cb 8f
- -2003-05-06T07:09:50ZFrhu1o4mL4gQHdJcU0xSA/h4COE=CN=a-sign-TEST-Premium-Enc-01,OU=a-sign-TEST-Premium-Enc-01,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT6455text/html \ No newline at end of file + + + + + + + + 2003-05-06T07:09:50Z + + + + + Frhu1o4mL4gQHdJcU0xSA/h4COE= + + + CN=a-sign-TEST-Premium-Enc-01,OU=a-sign-TEST-Premium-Enc-01,O=A-Trust + Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT + 6455 + + + + + + + + + + text/html + + + + + + \ No newline at end of file diff --git a/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java b/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java index f2f06cbf0..e28b154f4 100644 --- a/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java +++ b/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java index f875ea809..70b176027 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java index 2d00458e5..a9ed7d6de 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java index 9d07b6620..8b1745302 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java index 666f16f98..f3e2b7864 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java index eb1e85cb9..fc099ef62 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -326,4 +348,4 @@ // return conn; // } // -//} \ No newline at end of file +//} diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java index c973473a6..1dd11115e 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java index 120e6dc44..1db8b722c 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java b/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java index 7caa6dd8c..1986aeddb 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -187,4 +209,4 @@ // result = killInclusive(result,"AssertionID='", "'",""); // return result; // } -//} \ No newline at end of file +//} diff --git a/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java b/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java index 35dea51a4..3040361b9 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java b/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java index 723c1526d..97c4027c6 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java b/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java index 70b47c938..3b7569277 100644 --- a/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java +++ b/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java index 98337de6b..5d98e8e34 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java index db4500ddb..a645aa5a2 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -56,4 +78,4 @@ public class UnitTestCase extends MOAIDTestCase { TESTDATA_ROOT + "conf/ConfigurationTest.xml"); } -} \ No newline at end of file +} diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java index c54c31edb..308d94048 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java index ab1991b9e..1cd54d61b 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java index 166ea1544..d0d104d69 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java index b5623bb00..4c2b3ec8a 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java index 5b3769c4b..c133602b1 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java index 33139a2d6..7b364789b 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java index 07bed3492..ec15a209c 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java index 9acce6b38..b26fd4738 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java index 004e56061..ebdec6d22 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java index 7a6f69877..0aa1ffab9 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java index e4dd1c42f..e79fa6aa4 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java index 9cf92f8a5..14bb1e4cc 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -117,7 +139,7 @@ System.setProperty( } public void testVerifyXMLSignature2() throws Exception { - // Prüft den 2. Aufruf mit dem CreateXMLSIgnatureResponse als Parameter + // Pr�ft den 2. Aufruf mit dem CreateXMLSIgnatureResponse als Parameter //Momentan zeigt die Konfiguration als Endpunkt aus localhost:8081 zum //Protokollieren per TCPMon... der ECHT Endpunkt ist 10.16.46.108:8080 RandomAccessFile s = @@ -152,7 +174,7 @@ System.setProperty( public void testParseCreateXMLSignatureResponse() throws Exception { - //Später soll die Datei direkt vom Server geholt werden... + //Sp�ter soll die Datei direkt vom Server geholt werden... RandomAccessFile s = new RandomAccessFile( @@ -170,7 +192,7 @@ System.setProperty( public void testParseVerifyXMLSignatureResponse() throws Exception { - //Später soll die Datei direkt vom Server geholt werden... + //Sp�ter soll die Datei direkt vom Server geholt werden... RandomAccessFile s = new RandomAccessFile( diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/CertTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/CertTest.java index d9d61ee1d..6cf1e8280 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/CertTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/CertTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package test.at.gv.egovernment.moa.id.auth.oauth; import iaik.security.ecc.provider.ECCProvider; diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java index 9aede62e3..113a033a6 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package test.at.gv.egovernment.moa.id.auth.oauth; import java.io.IOException; diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20GoogleClientTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20GoogleClientTestCase.java index b2c17f062..53c7ad496 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20GoogleClientTestCase.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20GoogleClientTestCase.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package test.at.gv.egovernment.moa.id.auth.oauth; import java.awt.Desktop; diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20UtilTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20UtilTest.java index 83b92dbad..8e18adc08 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20UtilTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20UtilTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package test.at.gv.egovernment.moa.id.auth.oauth; import java.util.regex.Matcher; diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java index 5d82e00a9..d293ff347 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java index 6fb533ff0..977764878 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -78,7 +100,7 @@ public class IdentityLinkAssertionParserTest extends UnitTestCase { // // VerifyXMLSignatureRequestBuilder vx = new VerifyXMLSignatureRequestBuilder(); // -// // Element zurück bekommen: vx.build(idl.getSamlAssertion()); +// // Element zur�ck bekommen: vx.build(idl.getSamlAssertion()); // // IdentityLinkValidator idVali = IdentityLinkValidator.getInstance(); // idVali.validate(idl); @@ -104,7 +126,7 @@ public class IdentityLinkAssertionParserTest extends UnitTestCase { // // VerifyXMLSignatureRequestBuilder vx = new VerifyXMLSignatureRequestBuilder(); // -// // Element zurück bekommen: vx.build(idl.getSamlAssertion()); +// // Element zur�ck bekommen: vx.build(idl.getSamlAssertion()); // // IdentityLinkValidator idVali = IdentityLinkValidator.getInstance(); // idVali.validate(idl); diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java index da5e066c6..8d7dee597 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java index d34678f0c..961c8d0b5 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java index f08f5d20f..a51047d3f 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java index 780cf55f2..224ffc926 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java index 412e35233..ecf88babb 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java index 76b0c936a..8386fc52f 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java index 428477ce4..d2af95855 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -116,7 +138,7 @@ public class DOMTreeCompare { equal = compareNodeAttriubtes(n1,n2,level+1,path+getPathString(n1)+"/(a)"); if(!equal) { - Log.println("----- Attribute stimmen nicht überein:"+path+getPathString(n1)); + Log.println("----- Attribute stimmen nicht �berein:"+path+getPathString(n1)); return false; } } @@ -155,7 +177,7 @@ public class DOMTreeCompare { if(!equal) { - Log.println("----- Keine Übereinstimmung gefunden:"+path+getPathString(comp_n1)); + Log.println("----- Keine �bereinstimmung gefunden:"+path+getPathString(comp_n1)); return false; } } @@ -186,14 +208,14 @@ public class DOMTreeCompare { if(!((n1_name==null && n2_name==null) || (n1_name!=null && n2_name!=null && n1_name.equals(n2_name)))) { - Log.println("----- Name stimmt nicht überein:"+path); + Log.println("----- Name stimmt nicht �berein:"+path); return false; } //Log.println("----- Compare Node "+level+":"+n1.getNodeType()+" "+n2.getNodeType()); if(n1.getNodeType() != n2.getNodeType()) { - Log.println("----- Knotentyp stimmt nicht überein:"+path); + Log.println("----- Knotentyp stimmt nicht �berein:"+path); return false; } @@ -203,7 +225,7 @@ public class DOMTreeCompare { if(!((n1_ns==null && n2_ns==null) || (n1_ns!=null && n2_ns!=null && n1_ns.equals(n2_ns)))) { - Log.println("----- NameSpace stimmt nicht überein:"+path); + Log.println("----- NameSpace stimmt nicht �berein:"+path); return false; } @@ -218,7 +240,7 @@ public class DOMTreeCompare { if(!((n1_value==null && n2_value==null) || (n1_value!=null && n2_value!=null && n1_value.equals(n2_value)))) { - Log.println("----- Wert stimmt nicht überein:"+path); + Log.println("----- Wert stimmt nicht �berein:"+path); Log.println("----- Value1:\n"+n1_value); Log.println("----- Value2:\n"+n2_value); return false; @@ -292,7 +314,7 @@ public class DOMTreeCompare { if(!value1.equals(value2)) { - Log.println("----- Keine Übereinstimmung gefunden:"+path+getPathString(n1)); + Log.println("----- Keine �bereinstimmung gefunden:"+path+getPathString(n1)); return false; } } diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java index 467c6520e..2e676a00b 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java index f338b7c89..e595ca86c 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java index 24a9aa3c2..e5bde81fd 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -65,7 +87,7 @@ public class SAMLResponseParserTest extends UnitTestCase { "" + "http://localhost:8080/moa-id-auth/" + "" + - "" + + "" + "gb" + "" + "" + diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java index db6a0ac63..a85200400 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ ///* // * Copyright 2003 Federal Chancellery Austria // * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java b/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java index 2b0e5991c..2111d9811 100644 --- a/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java +++ b/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java b/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java index 82dcf2b41..7dd68a949 100644 --- a/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java +++ b/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java index 29af24ff7..4a89f031e 100644 --- a/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java +++ b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal @@ -53,7 +75,7 @@ import com.sun.net.ssl.HttpsURLConnection; * Aufruf: Requestdatei (==null), ServerURL, Anzahl der Requests pro Sekunde, Anzahl der Wiederholungen * z.b. "data/CX0/TestGeneratorCX0.001.Req.xml" "http://127.0.0.1:8080/" 5 100 * - * ==> GEÄNDERT: ersten 2 Parameter gekillt... nur noch 5 100 + * ==> GE�NDERT: ersten 2 Parameter gekillt... nur noch 5 100 */ public class LasttestClient { @@ -199,7 +221,7 @@ public class LasttestClient { int turns = 0; if (args.length != 3) { - System.out.println("Parameteranzahl falsch. Bitte verwenden Sie die Syntax "); + System.out.println("Parameteranzahl falsch. Bitte verwenden Sie die Syntax "); return; } @@ -221,12 +243,12 @@ public class LasttestClient { System.out.println("ServerURL: " + MOA_AUTH_SERVER); double reqPerSek = sek*1000; System.out.println("Requests pro Sekunde: " + reqPerSek/time); - System.out.println("Durchläufe: " + (turns == 0 ? "INF" : turns + "")); + System.out.println("Durchl�ufe: " + (turns == 0 ? "INF" : turns + "")); Log.println("Starte Lastest mit folgenden Parametern ..."); Log.println("ServerURL: " + MOA_AUTH_SERVER); Log.println("Requests pro Sekunde: " + reqPerSek / time); - Log.println("Durchläufe: " + (turns == 0 ? "INF" : turns + "")); + Log.println("Durchl�ufe: " + (turns == 0 ? "INF" : turns + "")); try { diff --git a/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java b/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java index e3f4b879d..9ad9890a0 100644 --- a/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java +++ b/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ /* * Copyright 2003 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal diff --git a/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java b/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java index 50854e3e5..ec908f78b 100644 --- a/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java +++ b/id/server/idserverlib/src/test/java/test/tlenz/simpletest.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ //package test.tlenz; // //import java.io.File; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java index 7f40b1875..e4e4ce98a 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db; import java.util.HashMap; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java index a177ea938..6bd987f96 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db; import java.util.Properties; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java index 2d7d21989..0065f2242 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/MOASessionDBUtils.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db; import java.util.Properties; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java index 537f1ca79..fac653eb2 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/StatisticLogDBUtils.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db; import java.util.Properties; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java index 50c156c4e..4c07d44fd 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java index 97cc20d9f..64f543973 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java index c439cdb64..7efb18a77 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java index 2d3fdb665..6d1b64262 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java index 3ec2babad..7961e1d0e 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.session; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java index b725544f8..65c9003e3 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.dao.statistic; import java.io.Serializable; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java index 169d31aac..46484879d 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ex/MOADatabaseException.java @@ -1,3 +1,25 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.commons.db.ex; public class MOADatabaseException extends Exception { -- cgit v1.2.3 From 648510a0769be3ebc4dc3d2e454172d230d3f217 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 29 Jan 2014 16:23:20 +0100 Subject: update SZR-GW Client xsd schema --- .../main/resources/resources/wsdl/szrgw/stork.xsd | 88 ---------------------- .../resources/wsdl/szrgw/szr-gw-0.0.3.xsd | 85 +++++++-------------- 2 files changed, 28 insertions(+), 145 deletions(-) delete mode 100644 id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd deleted file mode 100644 index a318d2952..000000000 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/stork.xsd +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd index a22c831cc..b8895b4d3 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd @@ -1,52 +1,29 @@ - - - - - - + + + + + - - - - - - - + + + + + + + + + - - + + @@ -55,49 +32,43 @@ - + - - + + - Antwort auf Personenbindung-Request - + Antwort auf Personenbindung-Request - - + + - + - simple type for dates (union), which may omit day - and/or month + simple type for dates (union), which may omit day and/or month - + - Allgemeiner Typ fuer ErrorResponse - + Allgemeiner Typ fuer ErrorResponse - - + + -- cgit v1.2.3 From 109aef31e7722cb8e18a920314ad342367bc8483 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 30 Jan 2014 11:56:54 +0100 Subject: -- set MOA-ID Version to 1.9.98-Snapshot -- update SZRGWClient -- insert MOA-ID-lib version in PVP2 metadata --- id/server/auth/pom.xml | 10 ++- id/server/idserverlib/pom.xml | 3 +- .../moa/id/iaik/config/PKIConfigurationImpl.java | 8 +++ .../moa/id/protocols/pvp2x/MetadataAction.java | 13 ++-- .../protocols/pvp2x/config/PVPConfiguration.java | 58 +++++++++++++++- .../moa/id/util/AxisSecureSocketFactory.java | 4 +- .../java/at/gv/util/wsdl/szrgw/SZRGWService.java | 22 ------ .../main/java/at/gv/util/wsdl/szrgw/SZRGWType.java | 22 ------ .../at/gv/util/xsd/mis/MandateIdentifiers.java | 22 ------ .../gv/util/xsd/mis/MandateIssueRequestType.java | 22 ------ .../gv/util/xsd/mis/MandateIssueResponseType.java | 22 ------ .../java/at/gv/util/xsd/mis/ObjectFactory.java | 22 ------ .../src/main/java/at/gv/util/xsd/mis/Target.java | 22 ------ .../main/java/at/gv/util/xsd/mis/package-info.java | 22 ------ .../util/xsd/persondata/AbstractAddressType.java | 22 ------ .../gv/util/xsd/persondata/AbstractPersonType.java | 30 ++------ .../AbstractSimpleIdentificationType.java | 22 ------ .../at/gv/util/xsd/persondata/AlternativeName.java | 22 ------ .../gv/util/xsd/persondata/BankConnectionType.java | 22 ------ .../xsd/persondata/CompactCorporateBodyType.java | 24 +------ .../gv/util/xsd/persondata/CompactPersonData.java | 22 ------ .../util/xsd/persondata/CompactPersonDataType.java | 38 +++------- .../util/xsd/persondata/CompactPersonNameType.java | 22 ------ .../xsd/persondata/CompactPhysicalPersonType.java | 24 +------ .../xsd/persondata/CompactPostalAddressType.java | 22 ------ .../gv/util/xsd/persondata/CorporateBodyType.java | 24 +------ .../persondata/DefinedAlternativeNameTypeType.java | 22 ------ .../util/xsd/persondata/DefinedRelationType.java | 22 ------ .../java/at/gv/util/xsd/persondata/ERJPZahl.java | 22 ------ .../gv/util/xsd/persondata/FederalStateType.java | 22 ------ .../gv/util/xsd/persondata/Firmenbuchnummer.java | 22 ------ .../gv/util/xsd/persondata/IdentificationType.java | 24 +------ .../util/xsd/persondata/InternetAddressType.java | 24 +------ .../gv/util/xsd/persondata/MaritalStatusType.java | 22 ------ .../xsd/persondata/MobileTelcomNumberType.java | 22 ------ .../at/gv/util/xsd/persondata/NationalityType.java | 28 +------- .../at/gv/util/xsd/persondata/ObjectFactory.java | 22 ------ .../at/gv/util/xsd/persondata/PersonDataType.java | 38 +++------- .../at/gv/util/xsd/persondata/PersonNameType.java | 22 ------ .../gv/util/xsd/persondata/PhysicalPersonType.java | 24 +------ .../gv/util/xsd/persondata/PostalAddressType.java | 22 ------ .../at/gv/util/xsd/persondata/RelatedPerson.java | 22 ------ .../java/at/gv/util/xsd/persondata/SexType.java | 22 ------ .../gv/util/xsd/persondata/TelcomNumberType.java | 22 ------ .../util/xsd/persondata/TelephoneAddressType.java | 24 +------ .../xsd/persondata/TypedPostalAddressType.java | 24 +------ .../at/gv/util/xsd/persondata/Vereinsnummer.java | 22 ------ .../java/at/gv/util/xsd/persondata/ZMRzahl.java | 22 ------ .../at/gv/util/xsd/persondata/package-info.java | 22 ------ .../at/gv/util/xsd/saml/assertion/ActionType.java | 22 ------ .../at/gv/util/xsd/saml/assertion/AdviceType.java | 24 +------ .../gv/util/xsd/saml/assertion/AssertionType.java | 22 ------ .../saml/assertion/AttributeDesignatorType.java | 22 ------ .../xsd/saml/assertion/AttributeStatementType.java | 22 ------ .../gv/util/xsd/saml/assertion/AttributeType.java | 22 ------ .../AudienceRestrictionConditionType.java | 22 ------ .../assertion/AuthenticationStatementType.java | 22 ------ .../xsd/saml/assertion/AuthorityBindingType.java | 22 ------ .../AuthorizationDecisionStatementType.java | 22 ------ .../xsd/saml/assertion/ConditionAbstractType.java | 22 ------ .../gv/util/xsd/saml/assertion/ConditionsType.java | 22 ------ .../gv/util/xsd/saml/assertion/DecisionType.java | 22 ------ .../gv/util/xsd/saml/assertion/EvidenceType.java | 22 ------ .../xsd/saml/assertion/NameIdentifierType.java | 22 ------ .../gv/util/xsd/saml/assertion/ObjectFactory.java | 22 ------ .../xsd/saml/assertion/StatementAbstractType.java | 22 ------ .../saml/assertion/SubjectConfirmationType.java | 22 ------ .../xsd/saml/assertion/SubjectLocalityType.java | 22 ------ .../assertion/SubjectStatementAbstractType.java | 22 ------ .../at/gv/util/xsd/saml/assertion/SubjectType.java | 26 +------ .../gv/util/xsd/saml/assertion/package-info.java | 22 ------ .../util/xsd/srzgw/CreateIdentityLinkRequest.java | 80 ++++++++++++++++------ .../util/xsd/srzgw/CreateIdentityLinkResponse.java | 22 ------ .../at/gv/util/xsd/srzgw/ErrorResponseType.java | 22 ------ .../main/java/at/gv/util/xsd/srzgw/MISType.java | 22 ------ .../java/at/gv/util/xsd/srzgw/ObjectFactory.java | 22 ------ .../java/at/gv/util/xsd/srzgw/package-info.java | 22 ------ .../xsd/xmldsig/CanonicalizationMethodType.java | 22 ------ .../at/gv/util/xsd/xmldsig/DSAKeyValueType.java | 22 ------ .../at/gv/util/xsd/xmldsig/DigestMethodType.java | 24 +------ .../java/at/gv/util/xsd/xmldsig/KeyInfoType.java | 40 +++-------- .../java/at/gv/util/xsd/xmldsig/KeyValueType.java | 24 +------ .../java/at/gv/util/xsd/xmldsig/ManifestType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/ObjectFactory.java | 48 ++++--------- .../java/at/gv/util/xsd/xmldsig/ObjectType.java | 24 +------ .../java/at/gv/util/xsd/xmldsig/PGPDataType.java | 24 +------ .../at/gv/util/xsd/xmldsig/RSAKeyValueType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/ReferenceType.java | 22 ------ .../gv/util/xsd/xmldsig/RetrievalMethodType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/SPKIDataType.java | 24 +------ .../gv/util/xsd/xmldsig/SignatureMethodType.java | 24 +------ .../util/xsd/xmldsig/SignaturePropertiesType.java | 22 ------ .../gv/util/xsd/xmldsig/SignaturePropertyType.java | 24 +------ .../java/at/gv/util/xsd/xmldsig/SignatureType.java | 22 ------ .../at/gv/util/xsd/xmldsig/SignatureValueType.java | 22 ------ .../at/gv/util/xsd/xmldsig/SignedInfoType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/TransformType.java | 22 ------ .../at/gv/util/xsd/xmldsig/TransformsType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/X509DataType.java | 32 ++------- .../gv/util/xsd/xmldsig/X509IssuerSerialType.java | 22 ------ .../java/at/gv/util/xsd/xmldsig/package-info.java | 22 ------ .../resources/wsdl/szrgw/szr-gw-0.0.3.xsd | 2 + id/server/moa-id-commons/pom.xml | 2 +- id/server/pom.xml | 2 +- id/server/proxy/pom.xml | 10 ++- 105 files changed, 223 insertions(+), 2173 deletions(-) (limited to 'id/server') diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml index 3423deb79..93009173d 100644 --- a/id/server/auth/pom.xml +++ b/id/server/auth/pom.xml @@ -2,7 +2,7 @@ MOA.id moa-id - 1.9.96-SNAPSHOT + 1.9.98-SNAPSHOT 4.0.0 @@ -15,6 +15,14 @@ ${basedir}/../../../repository + + + shibboleth.internet2.edu + Internet2 + https://build.shibboleth.net/nexus/content/groups/public/ + + + diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 059189b45..9b2711249 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -3,7 +3,7 @@ MOA.id moa-id - 1.9.96-SNAPSHOT + 1.9.98-SNAPSHOT 4.0.0 @@ -53,7 +53,6 @@ axis axis - 1.1 diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java index 646c27fe8..064d8a835 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java @@ -109,4 +109,12 @@ public class PKIConfigurationImpl implements PKIConfiguration { return validationConfiguration; } +/* (non-Javadoc) + * @see iaik.pki.PKIConfiguration#getTimeout() + */ + public int getTimeout() { + // TODO Auto-generated method stub + return 0; +} + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java index 3d4360640..151529ad5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java @@ -49,12 +49,9 @@ import org.opensaml.xml.io.Marshaller; import org.opensaml.xml.security.credential.Credential; import org.opensaml.xml.security.credential.UsageType; import org.opensaml.xml.security.keyinfo.KeyInfoGenerator; -import org.opensaml.xml.security.keyinfo.KeyInfoHelper; import org.opensaml.xml.security.x509.X509KeyInfoGeneratorFactory; -import org.opensaml.xml.signature.KeyInfo; import org.opensaml.xml.signature.Signature; import org.opensaml.xml.signature.Signer; -import org.opensaml.xml.signature.impl.KeyInfoBuilder; import org.w3c.dom.Document; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; @@ -69,19 +66,23 @@ import at.gv.egovernment.moa.logging.Logger; public class MetadataAction implements IAction { + private static final int VALIDUNTIL_IN_DAYES = 30; + public String processRequest(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp, AuthenticationSession moasession) throws MOAIDException { try { EntitiesDescriptor idpEntitiesDescriptor = SAML2Utils.createSAMLObject(EntitiesDescriptor.class); - + idpEntitiesDescriptor.setName(PVPConfiguration.getInstance().getIDPIssuerName()); idpEntitiesDescriptor.setID(SAML2Utils.getSecureIdentifier()); - idpEntitiesDescriptor.setValidUntil(new DateTime().plusWeeks(4)); + DateTime date = new DateTime(); + idpEntitiesDescriptor.setValidUntil(date.plusDays(VALIDUNTIL_IN_DAYES)); + EntityDescriptor idpEntityDescriptor = SAML2Utils .createSAMLObject(EntityDescriptor.class); @@ -90,6 +91,8 @@ public class MetadataAction implements IAction { idpEntityDescriptor .setEntityID(PVPConfiguration.getInstance().getIDPPublicPath()); + idpEntityDescriptor.setValidUntil(date.plusDays(VALIDUNTIL_IN_DAYES)); + List persons = PVPConfiguration.getInstance() .getIDPContacts(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java index f6832c161..769e36fc1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/PVPConfiguration.java @@ -25,10 +25,15 @@ package at.gv.egovernment.moa.id.protocols.pvp2x.config; import iaik.x509.X509Certificate; import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; import java.security.cert.CertificateException; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.jar.Attributes; +import java.util.jar.Manifest; import org.opensaml.saml2.metadata.Company; import org.opensaml.saml2.metadata.ContactPerson; @@ -51,6 +56,7 @@ import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; public class PVPConfiguration { @@ -103,6 +109,8 @@ public class PVPConfiguration { public static final String IDP_CONTACT_COMPANY = "company"; public static final String IDP_CONTACT_PHONE = "phone"; + private static String moaIDVersion = null; + PVP2 generalpvpconfigdb; Properties props; @@ -164,7 +172,12 @@ public class PVPConfiguration { } public String getIDPIssuerName() { - return generalpvpconfigdb.getIssuerName(); + + if (moaIDVersion == null) { + moaIDVersion = parseMOAIDVersionFromManifest(); + } + + return generalpvpconfigdb.getIssuerName() + moaIDVersion; } public List getMetadataFiles() { @@ -364,7 +377,48 @@ public class PVPConfiguration { .createSAMLObject(OrganizationURL.class); url.setURL(new LocalizedString(org_url, "de")); org.getURLs().add(url); - + return org; } + + private String parseMOAIDVersionFromManifest() { + + try { + Class clazz = PVPConfiguration.class; + String className = clazz.getSimpleName() + ".class"; + String classPath = clazz.getResource(className).toString(); + + if (!classPath.startsWith("jar")) { + Logger.info("MOA-ID Version can NOT parsed from Manifest. Set blank Version"); + return new String(); + + } + + String manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + 1) + + "/META-INF/MANIFEST.MF"; + + Manifest manifest = new Manifest(new URL(manifestPath).openStream());; + + Attributes attributes = manifest.getMainAttributes(); + String version = attributes.getValue("Implementation-Version"); + + + + if (MiscUtil.isNotEmpty(version)) + return new String(" (Version: " + version + ")"); + + else { + Logger.info("MOA-ID Version not found in Manifest. Set blank Version"); + return new String(); + + } + + } catch (Throwable e) { + Logger.info("MOA-ID Version can NOT parsed from Manifest. Set blank Version"); + + return new String(); + } + + + } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java index 046d0f825..fff5fac96 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java @@ -61,7 +61,7 @@ import javax.net.ssl.SSLSocketFactory; import org.apache.axis.components.net.BooleanHolder; import org.apache.axis.components.net.DefaultSocketFactory; -import org.apache.axis.components.net.SecureSocketFactory; +import org.apache.axis.components.net.SocketFactory; import org.apache.axis.components.net.TransportClientProperties; import org.apache.axis.components.net.TransportClientPropertiesFactory; import org.apache.axis.utils.Messages; @@ -87,7 +87,7 @@ import at.gv.egovernment.moa.logging.Logger; * @version $Id$ */ public class AxisSecureSocketFactory - extends DefaultSocketFactory implements SecureSocketFactory { + extends DefaultSocketFactory implements SocketFactory { /** Field sslFactory */ private static SSLSocketFactory sslFactory; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java index 7bedaf391..77969010f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.wsdl.szrgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java index 88031adbe..01ca437c9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.wsdl.szrgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIdentifiers.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIdentifiers.java index 68c0acf1c..7aa6dcdf2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIdentifiers.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIdentifiers.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueRequestType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueRequestType.java index 765f1304f..0c67da5ee 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueRequestType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueRequestType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueResponseType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueResponseType.java index 8614af154..7e55becac 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueResponseType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/MandateIssueResponseType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/ObjectFactory.java index b094aad00..5e58d91b1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/ObjectFactory.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/Target.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/Target.java index fa19da1b4..c85376979 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/Target.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/Target.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/package-info.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/package-info.java index 4d1a071b9..e6bcf80ef 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/package-info.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/mis/package-info.java @@ -1,24 +1,2 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ @javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/mandates/mis/1.0/xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package at.gv.util.xsd.mis; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractAddressType.java index 104187ae1..824331174 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java index bfea9c03c..eb9ff0739 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -141,13 +119,13 @@ public class AbstractPersonType { * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link ZMRzahl }{@code >} - * {@link JAXBElement }{@code <}{@link Firmenbuchnummer }{@code >} - * {@link JAXBElement }{@code <}{@link ERJPZahl }{@code >} - * {@link JAXBElement }{@code <}{@link Vereinsnummer }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} + * {@link JAXBElement }{@code <}{@link Firmenbuchnummer }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} + * {@link JAXBElement }{@code <}{@link ZMRzahl }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} + * {@link JAXBElement }{@code <}{@link ERJPZahl }{@code >} + * {@link JAXBElement }{@code <}{@link Vereinsnummer }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} * diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractSimpleIdentificationType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractSimpleIdentificationType.java index 02eb938d5..fb9201b02 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractSimpleIdentificationType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractSimpleIdentificationType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AlternativeName.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AlternativeName.java index bec51a660..9768cadeb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AlternativeName.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AlternativeName.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/BankConnectionType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/BankConnectionType.java index efff05a2b..aaf3ce9fc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/BankConnectionType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/BankConnectionType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java index b76e9539b..0a542e073 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -210,8 +188,8 @@ public class CompactCorporateBodyType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonData.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonData.java index 7f2531be8..5c563cecd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonData.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonData.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java index 138763697..1aa6acbf4 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -97,10 +75,10 @@ public class CompactPersonDataType * * @return * possible object is - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} * */ @@ -113,10 +91,10 @@ public class CompactPersonDataType * * @param value * allowed object is - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} * */ @@ -142,12 +120,12 @@ public class CompactPersonDataType * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link InternetAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TypedPostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} * * */ @@ -259,9 +237,9 @@ public class CompactPersonDataType * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link String } * {@link Object } - * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonNameType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonNameType.java index 16c00d4e0..08aabd4e5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonNameType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonNameType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java index d37f2d5b9..94e97ea12 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -262,8 +240,8 @@ public class CompactPhysicalPersonType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPostalAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPostalAddressType.java index d67541461..51e34910d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPostalAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPostalAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java index f37a7a345..19d957d80 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -278,8 +256,8 @@ public class CorporateBodyType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedAlternativeNameTypeType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedAlternativeNameTypeType.java index 8e9a7c5b8..41a2fc70b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedAlternativeNameTypeType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedAlternativeNameTypeType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedRelationType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedRelationType.java index 0ac3f3590..96e6cb4b8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedRelationType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/DefinedRelationType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ERJPZahl.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ERJPZahl.java index 289be8931..3c181a892 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ERJPZahl.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ERJPZahl.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/FederalStateType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/FederalStateType.java index 8953944a2..88577e32e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/FederalStateType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/FederalStateType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Firmenbuchnummer.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Firmenbuchnummer.java index e5f3ccf07..bd6758704 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Firmenbuchnummer.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Firmenbuchnummer.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java index fe043e48f..f22d6858a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -194,8 +172,8 @@ public class IdentificationType { * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java index 768923d6a..2afa51544 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -143,8 +121,8 @@ public class InternetAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MaritalStatusType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MaritalStatusType.java index 4274c726f..7f908d424 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MaritalStatusType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MaritalStatusType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MobileTelcomNumberType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MobileTelcomNumberType.java index d1c25eb63..3abde420a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MobileTelcomNumberType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/MobileTelcomNumberType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java index 87e73ec86..4a426fc93 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -74,9 +52,9 @@ import org.w3c.dom.Element; public class NationalityType { @XmlElementRefs({ - @XmlElementRef(name = "CountryNameFR", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), - @XmlElementRef(name = "CountryNameEN", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), @XmlElementRef(name = "ISOCode3", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), + @XmlElementRef(name = "CountryNameEN", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), + @XmlElementRef(name = "CountryNameFR", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), @XmlElementRef(name = "CountryNameDE", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) }) @XmlMixed @@ -101,10 +79,10 @@ public class NationalityType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Object } - * {@link Element } * {@link String } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ObjectFactory.java index 8289a55f5..890abbf8c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ObjectFactory.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java index 5ddf3f2f8..cefaa3bbd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -97,10 +75,10 @@ public class PersonDataType * * @return * possible object is - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} * */ @@ -113,10 +91,10 @@ public class PersonDataType * * @param value * allowed object is - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} * */ @@ -142,12 +120,12 @@ public class PersonDataType * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link InternetAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TypedPostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} * * */ @@ -259,9 +237,9 @@ public class PersonDataType * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link String } * {@link Object } - * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonNameType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonNameType.java index 39c584e8d..3b148fc3f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonNameType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonNameType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java index 95500736a..f2727635e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -506,8 +484,8 @@ public class PhysicalPersonType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PostalAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PostalAddressType.java index 63ef61ae8..d5ba41343 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PostalAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PostalAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/RelatedPerson.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/RelatedPerson.java index 9b681cf66..8a20960f9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/RelatedPerson.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/RelatedPerson.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/SexType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/SexType.java index 9decb481a..eacf4a13e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/SexType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/SexType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelcomNumberType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelcomNumberType.java index aaa2a968e..76664aca3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelcomNumberType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelcomNumberType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java index 6bb03bf48..eb7640237 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -147,8 +125,8 @@ public class TelephoneAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java index f36c5553f..c85e2ec69 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; @@ -142,8 +120,8 @@ public class TypedPostalAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Object } * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Vereinsnummer.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Vereinsnummer.java index 2bc0065f4..08edceb71 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Vereinsnummer.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/Vereinsnummer.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ZMRzahl.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ZMRzahl.java index eb00aa4e4..42f0beafe 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ZMRzahl.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/ZMRzahl.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/package-info.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/package-info.java index c0506b59f..1c9b9e547 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/package-info.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/package-info.java @@ -1,24 +1,2 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ @javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package at.gv.util.xsd.persondata; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ActionType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ActionType.java index a16c7d5ce..36a5ef407 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ActionType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ActionType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java index cd1dd7e36..e8ec84ccf 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; @@ -88,9 +66,9 @@ public class AdviceType { *

* Objects of the following type(s) are allowed in the list * {@link Element } - * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link AssertionType }{@code >} * {@link Object } + * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AssertionType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AssertionType.java index 8f2b1cff0..027a40fb2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AssertionType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AssertionType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeDesignatorType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeDesignatorType.java index 27a67539a..4f03b1951 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeDesignatorType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeDesignatorType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeStatementType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeStatementType.java index 9b6ce2379..8e499c4ae 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeStatementType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeStatementType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeType.java index 46ca8bc97..0f25e4802 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AttributeType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AudienceRestrictionConditionType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AudienceRestrictionConditionType.java index 93652a5ab..7088eaaf3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AudienceRestrictionConditionType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AudienceRestrictionConditionType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthenticationStatementType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthenticationStatementType.java index 0613243c9..48ae6e4b8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthenticationStatementType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthenticationStatementType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorityBindingType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorityBindingType.java index c0e5ccd12..809411c70 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorityBindingType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorityBindingType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorizationDecisionStatementType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorizationDecisionStatementType.java index 1a94566ba..035e3a079 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorizationDecisionStatementType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AuthorizationDecisionStatementType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionAbstractType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionAbstractType.java index 1031ec2ab..31033e0b6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionAbstractType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionAbstractType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionsType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionsType.java index af6a952df..93689f559 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionsType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ConditionsType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/DecisionType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/DecisionType.java index 905aea070..01befe477 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/DecisionType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/DecisionType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/EvidenceType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/EvidenceType.java index cd17208c9..9a25910fa 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/EvidenceType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/EvidenceType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/NameIdentifierType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/NameIdentifierType.java index ffb7f6938..fd14e84f2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/NameIdentifierType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/NameIdentifierType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ObjectFactory.java index f704e2fb2..e3e54db31 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/ObjectFactory.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/StatementAbstractType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/StatementAbstractType.java index 368acbdb5..b9dfff501 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/StatementAbstractType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/StatementAbstractType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectConfirmationType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectConfirmationType.java index 0934f9803..76e8a9b9a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectConfirmationType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectConfirmationType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectLocalityType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectLocalityType.java index e31e9b37f..1bd0eb783 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectLocalityType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectLocalityType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectStatementAbstractType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectStatementAbstractType.java index 64e8bc6c7..601815a36 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectStatementAbstractType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectStatementAbstractType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java index bde4d32ad..6845e807a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.saml.assertion; @@ -63,8 +41,8 @@ import javax.xml.bind.annotation.XmlType; public class SubjectType { @XmlElementRefs({ - @XmlElementRef(name = "SubjectConfirmation", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false), - @XmlElementRef(name = "NameIdentifier", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false) + @XmlElementRef(name = "NameIdentifier", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false), + @XmlElementRef(name = "SubjectConfirmation", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false) }) protected List> content; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/package-info.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/package-info.java index e6067bc11..2e2348830 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/package-info.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/package-info.java @@ -1,24 +1,2 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ @javax.xml.bind.annotation.XmlSchema(namespace = "urn:oasis:names:tc:SAML:1.0:assertion", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package at.gv.util.xsd.saml.assertion; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkRequest.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkRequest.java index 03a88f513..d191cc686 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkRequest.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.srzgw; @@ -49,6 +27,8 @@ import javax.xml.bind.annotation.XmlType; * <element name="Firstname" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Familyname" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="DateOfBirth" type="{http://reference.e-government.gv.at/namespace/szrgw/20070807/xsd}DateOfBirthType" minOccurs="0"/> + * <element name="Gender" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * <element name="FiscalNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="LegalPersonTranslatableType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="LegalPersonCanonicalRegisteredAddress" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Representative" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> @@ -170,6 +150,8 @@ public class CreateIdentityLinkRequest { * <element name="Firstname" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Familyname" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="DateOfBirth" type="{http://reference.e-government.gv.at/namespace/szrgw/20070807/xsd}DateOfBirthType" minOccurs="0"/> + * <element name="Gender" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> + * <element name="FiscalNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="LegalPersonTranslatableType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="LegalPersonCanonicalRegisteredAddress" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Representative" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> @@ -189,6 +171,8 @@ public class CreateIdentityLinkRequest { "firstname", "familyname", "dateOfBirth", + "gender", + "fiscalNumber", "legalPersonTranslatableType", "legalPersonCanonicalRegisteredAddress", "representative", @@ -205,6 +189,10 @@ public class CreateIdentityLinkRequest { protected String familyname; @XmlElement(name = "DateOfBirth") protected String dateOfBirth; + @XmlElement(name = "Gender") + protected String gender; + @XmlElement(name = "FiscalNumber") + protected String fiscalNumber; @XmlElement(name = "LegalPersonTranslatableType") protected String legalPersonTranslatableType; @XmlElement(name = "LegalPersonCanonicalRegisteredAddress") @@ -312,6 +300,54 @@ public class CreateIdentityLinkRequest { this.dateOfBirth = value; } + /** + * Gets the value of the gender property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getGender() { + return gender; + } + + /** + * Sets the value of the gender property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setGender(String value) { + this.gender = value; + } + + /** + * Gets the value of the fiscalNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFiscalNumber() { + return fiscalNumber; + } + + /** + * Sets the value of the fiscalNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFiscalNumber(String value) { + this.fiscalNumber = value; + } + /** * Gets the value of the legalPersonTranslatableType property. * diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkResponse.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkResponse.java index 3954c4239..255bd843e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkResponse.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/CreateIdentityLinkResponse.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.srzgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ErrorResponseType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ErrorResponseType.java index e6eea8085..294e59b87 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ErrorResponseType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ErrorResponseType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.srzgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/MISType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/MISType.java index d4b75417a..7b626ce23 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/MISType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/MISType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.srzgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ObjectFactory.java index 6e5ac514f..1fd2fa5b1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/ObjectFactory.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.srzgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/package-info.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/package-info.java index bfd240a1a..d242de2fb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/package-info.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/srzgw/package-info.java @@ -1,24 +1,2 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ @javax.xml.bind.annotation.XmlSchema(namespace = "http://reference.e-government.gv.at/namespace/szrgw/20070807/xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package at.gv.util.xsd.srzgw; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/CanonicalizationMethodType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/CanonicalizationMethodType.java index 2ea7f40d9..98f97fba8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/CanonicalizationMethodType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/CanonicalizationMethodType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DSAKeyValueType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DSAKeyValueType.java index 281267b95..a57f030b0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DSAKeyValueType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DSAKeyValueType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DigestMethodType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DigestMethodType.java index 703d6d516..630d17042 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DigestMethodType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/DigestMethodType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -86,9 +64,9 @@ public class DigestMethodType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link String } * {@link Object } - * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java index ce7433ef4..1f980f6df 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -76,12 +54,12 @@ public class KeyInfoType { @XmlElementRefs({ @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), + @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), + @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), + @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) @XmlMixed @XmlAnyElement(lax = true) @@ -110,16 +88,16 @@ public class KeyInfoType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} * {@link JAXBElement }{@code <}{@link X509DataType }{@code >} - * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} * {@link Object } - * {@link Element } - * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} + * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} * {@link String } * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} - * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} - * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java index 3bfc0ff25..55001162c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -92,8 +70,8 @@ public class KeyValueType { * {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} * {@link Element } * {@link String } - * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} * {@link Object } + * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ManifestType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ManifestType.java index 25c73eba2..98a7b9a24 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ManifestType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ManifestType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java index 2d3e93d09..a32d3badc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -71,14 +49,14 @@ public class ObjectFactory { private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); - private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); + private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); - private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); + private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); @@ -485,9 +463,9 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} * */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) - public JAXBElement createSPKIDataTypeSPKISexp(String value) { - return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, String.class, SPKIDataType.class, value); + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) + public JAXBElement createTransformTypeXPath(String value) { + return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); } /** @@ -536,21 +514,21 @@ public class ObjectFactory { } /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} * */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) - public JAXBElement createTransformTypeXPath(String value) { - return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) + public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { + return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); } /** - * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} * */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) - public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { - return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) + public JAXBElement createSPKIDataTypeSPKISexp(String value) { + return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, String.class, SPKIDataType.class, value); } /** diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectType.java index 8bf914cae..7e60f82ab 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -98,9 +76,9 @@ public class ObjectType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link String } * {@link Object } - * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java index 4744ae97f..e45501db6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -103,10 +81,10 @@ public class PGPDataType { * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Element } * {@link Object } * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RSAKeyValueType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RSAKeyValueType.java index 68d94e9a4..a03ee7b8b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RSAKeyValueType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RSAKeyValueType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ReferenceType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ReferenceType.java index c00a6e67f..faacd02ab 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ReferenceType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ReferenceType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RetrievalMethodType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RetrievalMethodType.java index 8d4537812..8de9a570f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RetrievalMethodType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/RetrievalMethodType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java index d414e160b..f829d355d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -82,8 +60,8 @@ public class SPKIDataType { * *

* Objects of the following type(s) are allowed in the list - * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Element } + * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Object } * * diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java index c1b745d35..70695afdf 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -91,8 +69,8 @@ public class SignatureMethodType { *

* Objects of the following type(s) are allowed in the list * {@link String } - * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} * {@link Object } + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertiesType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertiesType.java index fec647ded..d70a3dfae 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertiesType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertiesType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertyType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertyType.java index 95adf164d..23b7c84da 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertyType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignaturePropertyType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -95,9 +73,9 @@ public class SignaturePropertyType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } * {@link String } * {@link Object } - * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureType.java index bf44417d8..49db57941 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureValueType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureValueType.java index 90bf67df1..10c612080 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureValueType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureValueType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignedInfoType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignedInfoType.java index 27eed2b0b..140ed1b40 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignedInfoType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignedInfoType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java index 90eff50e7..2b96c553e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformsType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformsType.java index e1c1addb0..9b95a61fc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformsType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformsType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java index f68cd5140..e3148b2d0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; @@ -68,11 +46,11 @@ import org.w3c.dom.Element; public class X509DataType { @XmlElementRefs({ - @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), + @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) @XmlAnyElement(lax = true) protected List x509IssuerSerialOrX509SKIOrX509SubjectName; @@ -95,13 +73,13 @@ public class X509DataType { * *

* Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} * {@link Object } * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link Element } + * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509IssuerSerialType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509IssuerSerialType.java index cb8858564..b3ef62268 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509IssuerSerialType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509IssuerSerialType.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/package-info.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/package-info.java index 6eaeb8c6b..e4ae44053 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/package-info.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/package-info.java @@ -1,24 +1,2 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package at.gv.util.xsd.xmldsig; diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd index b8895b4d3..c97822427 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd @@ -14,6 +14,8 @@ + + diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index 94726fa16..01e81ce24 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -3,7 +3,7 @@ MOA.id moa-id - 1.9.96-SNAPSHOT + 1.9.98-SNAPSHOT moa-id-commons moa-id-commons diff --git a/id/server/pom.xml b/id/server/pom.xml index a3461e956..bc664e890 100644 --- a/id/server/pom.xml +++ b/id/server/pom.xml @@ -4,7 +4,7 @@ MOA id - 1.9.96-SNAPSHOT + 1.9.98-SNAPSHOT 4.0.0 diff --git a/id/server/proxy/pom.xml b/id/server/proxy/pom.xml index c7cb9a7c8..e5c78ff60 100644 --- a/id/server/proxy/pom.xml +++ b/id/server/proxy/pom.xml @@ -2,13 +2,21 @@ MOA.id moa-id - 1.9.96-SNAPSHOT + 1.9.98-SNAPSHOT ${basedir}/../../../repository + + + shibboleth.internet2.edu + Internet2 + https://build.shibboleth.net/nexus/content/groups/public/ + + + 4.0.0 MOA.id.server moa-id-proxy -- cgit v1.2.3 From 58bfb68f349ef7695fcf5071204c0c0eebf03807 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 30 Jan 2014 12:06:04 +0100 Subject: remove Eclipse config files --- id/server/auth/.settings/.jsdtscope | 13 -------- .../auth/.settings/org.eclipse.jdt.core.prefs | 8 ----- .../.settings/org.eclipse.wst.common.component | 18 ----------- .../org.eclipse.wst.common.project.facet.core.xml | 7 ---- .../org.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - .../auth/.settings/org.maven.ide.eclipse.prefs | 8 ----- .../.settings/org.eclipse.jdt.core.prefs | 9 ------ .../.settings/org.eclipse.wst.common.component | 9 ------ .../org.eclipse.wst.common.project.facet.core.xml | 7 ---- .../.settings/org.maven.ide.eclipse.prefs | 8 ----- id/server/moa-id-commons/.classpath | 33 ------------------- id/server/moa-id-commons/.project | 37 ---------------------- .../proxy/.settings/org.eclipse.jdt.core.prefs | 8 ----- .../.settings/org.eclipse.wst.common.component | 22 ------------- .../org.eclipse.wst.common.project.facet.core.xml | 7 ---- .../proxy/.settings/org.maven.ide.eclipse.prefs | 8 ----- 17 files changed, 204 deletions(-) delete mode 100644 id/server/auth/.settings/.jsdtscope delete mode 100644 id/server/auth/.settings/org.eclipse.jdt.core.prefs delete mode 100644 id/server/auth/.settings/org.eclipse.wst.common.component delete mode 100644 id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name delete mode 100644 id/server/auth/.settings/org.maven.ide.eclipse.prefs delete mode 100644 id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs delete mode 100644 id/server/idserverlib/.settings/org.eclipse.wst.common.component delete mode 100644 id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs delete mode 100644 id/server/moa-id-commons/.classpath delete mode 100644 id/server/moa-id-commons/.project delete mode 100644 id/server/proxy/.settings/org.eclipse.jdt.core.prefs delete mode 100644 id/server/proxy/.settings/org.eclipse.wst.common.component delete mode 100644 id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 id/server/proxy/.settings/org.maven.ide.eclipse.prefs (limited to 'id/server') diff --git a/id/server/auth/.settings/.jsdtscope b/id/server/auth/.settings/.jsdtscope deleted file mode 100644 index beb42ee1c..000000000 --- a/id/server/auth/.settings/.jsdtscope +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/id/server/auth/.settings/org.eclipse.jdt.core.prefs b/id/server/auth/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index dc0892a32..000000000 --- a/id/server/auth/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/id/server/auth/.settings/org.eclipse.wst.common.component b/id/server/auth/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 66a47bbde..000000000 --- a/id/server/auth/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,18 +0,0 @@ - - - - uses - - - uses - - - uses - - - - - - - - diff --git a/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index ac59587b0..000000000 --- a/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a48..000000000 --- a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6e..000000000 --- a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/id/server/auth/.settings/org.maven.ide.eclipse.prefs b/id/server/auth/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 7f28ca3cd..000000000 --- a/id/server/auth/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs b/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 78a34d46c..000000000 --- a/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Aug 05 10:52:32 CEST 2013 -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.compliance=1.5 diff --git a/id/server/idserverlib/.settings/org.eclipse.wst.common.component b/id/server/idserverlib/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 54623a08b..000000000 --- a/id/server/idserverlib/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 303978e14..000000000 --- a/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs b/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 7f28ca3cd..000000000 --- a/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/id/server/moa-id-commons/.classpath b/id/server/moa-id-commons/.classpath deleted file mode 100644 index 0e89cea3d..000000000 --- a/id/server/moa-id-commons/.classpath +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/id/server/moa-id-commons/.project b/id/server/moa-id-commons/.project deleted file mode 100644 index a7c3725f2..000000000 --- a/id/server/moa-id-commons/.project +++ /dev/null @@ -1,37 +0,0 @@ - - - moa-id-commons - - - moa-common - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index dc0892a32..000000000 --- a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/id/server/proxy/.settings/org.eclipse.wst.common.component b/id/server/proxy/.settings/org.eclipse.wst.common.component deleted file mode 100644 index e1f55f641..000000000 --- a/id/server/proxy/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,22 +0,0 @@ - - - - uses - - - uses - - - uses - - - uses - - - uses - - - - - - diff --git a/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 564572b10..000000000 --- a/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/id/server/proxy/.settings/org.maven.ide.eclipse.prefs b/id/server/proxy/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 7f28ca3cd..000000000 --- a/id/server/proxy/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 -- cgit v1.2.3 From d4a8d57e4cd10fc7e427f936983ae7c28aa6eab2 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 30 Jan 2014 15:03:56 +0100 Subject: add functionality for global authentication protocol activation/deactivation --- .../auth/exception/ProtocolNotActiveException.java | 44 +++++++++++ .../id/config/auth/AuthConfigurationProvider.java | 22 +++++- .../moa/id/config/auth/data/ProtocolAllowed.java | 91 ++++++++++++++++++++++ .../moa/id/entrypoints/DispatcherServlet.java | 18 ++++- .../oauth20/protocol/OAuth20Protocol.java | 9 +++ .../moa/id/protocols/pvp2x/PVP2XProtocol.java | 10 +++ .../moa/id/protocols/saml1/SAML1Protocol.java | 8 ++ .../resources/properties/id_messages_de.properties | 3 +- .../src/main/resources/config/moaid_config_2.0.xsd | 15 +++- 9 files changed, 211 insertions(+), 9 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/ProtocolNotActiveException.java create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/ProtocolAllowed.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/ProtocolNotActiveException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/ProtocolNotActiveException.java new file mode 100644 index 000000000..fe2bcedca --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/ProtocolNotActiveException.java @@ -0,0 +1,44 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.exception; + +/** + * @author tlenz + * + */ +public class ProtocolNotActiveException extends MOAIDException { + + /** + * + */ + private static final long serialVersionUID = 1832697083163940710L; + + /** + * @param messageId + * @param parameters + */ + public ProtocolNotActiveException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java index 69a73215a..d1872b2bc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java @@ -105,6 +105,7 @@ import at.gv.egovernment.moa.id.config.ConnectionParameter; import at.gv.egovernment.moa.id.config.ConnectionParameterForeign; import at.gv.egovernment.moa.id.config.ConnectionParameterMOASP; import at.gv.egovernment.moa.id.config.ConnectionParameterMandate; +import at.gv.egovernment.moa.id.config.auth.data.ProtocolAllowed; import at.gv.egovernment.moa.id.config.legacy.BuildFromLegacyConfig; import at.gv.egovernment.moa.id.config.stork.STORKConfig; import at.gv.egovernment.moa.id.data.IssuerAndSerial; @@ -190,6 +191,7 @@ public class AuthConfigurationProvider extends ConfigurationProvider { private static String alternativesourceid = null; private static List legacyallowedprotocols = new ArrayList(); + private static ProtocolAllowed allowedProtcols = null; private static VerifyAuthBlock verifyidl = null; @@ -246,6 +248,7 @@ public class AuthConfigurationProvider extends ConfigurationProvider { return instance; } + /** * Constructor for AuthConfigurationProvider. * @param fileName @@ -515,8 +518,22 @@ public class AuthConfigurationProvider extends ConfigurationProvider { //set PVP2 general config Protocols protocols = auth.getProtocols(); if (protocols != null) { + + allowedProtcols = new ProtocolAllowed(); + + if (protocols.getSAML1() != null) { + allowedProtcols.setSAML1Active(protocols.getSAML1().isIsActive()); + } + + if (protocols.getOAuth() != null) { + allowedProtcols.setOAUTHActive(protocols.getOAuth().isIsActive()); + } + if (protocols.getPVP2() != null) { - PVP2 el = protocols.getPVP2();; + PVP2 el = protocols.getPVP2(); + + allowedProtcols.setPVP21Active(el.isIsActive()); + pvp2general = new PVP2(); pvp2general.setIssuerName(el.getIssuerName()); pvp2general.setPublicURLPrefix(el.getPublicURLPrefix()); @@ -730,6 +747,9 @@ public class AuthConfigurationProvider extends ConfigurationProvider { return this.getGeneralProperiesConfig("protocols.oauth20."); } + public ProtocolAllowed getAllowedProtocols() { + return this.allowedProtcols; + } public PVP2 getGeneralPVP2DBConfig() { return pvp2general; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/ProtocolAllowed.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/ProtocolAllowed.java new file mode 100644 index 000000000..a04fb1626 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/ProtocolAllowed.java @@ -0,0 +1,91 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.config.auth.data; + +/** + * @author tlenz + * + */ +public class ProtocolAllowed { + + private boolean isSAML1Active = false; + private boolean isPVP21Active = true; + private boolean isOAUTHActive = true; + + /** + * + */ + public ProtocolAllowed() { + + } + + /** + * + */ + public ProtocolAllowed(boolean saml1, boolean pvp21, boolean oauth) { + this.isOAUTHActive = oauth; + this.isPVP21Active = pvp21; + this.isSAML1Active = saml1; + + } + + /** + * @return the isSAML1Active + */ + public boolean isSAML1Active() { + return isSAML1Active; + } + /** + * @param isSAML1Active the isSAML1Active to set + */ + public void setSAML1Active(boolean isSAML1Active) { + this.isSAML1Active = isSAML1Active; + } + /** + * @return the isPVP21Active + */ + public boolean isPVP21Active() { + return isPVP21Active; + } + /** + * @param isPVP21Active the isPVP21Active to set + */ + public void setPVP21Active(boolean isPVP21Active) { + this.isPVP21Active = isPVP21Active; + } + /** + * @return the isOAUTHActive + */ + public boolean isOAUTHActive() { + return isOAUTHActive; + } + /** + * @param isOAUTHActive the isOAUTHActive to set + */ + public void setOAUTHActive(boolean isOAUTHActive) { + this.isOAUTHActive = isOAUTHActive; + } + + + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java index 260a4fd79..1f526caca 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java @@ -28,6 +28,7 @@ import iaik.security.ecc.provider.ECCProvider; import iaik.security.provider.IAIK; import java.io.IOException; +import java.io.PrintWriter; import java.security.Security; import java.util.Iterator; import java.util.Map; @@ -45,6 +46,7 @@ import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.servlet.AuthServlet; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils; @@ -317,20 +319,28 @@ public class DispatcherServlet extends AuthServlet{ } } } + + } catch (ProtocolNotActiveException e) { + resp.getWriter().write(e.getMessage()); + resp.setContentType("text/html;charset=UTF-8"); + resp.sendError(HttpServletResponse.SC_FORBIDDEN, e.getMessage()); + return; + + } catch (MOAIDException e) { Logger.error("Failed to generate a valid protocol request!"); - resp.sendError(HttpServletResponse.SC_BAD_REQUEST); resp.setContentType("text/html;charset=UTF-8"); - resp.getWriter().write("NO valid protocol request received!"); + resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "NO valid protocol request received!"); return; + } if (protocolRequest == null) { Logger.error("Failed to generate a valid protocol request!"); - resp.sendError(HttpServletResponse.SC_BAD_REQUEST); resp.setContentType("text/html;charset=UTF-8"); - resp.getWriter().write("NO valid protocol request received!"); + resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "NO valid protocol request received!"); return; + } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java index 1fb67a0b2..7ef5a2068 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java @@ -32,6 +32,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.IAction; import at.gv.egovernment.moa.id.moduls.IModulInfo; import at.gv.egovernment.moa.id.moduls.IRequest; @@ -77,6 +79,13 @@ public class OAuth20Protocol implements IModulInfo { */ public IRequest preProcess(HttpServletRequest request, HttpServletResponse resp, String action) throws MOAIDException { // validation is done inside creation + + if (!AuthConfigurationProvider.getInstance().getAllowedProtocols().isOAUTHActive()) { + Logger.info("OAuth is deaktivated!"); + throw new ProtocolNotActiveException("auth.22", new Object[] { NAME }); + + } + OAuth20BaseRequest res = OAuth20BaseRequest.newInstance(action, request); Logger.debug("Created: " + res); return res; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index 82a620f6b..84c0138a5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -47,6 +47,8 @@ import org.opensaml.saml2.metadata.SPSSODescriptor; import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.IAction; import at.gv.egovernment.moa.id.moduls.IModulInfo; import at.gv.egovernment.moa.id.moduls.IRequest; @@ -129,6 +131,14 @@ public class PVP2XProtocol implements IModulInfo, MOAIDAuthConstants { public IRequest preProcess(HttpServletRequest request, HttpServletResponse response, String action) throws MOAIDException { + + if (!AuthConfigurationProvider.getInstance().getAllowedProtocols().isPVP21Active()) { + Logger.info("PVP2.1 is deaktivated!"); + throw new ProtocolNotActiveException("auth.22", new java.lang.Object[] { NAME }); + + } + + if(METADATA.equals(action)) { return new PVPTargetConfiguration(); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java index 1c57c841e..e587ef0e1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java @@ -32,6 +32,7 @@ import org.apache.commons.lang.StringEscapeUtils; import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.servlet.RedirectServlet; import at.gv.egovernment.moa.id.commons.db.dao.config.OASAML1; @@ -81,6 +82,13 @@ public class SAML1Protocol implements IModulInfo, MOAIDAuthConstants { public IRequest preProcess(HttpServletRequest request, HttpServletResponse response, String action) throws MOAIDException { RequestImpl config = new RequestImpl(); + + if (!AuthConfigurationProvider.getInstance().getAllowedProtocols().isSAML1Active()) { + Logger.info("SAML1 is deaktivated!"); + throw new ProtocolNotActiveException("auth.22", new Object[] { NAME }); + + } + String oaURL = (String) request.getParameter(PARAM_OA); //oaURL = StringEscapeUtils.escapeHtml(oaURL); diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 3151aa657..dc698782a 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -40,6 +40,7 @@ auth.18=Keine MOASessionID vorhanden auth.19=Die Authentifizierung kann nicht passiv durchgef\u00FChrt werden. auth.20=No valid MOA session found. Authentification process is abourted. auth.21=Der Anmeldevorgang wurde durch den Benutzer abgebrochen. +auth.22=Das Protokoll {0} ist deaktiviert. init.00=MOA ID Authentisierung wurde erfolgreich gestartet init.01=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround\: SSL ist m\u00F6glicherweise nicht verf\u00FCgbar @@ -227,5 +228,5 @@ oauth20.04=Die Art der Anmeldung wird nicht unterstuetzt oauth20.05=Der angegebene Benutzer ist nicht berechtigt oauth20.06=Die angegebene OA kann nicht verwendet werden oauth20.07=Angeforderter grant_type ist nicht erlaubt -oauth20.08=Nicht berechtigt für Token-Request +oauth20.08=Nicht berechtigt f�r Token-Request oauth20.09=Zertifikat fuer JSON Web-Token ist falsch konfiguriert. Fehler bei "{0}" diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd index 481f12091..e93cb5cc8 100644 --- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd +++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd @@ -281,7 +281,11 @@ - + + + + + @@ -298,6 +302,12 @@ + + + + + + @@ -873,7 +883,6 @@ - @@ -900,7 +909,7 @@ - + -- cgit v1.2.3 From 9e75e06b799e2baeae88a9e4b0e16acf0e292965 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 31 Jan 2014 08:42:39 +0100 Subject: update SessionEncryption to use IAIK JCE and salt for encryption --- .../gv/egovernment/moa/id/data/EncryptedData.java | 58 ++++++++++++++++++++ .../moa/id/moduls/AuthenticationManager.java | 29 +--------- .../id/storage/AuthenticationSessionStoreage.java | 23 +++++--- .../moa/id/util/SessionEncrytionUtil.java | 62 ++++++++++++++++------ .../db/dao/session/AuthenticatedSessionStore.java | 19 +++++++ 5 files changed, 141 insertions(+), 50 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/EncryptedData.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/EncryptedData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/EncryptedData.java new file mode 100644 index 000000000..e0484eb1b --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/EncryptedData.java @@ -0,0 +1,58 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.data; + +/** + * @author tlenz + * + */ +public class EncryptedData { + + private byte[] encData = null; + private byte[] iv = null; + + + /** + * + */ + public EncryptedData(byte[] encdata, byte[] iv) { + this.encData = encdata; + this.iv = iv; + + } + + /** + * @return the encData + */ + public byte[] getEncData() { + return encData; + } + /** + * @return the iv + */ + public byte[] getIv() { + return iv; + } + + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index 655c507be..90863890f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -271,32 +271,5 @@ public class AuthenticationManager extends AuthServlet { PrintWriter out = new PrintWriter(response.getOutputStream()); out.print(form); out.flush(); - } - - -// private AuthenticationSession getORCreateMOASession(HttpServletRequest request) throws MOAIDException { -// -// //String sessionID = request.getParameter(PARAM_SESSIONID); -// String sessionID = (String) request.getSession().getAttribute(MOA_SESSION); -// AuthenticationSession moasession; -// -// try { -// moasession = AuthenticationSessionStoreage.getSession(sessionID); -// Logger.info("Found existing MOASession with sessionID=" + sessionID -// + ". This session is used for reauthentification."); -// -// } catch (MOADatabaseException e) { -// try { -// moasession = AuthenticationSessionStoreage.createSession(); -// Logger.info("Create a new MOASession with sessionID=" + moasession.getSessionID() + "."); -// -// } catch (MOADatabaseException e1) { -// Logger.error("Database Error! MOASession are not created."); -// throw new MOAIDException("init.04", new Object[] { -// "0"}); -// } -// } -// -// return moasession; -// } + } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java index b00df8a86..393b80d04 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/AuthenticationSessionStoreage.java @@ -39,6 +39,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; +import at.gv.egovernment.moa.id.data.EncryptedData; import at.gv.egovernment.moa.id.util.Random; import at.gv.egovernment.moa.id.util.SessionEncrytionUtil; import at.gv.egovernment.moa.logging.Logger; @@ -110,7 +111,9 @@ public class AuthenticationSessionStoreage { dbsession.setAuthenticated(session.isAuthenticated()); byte[] serialized = SerializationUtils.serialize(session); - dbsession.setSession(SessionEncrytionUtil.encrypt(serialized)); + EncryptedData encdata = SessionEncrytionUtil.encrypt(serialized); + dbsession.setSession(encdata.getEncData()); + dbsession.setIv(encdata.getIv()); //set Timestamp in this state, because automated timestamp generation is buggy in Hibernate 4.2.1 dbsession.setUpdated(new Date()); @@ -133,7 +136,9 @@ public class AuthenticationSessionStoreage { dbsession.setAuthenticated(session.isAuthenticated()); byte[] serialized = SerializationUtils.serialize(session); - dbsession.setSession(SessionEncrytionUtil.encrypt(serialized)); + EncryptedData encdata = SessionEncrytionUtil.encrypt(serialized); + dbsession.setSession(encdata.getEncData()); + dbsession.setIv(encdata.getIv()); //set Timestamp in this state, because automated timestamp generation is buggy in Hibernate 4.2.1 dbsession.setUpdated(new Date()); @@ -193,7 +198,9 @@ public class AuthenticationSessionStoreage { byte[] serialized = SerializationUtils.serialize(session); - dbsession.setSession(SessionEncrytionUtil.encrypt(serialized)); + EncryptedData encdata = SessionEncrytionUtil.encrypt(serialized); + dbsession.setSession(encdata.getEncData()); + dbsession.setIv(encdata.getIv()); //set Timestamp in this state, because automated timestamp generation is buggy in Hibernate 4.2.1 dbsession.setUpdated(new Date()); @@ -291,7 +298,9 @@ public class AuthenticationSessionStoreage { AuthenticatedSessionStore dbsession = searchInDatabase(sessionID); //decrypt Session - byte[] decrypted = SessionEncrytionUtil.decrypt(dbsession.getSession()); + EncryptedData encdata = new EncryptedData(dbsession.getSession(), + dbsession.getIv()); + byte[] decrypted = SessionEncrytionUtil.decrypt(encdata); AuthenticationSession session = (AuthenticationSession) SerializationUtils.deserialize(decrypted); @@ -454,9 +463,11 @@ public class AuthenticationSessionStoreage { } //decrypt Session - byte[] decrypted = SessionEncrytionUtil.decrypt(result.get(0).getSession()); - + EncryptedData encdata = new EncryptedData(result.get(0).getSession(), + result.get(0).getIv()); + byte[] decrypted = SessionEncrytionUtil.decrypt(encdata); return (AuthenticationSession) SerializationUtils.deserialize(decrypted); + } catch (Throwable e) { Logger.warn("MOASession deserialization-exception by using MOASessionID=" + pedingRequestID); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java index 4b7e46ce7..acc2a7273 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java @@ -22,34 +22,58 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.util; +import iaik.security.cipher.PBEKey; +import iaik.security.spec.PBEKeyAndParameterSpec; + +import java.security.SecureRandom; import java.security.spec.KeySpec; import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; +import at.gv.egovernment.moa.id.data.EncryptedData; import at.gv.egovernment.moa.logging.Logger; public class SessionEncrytionUtil { - static SecretKey secret = null; - + private static final String CIPHER_MODE = "AES/CBC/PKCS5Padding"; + private static final String KEYNAME = "AES"; + + static private SecretKey secret = null; + static { try { String key = AuthConfigurationProvider.getInstance().getMOASessionEncryptionKey(); if (key != null) { - SecretKeyFactory factory; - factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); - KeySpec spec = new PBEKeySpec(key.toCharArray(), "TestSALT".getBytes(), 1024, 128); - SecretKey tmp = factory.generateSecret(spec); - secret = new SecretKeySpec(tmp.getEncoded(), "AES"); + PBEKeySpec keySpec = new PBEKeySpec(key.toCharArray()); + SecretKeyFactory factory = SecretKeyFactory.getInstance("PKCS#5", "IAIK"); + PBEKey pbeKey = (PBEKey)factory.generateSecret(keySpec); + + SecureRandom random = new SecureRandom(); + KeyGenerator pbkdf2 = KeyGenerator.getInstance("PBKDF2", "IAIK"); + + PBEKeyAndParameterSpec parameterSpec = + new PBEKeyAndParameterSpec(pbeKey.getEncoded(), + "TestSALT".getBytes(), + 2000, + 16); + + pbkdf2.init(parameterSpec, random); + SecretKey derivedKey = pbkdf2.generateKey(); + + SecretKeySpec spec = new SecretKeySpec(derivedKey.getEncoded(), KEYNAME); + SecretKeyFactory kf = SecretKeyFactory.getInstance(KEYNAME, "IAIK"); + secret = kf.generateSecret(spec); } else { Logger.warn("MOASession encryption is deaktivated."); @@ -61,41 +85,47 @@ public class SessionEncrytionUtil { } - public static byte[] encrypt(byte[] data) throws BuildException { + public static EncryptedData encrypt(byte[] data) throws BuildException { Cipher cipher; if (secret != null) { try { - cipher = Cipher.getInstance("AES/ECB/"+"ISO10126Padding"); + cipher = Cipher.getInstance(CIPHER_MODE, "IAIK"); cipher.init(Cipher.ENCRYPT_MODE, secret); Logger.debug("Encrypt MOASession"); - return cipher.doFinal(data); + + byte[] encdata = cipher.doFinal(data); + byte[] iv = cipher.getIV(); + + return new EncryptedData(encdata, iv); } catch (Exception e) { Logger.warn("MOASession is not encrypted",e); throw new BuildException("MOASession is not encrypted", new Object[]{}, e); } } else - return data; + return new EncryptedData(data, null); } - public static byte[] decrypt(byte[] data) throws BuildException { + public static byte[] decrypt(EncryptedData data) throws BuildException { Cipher cipher; if (secret != null) { try { - cipher = Cipher.getInstance("AES/ECB/"+"ISO10126Padding"); - cipher.init(Cipher.DECRYPT_MODE, secret); + IvParameterSpec iv = new IvParameterSpec(data.getIv()); + + cipher = Cipher.getInstance(CIPHER_MODE, "IAIK"); + cipher.init(Cipher.DECRYPT_MODE, secret, iv); Logger.debug("Decrypt MOASession"); - return cipher.doFinal(data); + return cipher.doFinal(data.getEncData()); } catch (Exception e) { Logger.warn("MOASession is not decrypted",e); throw new BuildException("MOASession is not decrypted", new Object[]{}, e); } } else - return data; + return data.getEncData(); } } diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java index 64f543973..730a328ab 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java @@ -74,6 +74,9 @@ public class AuthenticatedSessionStore implements Serializable{ @Column(name = "session", nullable=false) @Lob private byte [] session; + @Column(name = "iv", nullable=true) + @Lob private byte [] iv; + @Column(name = "isAuthenticated", nullable=false) private boolean isAuthenticated = false; @@ -205,5 +208,21 @@ public class AuthenticatedSessionStore implements Serializable{ this.pendingRequestID = pendingRequestID; } + /** + * @return the iv + */ + public byte[] getIv() { + return iv; + } + + /** + * @param iv the iv to set + */ + public void setIv(byte[] iv) { + this.iv = iv; + } + + + } -- cgit v1.2.3 From befaa7a7ac9d24210623598b04ad90d3837e57ee Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 31 Jan 2014 10:37:55 +0100 Subject: first draft sampleconfig and docu --- .../conf/moa-id/SampleMOAIDConfiguration.xml | 164 ----- .../conf/moa-id/SampleMOAIDConfigurationProxy.xml | 185 ------ .../SampleMOAIDConfiguration_withTestBKs.xml | 166 ------ .../SampleMOAIDConfiguration_withTestBKsProxy.xml | 186 ------ .../conf/moa-id/SampleMOAWIDConfiguration.xml | 74 --- .../conf/moa-id/SampleMOAWIDConfigurationProxy.xml | 94 --- .../SampleMOAWIDConfiguration_withTestBKs.xml | 75 --- .../SampleMOAWIDConfiguration_withTestBKsProxy.xml | 95 --- id/server/data/deploy/conf/moa-id/pvp.ks | Bin 4483 -> 0 bytes .../data/deploy/conf/moa-id/pvp2config.properties | 21 - .../transforms/TransformsInfoAuthBlockTable_DE.xml | 161 ----- .../profiles/MOAIDTransformAuthBlockTable_DE.xml | 159 ----- id/server/doc/MOA-ID-Configuration-1.5.1.xsd | 659 --------------------- id/server/doc/moa_id/moa.htm | 2 +- .../servlet/VerifyAuthenticationBlockServlet.java | 1 - 15 files changed, 1 insertion(+), 2041 deletions(-) delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml delete mode 100644 id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml delete mode 100644 id/server/data/deploy/conf/moa-id/pvp.ks delete mode 100644 id/server/data/deploy/conf/moa-id/pvp2config.properties delete mode 100644 id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml delete mode 100644 id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml delete mode 100644 id/server/doc/MOA-ID-Configuration-1.5.1.xsd (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml deleted file mode 100644 index b70b8f3f6..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindung - - - - MOAIDBuergerkarteAuthentisierungsDaten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file_to_keystore - signing_key_name - - - - - C-PEPS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml deleted file mode 100644 index c7da561e4..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindung - - - - MOAIDBuergerkarteAuthentisierungsDaten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file_to_keystore - signing_key_name - - - - - C-PEPS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml deleted file mode 100644 index f034a262e..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindungMitTestkarten - - - - - MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file_to_keystore - signing_key_name - - - - - C-PEPS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml deleted file mode 100644 index f3c0877a6..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindungMitTestkarten - - - - - MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file_to_keystore - signing_key_name - - - - - C-PEPS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml deleted file mode 100644 index 563236463..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindung - - - - MOAIDBuergerkarteAuthentisierungsDaten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - 468924i - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml deleted file mode 100644 index 7ff50bcf7..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindung - - - - MOAIDBuergerkarteAuthentisierungsDaten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - 468924i - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml deleted file mode 100644 index f3e0b777a..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindungMitTestkarten - - - - - MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - 468924i - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml deleted file mode 100644 index 530540dce..000000000 --- a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - MOAIDBuergerkartePersonenbindungMitTestkarten - - - - - MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten - - - MOAIDTransformAuthBlockTable_DE - - - - - - - - - - - - - - - - - - - - - - - 468924i - - - - - - - - - - - - - - - - - certs/ca-certs - - - - - - - - - - - - - - https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx - https://www.a-trust.at/mobile/https-security-layer-request/default.aspx - - - - diff --git a/id/server/data/deploy/conf/moa-id/pvp.ks b/id/server/data/deploy/conf/moa-id/pvp.ks deleted file mode 100644 index 4504c109d..000000000 Binary files a/id/server/data/deploy/conf/moa-id/pvp.ks and /dev/null differ diff --git a/id/server/data/deploy/conf/moa-id/pvp2config.properties b/id/server/data/deploy/conf/moa-id/pvp2config.properties deleted file mode 100644 index 3e851a255..000000000 --- a/id/server/data/deploy/conf/moa-id/pvp2config.properties +++ /dev/null @@ -1,21 +0,0 @@ -idp.ks.file=/home/afitzek/server/moaid_conf/moaid/pvp.ks -idp.ks.alias=pvpIDP -idp.ks.kspassword=123456 -idp.ks.keypassword=123456 - -idp.contact.test.surname=Mustermann -idp.contact.test.givenname=Max -idp.contact.test.mail=max@muster.mann -idp.contact.test.type=technical - -idp.org.name=OrganisatioName -idp.org.dispname=OrganisationDisplayName -idp.org.url=http://www.egiz.gv.at - -idp.sso.post=https://127.0.0.1:8443/moa-id-auth/dispatcher?mod=id_pvp2x&action=Post -idp.sso.redirect=https://127.0.0.1:8443/moa-id-auth/dispatcher?mod=id_pvp2x&action=Redirect -idp.resolve.soap=https://127.0.0.1:8443/moa-id-auth/dispatcher?mod=id_pvp2x&action=Soap - -idp.contact_list=test - -md.file=/home/afitzek/server/moaid_conf/moaid/metadata/samplePVP_MD.xml \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml deleted file mode 100644 index 4ec0f94ae..000000000 --- a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - Signatur der Anmeldedaten - - - -

Anmeldedaten:

-

Daten zur Person

- - - - - - - - - - - - - - - - - - - - - - - - - -
Name: - -
Geburtsdatum: - - . - - . - -
Rolle: - -
Vollmacht: - Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde. -
-

Daten zur Anwendung

- - - - - - - - - -
Name: - -
Staat:Österreich
-

Technische Parameter

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
URL: - -
Bereich: - -
- Vollmachten-Referenz: - -
- : - -
Identifikator: - - -
OID: - -
HPI: - -
Datum: - - . - - . - -
Uhrzeit: - - : - - : - -
- - - - - - - - - application/xhtml+xml - - diff --git a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml deleted file mode 100644 index 74bede15c..000000000 --- a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - Signatur der Anmeldedaten - - - -

Anmeldedaten:

-

Daten zur Person

- - - - - - - - - - - - - - - - - - - - - - - - - -
Name: - -
Geburtsdatum: - - . - - . - -
Rolle: - -
Vollmacht: - Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde. -
-

Daten zur Anwendung

- - - - - - - - - -
Name: - -
Staat:Österreich
-

Technische Parameter

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
URL: - -
Bereich: - -
- Vollmachten-Referenz: - -
- : - -
Identifikator: - - -
OID: - -
HPI: - -
Datum: - - . - - . - -
Uhrzeit: - - : - - : - -
- - -
-
-
- -
-
diff --git a/id/server/doc/MOA-ID-Configuration-1.5.1.xsd b/id/server/doc/MOA-ID-Configuration-1.5.1.xsd deleted file mode 100644 index d16953eab..000000000 --- a/id/server/doc/MOA-ID-Configuration-1.5.1.xsd +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enthält Parameter der Authentisierungs-Komponente - - - - - - - - - - - enthält Konfigurationsparameter der Proxy-Komponente - - - - - - enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente - - - - - - enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter) - - - - - - - - - - - enthält Parameter für die OA - - - - - - - - - - - - - - - - - - - - - - - - - spezifiziert den Algorithmus ("pkix" oder "chaining") für die Zertifikatspfadvalidierung - - - - - - ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden - - - - - - - - - - - - - - - - verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enthält Parameter für die Kommunikation mit dem Security-Layer - - - - - - - - - - enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul - - - - - - enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden; wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen - - - - - enthält Parameter für die Überprüfung der Personenbindung - - - - - - - - - - enthält Parameter für die Überprüfung des AUTH-Blocks - - - - - - - - - - - - - - enthält Informationen über akzeptierte Signers des IdentityLinks - - - - - - akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert - - - - - - - - enthält Defaultparameter für die Überprüfung weiterer Infoboxen - - - - - - - - Verbindungsparameter zum SZR-Gateway (GetIdentityLink) - - - - - - - - - - - Verbindungsparameter zum Online-Vollmachten-Service - - - - - - - - - - das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert - - - - - - - - - - - - - das Attribut URL spezifiziert die Lage des Templates - - - - - - Verifikation zusätzlicher Infoboxen - - - - - Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen - - - - - - - - - - Parameter für Überprüfung weiterer Infoboxen - - - - - - - Parameter zur Überprüfung einzelner Infoboxen - - - - - optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: "Stellvertretungen" für "Mandates"; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet - - - - - TrustProfil, das für die Überprüfung der Infobox verwendet werden soll - - - - - Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen - - - - - - Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden - - - - - - - - - - Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert. - - - - - - Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox "mandates" abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox "mandates" relevant. - - - - - Eigentlicher Konfigurationsteil für berufliche Parteienvertretung - - - - - - - - - - - - - - Spezifiziert die Lage von XML Schemas - - - - - - - - - - - - - - - - enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enthält Parameter über die OA, die die Proxy-Komponente betreffen - - - - - - enthält Parameter über die OA, die die Proxy-Komponente betreffen - - - - - - - - - - - - - - - - - - URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate) - - - - - - - - - - - - URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden - - - - - - - - - - - Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll - - - - - - - - - - Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors - - - - - Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden - - - - - Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation) - - - - - Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID="*" akzeptiert - - - - - - - - - Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors - - - - - - Optionale Verbindungsparameter zu speziellem (SZR-)Gateway - - - - - - OID der Parteienvertretung lt. "Object Identifier der öffentlichen Verwaltung" - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID "*" muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren - - - - - - Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist - - - - - - - - Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss) - - - - - - - - Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird - - - - - diff --git a/id/server/doc/moa_id/moa.htm b/id/server/doc/moa_id/moa.htm index 5a756088b..62f6115ea 100644 --- a/id/server/doc/moa_id/moa.htm +++ b/id/server/doc/moa_id/moa.htm @@ -16,7 +16,7 @@

MOA: Identifikation (ID)

-

Übersicht zur Dokumentation der Version 1.5

+

Übersicht zur Dokumentation der Version 2.0


Allgemein
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java index 714d6b3f5..4f722c8b3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java @@ -249,7 +249,6 @@ public class VerifyAuthenticationBlockServlet extends AuthServlet { targetType = AuthenticationSession.TARGET_PREFIX_ + oaParam.getTarget(); } - MISSessionId misSessionID = MISSimpleClient.sendSessionIdRequest(connectionParameters.getUrl(), idl, cert, oaFriendlyName, redirectURL, mandateReferenceValue, profilesArray, targetType, sslFactory); if (misSessionID == null) { -- cgit v1.2.3 From 85a983b556baaaa45ea79a4da232a1a72d323708 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 29 Jan 2014 15:13:42 +0100 Subject: enhanced samlengine for floating config location --- .../moa/id/auth/AuthenticationServer.java | 3 +- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 2 +- .../peps/configuration/ConfigurationReader.java | 18 +++-- .../src/test/resources/SamlEngine.xml | 6 +- .../src/test/resources/SignModule_demo.xml | 12 --- .../src/test/resources/SignModule_outgoing.xml | 12 +++ .../src/test/resources/StorkSamlEngine_demo.xml | 93 ---------------------- .../test/resources/StorkSamlEngine_outgoing.xml | 93 ++++++++++++++++++++++ 8 files changed, 124 insertions(+), 115 deletions(-) delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_demo.xml create mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_outgoing.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_demo.xml create mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_outgoing.xml (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index f19881578..204e7f724 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1920,11 +1920,12 @@ public class AuthenticationServer implements MOAIDAuthConstants { authnRequest.setEIDSectorShare(true); authnRequest.setCitizenCountryCode("LOCAL"); +// authnRequest.setCitizenCountryCode(moasession.getCcc()); Logger.debug("STORK AuthnRequest succesfully assembled."); - STORKSAMLEngine samlEngine = STORKSAMLEngine.getInstance("CONF0"); + STORKSAMLEngine samlEngine = STORKSAMLEngine.getInstance("outgoing"); try { authnRequest = samlEngine.generateSTORKAuthnRequest(authnRequest); } catch (STORKSAMLEngineException e) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index f05180932..4819b8219 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -97,7 +97,7 @@ public class PEPSConnectorServlet extends AuthServlet { } //Get SAMLEngine instance - STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF0"); + STORKSAMLEngine engine = STORKSAMLEngine.getInstance("outgoing"); STORKAuthnResponse authnResponse = null; try { diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java index 9ae8bb669..e9b067e76 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java @@ -15,6 +15,7 @@ package eu.stork.peps.configuration; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; @@ -119,8 +120,14 @@ public final class ConfigurationReader { */ public static Map readConfiguration() throws SAMLEngineException { - - LOGGER.info("Init reader: " + ENGINE_CONF_FILE); + + // fetch base from system properties, give a default if there is nothing configured + String base = System.getProperty("eu.stork.samlengine.config.location"); + if(null != base) + if(!base.endsWith("/")) + base += "/"; + + LOGGER.info("Init reader: " + base + ENGINE_CONF_FILE); final Map instanceConfs = new HashMap(); @@ -137,9 +144,10 @@ public final class ConfigurationReader { builder = factory.newDocumentBuilder(); - engineConf = ConfigurationReader.class - .getResourceAsStream("/" + ENGINE_CONF_FILE); - + if(null != base) + engineConf = new FileInputStream(base + ENGINE_CONF_FILE); + else + engineConf = ConfigurationReader.class.getResourceAsStream("/" + ENGINE_CONF_FILE); document = builder.parse(engineConf); diff --git a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml b/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml index d9dcb34f8..48fd9adff 100644 --- a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml +++ b/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml @@ -3,10 +3,10 @@ - + - + @@ -14,7 +14,7 @@ - + diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_demo.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_demo.xml deleted file mode 100644 index c7cee3af4..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_demo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SWModule sign with JKS. - projects/stork2/code/moa-idspss/id/server/stork2-saml-engine/src/test/resources/storkDemoKeys.jks - local-demo - local-demo - CN=local-demo-cert, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_outgoing.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_outgoing.xml new file mode 100644 index 000000000..c7cee3af4 --- /dev/null +++ b/id/server/stork2-saml-engine/src/test/resources/SignModule_outgoing.xml @@ -0,0 +1,12 @@ + + + + + SWModule sign with JKS. + projects/stork2/code/moa-idspss/id/server/stork2-saml-engine/src/test/resources/storkDemoKeys.jks + local-demo + local-demo + CN=local-demo-cert, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS + \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_demo.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_demo.xml deleted file mode 100644 index f8fc4f91a..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_demo.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - SAML constants for AuthnRequests and Responses. - - - unspecified - - - obtained - - - entity - - - - HTTP-POST - - - - - - - - - - false - - - true - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - 300 - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/residenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/academicTitle - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizen509Certificate - - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/mandateContent - http://www.stork.gov.eu/1.0/representative - http://www.stork.gov.eu/1.0/represented - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_outgoing.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_outgoing.xml new file mode 100644 index 000000000..f8fc4f91a --- /dev/null +++ b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_outgoing.xml @@ -0,0 +1,93 @@ + + + + + SAML constants for AuthnRequests and Responses. + + + unspecified + + + obtained + + + entity + + + + HTTP-POST + + + + + + + + + + false + + + true + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + 300 + + + false + + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/residenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/academicTitle + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizen509Certificate + + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/mandateContent + http://www.stork.gov.eu/1.0/representative + http://www.stork.gov.eu/1.0/represented + + \ No newline at end of file -- cgit v1.2.3 From 3e512ed4c85444fcbd3d364ffa48aa3291813b73 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 13:14:34 +0100 Subject: supply organization details on representative case --- .../moa/id/auth/AuthenticationServer.java | 36 +++++++++++++++++----- .../moa/id/auth/stork/STORKResponseProcessor.java | 16 ++++++++-- 2 files changed, 41 insertions(+), 11 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 204e7f724..d77119f4a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1699,7 +1699,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws SZRGWClientException */ - public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String citizenSignature, String represented, String representative, String mandateContent) throws SZRGWClientException { + public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException { SZRGWClient client = null; @@ -1712,20 +1712,19 @@ public class AuthenticationServer implements MOAIDAuthConstants { CreateIdentityLinkRequest request = new CreateIdentityLinkRequest(); request.setSignature(citizenSignature.getBytes()); - + PEPSData data = new PEPSData(); data.setDateOfBirth(PEPSDateOfBirth); data.setFamilyname(PEPSFamilyname); data.setFirstname(PEPSFirstname); data.setIdentifier(PEPSIdentifier); -// TODO add mandate data -// data.setRepresentative(representative); -// data.setRepresented(represented); -// data.setMandateContent(mandateContent); + data.setRepresentative(representative); + data.setRepresented(represented); + data.setMandateContent(mandateContent); - if(null != PEPSIdentifier) - request.setPEPSData(data); + data.setLegalPersonCanonicalRegisteredAddress(organizationAddress); + data.setLegalPersonTranslatableType(organizationType); // TODO add MIS data // request.setMIS(value) @@ -1812,6 +1811,27 @@ public class AuthenticationServer implements MOAIDAuthConstants { public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature) throws SZRGWClientException { return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, signature, null, null, null); } + + /** + * SZR-GW Client interface. + * + * @param eIdentifier the e identifier + * @param givenName the given name + * @param lastName the last name + * @param dateOfBirth the date of birth + * @param citizenSignature the citizen signature + * @param representative the representative + * @param represented the represented + * @param mandate the mandate + * @return the identity link + * @throws SZRGWClientException the sZRGW client exception + */ + public CreateIdentityLinkResponse getIdentityLink(String eIdentifier, + String givenName, String lastName, String dateOfBirth, + String citizenSignature, String representative, String represented, + String mandate) throws SZRGWClientException { + return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate, null, null); + } /** * Starts a MOA-ID authentication process using STORK diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 664d0cf57..e81adfb52 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -345,10 +345,20 @@ public class STORKResponseProcessor { String representative = getAttributeValue("representative", attributeList); String represented = getAttributeValue("represented", attributeList); String mandate = getAttributeValue("mandateContent", attributeList); + + // we definitely know we have a representation case here + // lets try if the represented is an organization + try { + String organizationAddress = getAttributeValue("canonicalRegisteredAddress", attributeList); + String organizationType = getAttributeValue("translateableType", attributeList); + + // if we got here, we have a natural person representing a legal person + response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate, organizationAddress, organizationType); + } catch(STORKException e1) { - // if we get here we have a representation case - response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate); - + // if we get here we have natural persons representing each other + response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate); + } } catch(STORKException e) { // we do not have a representation case response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature); -- cgit v1.2.3 From 58b19f33806927a753d76ff2d2f79e44353b0e03 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 15:12:04 +0100 Subject: refactored attribute parsing --- .../moa/id/auth/AuthenticationServer.java | 59 +++++------------ .../moa/id/auth/servlet/PEPSConnectorServlet.java | 19 +----- .../moa/id/auth/stork/STORKResponseProcessor.java | 76 ++++++++++++++-------- 3 files changed, 67 insertions(+), 87 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index d77119f4a..5ae3d8e47 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1733,53 +1733,12 @@ public class AuthenticationServer implements MOAIDAuthConstants { CreateIdentityLinkResponse response = client.sentCreateIDLRequest(request , connectionParameters.getUrl()); return response; - - -// client.setAddress(connectionParameters.getUrl()); -// if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) { -// Logger.debug("Initialisiere SSL Verbindung"); -// try { -// client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters)); -// } catch (IOException e) { -// Logger.error("Could not initialize SSL Factory", e); -// throw new SZRGWClientException("Could not initialize SSL Factory"); -// } catch (GeneralSecurityException e) { -// Logger.error("Could not initialize SSL Factory", e); -// throw new SZRGWClientException("Could not initialize SSL Factory"); -// } catch (PKIException e) { -// Logger.error("Could not initialize SSL Factory", e); -// throw new SZRGWClientException("Could not initialize SSL Factory"); -// } -// } } catch (ConfigurationException e) { Logger.warn(e); Logger.warn(MOAIDMessageProvider.getInstance().getMessage("config.12", null )); } -// // create request -// CreateIdentityLinkResponse response = null; -// Element request = null; -// try { -// Document doc = client.buildGetIdentityLinkRequest(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, signature); -// request = doc.getDocumentElement(); -// -// // send request -// response = client.createIdentityLinkResponse(request, connectionParameters.getUrl()); -// -// -// -// } catch (SZRGWClientException e) { -// // give him a second try - Nach dem Starten des Tomcat wird beim ersten Mal das Client-Zertifikat offenbar vom HTTPClient nicht mitgeschickt. -//// try { -//// response = client.createIdentityLinkResponse(request); -//// } -//// catch (SZRGWClientException e1) { -//// throw new SZRGWClientException(e1); -//// } -// } - - return null; } @@ -1811,6 +1770,24 @@ public class AuthenticationServer implements MOAIDAuthConstants { public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature) throws SZRGWClientException { return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, signature, null, null, null); } + + /** + * Gets the identity link. + * + * @param citizenSignature the citizen signature + * @param representative the representative + * @param represented the represented + * @param mandate the mandate + * @param organizationAddress the organization address + * @param organizationType the organization type + * @return the identity link + * @throws SZRGWClientException + */ + public CreateIdentityLinkResponse getIdentityLink(String citizenSignature, + String representative, String represented, String mandateContent, + String organizationAddress, String organizationType) throws SZRGWClientException { + return getIdentityLink(null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType); + } /** * SZR-GW Client interface. diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 4819b8219..45e6ab816 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -137,29 +137,12 @@ public class PEPSConnectorServlet extends AuthServlet { Logger.debug("Found a preceeding STORK AuthnRequest to this MOA session: " + moaSessionID); -// Logger.debug("Starting validation of SAML assertion"); -// //verify SAML assertion - Assertion storkAssertion = authnResponse.getAssertions().get(0); -// try { -// STORKResponseProcessor.verifySTORKAssertion( -// storkAssertion, //assertion -// request.getRemoteAddr(), //IP address of user -// storkAuthnRequest.getID(), //ID of STORK AuthnRequest -// request.getRequestURL().toString(), //destination -// HTTPUtils.getBaseURL(request), //audience -// storkAuthnRequest.getRequestedAttributes()); //Requested Attributes -// } catch (STORKException e) { -// Logger.error("Failed to verify STORK SAML Assertion", e); -// throw new MOAIDException("stork.08", null); -// } -// -// Logger.info("SAML assertion succesfully verified!"); - Logger.debug("Starting extraction of signedDoc attribute"); //extract signed doc element and citizen signature Element citizenSignature = null; try { + Assertion storkAssertion = authnResponse.getAssertions().get(0); citizenSignature = STORKResponseProcessor.extractCitizenSignature(storkAssertion); moaSession.setAuthBlock(DOMUtils.serializeNode(citizenSignature)); moaSession.setSignerCertificate(AuthenticationServer.getCertificateFromXML(citizenSignature)); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index e81adfb52..466d86f87 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -296,6 +296,22 @@ public class STORKResponseProcessor { } + + /** + * Checks for attribute. + * + * @param attributeName the attribute name + * @param attributeList the attribute list + * @return true, if successful + */ + private static boolean hasAttribute(String attributeName, IPersonalAttributeList attributeList) { + try { + getAttributeValue(attributeName, attributeList); + return true; + } catch(STORKException e) { + return false; + } + } /** * helper for reading attributes. Handles logging and error handling. @@ -325,52 +341,56 @@ public class STORKResponseProcessor { public static IdentityLink connectToSZRGateway(IPersonalAttributeList attributeList) throws STORKException { Logger.trace("Calling SZR Gateway with the following attributes:"); - // fetch mandatory attributes - String citizenSignature = getAttributeValue("signedDoc", attributeList); - String eIdentifier = getAttributeValue("eIdentifier", attributeList); - String givenName = getAttributeValue("givenName", attributeList); - String lastName = getAttributeValue("surname", attributeList); - String dateOfBirth = getAttributeValue("dateOfBirth", attributeList); - if (!StringUtils.isEmpty(dateOfBirth)) { - dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); - } - - CreateIdentityLinkResponse response; + CreateIdentityLinkResponse identityLinkResponse = null; IdentityLink identityLink = null; try { Logger.trace("Starting call..."); - // do we have a case of representation? - try { + + // if there is no signedDoc attribute, we cannot go on + String citizenSignature = getAttributeValue("signedDoc", attributeList); + + // if we have a signedDoc we test for a representation case + if(hasAttribute("mandateContent", attributeList) || hasAttribute("representative", attributeList) || hasAttribute("represented", attributeList)) { + // we have a representation case String representative = getAttributeValue("representative", attributeList); String represented = getAttributeValue("represented", attributeList); String mandate = getAttributeValue("mandateContent", attributeList); - // we definitely know we have a representation case here - // lets try if the represented is an organization - try { + if(!hasAttribute("dateOfBirth", attributeList)) { + // if we get here, we have a natural person representing a legal person String organizationAddress = getAttributeValue("canonicalRegisteredAddress", attributeList); String organizationType = getAttributeValue("translateableType", attributeList); - // if we got here, we have a natural person representing a legal person - response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate, organizationAddress, organizationType); - } catch(STORKException e1) { + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(citizenSignature, representative, represented, mandate, organizationAddress, organizationType); + } else { + // if we get here, we have a natural person representing another natural person + String eIdentifier = getAttributeValue("eIdentifier", attributeList); + String givenName = getAttributeValue("givenName", attributeList); + String lastName = getAttributeValue("surname", attributeList); + String dateOfBirth = getAttributeValue("dateOfBirth", attributeList); + if (!StringUtils.isEmpty(dateOfBirth)) + dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); - // if we get here we have natural persons representing each other - response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate); } - } catch(STORKException e) { + } else { // we do not have a representation case - response = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature); + String eIdentifier = getAttributeValue("eIdentifier", attributeList); + String givenName = getAttributeValue("givenName", attributeList); + String lastName = getAttributeValue("surname", attributeList); + String dateOfBirth = getAttributeValue("dateOfBirth", attributeList); + if (!StringUtils.isEmpty(dateOfBirth)) + dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature); } - - - if (null != response.getErrorResponse()){ + + if (null != identityLinkResponse.getErrorResponse()){ // TODO fix exception parameter - throw new SZRGWClientException(response.getErrorResponse().getErrorCode().toString(), null); + throw new SZRGWClientException(identityLinkResponse.getErrorResponse().getErrorCode().toString(), null); } else { - IdentityLinkAssertionParser ilParser = new IdentityLinkAssertionParser(new ByteArrayInputStream(response.getIdentityLink())); + IdentityLinkAssertionParser ilParser = new IdentityLinkAssertionParser(new ByteArrayInputStream(identityLinkResponse.getIdentityLink())); identityLink = ilParser.parseIdentityLink(); Logger.debug("Received Identity Link from SZR Gateway"); -- cgit v1.2.3 From 1c72a260e3633eb8e411992ac25fc747ec71513c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 17:43:18 +0100 Subject: fixed samlengine config loading --- .../java/eu/stork/peps/auth/engine/core/impl/SignSW.java | 13 +++++++++++-- .../eu/stork/peps/configuration/ConfigurationCreator.java | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java index 9f0a88c84..4554a9586 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java @@ -74,6 +74,7 @@ import org.slf4j.LoggerFactory; import eu.stork.peps.auth.engine.core.CustomAttributeQuery; import eu.stork.peps.auth.engine.core.SAMLEngineSignI; +import eu.stork.peps.configuration.ConfigurationReader; import eu.stork.peps.exceptions.SAMLEngineException; @@ -159,8 +160,16 @@ public class SignSW implements SAMLEngineSignI { throws SAMLEngineException { InputStream fileProperties = null; try { - fileProperties = SignSW.class.getResourceAsStream("/" - + fileConf); + // fetch base from system properties, give a default if there is nothing configured + String base = System.getProperty("eu.stork.samlengine.config.location"); + if(null != base) + if(!base.endsWith("/")) + base += "/"; + + if(null != base) + fileProperties = new FileInputStream(base + fileConf); + else + fileProperties = SignSW.class.getResourceAsStream("/" + fileConf); properties = new Properties(); properties.loadFromXML(fileProperties); diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java index 2fabff7d6..b40e3f7dd 100644 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java +++ b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java @@ -15,6 +15,7 @@ package eu.stork.peps.configuration; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; @@ -103,8 +104,16 @@ public final class ConfigurationCreator { LOGGER.info("Create file configuration properties to Stork Saml Engine."); InputStream fileEngineProp = null; try { - fileEngineProp = ConfigurationCreator.class - .getResourceAsStream("/" + fileName); + // fetch base from system properties, give a default if there is nothing configured + String base = System.getProperty("eu.stork.samlengine.config.location"); + if(null != base) + if(!base.endsWith("/")) + base += "/"; + + if(null != base) + fileEngineProp = new FileInputStream(base + fileName); + else + fileEngineProp = ConfigurationCreator.class.getResourceAsStream("/" + fileName); final Properties configuration = new Properties(); configuration.loadFromXML(fileEngineProp); return configuration; -- cgit v1.2.3 From b04ffb6167dca0a3d1c116953b23aebe1ddf4e32 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 18:05:19 +0100 Subject: gender retrieval if not delivered by stork --- .../moa/id/auth/AuthenticationServer.java | 12 ++--- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 54 ++++++++++++++++++++++ .../moa/id/auth/stork/STORKResponseProcessor.java | 7 ++- .../resources/resources/templates/fetchGender.html | 16 +++++++ 4 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 id/server/idserverlib/src/main/resources/resources/templates/fetchGender.html (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 5ae3d8e47..ec1762cbf 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1699,7 +1699,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws SZRGWClientException */ - public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException { + public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException { SZRGWClient client = null; @@ -1752,7 +1752,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws ConfigurationException the configuration exception */ public CreateIdentityLinkResponse getIdentityLink(Element signature) throws SZRGWClientException, ConfigurationException { - return getIdentityLink(null, null, null, null, XMLHelper.nodeToString(signature), null, null, null); + return getIdentityLink(null, null, null, null, null, XMLHelper.nodeToString(signature), null, null, null); } /** @@ -1768,7 +1768,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws ConfigurationException the configuration exception */ public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature) throws SZRGWClientException { - return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, signature, null, null, null); + return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, null, signature, null, null, null); } /** @@ -1786,7 +1786,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { public CreateIdentityLinkResponse getIdentityLink(String citizenSignature, String representative, String represented, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException { - return getIdentityLink(null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType); + return getIdentityLink(null, null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType); } /** @@ -1804,10 +1804,10 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws SZRGWClientException the sZRGW client exception */ public CreateIdentityLinkResponse getIdentityLink(String eIdentifier, - String givenName, String lastName, String dateOfBirth, + String givenName, String lastName, String dateOfBirth, String gender, String citizenSignature, String representative, String represented, String mandate) throws SZRGWClientException { - return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate, null, null); + return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate, null, null); } /** diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 45e6ab816..a1d38d488 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -1,6 +1,8 @@ package at.gv.egovernment.moa.id.auth.servlet; import java.io.IOException; +import java.io.StringWriter; +import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; @@ -9,6 +11,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; import org.opensaml.saml2.core.Assertion; import org.opensaml.saml2.core.StatusCode; import org.w3c.dom.Element; @@ -22,6 +27,7 @@ import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.stork.STORKException; import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor; +import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.moduls.ModulUtils; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; @@ -30,6 +36,7 @@ import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.StringUtils; import eu.stork.peps.auth.commons.PEPSUtil; +import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.STORKAuthnRequest; import eu.stork.peps.auth.commons.STORKAuthnResponse; import eu.stork.peps.auth.engine.STORKSAMLEngine; @@ -154,12 +161,59 @@ public class PEPSConnectorServlet extends AuthServlet { Logger.debug("Foregin Citizen signature successfully extracted from STORK Assertion (signedDoc)"); Logger.debug("Citizen signature will be verified by SZR Gateway!"); + ////////////// incorporate gender from parameters if not in stork response + + PersonalAttribute gender = authnResponse.getPersonalAttributeList().get("gender"); + if(null == gender) { + String gendervalue = (String) request.getParameter("gender"); + if(null != gendervalue) { + gender = new PersonalAttribute(); + gender.setName("gender"); + ArrayList tmp = new ArrayList(); + tmp.add(gendervalue); + gender.setValue(tmp); + + authnResponse.getPersonalAttributeList().add(gender); + } + } + + ////////////////////////////////////////////////////////////////////////// + + Logger.debug("Starting connecting SZR Gateway"); //contact SZR Gateway IdentityLink identityLink = null; try { identityLink = STORKResponseProcessor.connectToSZRGateway(authnResponse.getPersonalAttributeList()); } catch (STORKException e) { + // this is really nasty but we work against the system here. We are supposed to get the gender attribute from + // stork. If we do not, we cannot register the person in the ERnP - we have to have the + // gender for the represented person. So here comes the dirty hack. + if(e.getMessage().equals("gender not found in response")) { + // fetch gender + + try { + Logger.trace("Initialize VelocityEngine..."); + + VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); + Template template = velocityEngine.getTemplate("/resources/templates/fetchGender.html"); + VelocityContext context = new VelocityContext(); + context.put("SAMLResponse", request.getParameter("SAMLResponse")); + context.put("action", request.getRequestURL()); + + StringWriter writer = new StringWriter(); + template.merge(context, writer); + +// response.setContentType("text/html"); + response.getOutputStream().write(writer.toString().getBytes()); + } catch (Exception e1) { + Logger.error("Error sending gender retrival form.", e1); + httpSession.invalidate(); + throw new MOAIDException("stork.10", null); + } + + return; + } Logger.error("Error connecting SZR Gateway", e); throw new MOAIDException("stork.10", null); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 466d86f87..5406dc0e1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -369,10 +369,13 @@ public class STORKResponseProcessor { String givenName = getAttributeValue("givenName", attributeList); String lastName = getAttributeValue("surname", attributeList); String dateOfBirth = getAttributeValue("dateOfBirth", attributeList); + + // gender attribute is mandatory here because of some legal stuff +// String gender = getAttributeValue("gender", attributeList); if (!StringUtils.isEmpty(dateOfBirth)) dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); - identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, representative, represented, mandate); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate); } } else { // we do not have a representation case @@ -406,6 +409,8 @@ public class STORKResponseProcessor { } catch (ParseException e) { Logger.error("Error parsing IdentityLink received from SZR-Gateway: ", e); throw new STORKException("Error parsing IdentityLink received from SZR-Gateway: ", e); + } catch(STORKException e) { + throw e; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/id/server/idserverlib/src/main/resources/resources/templates/fetchGender.html b/id/server/idserverlib/src/main/resources/resources/templates/fetchGender.html new file mode 100644 index 000000000..f47ee53ff --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/templates/fetchGender.html @@ -0,0 +1,16 @@ + + + +
+
+ +
+

Please indicate the gender of the represented.

+
+ + +
+
+ + + \ No newline at end of file -- cgit v1.2.3 From 8449c5ab138f0b7a1760cb5f2aa6db2eb9d0b22e Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 19:04:02 +0100 Subject: added stork signature client api - untested --- id/server/idserverlib/pom.xml | 5 +++ .../moa/id/auth/AuthenticationServer.java | 36 ++++++++++++++------ .../moa/id/auth/servlet/PEPSConnectorServlet.java | 39 ++++++++++++---------- 3 files changed, 53 insertions(+), 27 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 8a9cdd51f..245348d09 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -37,6 +37,11 @@ SamlEngine 1.1.0 + + eu.stork + oasis-dss-api + 1.0.0-SNAPSHOT + MOA.id.server moa-id-commons diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index ec1762cbf..decf166c4 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -58,6 +58,7 @@ import org.opensaml.common.IdentifierGenerator; import org.opensaml.common.impl.SecureRandomIdentifierGenerator; import org.opensaml.xml.util.Base64; import org.opensaml.xml.util.XMLHelper; +import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -137,6 +138,11 @@ import at.gv.egovernment.moa.util.XPathUtils; import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest; import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest.PEPSData; import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; +import eu.stork.oasisdss.api.ApiUtils; +import eu.stork.oasisdss.api.ApiUtilsException; +import eu.stork.oasisdss.profile.DocumentType; +import eu.stork.oasisdss.profile.InputDocuments; +import eu.stork.oasisdss.profile.SignRequest; import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; @@ -1882,7 +1888,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { PersonalAttribute newAttribute = new PersonalAttribute(); newAttribute.setName("signedDoc"); List value = new ArrayList(); - value.add(generateDssSignRequest(Base64.encodeBytes(CreateXMLSignatureRequestBuilder.buildForeignIDTextToBeSigned("wie im Signaturzertifikat (as in my signature certificate)", oaParam, moasession).getBytes()), "application/xhtml+xml")); + value.add(generateDssSignRequest(CreateXMLSignatureRequestBuilder.buildForeignIDTextToBeSigned("wie im Signaturzertifikat (as in my signature certificate)", oaParam, moasession), "application/xhtml+xml")); newAttribute.setValue(value); attributeList.add(newAttribute); @@ -1978,18 +1984,28 @@ public class AuthenticationServer implements MOAIDAuthConstants { IdentifierGenerator idGenerator; try { idGenerator = new SecureRandomIdentifierGenerator(); - - return "" + - "" + - "" + - "" + text + "" + - "" + - "" + - ""; + + DocumentType doc = new DocumentType(); + doc.setBase64XML(Base64.encodeBytes(text.getBytes()).getBytes()); + + SignRequest request = new SignRequest(); + request.setInputDocuments(ApiUtils.createInputDocuments(doc)); + + request.setRequestID(idGenerator.generateIdentifier()); + + return ApiUtils.marshalToDocument(request).getTextContent(); } catch (NoSuchAlgorithmException e) { Logger.error("Cannot generate id", e); throw new RuntimeException(e); + } catch (ApiUtilsException e) { + Logger.error("Could not create SignRequest", e); + throw new RuntimeException(e); + } catch (DOMException e) { + Logger.error("Could not create SignRequest", e); + throw new RuntimeException(e); + } catch (ParserConfigurationException e) { + Logger.error("Could not create SignRequest", e); + throw new RuntimeException(e); } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index a1d38d488..3129c9e31 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import javax.xml.transform.stream.StreamSource; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; @@ -30,11 +31,15 @@ import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor; import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.moduls.ModulUtils; +import at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParser; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.StringUtils; +import eu.stork.oasisdss.api.ApiUtils; +import eu.stork.oasisdss.api.LightweightSourceResolver; +import eu.stork.oasisdss.profile.SignResponse; import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.STORKAuthnRequest; @@ -144,23 +149,6 @@ public class PEPSConnectorServlet extends AuthServlet { Logger.debug("Found a preceeding STORK AuthnRequest to this MOA session: " + moaSessionID); - Logger.debug("Starting extraction of signedDoc attribute"); - //extract signed doc element and citizen signature - Element citizenSignature = null; - try { - - Assertion storkAssertion = authnResponse.getAssertions().get(0); - citizenSignature = STORKResponseProcessor.extractCitizenSignature(storkAssertion); - moaSession.setAuthBlock(DOMUtils.serializeNode(citizenSignature)); - moaSession.setSignerCertificate(AuthenticationServer.getCertificateFromXML(citizenSignature)); - - } catch (Exception e) { - Logger.error("Could not extract citizen signature from C-PEPS", e); - throw new MOAIDException("stork.09", null); - } - Logger.debug("Foregin Citizen signature successfully extracted from STORK Assertion (signedDoc)"); - Logger.debug("Citizen signature will be verified by SZR Gateway!"); - ////////////// incorporate gender from parameters if not in stork response PersonalAttribute gender = authnResponse.getPersonalAttributeList().get("gender"); @@ -179,6 +167,23 @@ public class PEPSConnectorServlet extends AuthServlet { ////////////////////////////////////////////////////////////////////////// + Logger.debug("Starting extraction of signedDoc attribute"); + //extract signed doc element and citizen signature + String citizenSignature = null; + try { + citizenSignature = authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0); + moaSession.setAuthBlock(citizenSignature); + + // FIXME untested + Element sepp = (Element) ApiUtils.unmarshal(new StreamSource(new java.io.StringReader(citizenSignature))); + moaSession.setSignerCertificate(AuthenticationServer.getCertificateFromXML(sepp)); + + } catch (Exception e) { + Logger.error("Could not extract citizen signature from C-PEPS", e); + throw new MOAIDException("stork.09", null); + } + Logger.debug("Foregin Citizen signature successfully extracted from STORK Assertion (signedDoc)"); + Logger.debug("Citizen signature will be verified by SZR Gateway!"); Logger.debug("Starting connecting SZR Gateway"); //contact SZR Gateway -- cgit v1.2.3 From 20c7b74026da669ff560281e69b4df37392154fd Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 20:49:58 +0100 Subject: supply MIS information to SZRGW --- .../moa/id/auth/AuthenticationServer.java | 45 ++++++++++++++++------ .../moa/id/auth/servlet/PEPSConnectorServlet.java | 21 +++++++++- .../moa/id/auth/stork/STORKResponseProcessor.java | 12 ++++-- 3 files changed, 63 insertions(+), 15 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index decf166c4..60b269059 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -135,9 +135,13 @@ import at.gv.egovernment.moa.util.FileUtils; import at.gv.egovernment.moa.util.MiscUtil; import at.gv.egovernment.moa.util.StringUtils; import at.gv.egovernment.moa.util.XPathUtils; +import at.gv.util.xsd.mis.MandateIdentifiers; +import at.gv.util.xsd.mis.Target; import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest; import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest.PEPSData; import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; +import at.gv.util.xsd.srzgw.MISType; +import at.gv.util.xsd.srzgw.MISType.Filters; import eu.stork.oasisdss.api.ApiUtils; import eu.stork.oasisdss.api.ApiUtilsException; import eu.stork.oasisdss.profile.DocumentType; @@ -1700,20 +1704,19 @@ public class AuthenticationServer implements MOAIDAuthConstants { /** * Does the request to the SZR-GW - * @param signature XMLDSIG signature + * @param oaFriendlyName + * @param signature XMLDSIG signature * @return Identity link assertion * @throws SZRGWClientException */ - public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException { + public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType, String target, String oaFriendlyName, String filters) throws SZRGWClientException { - SZRGWClient client = null; - try { AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance(); ConnectionParameter connectionParameters = authConf.getForeignIDConnectionParameter(); - client = new SZRGWClient(connectionParameters); + SZRGWClient client = new SZRGWClient(connectionParameters); CreateIdentityLinkRequest request = new CreateIdentityLinkRequest(); @@ -1732,8 +1735,24 @@ public class AuthenticationServer implements MOAIDAuthConstants { data.setLegalPersonCanonicalRegisteredAddress(organizationAddress); data.setLegalPersonTranslatableType(organizationType); - // TODO add MIS data -// request.setMIS(value) + if(null != mandateContent) { + MISType mis = new MISType(); + + Target targetObject = new Target(); + targetObject.setValue(target); + mis.setTarget(targetObject); + + mis.setOAFriendlyName(oaFriendlyName); + + Filters filterObject = new Filters(); + MandateIdentifiers mandateIds = new MandateIdentifiers(); + for(String current : filters.split(",")) + mandateIds.getMandateIdentifier().add(current.trim()); + filterObject.setMandateIdentifiers(mandateIds); + mis.setFilters(filterObject); + + request.setMIS(mis); + } Logger.info("Starte Kommunikation mit dem Stammzahlenregister Gateway(" + connectionParameters.getUrl() + ")..."); CreateIdentityLinkResponse response = client.sentCreateIDLRequest(request , connectionParameters.getUrl()); @@ -1791,8 +1810,10 @@ public class AuthenticationServer implements MOAIDAuthConstants { */ public CreateIdentityLinkResponse getIdentityLink(String citizenSignature, String representative, String represented, String mandateContent, - String organizationAddress, String organizationType) throws SZRGWClientException { - return getIdentityLink(null, null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType); + String organizationAddress, String organizationType, String target, String oaFriendlyName, String filters) throws SZRGWClientException { + return getIdentityLink(null, null, null, null, null, + citizenSignature, represented, representative, mandateContent, organizationAddress, + organizationType, target, oaFriendlyName, filters); } /** @@ -1812,8 +1833,10 @@ public class AuthenticationServer implements MOAIDAuthConstants { public CreateIdentityLinkResponse getIdentityLink(String eIdentifier, String givenName, String lastName, String dateOfBirth, String gender, String citizenSignature, String representative, String represented, - String mandate) throws SZRGWClientException { - return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate, null, null); + String mandate, String target, String oaFriendlyName, String filters) throws SZRGWClientException { + return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, + citizenSignature, representative, represented, mandate, null, + null, target, oaFriendlyName, filters); } /** diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 3129c9e31..bd8c6420d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -30,6 +30,8 @@ import at.gv.egovernment.moa.id.auth.stork.STORKException; import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor; import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; +import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; +import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.ModulUtils; import at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParser; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; @@ -185,11 +187,28 @@ public class PEPSConnectorServlet extends AuthServlet { Logger.debug("Foregin Citizen signature successfully extracted from STORK Assertion (signedDoc)"); Logger.debug("Citizen signature will be verified by SZR Gateway!"); + Logger.debug("fetching OAParameters from database"); + + //read configuration paramters of OA + AuthenticationSession moasession; + try { + moasession = AuthenticationSessionStoreage.getSession(moaSessionID); + } catch (MOADatabaseException e2) { + Logger.error("could not retrieve moa session"); + throw new AuthenticationException("auth.01", null); + } + OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(moasession.getPublicOAURLPrefix()); + if (oaParam == null) + throw new AuthenticationException("auth.00", new Object[] { moasession.getPublicOAURLPrefix() }); + Logger.debug("Starting connecting SZR Gateway"); //contact SZR Gateway IdentityLink identityLink = null; try { - identityLink = STORKResponseProcessor.connectToSZRGateway(authnResponse.getPersonalAttributeList()); + identityLink = STORKResponseProcessor.connectToSZRGateway(authnResponse.getPersonalAttributeList(), + oaParam.getFriendlyName(), + oaParam.getTarget(), + oaParam.getMandateProfiles()); } catch (STORKException e) { // this is really nasty but we work against the system here. We are supposed to get the gender attribute from // stork. If we do not, we cannot register the person in the ERnP - we have to have the diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 5406dc0e1..8385c5dbe 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -334,11 +334,15 @@ public class STORKResponseProcessor { /** * Handels connection to SZR-GW and returns Identity Link on success + * @param oaFriendlyName + * @param target + * @param filters + * @param filter * @param iPersonalAttributeList Received attribute List in assertion * @return Identity Link * @throws STORKException */ - public static IdentityLink connectToSZRGateway(IPersonalAttributeList attributeList) throws STORKException { + public static IdentityLink connectToSZRGateway(IPersonalAttributeList attributeList, String oaFriendlyName, String target, String filters) throws STORKException { Logger.trace("Calling SZR Gateway with the following attributes:"); CreateIdentityLinkResponse identityLinkResponse = null; @@ -362,7 +366,7 @@ public class STORKResponseProcessor { String organizationAddress = getAttributeValue("canonicalRegisteredAddress", attributeList); String organizationType = getAttributeValue("translateableType", attributeList); - identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(citizenSignature, representative, represented, mandate, organizationAddress, organizationType); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(citizenSignature, representative, represented, mandate, organizationAddress, organizationType, target, oaFriendlyName, filters); } else { // if we get here, we have a natural person representing another natural person String eIdentifier = getAttributeValue("eIdentifier", attributeList); @@ -375,7 +379,9 @@ public class STORKResponseProcessor { if (!StringUtils.isEmpty(dateOfBirth)) dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); - identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, + givenName, lastName, dateOfBirth, gender, citizenSignature, representative, + represented, mandate, target, oaFriendlyName, filters); } } else { // we do not have a representation case -- cgit v1.2.3 From e1e410da00a399a8b059645a14a7848b39d3525c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 30 Jan 2014 20:59:16 +0100 Subject: removed old saml-engine --- id/server/idserverlib/pom.xml | 7 - .../moa/id/auth/stork/STORKResponseProcessor.java | 189 --- id/server/stork-saml-engine/pom.xml | 92 -- .../stork/mw/messages/saml/STORKAuthnRequest.java | 139 -- .../eu/stork/mw/messages/saml/STORKResponse.java | 52 - .../messages/builder/STORKMessagesBuilder.java | 1367 -------------------- .../stork/vidp/messages/common/STORKBootstrap.java | 75 -- .../stork/vidp/messages/common/STORKConstants.java | 176 --- .../vidp/messages/exception/SAMLException.java | 60 - .../exception/SAMLValidationException.java | 60 - .../stork/vidp/messages/saml/STORKAttribute.java | 65 - .../vidp/messages/saml/STORKAttributeValue.java | 51 - .../stork/vidp/messages/saml/STORKExtensions.java | 78 -- .../messages/saml/STORKRequestedAttribute.java | 53 - .../messages/saml/impl/STORKAttributeBuilder.java | 60 - .../messages/saml/impl/STORKAttributeImpl.java | 63 - .../saml/impl/STORKAttributeMarshaller.java | 56 - .../saml/impl/STORKAttributeUnmarshaller.java | 58 - .../saml/impl/STORKAuthnRequestBuilder.java | 48 - .../messages/saml/impl/STORKAuthnRequestImpl.java | 170 --- .../saml/impl/STORKAuthnRequestMarshaller.java | 44 - .../saml/impl/STORKAuthnRequestUnmarshaller.java | 137 -- .../messages/saml/impl/STORKExtensionsBuilder.java | 45 - .../messages/saml/impl/STORKExtensionsImpl.java | 74 -- .../saml/impl/STORKExtensionsMarshaller.java | 32 - .../saml/impl/STORKExtensionsUnmarshaller.java | 58 - .../saml/impl/STORKRequestedAttributeBuilder.java | 57 - .../saml/impl/STORKRequestedAttributeImpl.java | 66 - .../impl/STORKRequestedAttributeUnmarshaller.java | 64 - .../messages/saml/impl/STORKResponseBuilder.java | 48 - .../vidp/messages/saml/impl/STORKResponseImpl.java | 59 - .../saml/impl/STORKResponseMarshaller.java | 44 - .../saml/impl/STORKResponseUnmarshaller.java | 51 - .../messages/stork/AuthenticationAttributes.java | 55 - .../vidp/messages/stork/CitizenCountryCode.java | 48 - .../vidp/messages/stork/EIDCrossBorderShare.java | 54 - .../vidp/messages/stork/EIDCrossSectorShare.java | 54 - .../stork/vidp/messages/stork/EIDSectorShare.java | 54 - .../stork/QualityAuthenticationAssuranceLevel.java | 48 - .../vidp/messages/stork/RequestedAttributes.java | 58 - .../stork/vidp/messages/stork/SPAuthRequest.java | 46 - .../eu/stork/vidp/messages/stork/SPCertEnc.java | 44 - .../eu/stork/vidp/messages/stork/SPCertSig.java | 44 - .../eu/stork/vidp/messages/stork/SPCertType.java | 49 - .../java/eu/stork/vidp/messages/stork/SPID.java | 48 - .../stork/vidp/messages/stork/SPInformation.java | 67 - .../stork/vidp/messages/stork/SpApplication.java | 48 - .../eu/stork/vidp/messages/stork/SpCountry.java | 48 - .../stork/vidp/messages/stork/SpInstitution.java | 48 - .../eu/stork/vidp/messages/stork/SpSector.java | 48 - .../stork/VIDPAuthenticationAttributes.java | 60 - .../impl/AuthenticationAttributesBuilder.java | 46 - .../stork/impl/AuthenticationAttributesImpl.java | 74 -- .../impl/AuthenticationAttributesMarshaller.java | 35 - .../impl/AuthenticationAttributesUnmarshaller.java | 52 - .../stork/impl/CitizenCountryCodeBuilder.java | 46 - .../stork/impl/CitizenCountryCodeImpl.java | 60 - .../stork/impl/CitizenCountryCodeMarshaller.java | 45 - .../stork/impl/CitizenCountryCodeUnmarshaller.java | 45 - .../stork/impl/EIDCrossBorderShareBuilder.java | 46 - .../stork/impl/EIDCrossBorderShareImpl.java | 80 -- .../stork/impl/EIDCrossBorderShareMarshaller.java | 45 - .../impl/EIDCrossBorderShareUnmarshaller.java | 45 - .../stork/impl/EIDCrossSectorShareBuilder.java | 46 - .../stork/impl/EIDCrossSectorShareImpl.java | 80 -- .../stork/impl/EIDCrossSectorShareMarshaller.java | 45 - .../impl/EIDCrossSectorShareUnmarshaller.java | 45 - .../messages/stork/impl/EIDSectorShareBuilder.java | 46 - .../messages/stork/impl/EIDSectorShareImpl.java | 80 -- .../stork/impl/EIDSectorShareMarshaller.java | 45 - .../stork/impl/EIDSectorShareUnmarshaller.java | 45 - ...QualityAuthenticationAssuranceLevelBuilder.java | 46 - .../QualityAuthenticationAssuranceLevelImpl.java | 60 - ...lityAuthenticationAssuranceLevelMarshaller.java | 45 - ...tyAuthenticationAssuranceLevelUnmarshaller.java | 45 - .../stork/impl/RequestedAttributesBuilder.java | 58 - .../stork/impl/RequestedAttributesImpl.java | 88 -- .../stork/impl/RequestedAttributesMarshaller.java | 40 - .../impl/RequestedAttributesUnmarshaller.java | 55 - .../messages/stork/impl/SPAuthRequestBuilder.java | 50 - .../messages/stork/impl/SPAuthRequestImpl.java | 76 -- .../stork/impl/SPAuthRequestMarshaller.java | 57 - .../stork/impl/SPAuthRequestUnmarshaller.java | 70 - .../vidp/messages/stork/impl/SPCertEncBuilder.java | 46 - .../vidp/messages/stork/impl/SPCertEncImpl.java | 39 - .../messages/stork/impl/SPCertEncMarshaller.java | 34 - .../messages/stork/impl/SPCertEncUnmarshaller.java | 33 - .../vidp/messages/stork/impl/SPCertSigBuilder.java | 46 - .../vidp/messages/stork/impl/SPCertSigImpl.java | 39 - .../messages/stork/impl/SPCertSigMarshaller.java | 34 - .../messages/stork/impl/SPCertSigUnmarshaller.java | 33 - .../vidp/messages/stork/impl/SPCertTypeImpl.java | 72 -- .../messages/stork/impl/SPCertTypeMarshaller.java | 34 - .../stork/impl/SPCertTypeUnmarshaller.java | 53 - .../vidp/messages/stork/impl/SPIDBuilder.java | 46 - .../stork/vidp/messages/stork/impl/SPIDImpl.java | 60 - .../vidp/messages/stork/impl/SPIDMarshaller.java | 45 - .../vidp/messages/stork/impl/SPIDUnmarshaller.java | 45 - .../messages/stork/impl/SPInformationBuilder.java | 46 - .../messages/stork/impl/SPInformationImpl.java | 121 -- .../stork/impl/SPInformationMarshaller.java | 35 - .../stork/impl/SPInformationUnmarshaller.java | 61 - .../messages/stork/impl/SpApplicationBuilder.java | 46 - .../messages/stork/impl/SpApplicationImpl.java | 60 - .../stork/impl/SpApplicationMarshaller.java | 45 - .../stork/impl/SpApplicationUnmarshaller.java | 45 - .../vidp/messages/stork/impl/SpCountryBuilder.java | 46 - .../vidp/messages/stork/impl/SpCountryImpl.java | 60 - .../messages/stork/impl/SpCountryMarshaller.java | 45 - .../messages/stork/impl/SpCountryUnmarshaller.java | 45 - .../messages/stork/impl/SpInstitutionBuilder.java | 46 - .../messages/stork/impl/SpInstitutionImpl.java | 60 - .../stork/impl/SpInstitutionMarshaller.java | 45 - .../stork/impl/SpInstitutionUnmarshaller.java | 45 - .../vidp/messages/stork/impl/SpSectorBuilder.java | 47 - .../vidp/messages/stork/impl/SpSectorImpl.java | 60 - .../messages/stork/impl/SpSectorMarshaller.java | 45 - .../messages/stork/impl/SpSectorUnmarshaller.java | 45 - .../impl/VIDPAuthenticationAttributesBuilder.java | 46 - .../impl/VIDPAuthenticationAttributesImpl.java | 91 -- .../VIDPAuthenticationAttributesMarshaller.java | 35 - .../VIDPAuthenticationAttributesUnmarshaller.java | 55 - .../java/eu/stork/vidp/messages/util/SAMLUtil.java | 414 ------ .../validation/StorkAssertionValidator.java | 91 -- .../validation/StorkAttributeValidator.java | 204 --- .../StorkAudienceRestrictionValidator.java | 56 - .../StorkAuthenticationAttributesValidator.java | 57 - .../validation/StorkAuthnRequestValidator.java | 137 -- .../validation/StorkAuthnStatementValidator.java | 62 - .../StorkCitizenCountryCodeValidator.java | 63 - .../validation/StorkConditionsValidator.java | 70 - .../validation/StorkEIDSectorShareValidator.java | 51 - .../StorkEncryptedAttributeValidator.java | 50 - .../validation/StorkEncryptedIdValidator.java | 51 - .../validation/StorkExtensionsValidator.java | 66 - .../messages/validation/StorkIssuerValidator.java | 61 - .../messages/validation/StorkNameIDValidator.java | 67 - .../validation/StorkNameIdPolicyValidator.java | 52 - ...alityAuthenticationAssuranceLevelValidator.java | 54 - .../StorkRequestedAttributeValidator.java | 92 -- .../StorkRequestedAttributesValidator.java | 45 - .../validation/StorkResponseValidator.java | 137 -- .../messages/validation/StorkSPIDValidator.java | 64 - .../validation/StorkSPInformationValidator.java | 49 - .../validation/StorkSpApplicationValidator.java | 63 - .../validation/StorkSpCountryValidator.java | 58 - .../validation/StorkSpInstitutionValidator.java | 62 - .../validation/StorkSpSectorValidator.java | 65 - .../validation/StorkStatusCodeValidator.java | 139 -- .../messages/validation/StorkStatusValidator.java | 55 - .../StorkSubjectConfirmationValidator.java | 128 -- .../validation/StorkSubjectLocalityValidator.java | 47 - .../messages/validation/StorkSubjectValidator.java | 60 - ...StorkVIDPAuthenticationAttributesValidator.java | 57 - .../src/main/resources/saml2-post-binding-moa.vm | 38 - .../src/main/resources/saml2-stork-config.xml | 242 ---- 156 files changed, 11301 deletions(-) delete mode 100644 id/server/stork-saml-engine/pom.xml delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKAuthnRequest.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKResponse.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/builder/STORKMessagesBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKBootstrap.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKConstants.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLException.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLValidationException.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttribute.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttributeValue.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKExtensions.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKRequestedAttribute.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/AuthenticationAttributes.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/CitizenCountryCode.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossBorderShare.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossSectorShare.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDSectorShare.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/QualityAuthenticationAssuranceLevel.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/RequestedAttributes.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPAuthRequest.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertEnc.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertSig.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertType.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPID.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPInformation.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpApplication.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpCountry.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpInstitution.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpSector.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/VIDPAuthenticationAttributes.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesBuilder.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesImpl.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesMarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesUnmarshaller.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/util/SAMLUtil.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAssertionValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAttributeValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAudienceRestrictionValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthenticationAttributesValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnRequestValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnStatementValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkCitizenCountryCodeValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkConditionsValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEIDSectorShareValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedAttributeValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedIdValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkExtensionsValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkIssuerValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIDValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIdPolicyValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkQualityAuthenticationAssuranceLevelValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributeValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributesValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkResponseValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPIDValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPInformationValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpApplicationValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpCountryValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpInstitutionValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpSectorValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusCodeValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectConfirmationValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectLocalityValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkVIDPAuthenticationAttributesValidator.java delete mode 100644 id/server/stork-saml-engine/src/main/resources/saml2-post-binding-moa.vm delete mode 100644 id/server/stork-saml-engine/src/main/resources/saml2-stork-config.xml (limited to 'id/server') diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 245348d09..1efa46c7d 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -25,13 +25,6 @@ - - - MOA.id - stork-saml-engine - 1.5.2 - - eu.stork SamlEngine diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 8385c5dbe..6d88a1684 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -40,11 +40,8 @@ import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.DateTimeUtils; import at.gv.egovernment.moa.util.StringUtils; import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; -import eu.stork.mw.messages.saml.STORKResponse; import eu.stork.peps.auth.commons.IPersonalAttributeList; import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.util.SAMLUtil; /** * @@ -60,192 +57,6 @@ public class STORKResponseProcessor { /** OASIS DSS Success Message */ public static final String OASIS_DSS_SUCCESS_MSG = "urn:oasis:names:tc:dss:1.0:resultmajor:Success"; - /** - * Extracts a STORK response from a HTTP message - * @param request HttpServletRequest - * @param response HttpServletResponse - * @return STORK Response - * @throws STORKException - */ - public static STORKResponse receiveSTORKRepsonse(HttpServletRequest request, HttpServletResponse response) throws STORKException { - - HTTPInTransport httpInTransport = new HttpServletRequestAdapter(request); - HTTPOutTransport httpOutTransport = new HttpServletResponseAdapter(response, request.isSecure()); - - httpInTransport.getPeerAddress(); - - String samlResponseString = request.getParameter("SAMLResponse"); - - if (StringUtils.isEmpty(samlResponseString)) { - Logger.error("SAMLResponse not found in request."); - throw new STORKException("SAMLResponse not found in request."); - } - - BasicSAMLMessageContext samlMessageContext = new BasicSAMLMessageContext(); - - samlMessageContext.setInboundMessageTransport(httpInTransport); - samlMessageContext.setOutboundMessageTransport(httpOutTransport); - - HTTPPostDecoder postDecoder = new HTTPPostDecoder(); - - try { - postDecoder.decode(samlMessageContext); - } catch (Exception e) { - Logger.error("Error decoding SAMLResponse message", e); - throw new STORKException("Error decoding SAMLResponse message", e); - } - - if (!(samlMessageContext.getInboundSAMLMessage() instanceof STORKResponse)) { - Logger.error("Message received is not a SAMLResponse message"); - throw new STORKException("Message received is not a SAMLResponse message"); - } - - STORKResponse samlResponse = (STORKResponse) samlMessageContext.getInboundSAMLMessage(); - - return samlResponse; - } - - /** - * Verifies a STORK response according STORK specification - * @param storkResponse STORK Response to verify - * @throws STORKException if validation fails - */ - public static void verifySTORKResponse(STORKResponse storkResponse) throws STORKException { - - ResponseVerifier responseVerifier = new PEPSConnectorResponseVerifier(); - try { - responseVerifier.verify(storkResponse); - } catch (SecurityException e) { - Logger.error("Error validating response message from PEPS.", e); - throw new STORKException("Error validating response message from PEPS."); - } - - } - - /** - * Verifies a STORK assertion - * @param assertion STORK assertion - * @param ipAddress Client IP address - * @param authnRequestID ID of the AuthnRequest - * @param recipient recipient for verification - * @param audience audience for verification - * @param reqAttributeList RequestedAttribute list for verification - * @throws STORKException - */ - public static void verifySTORKAssertion( - Assertion assertion, - String ipAddress, - String authnRequestID, - String recipient, - String audience, - List reqAttributeList) throws STORKException { - - //validate Assertion - AssertionVerifier assertionVerifier = new PEPSConnectorAssertionVerifier(); - try { - assertionVerifier.verify(assertion, ipAddress, authnRequestID, recipient, audience, reqAttributeList); - - //verify if all required attributes are present - PEPSConnectorAssertionVerifier.validateRequiredAttributes(reqAttributeList, assertion.getAttributeStatements().get(0).getAttributes()); - - } catch (SecurityException e) { - Logger.error("Error verifying assertion from PEPS", e); - throw new STORKException("Error validating assertion received from PEPS."); - } - - } - - /** - * Extracts the citizen signature from the signedDoc element present in the STORK assertion - * @param storkAssertion STORK assertion - * @return citizen signature as XML - * @throws STORKException - */ - public static Element extractCitizenSignature(Assertion storkAssertion) throws STORKException { - - Logger.debug("Processing DSS signature response from PEPS"); - - Element signatureResponse = getSignedDocAttributeValue(storkAssertion); - - if (signatureResponse == null) { - String msg = "Could not find DSS signature response in SAML assertion"; - Logger.error(msg); - throw new STORKException(msg); - } - - Logger.debug("Found DSS signature in SAML assertion"); - - Logger.debug("DSS Signature creation response received from PEPS (pretty print):"); - Logger.debug(XMLHelper.prettyPrintXML(signatureResponse)); - Logger.trace("DSS Signature creation response received from PEPS (original):"); - Logger.trace(XMLUtil.printXML(signatureResponse)); - - Element signature = getSignature(signatureResponse); - - if (signature == null) { - String msg = "Could not find citizen signature in SAML assertion"; - Logger.error(msg); - throw new STORKException(msg); - } - - Logger.debug("Found foreign citizen signature in SAML assertion (pretty print):"); - Logger.debug(XMLHelper.prettyPrintXML(signature)); - Logger.trace("Found foreign citizen signature in SAML assertion (original):"); - Logger.trace(XMLUtil.printXML(signature)); - - return signature; - } - - /** - * Extracts the signedDoc attribute from a STORK assertion as XML - * @param storkAssertion STORK assertion - * @return Value of signedDoc attribute - * @throws STORKException - */ - private static Element getSignedDocAttributeValue(Assertion storkAssertion) throws STORKException { - - XMLObject xmlObj = SAMLUtil.getAttributeValue(storkAssertion.getAttributeStatements().get(0).getAttributes(), STORKConstants.STORK_ATTRIBUTE_SIGNEDDOC); - - - if (xmlObj instanceof XSAny) - return getSignedDocAttributeValueFromAny((XSAny) xmlObj); - else if (xmlObj instanceof XSString) - return getSignedDocAttributValueFromString((XSString) xmlObj); - else - return null; - - } - - /** - * Get signedDoc as XML if provided as anyType - * @param any AttributeValue as anyType - * @return signedDoc as XML - */ - private static Element getSignedDocAttributeValueFromAny(XSAny any) { - if (!any.getUnknownXMLObjects(new QName(OASIS_DSS_NS, "SignResponse")).isEmpty()) { - XMLObject xmlObj = any.getUnknownXMLObjects(new QName(OASIS_DSS_NS, "SignResponse")).get(0); - return xmlObj.getDOM(); - } else { - return null; - } - } - - /** - * Get signedDoc as XML if provided as String - * @param string AttributeValue as String - * @return signedDoc as XML - * @throws STORKException - */ - private static Element getSignedDocAttributValueFromString(XSString string) throws STORKException { - try { - return XMLUtil.stringToDOM(string.getValue()); - } catch (Exception e) { - Logger.error("Error building DOM", e); - throw new STORKException(e); - - } - } - /** * Extracts the signature value out of a DSS response * @param signatureResponse DSS signature response diff --git a/id/server/stork-saml-engine/pom.xml b/id/server/stork-saml-engine/pom.xml deleted file mode 100644 index 1988b9af0..000000000 --- a/id/server/stork-saml-engine/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - 4.0.0 - - moa-id - MOA.id - 1.9.96-SNAPSHOT - - stork-saml-engine - 1.5.2 - STORK SAML Engine - SAML2 related stuff for STORK - - - - - -org.apache.maven.plugins -maven-compiler-plugin - -1.5 -1.5 - - - - - - - - org.opensaml - opensaml - 2.5.3 - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - jul-to-slf4j - - - org.slf4j - log4j-over-slf4j - - - - - org.opensaml - xmltooling - 1.3.4 - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - jul-to-slf4j - - - org.slf4j - log4j-over-slf4j - - - - - org.opensaml - openws - 1.4.4 - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - jul-to-slf4j - - - org.slf4j - log4j-over-slf4j - - - - - org.slf4j - slf4j-log4j12 - 1.6.4 - - - - \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKAuthnRequest.java b/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKAuthnRequest.java deleted file mode 100644 index b84721ff5..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKAuthnRequest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.mw.messages.saml; - -import java.security.cert.X509Certificate; -import java.util.List; - -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.xml.XMLObject; - -/** - * Interface extending a SAML AuthnRequest by additional attributes required by STORK - * @author bzwattendorfer - * - */ -public interface STORKAuthnRequest extends AuthnRequest { - - /** - * Sets the ID of the requesting Service Provider - * @param spID ID of the Service Provider - */ - public void setSPID(String spID); - - /** - * Gets the ID of the Service Provider - * @return ID of the Service Provider - */ - public String getSPID(); - - /** - * Sets the citizen country code - * @param citizenCountryCode citizen country code - */ - public void setCitizenCountryCode(String citizenCountryCode); - - /** - * Gets the citizen country code - * @return citizen country code - */ - public String getCitizenCountryCode(); - - /** - * Sets the final redirect URL - * @param finalRedirectURL Final redirect URL - */ - public void setFinalRedirectURL(String finalRedirectURL); - - /** - * Gets the final redirect URL - * @return final redirect URL - */ - public String getFinalRedirectURL(); - - /** - * Sets the signing certificate of the service provider - * @param signingCertificate Signing certificate of the SP - */ - public void setSPCertSig(X509Certificate signingCertificate); - - /** - * Gets the signing certificate of the service provider - * @return signing certificate of the service provider - */ - public X509Certificate getSPCertSig(); - - /** - * Sets the encryption certificate of the service provider - * @param encryptionCertificate encryption certificate of the SP - */ - public void setSPCertEnc(X509Certificate encryptionCertificate); - - /** - * Gets the encryption certificate of the service provider - * @return encryption certificate of the SP - */ - public X509Certificate getSPCertEnc(); - - - /** - * Sets the original authentication request of the service provider - * @param spAuthRequest original SP authentication request - */ - public void setOriginalSPAuthRequest(XMLObject spAuthRequest); - - /** - * Gets the original authentication request of the service provider - * @return original SP authentication request - */ - public XMLObject getOriginalSPAuthRequest(); - - /** - * Sets the requested STORK QAA level - * @param authLevel Requested STORK QAA level - */ - public void setQAALevel(int authLevel); - - /** - * Gets the requested STORK QAA level - * @return Requested STORK QAA level - */ - public int getQAALevel(); - - /** - * Gets a list of requested attributes - * @return List containg all requested attributes - */ - public List getRequestedAttributes(); - - /** - * Sets the requested attributes - * @param requestedAttributesList List containg all requested attributes - */ - public void setRequestedAttributes(List requestedAttributesList); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKResponse.java b/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKResponse.java deleted file mode 100644 index 28de6068b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/mw/messages/saml/STORKResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.mw.messages.saml; - -import org.opensaml.saml2.core.Response; - -/** - * Interface extending a SAML Response by attributes required by STORK - * @author bzwattendorfer - * - */ -public interface STORKResponse extends Response { - - /** - * Sets the QAA level by which the user has been authenticated - * @param authLevel STORK QAA level used for authentication - */ - public void setQAALevel(int authLevel); - - /** - * Gets the QAA level by which the user has been authenticated - * @return STORK QAA level used for authentication - */ - public int getQAALevel(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/builder/STORKMessagesBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/builder/STORKMessagesBuilder.java deleted file mode 100644 index 2f9a19620..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/builder/STORKMessagesBuilder.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.builder; - -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.commons.lang.StringUtils; -import org.joda.time.DateTime; -import org.opensaml.Configuration; -import org.opensaml.common.IdentifierGenerator; -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SAMLObjectBuilder; -import org.opensaml.common.SAMLVersion; -import org.opensaml.common.impl.SecureRandomIdentifierGenerator; -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeStatement; -import org.opensaml.saml2.core.AttributeValue; -import org.opensaml.saml2.core.Audience; -import org.opensaml.saml2.core.AudienceRestriction; -import org.opensaml.saml2.core.AuthnContext; -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.Conditions; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.NameID; -import org.opensaml.saml2.core.OneTimeUse; -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.saml2.core.StatusDetail; -import org.opensaml.saml2.core.StatusMessage; -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.core.SubjectLocality; -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.ws.soap.common.SOAPObject; -import org.opensaml.ws.soap.common.SOAPObjectBuilder; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.XMLObjectBuilder; -import org.opensaml.xml.schema.XSAny; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.schema.impl.XSAnyBuilder; -import org.opensaml.xml.schema.impl.XSStringBuilder; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.signature.X509Data; -import org.opensaml.xml.util.Base64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; -import eu.stork.mw.messages.saml.STORKResponse; -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.saml.STORKAttribute; -import eu.stork.vidp.messages.saml.STORKAttributeValue; -import eu.stork.vidp.messages.saml.STORKExtensions; -import eu.stork.vidp.messages.saml.STORKRequestedAttribute; -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.CitizenCountryCode; -import eu.stork.vidp.messages.stork.EIDCrossBorderShare; -import eu.stork.vidp.messages.stork.EIDCrossSectorShare; -import eu.stork.vidp.messages.stork.EIDSectorShare; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; -import eu.stork.vidp.messages.stork.RequestedAttributes; -import eu.stork.vidp.messages.stork.SPAuthRequest; -import eu.stork.vidp.messages.stork.SPCertEnc; -import eu.stork.vidp.messages.stork.SPCertSig; -import eu.stork.vidp.messages.stork.SPCertType; -import eu.stork.vidp.messages.stork.SPID; -import eu.stork.vidp.messages.stork.SPInformation; -import eu.stork.vidp.messages.stork.SpApplication; -import eu.stork.vidp.messages.stork.SpCountry; -import eu.stork.vidp.messages.stork.SpInstitution; -import eu.stork.vidp.messages.stork.SpSector; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -/** - * Class providing several methods for SAML Object generation - * @author bzwattendorfer - * - */ -public class STORKMessagesBuilder { - - final static Logger log = LoggerFactory.getLogger(STORKMessagesBuilder.class); - - /** - * Builds an arbitrary OpenSAML XML object - * @param OpenSAML XMLObject - * @param objectQName QName of the XML element - * @return Builded OpenSAML XMLObject - */ - @SuppressWarnings("unchecked") - public static T buildXMLObject(QName objectQName) { - - try { - XMLObjectBuilder builder = (XMLObjectBuilder) Configuration.getBuilderFactory().getBuilder(objectQName); - return builder.buildObject(objectQName.getNamespaceURI(), objectQName.getLocalPart(), objectQName.getPrefix()); - } catch (Exception e) { - log.error("Cannot build XML Object {}: {}", objectQName.getLocalPart(), e); - throw new RuntimeException(e); - } - - } - - /** - * Builds a SOAP object - * @param SOAP Object or any extensions - * @param objectQName QName of the XML element - * @return SOAP Object or any extensions - */ - @SuppressWarnings("unchecked") - public static T buildSOAPObject(QName objectQName) { - - try { - SOAPObjectBuilder builder = (SOAPObjectBuilder) Configuration.getBuilderFactory().getBuilder(objectQName); - return builder.buildObject(); - } catch (Exception e) { - log.error("Cannot build SOAP Object {}: {}", objectQName.getLocalPart(), e); - throw new RuntimeException(e); - } - - } - - /** - * Builds an arbitrary OpenSAML SAML object - * @param OpenSAML SAML Object - * @param objectQName QName of the SAML element - * @return Builded OpenSAML SAML Object - */ - @SuppressWarnings("unchecked") - public static T buildSAMLObject(QName objectQName) { - - try { - SAMLObjectBuilder builder = (SAMLObjectBuilder) Configuration.getBuilderFactory().getBuilder(objectQName); - return builder.buildObject(); - } catch (Exception e) { - log.error("Cannot build SAML Object {}: {}", objectQName.getLocalPart(), e); - throw new RuntimeException(e); - } - - } - - - - /** - * Builds SAML Issuer object - * @param issuerValue Value for the issuer element - * @return Issuer object - */ - public static Issuer buildIssuer(String issuerValue) { - if (StringUtils.isEmpty(issuerValue)) - return null; - - Issuer issuer = buildXMLObject(Issuer.DEFAULT_ELEMENT_NAME); - issuer.setValue(issuerValue); - issuer.setFormat(Issuer.ENTITY); - - return issuer; - } - - /** - * Builds a QualityAuthenticationAssuranceLevel object - * @param qaaValue QAALevel (1 to 4) - * @return QualityAuthenticationAssuranceLevel object - */ - public static QualityAuthenticationAssuranceLevel buildQualityAuthenticationAssuranceLevel(int qaaValue) { - if (qaaValue < 1 || qaaValue > 4) { - log.error("QAA Level must be between 1 and 4."); - return null; - } - - QualityAuthenticationAssuranceLevel qaaLevel = buildXMLObject(QualityAuthenticationAssuranceLevel.DEFAULT_ELEMENT_NAME); - qaaLevel.setValue(qaaValue); - return qaaLevel; - } - - /** - * Builds a STORK RequestedAttribute object - * @param name Name of the RequesteAttribute - * @param isRequired true or false if RequestedAttribute is required - * @param value Value of RequestedAttribute - * @return STORK RequestedAttribute object - */ - public static RequestedAttribute buildRequestedAttribute(String name, boolean isRequired, String value) { - - RequestedAttribute reqAttribute = buildXMLObject(STORKRequestedAttribute.DEFAULT_ELEMENT_NAME); - reqAttribute.setName(name); - reqAttribute.setNameFormat(STORKRequestedAttribute.URI_REFERENCE); - reqAttribute.setIsRequired(isRequired); - - if (!StringUtils.isEmpty(value)) { - XSString stringValue = buildXSString(STORKAttributeValue.DEFAULT_ELEMENT_NAME); - stringValue.setValue(value); - reqAttribute.getAttributeValues().add(stringValue); - } - - return reqAttribute; - } - - /** - * Builds XML String type object with given QName - * @param qname QName for object to build - * @return XML object as String type - */ - public static XSString buildXSString(QName qname) { - XSStringBuilder stringBuilder = (XSStringBuilder) Configuration.getBuilderFactory().getBuilder(XSString.TYPE_NAME); - return stringBuilder.buildObject(qname, XSString.TYPE_NAME); - } - - /** - * Builds XML Any type object with given QName - * @param qname QName for object to build - * @return XML object as Any type - */ - public static XSAny buildXSAny(QName qname) { - XSAnyBuilder anyBuilder = (XSAnyBuilder) Configuration.getBuilderFactory().getBuilder(XSAny.TYPE_NAME); - return anyBuilder.buildObject(qname, XSAny.TYPE_NAME); - } - - /** - * Builds a List of RequestedAttribute - * @param requestedAttributeArguments RequestedAttributes - * @return List of RequestedAttribute - */ - public static RequestedAttributes buildRequestedAttributes(RequestedAttribute... requestedAttributeArguments) { - - if (requestedAttributeArguments == null) - return null; - - RequestedAttributes reqAttributes = buildXMLObject(RequestedAttributes.DEFAULT_ELEMENT_NAME); - - for (RequestedAttribute reqAttr : requestedAttributeArguments) { - reqAttributes.getRequestedAttributes().add(reqAttr); - } - - return reqAttributes; - } - - /** - * Builds RequestedAttributes object out of list of RequestedAttribute - * @param requestedAttributeList List of RequestedAttribute - * @return RequestedAttributes object - */ - public static RequestedAttributes buildRequestedAttributes(List requestedAttributeList) { - if (requestedAttributeList == null) - return null; - - RequestedAttributes reqAttributes = buildXMLObject(RequestedAttributes.DEFAULT_ELEMENT_NAME); - reqAttributes.getRequestedAttributes().addAll(requestedAttributeList); - - return reqAttributes; - } - - /** - * Builds a STORK CitizenCountryCode object - * @param ccc ISO country code - * @return CitizenCountryCode object - */ - public static CitizenCountryCode buildCitizenCountryCode(String ccc) { - if (StringUtils.isEmpty(ccc)) { - log.error("CitizenCountryCode must have a value."); - return null; - } - - CitizenCountryCode citizenCountryCode = buildXMLObject(CitizenCountryCode.DEFAULT_ELEMENT_NAME); - citizenCountryCode.setValue(ccc); - - return citizenCountryCode; - } - - /** - * Builds a SPID object - * @param spIDString String to be used as SPID - * @return SPID object - */ - public static SPID buildSPID(String spIDString) { - if (StringUtils.isEmpty(spIDString)) { - log.error("SPID must have a value."); - return null; - } - - SPID spID = buildXMLObject(SPID.DEFAULT_ELEMENT_NAME); - spID.setValue(spIDString); - - return spID; - } - - /** - * Builds SPCertType - * @param cert X509Certificate - * @return SPCertType - */ - private static SPCertType buildSPCertType(X509Certificate cert) { - SPCertType spCertType = buildXMLObject(SPCertType.TYPE_NAME); - KeyInfo keyInfo = buildXMLObject(KeyInfo.DEFAULT_ELEMENT_NAME); - X509Data x509DataElem = buildXMLObject(X509Data.DEFAULT_ELEMENT_NAME); - org.opensaml.xml.signature.X509Certificate x509CertElem = buildXMLObject(org.opensaml.xml.signature.X509Certificate.DEFAULT_ELEMENT_NAME); - - try { - x509CertElem.setValue(Base64.encodeBytes(cert.getEncoded())); - } catch (CertificateEncodingException e) { - log.error("Cannot encode certificate.", e); - throw new RuntimeException(e); - } - - x509DataElem.getX509Certificates().add(x509CertElem); - keyInfo.getX509Datas().add(x509DataElem); - spCertType.setKeyInfo(keyInfo); - return spCertType; - } - - /** - * Builds SPCertSig object - * @param cert X509Certificate - * @return SPCertSig - */ - public static SPCertSig buildSPCertSig(X509Certificate cert) { - return (SPCertSig) buildSPCertType(cert); - } - - /** - * Builds SPCertEnc object - * @param cert X509Certificate - * @return SPCertEnc - */ - public static SPCertEnc buildSPCertEnc(X509Certificate cert) { - return (SPCertEnc) buildSPCertType(cert); - } - - /** - * Builds SPAuthRequest object - * @param xmlObject Abritrary XML object - * @return SPAuthRequest - */ - public static SPAuthRequest buildSPAuthRequest(XMLObject xmlObject) { - SPAuthRequest authRequest = buildXMLObject(SPAuthRequest.DEFAULT_ELEMENT_NAME); - authRequest.getUnknownXMLObjects().add(xmlObject); - return authRequest; - } - - /** - * Builds SPInformation object - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @return SPInformations - */ - public static SPInformation buildSPInformation(String spIDString, X509Certificate sigCert, X509Certificate encCert, XMLObject spAuthRequest) { - - SPInformation spInformation = buildXMLObject(SPInformation.DEFAULT_ELEMENT_NAME); - - SPID spID = buildSPID(spIDString); - spInformation.setSPID(spID); - - if (sigCert != null) { - SPCertSig spCertSig = buildSPCertSig(sigCert); - spInformation.setSPCertSig(spCertSig); - } - - if (encCert != null) { - SPCertEnc spCertEnc = buildSPCertEnc(encCert); - spInformation.setSPCertEnc(spCertEnc); - } - - if (spAuthRequest != null) { - SPAuthRequest spAuthRequestElem = buildSPAuthRequest(spAuthRequest); - spInformation.setSPAuthRequest(spAuthRequestElem); - } - - return spInformation; - - } - - /** - * Builds VIDPAuthenticationAttributes objext - * @param ccc ISO citizen country code - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @return VIDPAuthenticationAttributes - */ - public static VIDPAuthenticationAttributes buildVIDPAuthenticationAttributes(String ccc, String spIDString, X509Certificate sigCert, X509Certificate encCert, XMLObject spAuthRequest) { - VIDPAuthenticationAttributes vidpAuthenticationAttributes = buildXMLObject(VIDPAuthenticationAttributes.DEFAULT_ELEMENT_NAME); - - CitizenCountryCode citizenCountryCode = buildCitizenCountryCode(ccc); - SPInformation spInformation = buildSPInformation(spIDString, sigCert, encCert, spAuthRequest); - - vidpAuthenticationAttributes.setCitizenCountryCode(citizenCountryCode); - vidpAuthenticationAttributes.setSPInformation(spInformation); - - return vidpAuthenticationAttributes; - } - - /** - * Builds AuthenticationAttributes object - * @param ccc ISO citizen country code - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @return AuthenticationAttributes - */ - public static AuthenticationAttributes buildAuthenticationAttributes(String ccc, String spIDString, X509Certificate sigCert, X509Certificate encCert, XMLObject spAuthRequest) { - AuthenticationAttributes authenticationAttributes = buildXMLObject(AuthenticationAttributes.DEFAULT_ELEMENT_NAME); - - VIDPAuthenticationAttributes vidpAuthenticationAttributes = buildVIDPAuthenticationAttributes(ccc, spIDString, sigCert, encCert, spAuthRequest); - - authenticationAttributes.setVIDPAuthenticationAttributes(vidpAuthenticationAttributes); - return authenticationAttributes; - - } - - /** - * Builds SpSector object - * @param spSector Value SPSector value - * @return SpSector - */ - public static SpSector buildSpSector(String spSectorValue) { - - SpSector spSector = buildXMLObject(SpSector.DEFAULT_ELEMENT_NAME); - spSector.setValue(spSectorValue); - - return spSector; - } - - /** - * Builds SpInstitution object - * @param spInstitutionValue Value for SpInstitution - * @return SpInstitution - */ - public static SpInstitution buildSpInstitution(String spInstitutionValue) { - - SpInstitution spInstitution = buildXMLObject(SpInstitution.DEFAULT_ELEMENT_NAME); - spInstitution.setValue(spInstitutionValue); - - return spInstitution; - } - - - /** - * Builds SpApplication object - * @param spApplicationValue Value for SpApplication - * @return SpApplication - */ - public static SpApplication buildSpApplication(String spApplicationValue) { - - SpApplication spApplication = buildXMLObject(SpApplication.DEFAULT_ELEMENT_NAME); - spApplication.setValue(spApplicationValue); - - return spApplication; - } - - /** - * Builds SpCountry object - * @param spCountryValue ISO Code Value for SpCountry - * @return SpCountry - */ - public static SpCountry buildSpCountry(String spCountryValue) { - - SpCountry spCountry = buildXMLObject(SpCountry.DEFAULT_ELEMENT_NAME); - spCountry.setValue(spCountryValue); - - return spCountry; - } - - /** - * Generates secured randomized ID for SAML Messages - * @return secured randomized ID - */ - public static String generateID() { - try { - IdentifierGenerator idGenerator = new SecureRandomIdentifierGenerator(); - return idGenerator.generateIdentifier(); - } catch (NoSuchAlgorithmException e) { - log.error("Cannot generate id", e); - throw new RuntimeException(e); - - } - - } - - /** - * Builds STORKAuthnRequest object - * @param destination Endpoint for AuthnRequest - * @param acsURL Endpoint where STORK response wants to be received - * @param providerName Provider Name - * @param issuerValue Value for Issuer element - * @param qaaLevel STORK QAALevel - * @param requestedAttributes Attributes to be requested - * @param spSector SPSector - * @param spInstitution SPInstitution - * @param spApplication SPApplication - * @param spCountry SPCountry - * @return STORKAuthnRequest - */ - public static STORKAuthnRequest buildSTORKAuthnRequest( - String destination, - String acsURL, - String providerName, - String issuerValue, - QualityAuthenticationAssuranceLevel qaaLevel, - RequestedAttributes requestedAttributes, - String spSector, - String spInstitution, - String spApplication, - String spCountry) { - - //fixed values - String consent = STORKAuthnRequest.UNSPECIFIED_CONSENT; - boolean forceAuthn = true; - boolean isPassive = false; - String binding = SAMLConstants.SAML2_POST_BINDING_URI; - boolean eIDSectorShare = true; - boolean eIDCrossSectorShare = true; - boolean eIDCrossBorderShare = false; - - STORKAuthnRequest authnRequest = buildXMLObject(STORKAuthnRequest.DEFAULT_ELEMENT_NAME); - - authnRequest.setVersion(SAMLVersion.VERSION_20); - authnRequest.setID(generateID()); - authnRequest.setIssueInstant(new DateTime()); - - authnRequest.setConsent(consent); - authnRequest.setForceAuthn(forceAuthn); - authnRequest.setIsPassive(isPassive); - authnRequest.setProtocolBinding(binding); - - authnRequest.setDestination(destination); - authnRequest.setAssertionConsumerServiceURL(acsURL); - authnRequest.setProviderName(providerName); - authnRequest.setIssuer(buildIssuer(issuerValue)); - - STORKExtensions extensions = buildSTORKExtensions(); - - authnRequest.setQAALevel(qaaLevel.getValue()); - extensions.setQAALevel(qaaLevel); - - authnRequest.setRequestedAttributes(requestedAttributes.getRequestedAttributes()); - extensions.setRequestedAttributes(requestedAttributes); - - EIDSectorShare eidSectorShareObj = buildXMLObject(EIDSectorShare.DEFAULT_ELEMENT_NAME); - eidSectorShareObj.setValue(eIDSectorShare); - - EIDCrossSectorShare eidCrossSectorShareObj = buildXMLObject(EIDCrossSectorShare.DEFAULT_ELEMENT_NAME); - eidCrossSectorShareObj.setValue(eIDCrossSectorShare); - - EIDCrossBorderShare eidCrossBorderShareObj = buildXMLObject(EIDCrossBorderShare.DEFAULT_ELEMENT_NAME); - eidCrossBorderShareObj.setValue(eIDCrossBorderShare); - - SpSector spSectorObj = buildSpSector(spSector); - SpInstitution spInstitutionObj = buildSpInstitution(spInstitution); - SpApplication spApplicationObj = buildSpApplication(spApplication); - SpCountry spCountryObj = buildSpCountry(spCountry); - - - extensions.getUnknownXMLObjects().add(qaaLevel); - extensions.getUnknownXMLObjects().add(spSectorObj); - extensions.getUnknownXMLObjects().add(spInstitutionObj); - extensions.getUnknownXMLObjects().add(spApplicationObj); - extensions.getUnknownXMLObjects().add(spCountryObj); - extensions.getUnknownXMLObjects().add(eidSectorShareObj); - extensions.getUnknownXMLObjects().add(eidCrossSectorShareObj); - extensions.getUnknownXMLObjects().add(eidCrossBorderShareObj); - extensions.getUnknownXMLObjects().add(requestedAttributes); - - authnRequest.setExtensions(extensions); - - return authnRequest; - } - - /** - * Builds STORKAuthnRequest object - * @param destination Endpoint for AuthnRequest - * @param acsURL Endpoint where STORK response wants to be received - * @param providerName Provider Name - * @param issuerValue Value for Issuer element - * @param qaaLevel STORK QAALevel - * @param requestedAttributeList List of STORK attributes to be requested - * @param ccc ISO citizen country code - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @param spSector SPSector - * @param spInstitution SPInstitution - * @param spApplication SPApplication - * @param spCountry SPCountry - * @return STORKAuthnRequest - */ - public static STORKAuthnRequest buildSTORKAuthnRequest( - String destination, - String acsURL, - String providerName, - String issuerValue, - int qaaLevel, - List requestedAttributeList, - String ccc, - String spID, - X509Certificate sigCert, - X509Certificate encCert, - XMLObject spAuthRequest, - String spSector, - String spInstitution, - String spApplication, - String spCountry) { - - //fixed values via config - String consent = STORKAuthnRequest.UNSPECIFIED_CONSENT; - boolean forceAuthn = true; - boolean isPassive = false; - String binding = SAMLConstants.SAML2_POST_BINDING_URI; - boolean eIDSectorShare = true; - boolean eIDCrossSectorShare = true; - boolean eIDCrossBorderShare = false; - - return buildSTORKAuthnRequest(consent, forceAuthn, isPassive, binding, eIDSectorShare, eIDCrossSectorShare, eIDCrossBorderShare, destination, acsURL, providerName, issuerValue, qaaLevel, requestedAttributeList, ccc, spID, sigCert, encCert, spAuthRequest, spSector, spInstitution, spApplication, spCountry); - - } - - /** - * Builds STORKAuthnRequest object - * @param consent Consent for the request - * @param forceAuthn forceAuthn - * @param isPassive isPassive - * @param binding Binding the request is sent over - * @param eIDSectorShare Should eIdentifier be shared? - * @param eIDCrossSectorShare Should eIdentifier be shared across sectors? - * @param eIDCrossBorderShare Should eIdentifier be shared across borders? - * @param destination Endpoint for AuthnRequest - * @param acsURL Endpoint where STORK response wants to be received - * @param providerName Provider Name - * @param issuerValue Value for Issuer element - * @param qaaLevel STORK QAALevel - * @param requestedAttributeList List of STORK attributes to be requested - * @param ccc ISO citizen country code - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @param spSector SPSector - * @param spInstitution SPInstitution - * @param spApplication SPApplication - * @param spCountry SPCountry - * @return STORKAuthnRequest - */ - public static STORKAuthnRequest buildSTORKAuthnRequest( - String consent, - boolean forceAuthn, - boolean isPassive, - String binding, - boolean eIDSectorShare, - boolean eIDCrossSectorShare, - boolean eIDCrossBorderShare, - String destination, - String acsURL, - String providerName, - String issuerValue, - int qaaLevel, - List requestedAttributeList, - String ccc, - String spID, - X509Certificate sigCert, - X509Certificate encCert, - XMLObject spAuthRequest, - String spSector, - String spInstitution, - String spApplication, - String spCountry) { - - STORKAuthnRequest authnRequest = buildXMLObject(STORKAuthnRequest.DEFAULT_ELEMENT_NAME); - - authnRequest.setVersion(SAMLVersion.VERSION_20); - authnRequest.setID(generateID()); - authnRequest.setIssueInstant(new DateTime()); - - authnRequest.setDestination(destination); - authnRequest.setAssertionConsumerServiceURL(acsURL); - authnRequest.setProviderName(providerName); - authnRequest.setIssuer(buildIssuer(issuerValue)); - authnRequest.setQAALevel(qaaLevel); - authnRequest.setRequestedAttributes(requestedAttributeList); - authnRequest.setCitizenCountryCode(ccc); - authnRequest.setSPID(spID); - authnRequest.setSPCertSig(sigCert); - authnRequest.setSPCertEnc(encCert); - authnRequest.setOriginalSPAuthRequest(spAuthRequest); - - authnRequest.setConsent(consent); - authnRequest.setForceAuthn(forceAuthn); - authnRequest.setIsPassive(isPassive); - authnRequest.setProtocolBinding(binding); - - addSTORKExtensionsToAuthnRequest(authnRequest, qaaLevel, requestedAttributeList, ccc, spID, sigCert, encCert, spAuthRequest, eIDSectorShare, eIDCrossSectorShare, eIDCrossBorderShare, spSector, spInstitution, spApplication, spCountry); - - return authnRequest; - - } - - /** - * Adds STORK Extensions to STORKAuthnRequest - * @param authnRequest - * @param qaaLevel STORK QAALevel - * @param requestedAttributeList List of STORK attributes to be requested - * @param ccc ISO citizen country code - * @param spIDString SPID - * @param sigCert SP signature certificate - * @param encCert SP encryption certificate - * @param spAuthRequest Original SP AuthnRequest - * @param spSector SPSector - * @param spInstitution SPInstitution - * @param spApplication SPApplication - * @param spCountry SPCountry - */ - public static void addSTORKExtensionsToAuthnRequest( - STORKAuthnRequest authnRequest, - int qaaLevel, - List requestedAttributeList, - String ccc, - String spID, - X509Certificate sigCert, - X509Certificate encCert, - XMLObject spAuthRequest, - boolean eIDSectorShare, - boolean eIDCrossSectorShare, - boolean eIDCrossBorderShare, - String spSector, - String spInstitution, - String spApplication, - String spCountry) { - - STORKExtensions extensions = buildSTORKExtensions(); - authnRequest.setRequestedAttributes(requestedAttributeList); - - QualityAuthenticationAssuranceLevel qaaLevelObj = buildQualityAuthenticationAssuranceLevel(qaaLevel); - RequestedAttributes requestedAttributesObj = buildRequestedAttributes(requestedAttributeList); - AuthenticationAttributes authenticationAttributesObj = buildAuthenticationAttributes(ccc, spID, sigCert, encCert, spAuthRequest); - - EIDSectorShare eidSectorShareObj = buildXMLObject(EIDSectorShare.DEFAULT_ELEMENT_NAME); - eidSectorShareObj.setValue(eIDSectorShare); - - EIDCrossSectorShare eidCrossSectorShareObj = buildXMLObject(EIDCrossSectorShare.DEFAULT_ELEMENT_NAME); - eidCrossSectorShareObj.setValue(eIDCrossSectorShare); - - EIDCrossBorderShare eidCrossBorderShareObj = buildXMLObject(EIDCrossBorderShare.DEFAULT_ELEMENT_NAME); - eidCrossBorderShareObj.setValue(eIDCrossBorderShare); - - SpSector spSectorObj = buildSpSector(spSector); - SpApplication spApplicationObj = buildSpApplication(spApplication); - SpCountry spCountryObj = buildSpCountry(spCountry); - - extensions.setQAALevel(qaaLevelObj); - extensions.setRequestedAttributes(requestedAttributesObj); - extensions.setAuthenticationAttributes(authenticationAttributesObj); - - extensions.getUnknownXMLObjects().add(qaaLevelObj); - extensions.getUnknownXMLObjects().add(spSectorObj); - extensions.getUnknownXMLObjects().add(spApplicationObj); - extensions.getUnknownXMLObjects().add(spCountryObj); - extensions.getUnknownXMLObjects().add(eidSectorShareObj); - extensions.getUnknownXMLObjects().add(eidCrossSectorShareObj); - extensions.getUnknownXMLObjects().add(eidCrossBorderShareObj); - extensions.getUnknownXMLObjects().add(requestedAttributesObj); - extensions.getUnknownXMLObjects().add(authenticationAttributesObj); - - authnRequest.setExtensions(extensions); - - } - - - /** - * Builds STORKExtensions object - * @return STORKExtensions - */ - public static STORKExtensions buildSTORKExtensions() { - QName samlProtocolExtensions = new QName(SAMLConstants.SAML20P_NS, STORKExtensions.LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - return buildXMLObject(samlProtocolExtensions); - } - - /** - * Builds STORKResponse - * @param destination Endpoint where the STORKResponse should be sent to - * @param inResponseTo ID of the corresponding AuthnRequest - * @param issuer Issuer value of the response - * @param status Status of the response (success, error, etc.) - * @param assertion SAML assertion to be included - * @return STORKResponse - */ - public static STORKResponse buildSTORKResponse( - String destination, - String inResponseTo, - Issuer issuer, - Status status, - Assertion assertion) { - - STORKResponse response = buildXMLObject(STORKResponse.DEFAULT_ELEMENT_NAME); - - response.setDestination(destination); - response.setInResponseTo(inResponseTo); - response.setConsent(STORKResponse.OBTAINED_CONSENT); - response.setID(generateID()); - response.setIssueInstant(new DateTime()); - response.setVersion(SAMLVersion.VERSION_20); - - response.setIssuer(issuer); - response.setStatus(status); - response.getAssertions().add(assertion); - - return response; - } - - /** - * Build STORKResponse - * @param destination Endpoint where the STORKResponse should be sent to - * @param inResponseTo ID of the corresponding AuthnRequest - * @param issuer Issuer value of the response - * @param status Status of the response (success, error, etc.) - * @param statusMessage Status message for the response - * @param assertion SAML assertion to be included - * @return STORKResponse - */ - public static STORKResponse buildSTORKResponse( - String destination, - String inResponseTo, - String issuerString, - String statusCode, - String statusMessage, - Assertion assertion) { - - Status status = buildStatus(statusCode, statusMessage); - Issuer issuer = buildIssuer(issuerString); - - return buildSTORKResponse(destination, inResponseTo, issuer, status, assertion); - } - - - /** - * Builds a STORKResponse containing no assertion - * @param destination Endpoint where the STORKResponse should be sent to - * @param inResponseTo ID of the corresponding AuthnRequest - * @param issuer Issuer value of the response - * @param status Status of the response (success, error, etc.) - * @param statusMessage Status message for the response - * @return STORKResponse - */ - public static STORKResponse buildSTORKErrorResponse( - String destination, - String inResponseTo, - String issuerString, - String statusCode, - String statusMessage) { - - return buildSTORKResponse(destination, inResponseTo, issuerString, statusCode, statusMessage, null); - } - - /** - * Builds Status object - * @param statusCodeValue StatusCode - * @param statusMessageValue StatusMessage - * @return Status - */ - public static Status buildStatus(String statusCodeValue, String statusMessageValue) { - return buildStatus(statusCodeValue, statusMessageValue, null); - } - - /** - * Builds Status object - * @param statusCodeValue StatusCode - * @param statusMessageValue StatusMessage - * @param detail Detail Message - * @return Status - */ - public static Status buildStatus(String statusCodeValue, String statusMessageValue, XMLObject detail) { - StatusCode statusCode = buildXMLObject(StatusCode.DEFAULT_ELEMENT_NAME); - statusCode.setValue(statusCodeValue); - - StatusMessage statusMessage = buildXMLObject(StatusMessage.DEFAULT_ELEMENT_NAME); - statusMessage.setMessage(statusMessageValue); - - StatusDetail statusDetail = buildXMLObject(StatusDetail.DEFAULT_ELEMENT_NAME); - statusDetail.getUnknownXMLObjects().add(detail); - - Status status = buildXMLObject(Status.DEFAULT_ELEMENT_NAME); - status.setStatusCode(statusCode); - status.setStatusMessage(statusMessage); - - return status; - - } - - /** - * Builds Assertion - * @param issuer Issuer value for assertion - * @param subject Subject of assertion - * @param conditions Conditions of assertion - * @param authnStatement AuthnStatement - * @param attributeStatement AttributeAtatement - * @return Assertion - */ - public static Assertion buildAssertion(Issuer issuer, - Subject subject, - Conditions conditions, - AuthnStatement authnStatement, - AttributeStatement attributeStatement) { - Assertion assertion = buildXMLObject(Assertion.DEFAULT_ELEMENT_NAME); - - assertion.setID(generateID()); - assertion.setVersion(SAMLVersion.VERSION_20); - assertion.setIssueInstant(new DateTime()); - - assertion.setIssuer(issuer); - assertion.setSubject(subject); - assertion.setConditions(conditions); - assertion.getAuthnStatements().add(authnStatement); - assertion.getAttributeStatements().add(attributeStatement); - - return assertion; - } - - /** - * Builds Assertion object - * @param issuerValue Value of the issuer - * @param nameQualifier nameQualifier - * @param spNameQualifier spNameQualifier - * @param spProviderID spProviderID - * @param ipAddress IP address of the client - * @param inResponseTo ID of the corresponding AuthnRequest - * @param notBefore Time before assertion is not valid - * @param notOnOrAfter Time after assertion is not valid - * @param recipient Recipient of the assertion - * @param attributeList Attributes to be included in the assertion - * @return Assertion - */ - public static Assertion buildAssertion( - String issuerValue, - String nameQualifier, - String spNameQualifier, - String spProviderID, - String ipAddress, - String inResponseTo, - DateTime notBefore, - DateTime notOnOrAfter, - String recipient, - List attributeList) { - - Issuer issuer = buildIssuer(issuerValue); - NameID nameID = buildNameID(NameID.UNSPECIFIED, nameQualifier, spNameQualifier, spProviderID, NameID.UNSPECIFIED); - SubjectConfirmationData scData = buildSubjectConfirmationData(ipAddress, inResponseTo, notOnOrAfter, recipient); - SubjectConfirmation subjectConfirmation = buildSubjectConfirmation(SubjectConfirmation.METHOD_BEARER, scData); - Subject subject = buildSubject(nameID, subjectConfirmation); - - List audienceList = buildAudienceList(recipient); - Conditions conditions = buildConditions(notBefore, notOnOrAfter, audienceList); - AuthnStatement authnStatement = buildAuthnStatement(ipAddress); - AttributeStatement attributeStatement = buildAttributeStatement(attributeList); - - return buildAssertion(issuer, subject, conditions, authnStatement, attributeStatement); - } - - /** - * Builds List of Audience objects - * @param audiences Audience strings - * @return List of Audience - */ - public static List buildAudienceList(String... audiences) { - List audienceList = new ArrayList(); - - for (String audienceString : audiences) { - Audience audience = buildXMLObject(Audience.DEFAULT_ELEMENT_NAME); - audience.setAudienceURI(audienceString); - audienceList.add(audience); - } - - return audienceList; - } - - /** - * Builds NameID object - * @param format Format of the NameID - * @param nameQualifier nameQualifier - * @param spNameQualifier spNameQualifier - * @param spProviderID spProviderID - * @param value Value of the NameID - * @return NameID - */ - public static NameID buildNameID(String format, - String nameQualifier, - String spNameQualifier, - String spProviderID, - String value) { - - NameID nameID = buildXMLObject(NameID.DEFAULT_ELEMENT_NAME); - - nameID.setFormat(format); - nameID.setNameQualifier(nameQualifier); - nameID.setSPNameQualifier(spNameQualifier); - nameID.setSPProvidedID(spProviderID); - nameID.setValue(value); - - return nameID; - - } - - /** - * Builds SubjectConfirmation object - * @param method Method of SubjectConfirmation - * @param scData SubjectConfirmationData - * @return SubjectConfirmation - */ - public static SubjectConfirmation buildSubjectConfirmation(String method, SubjectConfirmationData scData) { - - SubjectConfirmation subjectConfirmation = buildXMLObject(SubjectConfirmation.DEFAULT_ELEMENT_NAME); - - subjectConfirmation.setMethod(method); - subjectConfirmation.setSubjectConfirmationData(scData); - - return subjectConfirmation; - } - - /** - * Builds SubjectConfirmationData object - * @param ipAddress IP address of the client - * @param inResponseTo ID of the corresponding AuthnRequest - * @param notOnOrAfter Time after subject is not valid - * @param recipient recipient of the assertion - * @return SubjectConfirmationData - */ - public static SubjectConfirmationData buildSubjectConfirmationData(String ipAddress, - String inResponseTo, - DateTime notOnOrAfter, - String recipient) { - - SubjectConfirmationData scData = buildXMLObject(SubjectConfirmationData.DEFAULT_ELEMENT_NAME); - - scData.setAddress(ipAddress); - scData.setInResponseTo(inResponseTo); - scData.setNotOnOrAfter(notOnOrAfter); - scData.setRecipient(recipient); - - return scData; - - } - - /** - * Builds Subject object - * @param nameID NameID object - * @param subjectConfirmation SubjectConfirmation - * @return Subject - */ - public static Subject buildSubject(NameID nameID, SubjectConfirmation subjectConfirmation) { - - Subject subject = buildXMLObject(Subject.DEFAULT_ELEMENT_NAME); - subject.setNameID(nameID); - subject.getSubjectConfirmations().add(subjectConfirmation); - - return subject; - } - - /** - * Build Conditions object - * @param notBefore Time before assertion is not valid - * @param notOnOrAfter Time after assertion is not valid - * @param audienceList List of audience - * @return Conditions - */ - public static Conditions buildConditions(DateTime notBefore, DateTime notOnOrAfter, List audienceList) { - Conditions conditions = buildXMLObject(Conditions.DEFAULT_ELEMENT_NAME); - - conditions.setNotBefore(notBefore); - conditions.setNotOnOrAfter(notOnOrAfter); - - AudienceRestriction audienceRestriction = buildXMLObject(AudienceRestriction.DEFAULT_ELEMENT_NAME); - audienceRestriction.getAudiences().addAll(audienceList); - conditions.getAudienceRestrictions().add(audienceRestriction); - - OneTimeUse oneTimeUse = buildXMLObject(OneTimeUse.DEFAULT_ELEMENT_NAME); - conditions.getConditions().add(oneTimeUse); - - return conditions; - - } - - /** - * Build AuthnStatement object - * @param authInstant Time instant of authentication - * @param subjectLocality subjectLocality - * @param authnContext AuthnContext used - * @return AuthnStatement - */ - public static AuthnStatement buildAuthnStatement(DateTime authInstant, SubjectLocality subjectLocality, AuthnContext authnContext) { - AuthnStatement authnStatement = buildXMLObject(AuthnStatement.DEFAULT_ELEMENT_NAME); - - authnStatement.setAuthnInstant(authInstant); - authnStatement.setSubjectLocality(subjectLocality); - authnStatement.setAuthnContext(authnContext); - - return authnStatement; - } - - /** - * Build AuthnStatement object - * @param ipAddress IP address of the client - * @return AuthnStatement - */ - public static AuthnStatement buildAuthnStatement(String ipAddress) { - AuthnStatement authnStatement = buildXMLObject(AuthnStatement.DEFAULT_ELEMENT_NAME); - - authnStatement.setAuthnInstant(new DateTime()); - - SubjectLocality subjectLocality = buildXMLObject(SubjectLocality.DEFAULT_ELEMENT_NAME); - subjectLocality.setAddress(ipAddress); - authnStatement.setSubjectLocality(subjectLocality); - - AuthnContext authnContext = buildXMLObject(AuthnContext.DEFAULT_ELEMENT_NAME); - authnStatement.setAuthnContext(authnContext); - - return authnStatement; - } - - /** - * Builds AttributeStatement object - * @return AttributeStatement - */ - public static AttributeStatement buildAttributeStatement() { - return buildXMLObject(AttributeStatement.DEFAULT_ELEMENT_NAME); - } - - /** - * Builds AttributeStatement object - * @param attributeList List of attributes - * @return AttributeStatement - */ - public static AttributeStatement buildAttributeStatement(List attributeList) { - AttributeStatement attributeStatement = buildXMLObject(AttributeStatement.DEFAULT_ELEMENT_NAME); - attributeStatement.getAttributes().addAll(attributeList); - - return attributeStatement; - } - - /** - * Builds STORK String Attribute - * @param name Attribute Name - * @param friendlyName friendlyName of Attribute - * @param value Value of Attribute - * @param status STORK status of attribute - * @return STORK String Attribute - */ - public static Attribute buildSTORKStringAttribute(String name, String friendlyName, String value, String status) { - XSString xsString = buildXSString(AttributeValue.DEFAULT_ELEMENT_NAME); - xsString.setValue(value); - - return buildAttribute(name, friendlyName, status, xsString); - } - - /** - * Builds STORK XML Any Attribute - * @param name Attribute Name - * @param friendlyName friendlyName of Attribute - * @param value Value of Attribute - * @param status STORK status of attribute - * @return STORK XML Any Attribute - */ - public static Attribute buildSTORKXMLAttribute(String name, String friendlyName, XMLObject value, String status) { - XSAny xsAny = buildXMLObject(AttributeValue.DEFAULT_ELEMENT_NAME); - xsAny.getUnknownXMLObjects().add(value); - - return buildAttribute(name, friendlyName, status, xsAny); - } - - /** - * Builds STORK Attribute - * @param name Attribute Name - * @param friendlyName friendlyName of Attribute - * @param status STORK status of Attribute - * @param attributeValue Value of the Attribute - * @return Attribute - */ - public static Attribute buildAttribute(String name, String friendlyName, String status, XMLObject attributeValue) { - Attribute attribute = buildXMLObject(STORKAttribute.DEFAULT_ELEMENT_NAME); - - attribute.setNameFormat(STORKAttribute.URI_REFERENCE); - attribute.setFriendlyName(friendlyName); - attribute.setName(name); - attribute.getUnknownAttributes().put(STORKAttribute.DEFAULT_STORK_ATTRIBUTE_QNAME, status); - attribute.getAttributeValues().add(attributeValue); - - return attribute; - } - - /** - * Builds STORK String Attribute - * @param name Attribute Name - * @param friendlyName friendlyName of Attribute - * @param status STORK status of Attribute - * @param attributeValue Value of the Attribute - * @return String Attribute - */ - public static Attribute buildStringAttribute(String name, String friendlyName, String status, String attributeValue) { - Attribute attribute = buildXMLObject(STORKAttribute.DEFAULT_ELEMENT_NAME); - - attribute.setNameFormat(STORKAttribute.URI_REFERENCE); - attribute.setFriendlyName(friendlyName); - attribute.setName(name); - attribute.getUnknownAttributes().put(STORKAttribute.DEFAULT_STORK_ATTRIBUTE_QNAME, status); - - XSString xsString = buildXSString(AttributeValue.DEFAULT_ELEMENT_NAME); - xsString.setValue(attributeValue); - attribute.getAttributeValues().add(xsString); - - return attribute; - } - - /** - * Builds DSS signature request - * @param textToBeSigned Text to be included in the DSS request - * @param mimeType MimeType of the contents - * @return DSS signature request as String - */ - public static String buildSignatureRequestString(String textToBeSigned, String mimeType) { - //MimeType=\"text/plain\" - //MimeType=\"application/xhtml+xml\" - String sigRequestString = - "" + - "" + - "" + - "" + Base64.encodeBytes(textToBeSigned.getBytes()) + "" + - "" + - "" + - ""; - - return sigRequestString; - - } - - /** - * Builds STORK signedDoc RequestedAttribute - * @param textToBeSigned Text to be included in the DSS request - * @param mimeType MimeType of the contents - * @param isRequired true or false if signedDoc RequestedAttribute is required - * @return STORK signedDoc RequestedAttribute - */ - public static RequestedAttribute buildSignatureRequestRequestedAttribute(String textToBeSigned, String mimeType, boolean isRequired) { - return buildRequestedAttribute(STORKConstants.STORK_ATTRIBUTE_SIGNEDDOC, isRequired, buildSignatureRequestString(textToBeSigned, mimeType)); - } - - /** - * Adds RequestedAttribute to STORKAuthnRequest - * @param authnRequest STORKAuthnRequest - * @param reqAttr RequestedAttribute - */ - public static void addRequestedAttribute(STORKAuthnRequest authnRequest, RequestedAttribute reqAttr) { - if (authnRequest != null) { - RequestedAttributes requestedAttributes = (RequestedAttributes) authnRequest.getExtensions().getUnknownXMLObjects(RequestedAttributes.DEFAULT_ELEMENT_NAME).get(0); - requestedAttributes.getRequestedAttributes().add(reqAttr); - } - } - - /** - * Adds several RequestedAttribute to STORKAuthnRequest - * @param authnRequest STORKAuthnRequest - * @param reqAttr RequestedAttribute - */ - public static void addRequestedAttributes(STORKAuthnRequest authnRequest, RequestedAttribute... reqAttrs) { - for (RequestedAttribute reqAttr : reqAttrs) { - addRequestedAttribute(authnRequest, reqAttr); - } - } - - /** - * Builds STORK signed doc attribute and adds it to STORKAuthnRequest - * @param authnRequest STORKAuthnRequest - * @param textToBeSigned Text to be included in the DSS request - * @param mimeType MimeType of the contents - * @param isRequired true or false if signedDoc RequestedAttribute is required - */ - public static void buildAndAddSignatureRequestToAuthnRequest(STORKAuthnRequest authnRequest, String textToBeSigned, String mimeType, boolean isRequired) { - if (authnRequest != null && !StringUtils.isEmpty(textToBeSigned)) { - addRequestedAttribute(authnRequest, buildSignatureRequestRequestedAttribute(textToBeSigned, mimeType, isRequired)); - } - - } - - /** - * Adds DSS siganture request as String to STORKAuthnRequest - * @param authnRequest STORKAuthnRequest - * @param dssSignatureRequest DSS signature request as String - * @param isRequired true or false if signedDoc RequestedAttribute is required - */ - public static void addSignatureRequestToAuthnRequest(STORKAuthnRequest authnRequest, String dssSignatureRequest, boolean isRequired) { - if (authnRequest != null && !StringUtils.isEmpty(dssSignatureRequest)) { - addRequestedAttribute(authnRequest, buildRequestedAttribute(STORKConstants.STORK_ATTRIBUTE_SIGNEDDOC, isRequired, dssSignatureRequest)); - } - - } - - /** - * Adds Attribute to an assertion - * @param assertion Assertion - * @param attr Attribute - */ - public static void addAttribute(Assertion assertion, Attribute attr) { - if (assertion != null) { - if (!assertion.getAttributeStatements().isEmpty()) { - assertion.getAttributeStatements().get(0).getAttributes().add(attr); - } - } - } - - /** - * Adds several Attribute to an assertion - * @param assertion Assertion - * @param attr Attribute - */ - public static void addAttributes(Assertion assertion, Attribute... attrs) { - for (Attribute attr : attrs) { - addAttribute(assertion, attr); - } - } - - /** - * Adds several Attribute to first assertion in STORK response - * @param response STORK response - * @param attrs Attribute - */ - public static void addAttribute(STORKResponse response, Attribute... attrs) { - if (response != null) { - if (!response.getAssertions().isEmpty()) { - addAttributes(response.getAssertions().get(0), attrs); - } - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKBootstrap.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKBootstrap.java deleted file mode 100644 index 953affdf8..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKBootstrap.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.common; - -import java.io.InputStream; - -import org.opensaml.DefaultBootstrap; -import org.opensaml.common.xml.SAMLSchemaBuilder; -import org.opensaml.xml.ConfigurationException; -import org.opensaml.xml.XMLConfigurator; - -/** - * Class extending the default bootstrap mechanism of OpenSAML - * @author bzwattendorfer - * - */ -public class STORKBootstrap extends DefaultBootstrap { - - /** - * Extends the default bootstrap mechanism of OpenSAML - * Adds STORK schemata and extension elements - * @throws ConfigurationException - */ - public static synchronized void bootstrap() throws ConfigurationException { - - DefaultBootstrap.bootstrap(); - - SAMLSchemaBuilder.addExtensionSchema("stork-schema-assertion-1.0.xsd"); - SAMLSchemaBuilder.addExtensionSchema("stork-schema-protocol-1.0.xsd"); - - - - initStorkConfig("saml2-stork-config.xml"); - - } - - /** - * Initializes OpenSAML with config - * @param xmlConfig XML Config for STORK and SAML2 - * @throws ConfigurationException - */ - private static void initStorkConfig(String xmlConfig) throws ConfigurationException { - - XMLConfigurator configurator = new XMLConfigurator(); - - InputStream is = STORKBootstrap.class.getClassLoader().getResourceAsStream(xmlConfig); - - configurator.load(is); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKConstants.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKConstants.java deleted file mode 100644 index 5a63e2dcd..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/common/STORKConstants.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.common; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** - * Interface encapuslating relevant STORK constants such as namespace, attribute names, etc. - * @author bzwattendorfer - * - */ -public interface STORKConstants { - - /** - * STORK namespace - */ - public static final String STORK10_NS = "urn:eu:stork:names:tc:STORK:1.0:assertion"; - - /** - * STORK namespace prefix - */ - public static final String STORK10_PREFIX = "stork"; - - /** - * STORK protocol namespace - */ - public static final String STORKP10_NS = "urn:eu:stork:names:tc:STORK:1.0:protocol"; - - /** - * STORK protocol namespace prefix - */ - public static final String STORKP10_PREFIX = "storkp"; - - /** - * STORK attribute name prefix - */ - final static String STORK_ATTRIBUTE_NAME_PREFIX = "http://www.stork.gov.eu/1.0/"; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_EIDENTIFIER = "eIdentifier"; - final static String STORK_ATTRIBUTE_EIDENTIFIER = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_EIDENTIFIER; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_GIVENAME = "givenName"; - final static String STORK_ATTRIBUTE_GIVENNAME = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_GIVENAME; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_SURNAME = "surname"; - final static String STORK_ATTRIBUTE_SURNAME = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_SURNAME; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_INHERITED_FAMILYNAME = "inheritedFamilyName"; - final static String STORK_ATTRIBUTE_INHERITED_FAMILYNAME = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_INHERITED_FAMILYNAME; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_ADOPTED_FAMILYNAME = "adoptedFamilyName"; - final static String STORK_ATTRIBUTE_ADOPTED_FAMILYNAME = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_ADOPTED_FAMILYNAME; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_GENDER = "gender"; - final static String STORK_ATTRIBUTE_GENDER = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_GENDER; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_DATEOFBIRTH = "dateOfBirth"; - final static String STORK_ATTRIBUTE_DATEOFBIRTH = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_DATEOFBIRTH; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_COUNTRYOFBIRTH = "countryCodeOfBirth"; - final static String STORK_ATTRIBUTE_COUNTRYCODEOFBIRTH = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_COUNTRYOFBIRTH; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_NATIONALITYCODE = "nationalityCode"; - final static String STORK_ATTRIBUTE_NATIONALITYCODE = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_NATIONALITYCODE; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_MARTIALSTATUS = "maritalStatus"; - final static String STORK_ATTRIBUTE_MARTIALSTATUS = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_MARTIALSTATUS; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_TEXT_RESIDENCE_ADDRESS = "textResidenceAddress"; - final static String STORK_ATTRIBUTE_TEXT_RESIDENCE_ADDRESS = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_TEXT_RESIDENCE_ADDRESS; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_CANONICAL_RESIDENCE_ADDRESS = "canonicalResidenceAddress"; - final static String STORK_ATTRIBUTE_TEXT_CANONICAL_ADDRESS = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_CANONICAL_RESIDENCE_ADDRESS; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_EMAIL = "eMail"; - final static String STORK_ATTRIBUTE_EMAIL = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_EMAIL; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_TITLE = "title"; - final static String STORK_ATTRIBUTE_TITLE = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_TITLE; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_RESIDENCE_PERMIT = "residencePermit"; - final static String STORK_ATTRIBUTE_RESIDENCE_PERMIT = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_RESIDENCE_PERMIT; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_PSEUDONYM = "pseudonym"; - final static String STORK_ATTRIBUTE_PSEUDONYM = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_PSEUDONYM; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_AGE = "age"; - final static String STORK_ATTRIBUTE_AGE = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_AGE; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_ISAGEOVER = "isAgeOver"; - final static String STORK_ATTRIBUTE_ISAGEOVER = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_ISAGEOVER; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_SIGNED_DOC = "signedDoc"; - final static String STORK_ATTRIBUTE_SIGNEDDOC = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_SIGNED_DOC; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_FISCALNUMBER = "fiscalNumber"; - final static String STORK_ATTRIBUTE_FISCALNUMBER = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_FISCALNUMBER; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_CITIZENQAALEVEL_OLD = "citizenQAAlevel"; - final static String STORK_ATTRIBUTE_CITIZENQAALEVEL_OLD = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_CITIZENQAALEVEL_OLD; - - final static String STORK_ATTRIBUTE_NAME_SUFFIX_CITIZENQAALEVEL = "citizenQAALevel"; - final static String STORK_ATTRIBUTE_CITIZENQAALEVEL = STORK_ATTRIBUTE_NAME_PREFIX + STORK_ATTRIBUTE_NAME_SUFFIX_CITIZENQAALEVEL; - - /** - * Full Set of accepted STORK attributes - */ - public final Set FULL_STORK_ATTRIBUTE_SET = new HashSet(Arrays.asList(new String[] {STORK_ATTRIBUTE_EIDENTIFIER, - STORK_ATTRIBUTE_GIVENNAME, - STORK_ATTRIBUTE_SURNAME, - STORK_ATTRIBUTE_INHERITED_FAMILYNAME, - STORK_ATTRIBUTE_ADOPTED_FAMILYNAME, - STORK_ATTRIBUTE_GENDER, - STORK_ATTRIBUTE_DATEOFBIRTH, - STORK_ATTRIBUTE_COUNTRYCODEOFBIRTH, - STORK_ATTRIBUTE_NATIONALITYCODE, - STORK_ATTRIBUTE_MARTIALSTATUS, - STORK_ATTRIBUTE_TEXT_RESIDENCE_ADDRESS, - STORK_ATTRIBUTE_TEXT_CANONICAL_ADDRESS, - STORK_ATTRIBUTE_TEXT_CANONICAL_ADDRESS, - STORK_ATTRIBUTE_EMAIL, - STORK_ATTRIBUTE_TITLE, - STORK_ATTRIBUTE_RESIDENCE_PERMIT, - STORK_ATTRIBUTE_PSEUDONYM, - STORK_ATTRIBUTE_AGE, - STORK_ATTRIBUTE_ISAGEOVER, - STORK_ATTRIBUTE_SIGNEDDOC, - STORK_ATTRIBUTE_FISCALNUMBER, - STORK_ATTRIBUTE_CITIZENQAALEVEL_OLD, - STORK_ATTRIBUTE_CITIZENQAALEVEL})); - - /** - * Default set of STORK attributes to be requested (without signedDoc) - */ - Set DEFAULT_STORK_REQUESTED_ATTRIBUTE_SET = new HashSet(Arrays.asList(new String[] { - STORK_ATTRIBUTE_EIDENTIFIER, - STORK_ATTRIBUTE_GIVENNAME, - STORK_ATTRIBUTE_SURNAME, - STORK_ATTRIBUTE_DATEOFBIRTH,})); - - /** - * Default required set of returned STORK attributes - */ - Set DEFAULT_STORK_RETURNED_ATTRIBUTE_SET = new HashSet(Arrays.asList(new String[] { - STORK_ATTRIBUTE_EIDENTIFIER, - STORK_ATTRIBUTE_GIVENNAME, - STORK_ATTRIBUTE_SURNAME, - STORK_ATTRIBUTE_DATEOFBIRTH, - STORK_ATTRIBUTE_SIGNEDDOC})); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLException.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLException.java deleted file mode 100644 index 33ee67313..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLException.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.exception; - -/** - * Exception thrown if exception occurs in SAML message processing - * @author bzwattendorfer - * - */ -public class SAMLException extends Exception { - - /** {@inheritDoc} */ - public SAMLException() { - super(); - } - - /** {@inheritDoc} */ - public SAMLException(String message, Throwable cause) { - super(message, cause); - } - - /** {@inheritDoc} */ - public SAMLException(String message) { - super(message); - } - - /** {@inheritDoc} */ - public SAMLException(Throwable cause) { - super(cause); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLValidationException.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLValidationException.java deleted file mode 100644 index 51520d968..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/exception/SAMLValidationException.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.exception; - -/** - * Exception thrown if error occurs in SAML message validation - * @author bzwattendorfer - * - */ -public class SAMLValidationException extends Exception { - - private static final long serialVersionUID = 1L; - - /** {@inheritDoc} */ - public SAMLValidationException() { - - super(); - } - - /** {@inheritDoc} */ - public SAMLValidationException(String s) { - - super(s); - } - - /** {@inheritDoc} */ - public SAMLValidationException(Exception e) { - - super(e); - } - - /** {@inheritDoc} */ - public SAMLValidationException(String m, Exception e) { - - super(m, e); - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttribute.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttribute.java deleted file mode 100644 index ec8232704..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttribute.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.core.Attribute; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * Interface extending original SAML Attribute for STORK with the XML attributeStatus attribute - * {@inheritDoc} - * @author bzwattendorfer - * - */ -public interface STORKAttribute extends Attribute { - - public static final String STORK_ATTRIBUTE_STATUS_ATTTRIB_NAME = "AttributeStatus"; - - public static final QName DEFAULT_STORK_ATTRIBUTE_QNAME = new QName(STORKConstants.STORK10_NS, STORK_ATTRIBUTE_STATUS_ATTTRIB_NAME, STORKConstants.STORK10_PREFIX); - - public static final String ALLOWED_ATTRIBUTE_STATUS_AVAIL = "Available"; - public static final String ALLOWED_ATTRIBUTE_STATUS_NOT_AVAIL = "NotAvailable"; - public static final String ALLOWED_ATTRIBUTE_STATUS_WITHHELD = "Withheld"; - - /** - * Sets the STORK attributeStatus - * @param attributeStatus - */ - public void setAttributeStatus(String attributeStatus); - - /** - * Gets the STORK attributeStatus - * @return - */ - public String getAttributeStatus(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttributeValue.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttributeValue.java deleted file mode 100644 index 2d511d62a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKAttributeValue.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.core.AttributeValue; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * {@inheritDoc} - * @author bzwattendorfer - * - */ -public interface STORKAttributeValue extends AttributeValue { - - /** Element name, no namespace. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AttributeValue"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKExtensions.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKExtensions.java deleted file mode 100644 index b5e12ea75..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKExtensions.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml; - -import org.opensaml.saml2.common.Extensions; - -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; -import eu.stork.vidp.messages.stork.RequestedAttributes; - -/** - * Extends the SAML Extension element with STORK related functionality - * {@inheritDoc} - * @author bzwattendorfer - * - */ -public interface STORKExtensions extends Extensions { - - /** - * Sets the QAALevel object - * @param authLevel QAALevel object - */ - public void setQAALevel(QualityAuthenticationAssuranceLevel authLevel); - - /** - * Gets the QAALevel object - * @return QAALevel object - */ - public QualityAuthenticationAssuranceLevel getQAALevel(); - - /** - * Gets the RequestedAttributes object - * @return RequestedAttributes object - */ - public RequestedAttributes getRequestedAttributes(); - - /** - * Sets RequestedAttributes - * @param requestedAttributes RequestedAttributes object - */ - public void setRequestedAttributes(RequestedAttributes requestedAttributes); - - /** - * Gets AuthenticationAttributes - * @return AuthenticationAttributes - */ - public AuthenticationAttributes getAuthenticationAttributes(); - - /** - * Sets AuthenticationAttributes - * @param authenticationAttributes AuthenticationAttributes object - */ - public void setAuthenticationAttributes(AuthenticationAttributes authenticationAttributes); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKRequestedAttribute.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKRequestedAttribute.java deleted file mode 100644 index 38149bea5..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/STORKRequestedAttribute.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.metadata.RequestedAttribute; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * {@inheritDoc} - * @author bzwattendorfer - * - */ -public interface STORKRequestedAttribute extends RequestedAttribute { - - - /** Default element name */ - public final static QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - /** QName of the XSI type */ - public final static QName TYPE_NAME = new QName(STORKConstants.STORK10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeBuilder.java deleted file mode 100644 index 413b5f6d7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.impl.AttributeBuilder; - -import eu.stork.vidp.messages.saml.STORKAttribute; - -/** - * @author bzwattendorfer - * - */ -public class STORKAttributeBuilder extends AttributeBuilder { - - /** - * Constructor. - */ - public STORKAttributeBuilder() { - - } - - /** {@inheritDoc} */ - public STORKAttribute buildObject() { - return buildObject(SAMLConstants.SAML20_NS, Attribute.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20_PREFIX); - } - - /** {@inheritDoc} */ - public STORKAttribute buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new STORKAttributeImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeImpl.java deleted file mode 100644 index 89ad90eae..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.core.impl.AttributeImpl; - -import eu.stork.vidp.messages.saml.STORKAttribute; - -/** - * @author bzwattendorfer - * - */ -public class STORKAttributeImpl extends AttributeImpl implements STORKAttribute { - - private String attributeStatus; - - protected STORKAttributeImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.saml.STORKAttribute#getAttributeStatus() - */ - public String getAttributeStatus() { - return attributeStatus; - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.saml.STORKAttribute#setAttributeStatus(java.lang.String) - */ - public void setAttributeStatus(String attributeStatus) { - this.attributeStatus = attributeStatus; - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeMarshaller.java deleted file mode 100644 index ba8c2f1a3..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeMarshaller.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.core.impl.AttributeMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.saml.STORKAttribute; - -/** - * @author bzwattendorfer - * - */ -public class STORKAttributeMarshaller extends AttributeMarshaller { - - protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { - STORKAttribute attribute = (STORKAttribute) samlElement; - - if (attribute.getAttributeStatus() != null) { - domElement.setAttributeNS(STORKConstants.STORK10_NS, STORKAttribute.STORK_ATTRIBUTE_STATUS_ATTTRIB_NAME, attribute.getName()); - } - - super.marshallAttributes(samlElement, domElement); - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeUnmarshaller.java deleted file mode 100644 index 5a74dab7d..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAttributeUnmarshaller.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -package eu.stork.vidp.messages.saml.impl; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.impl.AttributeUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; -import org.w3c.dom.Attr; - -import eu.stork.vidp.messages.saml.STORKAttribute; - -/** - * A thread-safe Unmarshaller for {@link org.opensaml.saml2.core.Attribute} objects. - */ -public class STORKAttributeUnmarshaller extends AttributeUnmarshaller { - - - protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { - - if (samlObject instanceof STORKAttribute) { - STORKAttribute attrib = (STORKAttribute) samlObject; - - if (attribute.getLocalName().equals(STORKAttribute.STORK_ATTRIBUTE_STATUS_ATTTRIB_NAME)) { - attrib.setAttributeStatus(attribute.getValue()); - } - } - - super.processAttribute(samlObject, attribute); - } - -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestBuilder.java deleted file mode 100644 index 8836b6c8e..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.impl.AuthnRequestBuilder; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; - -public class STORKAuthnRequestBuilder extends AuthnRequestBuilder { - - /** {@inheritDoc} */ - - - public STORKAuthnRequest buildObject() { - return buildObject(SAMLConstants.SAML20P_NS, AuthnRequest.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - /** {@inheritDoc} */ - public STORKAuthnRequest buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new STORKAuthnRequestImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestImpl.java deleted file mode 100644 index c9375ceb9..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import java.security.cert.X509Certificate; -import java.util.List; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.impl.AuthnRequestImpl; -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.xml.XMLObject; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; - -public class STORKAuthnRequestImpl extends AuthnRequestImpl implements STORKAuthnRequest { - - private int qaaLevel; - - private String ccc; - - private String finalRedirectURL; - - private String spID; - - private XMLObject originalSPAuthRequest; - - private X509Certificate spCertSig; - - private X509Certificate spCertEnc; - - //private XMLObjectChildrenList requestedAttributes; - private List requestedAttributes; - - protected STORKAuthnRequestImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - //requestedAttributes = new IndexedXMLObjectChildrenList(this); - } - - public STORKAuthnRequestImpl() { - super(SAMLConstants.SAML20P_NS, STORKAuthnRequest.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - - - public int getQAALevel() { - return this.qaaLevel; - } - - public void setQAALevel(int authLevel) { - this.qaaLevel = authLevel; - - } - - public String getCitizenCountryCode() { - return ccc; - } - - public String getFinalRedirectURL() { - return finalRedirectURL; - } - - public XMLObject getOriginalSPAuthRequest() { - return originalSPAuthRequest; - } - - public X509Certificate getSPCertEnc() { - return spCertEnc; - } - - public X509Certificate getSPCertSig() { - return spCertSig; - } - - public String getSPID() { - return spID; - } - - public void setCitizenCountryCode(String citizenCountryCode) { - this.ccc = citizenCountryCode; - } - - public void setFinalRedirectURL(String finalRedirectURL) { - this.finalRedirectURL = finalRedirectURL; - } - - public void setOriginalSPAuthRequest(XMLObject spAuthRequest) { - this.originalSPAuthRequest = spAuthRequest; - } - - public void setSPCertEnc(X509Certificate encryptionCertificate) { - this.spCertEnc = encryptionCertificate; - } - - public void setSPCertSig(X509Certificate signingCertificate) { - this.spCertSig = signingCertificate; - } - - public void setSPID(String spID) { - this.spID = spID; - } - - public List getRequestedAttributes() { -// return (List) requestedAttributes.subList(new QName(STORKMessagesConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, STORKMessagesConstants.STORK10_PREFIX)); - return requestedAttributes; - } - - public void setRequestedAttributes(List requestedAttributesList) { - // this.requestedAttributes = (XMLObjectChildrenList) requestedAttributesList; - this.requestedAttributes = requestedAttributesList; - } - -// public List getOrderedChildren() { -// ArrayList children = new ArrayList(); -// -// if (super.getOrderedChildren() != null) { -// children.addAll(super.getOrderedChildren()); -// } -// -// if (qaaLevel != 0 ) { -// children.add(subject); -// } -// -// if (nameIDPolicy != null) { -// children.add(nameIDPolicy); -// } -// -// if (conditions != null) { -// children.add(conditions); -// } -// -// if (requestedAuthnContext != null) { -// children.add(requestedAuthnContext); -// } -// -// if (scoping != null) { -// children.add(scoping); -// } -// -// if (children.size() == 0) { -// return null; -// } -// -// return Collections.unmodifiableList(children); -// } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestMarshaller.java deleted file mode 100644 index faad3a835..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestMarshaller.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.core.impl.AuthnRequestMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; - -public class STORKAuthnRequestMarshaller extends AuthnRequestMarshaller { - - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - STORKAuthnRequest req = (STORKAuthnRequest) samlObject; - -// if (sr.getQAA() != -1) { -// //domElement.setAttributeNS(null, StatusResponseType.VERSION_ATTRIB_NAME, sr.getVersion().toString()); -// } - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestUnmarshaller.java deleted file mode 100644 index 7924400fa..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKAuthnRequestUnmarshaller.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; - -import org.opensaml.saml2.core.impl.AuthnRequestUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.signature.X509Data; -import org.opensaml.xml.util.Base64; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; -import eu.stork.vidp.messages.saml.STORKExtensions; -import eu.stork.vidp.messages.stork.SPCertEnc; -import eu.stork.vidp.messages.stork.SPCertSig; -import eu.stork.vidp.messages.stork.SPCertType; -import eu.stork.vidp.messages.stork.SPInformation; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class STORKAuthnRequestUnmarshaller extends AuthnRequestUnmarshaller { - - protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) - throws UnmarshallingException { - STORKAuthnRequest req = (STORKAuthnRequest) parentSAMLObject; - - if (childSAMLObject instanceof STORKExtensions) { - STORKExtensions ext = (STORKExtensions) childSAMLObject; - req.setExtensions(ext); - - if (ext.getQAALevel() != null) - req.setQAALevel(ext.getQAALevel().getValue()); - - if (ext.getRequestedAttributes() != null) { - //List reqAttrList = new ArrayList(); -// for (RequestedAttribute reqAtt : ext.getRequestedAttributes().getRequestedAttributes()) { -// req.getRequestedAttributes().add(reqAtt); -// } - req.setRequestedAttributes(ext.getRequestedAttributes().getRequestedAttributes()); - - } - - if (ext.getAuthenticationAttributes() != null) { - VIDPAuthenticationAttributes vidpAuthAttributes = ext.getAuthenticationAttributes().getVIDPAuthenticationAttributes(); - if (vidpAuthAttributes != null) { - if (vidpAuthAttributes.getCitizenCountryCode() != null) - req.setCitizenCountryCode(vidpAuthAttributes.getCitizenCountryCode().getValue()); - - SPInformation spInformation = vidpAuthAttributes.getSPInformation(); - if (spInformation != null) { - if (spInformation.getSPID() != null) - req.setSPID(spInformation.getSPID().getValue()); - - if (spInformation.getSPCertSig() != null) { - SPCertSig spCertSig = spInformation.getSPCertSig(); - try { - req.setSPCertSig(getCertificateFromX509Data(spCertSig)); - } catch (Exception e) { - throw new UnmarshallingException("Error reading SP signing certificate"); - } - } - - if (spInformation.getSPCertEnc() != null) { - SPCertEnc spCertEnc = spInformation.getSPCertEnc(); - try { - req.setSPCertEnc(getCertificateFromX509Data(spCertEnc)); - } catch (Exception e) { - throw new UnmarshallingException("Error reading SP encryption certificate"); - } - } - - if (spInformation.getSPAuthRequest() != null) { - req.setOriginalSPAuthRequest(spInformation.getSPAuthRequest()); - } - - } - } - } - - } else { - super.processChildElement(parentSAMLObject, childSAMLObject); - } - } - - private X509Certificate getCertificateFromX509Data(SPCertType spCert) throws CertificateException { - if (spCert.getKeyInfo() != null) - if (!spCert.getKeyInfo().getX509Datas().isEmpty()) { - X509Data samlX509Data = spCert.getKeyInfo().getX509Datas().get(0); - - if (samlX509Data != null) { - if (!samlX509Data.getX509Certificates().isEmpty()) { - org.opensaml.xml.signature.X509Certificate samlX509Cert = samlX509Data.getX509Certificates().get(0); - if (samlX509Cert != null) { - if (samlX509Cert.getValue() != null && samlX509Cert.getValue().length() != 0) { - InputStream inStream = new ByteArrayInputStream( Base64.decode(samlX509Cert.getValue())); - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - X509Certificate cert = (X509Certificate)cf.generateCertificate(inStream); - return cert; - } - - } - - } - } - } - - return null; - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsBuilder.java deleted file mode 100644 index 96004871c..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.common.impl.ExtensionsBuilder; -import org.opensaml.saml2.core.Response; - -import eu.stork.vidp.messages.saml.STORKExtensions; - -public class STORKExtensionsBuilder extends ExtensionsBuilder { - - public STORKExtensions buildObject() { - return buildObject(SAMLConstants.SAML20P_NS, Response.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - /** {@inheritDoc} */ - public STORKExtensions buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new STORKExtensionsImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsImpl.java deleted file mode 100644 index 5417481c7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.common.impl.ExtensionsImpl; - -import eu.stork.vidp.messages.saml.STORKExtensions; -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; -import eu.stork.vidp.messages.stork.RequestedAttributes; - -public class STORKExtensionsImpl extends ExtensionsImpl implements STORKExtensions { - - private QualityAuthenticationAssuranceLevel qaaLevel; - - private RequestedAttributes requestedAttributes; - - private AuthenticationAttributes authenticationAttributes; - - protected STORKExtensionsImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public AuthenticationAttributes getAuthenticationAttributes() { - return authenticationAttributes; - } - - public QualityAuthenticationAssuranceLevel getQAALevel() { - return qaaLevel; - } - - public RequestedAttributes getRequestedAttributes() { - return requestedAttributes; - } - - public void setAuthenticationAttributes( - AuthenticationAttributes authenticationAttributes) { - this.authenticationAttributes = authenticationAttributes; - } - - public void setQAALevel(QualityAuthenticationAssuranceLevel authLevel) { - this.qaaLevel = authLevel; - } - - public void setRequestedAttributes(RequestedAttributes requestedAttributes) { - this.requestedAttributes = requestedAttributes; - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsMarshaller.java deleted file mode 100644 index 7aa86c2ed..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsMarshaller.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.common.impl.ExtensionsMarshaller; - -public class STORKExtensionsMarshaller extends ExtensionsMarshaller { - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsUnmarshaller.java deleted file mode 100644 index a701c9e6f..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKExtensionsUnmarshaller.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.common.impl.ExtensionsUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.saml.STORKExtensions; -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; -import eu.stork.vidp.messages.stork.RequestedAttributes; - -public class STORKExtensionsUnmarshaller extends ExtensionsUnmarshaller { - - protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) - throws UnmarshallingException { - STORKExtensions extensions = (STORKExtensions) parentXMLObject; - - if (childXMLObject instanceof QualityAuthenticationAssuranceLevel) { - QualityAuthenticationAssuranceLevel qaa = (QualityAuthenticationAssuranceLevel) childXMLObject; - extensions.setQAALevel(qaa); - } if (childXMLObject instanceof RequestedAttributes) { - RequestedAttributes requestedAttributes = (RequestedAttributes) childXMLObject; - extensions.setRequestedAttributes(requestedAttributes); - } if (childXMLObject instanceof AuthenticationAttributes) { - AuthenticationAttributes authenticationAttributes = (AuthenticationAttributes) childXMLObject; - extensions.setAuthenticationAttributes(authenticationAttributes); - } else { - super.processChildElement(parentXMLObject, childXMLObject); - } - -} - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeBuilder.java deleted file mode 100644 index 1e23a9f2b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; -import org.opensaml.saml2.metadata.RequestedAttribute; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.saml.STORKRequestedAttribute; - -/** - * Builder for {@link org.opensaml.saml2.metadata.impl.RequestedAttributeImpl}. - */ -public class STORKRequestedAttributeBuilder extends AbstractSAMLObjectBuilder { - - /** Constructor */ - public STORKRequestedAttributeBuilder() { - - } - - /** {@inheritDoc} */ - public STORKRequestedAttribute buildObject() { - return buildObject(STORKConstants.STORK10_NS, STORKRequestedAttribute.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - - /** {@inheritDoc} */ - public STORKRequestedAttribute buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new STORKRequestedAttributeImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeImpl.java deleted file mode 100644 index e3921919a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.saml.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.saml2.metadata.impl.RequestedAttributeImpl; -import org.opensaml.xml.XMLObject; - -import eu.stork.vidp.messages.saml.STORKRequestedAttribute; - -/** - * Concrete implementation of {@link org.opensaml.saml2.metadata.RequestedAttribute} - */ -public class STORKRequestedAttributeImpl extends RequestedAttributeImpl implements STORKRequestedAttribute { - - /** - * Constructor - * - * @param namespaceURI - * @param elementLocalName - * @param namespacePrefix - */ - protected STORKRequestedAttributeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** {@inheritDoc} */ - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - children.addAll(getAttributeValues()); - - return Collections.unmodifiableList(children); - } -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeUnmarshaller.java deleted file mode 100644 index 6b7771c72..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKRequestedAttributeUnmarshaller.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.saml.impl; - -import javax.xml.namespace.QName; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.metadata.impl.RequestedAttributeUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.common.STORKConstants; - - -/** - * A thread-safe Unmarshaller for {@link org.opensaml.saml2.metadata.RequestedAttribute} objects. - */ -public class STORKRequestedAttributeUnmarshaller extends RequestedAttributeUnmarshaller { - - protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) - throws UnmarshallingException { - - Attribute attribute = (Attribute) parentSAMLObject; - - QName childQName = childSAMLObject.getElementQName(); - if (childQName.getLocalPart().equals("AttributeValue") - && childQName.getNamespaceURI().equals(STORKConstants.STORK10_NS)) { - attribute.getAttributeValues().add(childSAMLObject); - } else { - super.processChildElement(parentSAMLObject, childSAMLObject); - } -} - - -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseBuilder.java deleted file mode 100644 index 24cebaef7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.impl.ResponseBuilder; - -import eu.stork.mw.messages.saml.STORKResponse; - -public class STORKResponseBuilder extends ResponseBuilder { - - /** {@inheritDoc} */ - - - public STORKResponse buildObject() { - return buildObject(SAMLConstants.SAML20P_NS, Response.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - /** {@inheritDoc} */ - public STORKResponse buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new STORKResponseImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseImpl.java deleted file mode 100644 index 08b5dc9bc..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.impl.ResponseImpl; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; -import eu.stork.mw.messages.saml.STORKResponse; - -public class STORKResponseImpl extends ResponseImpl implements STORKResponse { - - private int qaaLevel; - - protected STORKResponseImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - - - public STORKResponseImpl() { - super(SAMLConstants.SAML20P_NS, STORKResponse.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - - public int getQAALevel() { - return this.qaaLevel; - } - - public void setQAALevel(int authLevel) { - this.qaaLevel = authLevel; - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseMarshaller.java deleted file mode 100644 index 1a4654d01..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseMarshaller.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.core.impl.ResponseMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -import eu.stork.mw.messages.saml.STORKResponse; - -public class STORKResponseMarshaller extends ResponseMarshaller { - - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - STORKResponse sr = (STORKResponse) samlObject; - -// if (sr.getQAA() != -1) { -// //domElement.setAttributeNS(null, StatusResponseType.VERSION_ATTRIB_NAME, sr.getVersion().toString()); -// } - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseUnmarshaller.java deleted file mode 100644 index c2a7bcef9..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/saml/impl/STORKResponseUnmarshaller.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.saml.impl; - -import org.opensaml.saml2.core.impl.ResponseUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.mw.messages.saml.STORKResponse; -import eu.stork.vidp.messages.saml.STORKExtensions; - -public class STORKResponseUnmarshaller extends ResponseUnmarshaller { - - protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) - throws UnmarshallingException { - STORKResponse resp = (STORKResponse) parentSAMLObject; - - if (childSAMLObject instanceof STORKExtensions) { - STORKExtensions ext = (STORKExtensions) childSAMLObject; - - if (ext.getQAALevel() != null) - resp.setQAALevel(ext.getQAALevel().getValue()); - } else { - super.processChildElement(parentSAMLObject, childSAMLObject); - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/AuthenticationAttributes.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/AuthenticationAttributes.java deleted file mode 100644 index 73f9cd503..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/AuthenticationAttributes.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface AuthenticationAttributes extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AuthenticationAttributes"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "AuthenticationAttributesType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(STORKConstants.STORKP10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setVIDPAuthenticationAttributes(VIDPAuthenticationAttributes authenticationAttributes); - - public VIDPAuthenticationAttributes getVIDPAuthenticationAttributes(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/CitizenCountryCode.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/CitizenCountryCode.java deleted file mode 100644 index 8c7847dd7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/CitizenCountryCode.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface CitizenCountryCode extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "CitizenCountryCode"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setValue(String citizenCountryCode); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossBorderShare.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossBorderShare.java deleted file mode 100644 index c0f7cb291..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossBorderShare.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * @author bzwattendorfer - * - */ -public interface EIDCrossBorderShare extends ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "eIDCrossBorderShare"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setValue(boolean value); - - public boolean getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossSectorShare.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossSectorShare.java deleted file mode 100644 index a04376fb2..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDCrossSectorShare.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * @author bzwattendorfer - * - */ -public interface EIDCrossSectorShare extends ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "eIDCrossSectorShare"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setValue(boolean value); - - public boolean getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDSectorShare.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDSectorShare.java deleted file mode 100644 index 4fbd4a2d9..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/EIDSectorShare.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * @author bzwattendorfer - * - */ -public interface EIDSectorShare extends ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "eIDSectorShare"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setValue(boolean value); - - public boolean getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/QualityAuthenticationAssuranceLevel.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/QualityAuthenticationAssuranceLevel.java deleted file mode 100644 index 2869177b2..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/QualityAuthenticationAssuranceLevel.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface QualityAuthenticationAssuranceLevel extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "QualityAuthenticationAssuranceLevel"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - public void setValue(int level); - - public int getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/RequestedAttributes.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/RequestedAttributes.java deleted file mode 100644 index 0dcb1964c..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/RequestedAttributes.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import java.util.List; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface RequestedAttributes extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RequestedAttributes"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "RequestedAttributesType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(STORKConstants.STORKP10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setRequestedAttributes(List requestedAttributes); - - public List getRequestedAttributes(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPAuthRequest.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPAuthRequest.java deleted file mode 100644 index 8a5fd8644..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPAuthRequest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.ElementExtensibleXMLObject; -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -/** - * SAML 2.0 Extensions - */ -public interface SPAuthRequest extends ValidatingXMLObject, ElementExtensibleXMLObject { - - /** Local name, no namespace */ - public final static String LOCAL_NAME = "SPAuthRequest"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertEnc.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertEnc.java deleted file mode 100644 index fd0ff31ae..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertEnc.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SPCertEnc extends - SPCertType { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "SPCertEnc"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertSig.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertSig.java deleted file mode 100644 index c54d23505..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertSig.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SPCertSig extends - SPCertType { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "SPCertSig"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertType.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertType.java deleted file mode 100644 index e24db06a7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPCertType.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SPCertType extends - ValidatingXMLObject { - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "SPCertType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(STORKConstants.STORKP10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setKeyInfo(KeyInfo keyInfo); - - public KeyInfo getKeyInfo(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPID.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPID.java deleted file mode 100644 index 6c8122b88..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPID.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SPID extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "SPID"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setValue(String spID); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPInformation.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPInformation.java deleted file mode 100644 index e0926cd65..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SPInformation.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SPInformation extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "SPInformation"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "SPInformationType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(STORKConstants.STORKP10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setSPID(SPID spID); - - public SPID getSPID(); - - public void setSPCertSig(SPCertSig spCertSig); - - public SPCertSig getSPCertSig(); - - public void setSPCertEnc(SPCertEnc spCertEnc); - - public SPCertEnc getSPCertEnc(); - - public void setSPAuthRequest(SPAuthRequest spAuthRequest); - - public SPAuthRequest getSPAuthRequest(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpApplication.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpApplication.java deleted file mode 100644 index c68a29297..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpApplication.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SpApplication extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "spApplication"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - public void setValue(String spApplication); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpCountry.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpCountry.java deleted file mode 100644 index d7708cb62..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpCountry.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SpCountry extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "spCountry"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - public void setValue(String spCountry); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpInstitution.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpInstitution.java deleted file mode 100644 index dddd9e599..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpInstitution.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SpInstitution extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "spInstitution"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - public void setValue(String spInstitution); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpSector.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpSector.java deleted file mode 100644 index f29bf02c8..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/SpSector.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface SpSector extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "spSector"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORK10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - - public void setValue(String spSector); - - public String getValue(); - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/VIDPAuthenticationAttributes.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/VIDPAuthenticationAttributes.java deleted file mode 100644 index 89c4bec61..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/VIDPAuthenticationAttributes.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.validation.ValidatingXMLObject; - -import eu.stork.vidp.messages.common.STORKConstants; - -public interface VIDPAuthenticationAttributes extends - ValidatingXMLObject { - - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "VIDPAuthenticationAttributes"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(STORKConstants.STORKP10_NS, DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "VIDPAuthenticationAttributesType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(STORKConstants.STORKP10_NS, TYPE_LOCAL_NAME, - STORKConstants.STORKP10_PREFIX); - - public void setCitizenCountryCode(CitizenCountryCode citizenCountryCode); - - public CitizenCountryCode getCitizenCountryCode(); - - public void setSPInformation(SPInformation spInformation); - - public SPInformation getSPInformation(); - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesBuilder.java deleted file mode 100644 index 7fb418f74..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.AuthenticationAttributes; - -public class AuthenticationAttributesBuilder extends - AbstractXMLObjectBuilder { - - @Override - public AuthenticationAttributes buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new AuthenticationAttributesImpl(namespaceURI, localName, namespacePrefix); - } - - public AuthenticationAttributes buildObject() { - return buildObject(STORKConstants.STORK10_NS, AuthenticationAttributes.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesImpl.java deleted file mode 100644 index 68e751fdc..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class AuthenticationAttributesImpl extends - AbstractValidatingXMLObject implements - AuthenticationAttributes { - - private VIDPAuthenticationAttributes authenticationAttributes; - - - protected AuthenticationAttributesImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public VIDPAuthenticationAttributes getVIDPAuthenticationAttributes() { - return authenticationAttributes; - } - - public void setVIDPAuthenticationAttributes( - VIDPAuthenticationAttributes authenticationAttributes) { - this.authenticationAttributes = authenticationAttributes; - } - - - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - if (authenticationAttributes != null) { - children.add(authenticationAttributes); - } - - if (children.size() == 0) { - return null; - } - - return Collections.unmodifiableList(children); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesMarshaller.java deleted file mode 100644 index 05f1f9aec..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesMarshaller.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.io.BaseXMLObjectMarshaller; - -public class AuthenticationAttributesMarshaller extends - BaseXMLObjectMarshaller { - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesUnmarshaller.java deleted file mode 100644 index 564d62383..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/AuthenticationAttributesUnmarshaller.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class AuthenticationAttributesUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processChildElement(XMLObject parentXMLObject, - XMLObject childXMLObject) throws UnmarshallingException { - AuthenticationAttributes attributes = (AuthenticationAttributes) parentXMLObject; - - if (childXMLObject instanceof VIDPAuthenticationAttributes) { - attributes.setVIDPAuthenticationAttributes((VIDPAuthenticationAttributes) childXMLObject); - } else { - super.processChildElement(parentXMLObject, childXMLObject); - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeBuilder.java deleted file mode 100644 index de380d780..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.CitizenCountryCode; - -public class CitizenCountryCodeBuilder extends - AbstractXMLObjectBuilder { - - @Override - public CitizenCountryCode buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new CitizenCountryCodeImpl(namespaceURI, localName, namespacePrefix); - } - - public CitizenCountryCode buildObject() { - return buildObject(STORKConstants.STORK10_NS, CitizenCountryCode.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeImpl.java deleted file mode 100644 index 3de591116..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; - -public class CitizenCountryCodeImpl extends - AbstractValidatingXMLObject implements - CitizenCountryCode { - - private String citizenCountryCode; - - protected CitizenCountryCodeImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return citizenCountryCode; - } - - public void setValue(String citizenCountryCode) { - this.citizenCountryCode = citizenCountryCode; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeMarshaller.java deleted file mode 100644 index 8d47d6117..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; - -public class CitizenCountryCodeMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - CitizenCountryCode ccc = (CitizenCountryCode) xmlObject; - XMLHelper.appendTextContent(domElement, ccc.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeUnmarshaller.java deleted file mode 100644 index 69bd4cdb1..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/CitizenCountryCodeUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; - -public class CitizenCountryCodeUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - CitizenCountryCode ccc = (CitizenCountryCode) xmlObject; - ccc.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareBuilder.java deleted file mode 100644 index d2b1bba08..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.EIDCrossBorderShare; - -public class EIDCrossBorderShareBuilder extends - AbstractXMLObjectBuilder { - - @Override - public EIDCrossBorderShare buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new EIDCrossBorderShareImpl(namespaceURI, localName, namespacePrefix); - } - - public EIDCrossBorderShare buildObject() { - return buildObject(STORKConstants.STORKP10_NS, EIDCrossBorderShare.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORKP10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareImpl.java deleted file mode 100644 index e5182aff1..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.EIDCrossBorderShare; - -/** - * @author bzwattendorfer - * - */ -public class EIDCrossBorderShareImpl extends AbstractValidatingXMLObject implements - EIDCrossBorderShare { - - private boolean value; - - /** - * @param namespaceURI - * @param elementLocalName - * @param namespacePrefix - */ - public EIDCrossBorderShareImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#getValue() - */ - public boolean getValue() { - return this.value; - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#setValue(boolean) - */ - public void setValue(boolean value) { - this.value = value; - - } - - /* (non-Javadoc) - * @see org.opensaml.xml.XMLObject#getOrderedChildren() - */ - public List getOrderedChildren() { - return Collections.emptyList(); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareMarshaller.java deleted file mode 100644 index 1b98e8a2b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.EIDCrossBorderShare; - -public class EIDCrossBorderShareMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - EIDCrossBorderShare cbs = (EIDCrossBorderShare) samlObject; - XMLHelper.appendTextContent(domElement, String.valueOf(cbs.getValue())); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareUnmarshaller.java deleted file mode 100644 index bb7b9d762..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossBorderShareUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.EIDCrossBorderShare; - -public class EIDCrossBorderShareUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - EIDCrossBorderShare cbs = (EIDCrossBorderShare) xmlObject; - cbs.setValue(Boolean.parseBoolean(elementContent)); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareBuilder.java deleted file mode 100644 index c02b11a7f..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.EIDCrossSectorShare; - -public class EIDCrossSectorShareBuilder extends - AbstractXMLObjectBuilder { - - @Override - public EIDCrossSectorShare buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new EIDCrossSectorShareImpl(namespaceURI, localName, namespacePrefix); - } - - public EIDCrossSectorShare buildObject() { - return buildObject(STORKConstants.STORKP10_NS, EIDCrossSectorShare.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORKP10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareImpl.java deleted file mode 100644 index b58ee4c4b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.EIDCrossSectorShare; - -/** - * @author bzwattendorfer - * - */ -public class EIDCrossSectorShareImpl extends AbstractValidatingXMLObject implements - EIDCrossSectorShare { - - private boolean value; - - /** - * @param namespaceURI - * @param elementLocalName - * @param namespacePrefix - */ - public EIDCrossSectorShareImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#getValue() - */ - public boolean getValue() { - return this.value; - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#setValue(boolean) - */ - public void setValue(boolean value) { - this.value = value; - - } - - /* (non-Javadoc) - * @see org.opensaml.xml.XMLObject#getOrderedChildren() - */ - public List getOrderedChildren() { - return Collections.emptyList(); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareMarshaller.java deleted file mode 100644 index bcffdad4a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.EIDCrossSectorShare; - -public class EIDCrossSectorShareMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - EIDCrossSectorShare css = (EIDCrossSectorShare) samlObject; - XMLHelper.appendTextContent(domElement, String.valueOf(css.getValue())); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareUnmarshaller.java deleted file mode 100644 index a249c4628..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDCrossSectorShareUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.EIDCrossSectorShare; - -public class EIDCrossSectorShareUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - EIDCrossSectorShare css = (EIDCrossSectorShare) xmlObject; - css.setValue(Boolean.parseBoolean(elementContent)); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareBuilder.java deleted file mode 100644 index 79e0d1122..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.EIDSectorShare; - -public class EIDSectorShareBuilder extends - AbstractXMLObjectBuilder { - - @Override - public EIDSectorShare buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new EIDSectorShareImpl(namespaceURI, localName, namespacePrefix); - } - - public EIDSectorShare buildObject() { - return buildObject(STORKConstants.STORKP10_NS, EIDSectorShare.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORKP10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareImpl.java deleted file mode 100644 index ae65ad36c..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.EIDSectorShare; - -/** - * @author bzwattendorfer - * - */ -public class EIDSectorShareImpl extends AbstractValidatingXMLObject implements - EIDSectorShare { - - private boolean value; - - /** - * @param namespaceURI - * @param elementLocalName - * @param namespacePrefix - */ - public EIDSectorShareImpl(String namespaceURI, String elementLocalName, - String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#getValue() - */ - public boolean getValue() { - return this.value; - } - - /* (non-Javadoc) - * @see eu.stork.mw.common.messages.stork.EIDSectorShare#setValue(boolean) - */ - public void setValue(boolean value) { - this.value = value; - - } - - /* (non-Javadoc) - * @see org.opensaml.xml.XMLObject#getOrderedChildren() - */ - public List getOrderedChildren() { - return Collections.emptyList(); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareMarshaller.java deleted file mode 100644 index ed18cfbd4..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.EIDSectorShare; - -public class EIDSectorShareMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - EIDSectorShare ss = (EIDSectorShare) samlObject; - XMLHelper.appendTextContent(domElement, String.valueOf(ss.getValue())); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareUnmarshaller.java deleted file mode 100644 index 6631e1ac2..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/EIDSectorShareUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.EIDSectorShare; - -public class EIDSectorShareUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - EIDSectorShare ss = (EIDSectorShare) xmlObject; - ss.setValue(Boolean.parseBoolean(elementContent)); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelBuilder.java deleted file mode 100644 index d536372e8..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class QualityAuthenticationAssuranceLevelBuilder extends - AbstractXMLObjectBuilder { - - @Override - public QualityAuthenticationAssuranceLevel buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new QualityAuthenticationAssuranceLevelImpl(namespaceURI, localName, namespacePrefix); - } - - public QualityAuthenticationAssuranceLevel buildObject() { - return buildObject(STORKConstants.STORKP10_NS, QualityAuthenticationAssuranceLevel.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORKP10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelImpl.java deleted file mode 100644 index 69548c149..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class QualityAuthenticationAssuranceLevelImpl extends - AbstractValidatingXMLObject implements - QualityAuthenticationAssuranceLevel { - - private int qaaLevel; - - protected QualityAuthenticationAssuranceLevelImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public int getValue() { - return this.qaaLevel; - } - - public void setValue(int level) { - this.qaaLevel = level; - - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelMarshaller.java deleted file mode 100644 index 7f0d28895..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class QualityAuthenticationAssuranceLevelMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { - QualityAuthenticationAssuranceLevel qaa = (QualityAuthenticationAssuranceLevel) samlObject; - XMLHelper.appendTextContent(domElement, String.valueOf(qaa.getValue())); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelUnmarshaller.java deleted file mode 100644 index f024261f8..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/QualityAuthenticationAssuranceLevelUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class QualityAuthenticationAssuranceLevelUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - QualityAuthenticationAssuranceLevel qaa = (QualityAuthenticationAssuranceLevel) xmlObject; - qaa.setValue(Integer.parseInt(elementContent)); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesBuilder.java deleted file mode 100644 index d1e80abbb..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.RequestedAttributes; - -/** - * Builder for {@link org.opensaml.saml2.core.impl.AudienceRestrictionImpl} objects. - */ -public class RequestedAttributesBuilder extends AbstractXMLObjectBuilder { - - /** Constructor. */ - public RequestedAttributesBuilder() { - - } - - /** {@inheritDoc} */ - public RequestedAttributes buildObject() { - return buildObject(STORKConstants.STORK10_NS, RequestedAttributes.DEFAULT_ELEMENT_LOCAL_NAME, - STORKConstants.STORK10_PREFIX); - } - - /** {@inheritDoc} */ - public RequestedAttributes buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new RequestedAttributesImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesImpl.java deleted file mode 100644 index cd2b4a490..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.stork.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.util.XMLObjectChildrenList; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.RequestedAttributes; - -/** - * Concrete implementation of {@link org.opensaml.saml2.core.AudienceRestriction}. - */ -public class RequestedAttributesImpl extends AbstractValidatingXMLObject implements RequestedAttributes { - - /** List of the audiences. */ - private XMLObjectChildrenList requestedAttributes; - - /** - * Constructor. - * - * @param namespaceURI the namespace the element is in - * @param elementLocalName the local name of the XML element this Object represents - * @param namespacePrefix the prefix for the given namespace - */ - protected RequestedAttributesImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - requestedAttributes = new XMLObjectChildrenList(this); - } - - /** {@inheritDoc} */ - public List getRequestedAttributes() { - return requestedAttributes; - } - - - /** {@inheritDoc} */ - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - children.addAll(requestedAttributes); - - return Collections.unmodifiableList(children); - } - - public void setRequestedAttributes( - List requestedAttributes) { - this.requestedAttributes = (XMLObjectChildrenList) requestedAttributes; - - } - - - - -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesMarshaller.java deleted file mode 100644 index 8716c45a5..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesMarshaller.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.io.BaseXMLObjectMarshaller; - -/** - * A thread safe Marshaller for {@link org.opensaml.saml2.core.AudienceRestriction} objects. - */ -public class RequestedAttributesMarshaller extends BaseXMLObjectMarshaller { - -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesUnmarshaller.java deleted file mode 100644 index 94e603bd9..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/RequestedAttributesUnmarshaller.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - - -/** - * - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.stork.RequestedAttributes; - -/** - * A thread-safe Unmarshaller for {@link org.opensaml.saml2.core.AudienceRestriction} objects. - */ -public class RequestedAttributesUnmarshaller extends BaseXMLObjectUnmarshaller { - - /** {@inheritDoc} */ - protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException { - RequestedAttributes requestedAttributes = (RequestedAttributes) parentObject; - - if (childObject instanceof RequestedAttribute) { - requestedAttributes.getRequestedAttributes().add((RequestedAttribute) childObject); - } else { - super.processChildElement(parentObject, childObject); - } - } -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestBuilder.java deleted file mode 100644 index 1febbf399..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SPAuthRequest; - -/** - * Builder of {@link org.opensaml.saml2.common.impl.ExtensionsImpl} objects. - */ -public class SPAuthRequestBuilder extends AbstractXMLObjectBuilder { - - /** - * {@inheritDoc} - */ - public SPAuthRequest buildObject() { - return buildObject(STORKConstants.STORK10_NS, SPAuthRequest.LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - - /** - * {@inheritDoc} - */ - public SPAuthRequest buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new SPAuthRequestImpl(namespaceURI, localName, namespacePrefix); - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestImpl.java deleted file mode 100644 index 9ea20b9cc..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.util.IndexedXMLObjectChildrenList; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SPAuthRequest; - -/** - * - */ -public class SPAuthRequestImpl extends AbstractValidatingXMLObject implements SPAuthRequest { - - /** "any" children */ - private final IndexedXMLObjectChildrenList unknownChildren; - - /** - * Constructor - * - * @param namespaceURI - * @param elementLocalName - * @param namespacePrefix - */ - protected SPAuthRequestImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - unknownChildren = new IndexedXMLObjectChildrenList(this); - } - - /** - * {@inheritDoc} - */ - public List getUnknownXMLObjects() { - return unknownChildren; - } - - /** {@inheritDoc} */ - @SuppressWarnings("unchecked") - public List getUnknownXMLObjects(QName typeOrName) { - return (List) unknownChildren.subList(typeOrName); - } - - /** {@inheritDoc} */ - public List getOrderedChildren() { - return Collections.unmodifiableList(unknownChildren); - } -} \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestMarshaller.java deleted file mode 100644 index feb730935..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestMarshaller.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.AbstractXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -/** - * A thread-safe Marshaller for {@link org.opensaml.saml2.common.Extensions} objects. - */ -public class SPAuthRequestMarshaller extends AbstractXMLObjectMarshaller { - - /** - * Constructor - */ - public SPAuthRequestMarshaller() { - super(); - } - - /** - * {@inheritDoc} - */ - protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { - // no attributes - } - - /** - * {@inheritDoc} - */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - // no content - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestUnmarshaller.java deleted file mode 100644 index 7d5be220d..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPAuthRequestUnmarshaller.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Attr; - -import eu.stork.vidp.messages.stork.SPAuthRequest; - -public class SPAuthRequestUnmarshaller extends AbstractXMLObjectUnmarshaller { - - /** Logger. */ - private final Logger log = LoggerFactory.getLogger(AbstractSAMLObjectUnmarshaller.class); - - /** Constructor. */ - public SPAuthRequestUnmarshaller() { - super(); - } - - /** - * {@inheritDoc} - */ - protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) - throws UnmarshallingException { - SPAuthRequest spAuthRequest = (SPAuthRequest) parentXMLObject; - - spAuthRequest.getUnknownXMLObjects().add(childXMLObject); - } - - /** - * {@inheritDoc} - */ - protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { - log.debug("Ignorning unknown attribute {}", attribute.getLocalName()); - } - - /** - * {@inheritDoc} - */ - protected void processElementContent(XMLObject xmlObject, String elementContent) { - log.debug("Ignoring element content {}", elementContent); - } -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncBuilder.java deleted file mode 100644 index eb13ddf73..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SPCertEnc; - -public class SPCertEncBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SPCertEnc buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SPCertEncImpl(namespaceURI, localName, namespacePrefix); - } - - public SPCertEnc buildObject() { - return buildObject(STORKConstants.STORK10_NS, SPCertEnc.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncImpl.java deleted file mode 100644 index 2ee08e1ec..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import eu.stork.vidp.messages.stork.SPCertEnc; - -public class SPCertEncImpl extends - SPCertTypeImpl implements - SPCertEnc { - - protected SPCertEncImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncMarshaller.java deleted file mode 100644 index 091676959..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncMarshaller.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - - -public class SPCertEncMarshaller extends - SPCertTypeMarshaller { - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncUnmarshaller.java deleted file mode 100644 index 3b6339609..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertEncUnmarshaller.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - - -public class SPCertEncUnmarshaller extends - SPCertTypeUnmarshaller { - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigBuilder.java deleted file mode 100644 index 5e75a0e2c..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SPCertSig; - -public class SPCertSigBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SPCertSig buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SPCertSigImpl(namespaceURI, localName, namespacePrefix); - } - - public SPCertSig buildObject() { - return buildObject(STORKConstants.STORK10_NS, SPCertSig.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigImpl.java deleted file mode 100644 index f98e3ede3..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import eu.stork.vidp.messages.stork.SPCertSig; - -public class SPCertSigImpl extends - SPCertTypeImpl implements - SPCertSig { - - protected SPCertSigImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigMarshaller.java deleted file mode 100644 index e9f3d14da..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigMarshaller.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - - -public class SPCertSigMarshaller extends - SPCertTypeMarshaller { - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigUnmarshaller.java deleted file mode 100644 index d706223cb..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertSigUnmarshaller.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - - -public class SPCertSigUnmarshaller extends - SPCertTypeUnmarshaller { - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeImpl.java deleted file mode 100644 index a9a30dada..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SPCertType; - -public class SPCertTypeImpl extends - AbstractValidatingXMLObject implements - SPCertType { - - private KeyInfo keyInfo; - - protected SPCertTypeImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public KeyInfo getKeyInfo() { - return keyInfo; - } - - public void setKeyInfo(KeyInfo keyInfo) { - this.keyInfo = keyInfo; - } - - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - if (keyInfo != null) { - children.add(keyInfo); - } - - if (children.size() == 0) { - return null; - } - - return Collections.unmodifiableList(children); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeMarshaller.java deleted file mode 100644 index 0443a721a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeMarshaller.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.io.BaseXMLObjectMarshaller; - -public class SPCertTypeMarshaller extends - BaseXMLObjectMarshaller { - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeUnmarshaller.java deleted file mode 100644 index e23ff6b54..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPCertTypeUnmarshaller.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.signature.KeyInfo; - -import eu.stork.vidp.messages.stork.SPCertType; - -public class SPCertTypeUnmarshaller extends - BaseXMLObjectUnmarshaller { - - - @Override - protected void processChildElement(XMLObject parentXMLObject, - XMLObject childXMLObject) throws UnmarshallingException { - SPCertType spCertType = (SPCertType) parentXMLObject; - - if (childXMLObject instanceof KeyInfo) { - spCertType.setKeyInfo((KeyInfo) childXMLObject); - } else { - super.processChildElement(parentXMLObject, childXMLObject); - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDBuilder.java deleted file mode 100644 index f892c88c3..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SPID; - -public class SPIDBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SPID buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SPIDImpl(namespaceURI, localName, namespacePrefix); - } - - public SPID buildObject() { - return buildObject(STORKConstants.STORK10_NS, SPID.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDImpl.java deleted file mode 100644 index 34bde4caa..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SPID; - -public class SPIDImpl extends - AbstractValidatingXMLObject implements - SPID { - - private String spID; - - protected SPIDImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return spID; - } - - public void setValue(String spID) { - this.spID = spID; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDMarshaller.java deleted file mode 100644 index 8455d5033..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.SPID; - -public class SPIDMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - SPID spID = (SPID) xmlObject; - XMLHelper.appendTextContent(domElement, spID.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDUnmarshaller.java deleted file mode 100644 index f2eb1eb00..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPIDUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.SPID; - -public class SPIDUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - SPID spID = (SPID) xmlObject; - spID.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationBuilder.java deleted file mode 100644 index 1bc9c6ae8..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SPInformation; - -public class SPInformationBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SPInformation buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SPInformationImpl(namespaceURI, localName, namespacePrefix); - } - - public SPInformation buildObject() { - return buildObject(STORKConstants.STORK10_NS, SPInformation.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationImpl.java deleted file mode 100644 index e42c1cff5..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SPAuthRequest; -import eu.stork.vidp.messages.stork.SPCertEnc; -import eu.stork.vidp.messages.stork.SPCertSig; -import eu.stork.vidp.messages.stork.SPID; -import eu.stork.vidp.messages.stork.SPInformation; - -public class SPInformationImpl extends - AbstractValidatingXMLObject implements - SPInformation { - - private SPID spID; - - private SPCertSig spCertSig; - - private SPCertEnc spCertEnc; - - private SPAuthRequest spAuthRequest; - - protected SPInformationImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public SPAuthRequest getSPAuthRequest() { - return spAuthRequest; - } - - public SPCertEnc getSPCertEnc() { - return spCertEnc; - } - - public SPCertSig getSPCertSig() { - return spCertSig; - } - - public SPID getSPID() { - return spID; - } - - public void setSPAuthRequest(SPAuthRequest spAuthRequest) { - this.spAuthRequest = spAuthRequest; - } - - public void setSPCertEnc(SPCertEnc spCertEnc) { - this.spCertEnc = spCertEnc; - } - - public void setSPCertSig(SPCertSig spCertSig) { - this.spCertSig = spCertSig; - } - - public void setSPID(SPID spID) { - this.spID = spID; - } - - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - if (spID != null) { - children.add(spID); - } - - if (spCertSig != null) { - children.add(spCertSig); - } - - if (spCertEnc != null) { - children.add(spCertEnc); - } - - if (spAuthRequest != null) { - children.add(spAuthRequest); - } - - if (children.size() == 0) { - return null; - } - - return Collections.unmodifiableList(children); - } - - - - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationMarshaller.java deleted file mode 100644 index aea91af92..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationMarshaller.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.io.BaseXMLObjectMarshaller; - -public class SPInformationMarshaller extends - BaseXMLObjectMarshaller { - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationUnmarshaller.java deleted file mode 100644 index e7f9bd98e..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SPInformationUnmarshaller.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.stork.SPAuthRequest; -import eu.stork.vidp.messages.stork.SPCertEnc; -import eu.stork.vidp.messages.stork.SPCertSig; -import eu.stork.vidp.messages.stork.SPID; -import eu.stork.vidp.messages.stork.SPInformation; - -public class SPInformationUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processChildElement(XMLObject parentXMLObject, - XMLObject childXMLObject) throws UnmarshallingException { - SPInformation spInformation = (SPInformation) parentXMLObject; - - if (childXMLObject instanceof SPID) { - spInformation.setSPID((SPID) childXMLObject); - } else if (childXMLObject instanceof SPCertSig) { - spInformation.setSPCertSig((SPCertSig) childXMLObject); - } if (childXMLObject instanceof SPCertEnc) { - spInformation.setSPCertEnc((SPCertEnc) childXMLObject); - } if (childXMLObject instanceof SPAuthRequest) { - spInformation.setSPAuthRequest((SPAuthRequest) childXMLObject); - } else { - super.processChildElement(parentXMLObject, childXMLObject); - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationBuilder.java deleted file mode 100644 index 596d77908..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SpApplication; - -public class SpApplicationBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SpApplication buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SpApplicationImpl(namespaceURI, localName, namespacePrefix); - } - - public SpApplication buildObject() { - return buildObject(STORKConstants.STORK10_NS, SpApplication.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationImpl.java deleted file mode 100644 index d9c3b3ad2..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SpApplication; - -public class SpApplicationImpl extends - AbstractValidatingXMLObject implements - SpApplication { - - private String spApplication; - - protected SpApplicationImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return spApplication; - } - - public void setValue(String spApplication) { - this.spApplication = spApplication; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationMarshaller.java deleted file mode 100644 index 1b484e338..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.SpApplication; - -public class SpApplicationMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - SpApplication spApplication = (SpApplication) xmlObject; - XMLHelper.appendTextContent(domElement, spApplication.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationUnmarshaller.java deleted file mode 100644 index 70aef824a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpApplicationUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.SpApplication; - -public class SpApplicationUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - SpApplication spSector = (SpApplication) xmlObject; - spSector.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryBuilder.java deleted file mode 100644 index 29c765128..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SpCountry; - -public class SpCountryBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SpCountry buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SpCountryImpl(namespaceURI, localName, namespacePrefix); - } - - public SpCountry buildObject() { - return buildObject(STORKConstants.STORK10_NS, SpCountry.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryImpl.java deleted file mode 100644 index 66e2e81a6..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SpCountry; - -public class SpCountryImpl extends - AbstractValidatingXMLObject implements - SpCountry { - - private String spCountry; - - protected SpCountryImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return spCountry; - } - - public void setValue(String spCountry) { - this.spCountry = spCountry; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryMarshaller.java deleted file mode 100644 index 60a1f7838..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.SpCountry; - -public class SpCountryMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - SpCountry spCountry = (SpCountry) xmlObject; - XMLHelper.appendTextContent(domElement, spCountry.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryUnmarshaller.java deleted file mode 100644 index 66558248b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpCountryUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.SpCountry; - -public class SpCountryUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - SpCountry spCountry = (SpCountry) xmlObject; - spCountry.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionBuilder.java deleted file mode 100644 index 4ddc48d53..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.SpInstitution; - -public class SpInstitutionBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SpInstitution buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SpInstitutionImpl(namespaceURI, localName, namespacePrefix); - } - - public SpInstitution buildObject() { - return buildObject(STORKConstants.STORK10_NS, SpInstitution.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionImpl.java deleted file mode 100644 index 8d9753328..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SpInstitution; - -public class SpInstitutionImpl extends - AbstractValidatingXMLObject implements - SpInstitution { - - private String spInstitution; - - protected SpInstitutionImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return spInstitution; - } - - public void setValue(String spInstitution) { - this.spInstitution = spInstitution; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionMarshaller.java deleted file mode 100644 index ec150523d..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.SpInstitution; - -public class SpInstitutionMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - SpInstitution spInstitution = (SpInstitution) xmlObject; - XMLHelper.appendTextContent(domElement, spInstitution.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionUnmarshaller.java deleted file mode 100644 index 34fa89281..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpInstitutionUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.SpInstitution; - -public class SpInstitutionUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - SpInstitution spInstitution = (SpInstitution) xmlObject; - spInstitution.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorBuilder.java deleted file mode 100644 index 08daa3c7b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.CitizenCountryCode; -import eu.stork.vidp.messages.stork.SpSector; - -public class SpSectorBuilder extends - AbstractXMLObjectBuilder { - - @Override - public SpSector buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new SpSectorImpl(namespaceURI, localName, namespacePrefix); - } - - public SpSector buildObject() { - return buildObject(STORKConstants.STORK10_NS, SpSector.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorImpl.java deleted file mode 100644 index f52d2c83d..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.SpSector; - -public class SpSectorImpl extends - AbstractValidatingXMLObject implements - SpSector { - - private String spSector; - - protected SpSectorImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public String getValue() { - return spSector; - } - - public void setValue(String spSector) { - this.spSector = spSector; - } - - public List getOrderedChildren() { - return Collections.emptyList(); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorMarshaller.java deleted file mode 100644 index 78772c956..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorMarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectMarshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.stork.SpSector; - -public class SpSectorMarshaller extends - BaseXMLObjectMarshaller { - - /** {@inheritDoc} */ - protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException { - SpSector spSector = (SpSector) xmlObject; - XMLHelper.appendTextContent(domElement, spSector.getValue()); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorUnmarshaller.java deleted file mode 100644 index ea65413a2..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/SpSectorUnmarshaller.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; - -import eu.stork.vidp.messages.stork.SpSector; - -public class SpSectorUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processElementContent(XMLObject xmlObject, - String elementContent) { - SpSector spSector = (SpSector) xmlObject; - spSector.setValue(elementContent); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesBuilder.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesBuilder.java deleted file mode 100644 index a7827f652..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.AbstractXMLObjectBuilder; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class VIDPAuthenticationAttributesBuilder extends - AbstractXMLObjectBuilder { - - @Override - public VIDPAuthenticationAttributes buildObject(String namespaceURI, String localName, - String namespacePrefix) { - return new VIDPAuthenticationAttributesImpl(namespaceURI, localName, namespacePrefix); - } - - public VIDPAuthenticationAttributes buildObject() { - return buildObject(STORKConstants.STORK10_NS, VIDPAuthenticationAttributes.DEFAULT_ELEMENT_LOCAL_NAME, STORKConstants.STORK10_PREFIX); - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesImpl.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesImpl.java deleted file mode 100644 index 3c8d960db..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesImpl.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.AbstractValidatingXMLObject; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; -import eu.stork.vidp.messages.stork.SPInformation; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class VIDPAuthenticationAttributesImpl extends - AbstractValidatingXMLObject implements - VIDPAuthenticationAttributes { - - private CitizenCountryCode citizenCountryCode; - - private SPInformation spInformation; - - protected VIDPAuthenticationAttributesImpl(String namespaceURI, - String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - public CitizenCountryCode getCitizenCountryCode() { - return citizenCountryCode; - } - - - public SPInformation getSPInformation() { - return spInformation; - } - - public void setCitizenCountryCode(CitizenCountryCode citizenCountryCode) { - this.citizenCountryCode = citizenCountryCode; - } - - - public void setSPInformation(SPInformation spInformation) { - this.spInformation = spInformation; - } - - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - if (citizenCountryCode != null) { - children.add(citizenCountryCode); - } - - - if (spInformation != null) { - children.add(spInformation); - } - - if (children.size() == 0) { - return null; - } - - return Collections.unmodifiableList(children); - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesMarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesMarshaller.java deleted file mode 100644 index f21b492a9..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesMarshaller.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.io.BaseXMLObjectMarshaller; - -public class VIDPAuthenticationAttributesMarshaller extends - BaseXMLObjectMarshaller { - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesUnmarshaller.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesUnmarshaller.java deleted file mode 100644 index 3b7a1b20e..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/stork/impl/VIDPAuthenticationAttributesUnmarshaller.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.stork.impl; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.BaseXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; -import eu.stork.vidp.messages.stork.SPInformation; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class VIDPAuthenticationAttributesUnmarshaller extends - BaseXMLObjectUnmarshaller { - - @Override - protected void processChildElement(XMLObject parentXMLObject, - XMLObject childXMLObject) throws UnmarshallingException { - VIDPAuthenticationAttributes attributes = (VIDPAuthenticationAttributes) parentXMLObject; - - if (childXMLObject instanceof CitizenCountryCode) { - attributes.setCitizenCountryCode((CitizenCountryCode) childXMLObject); - } else if (childXMLObject instanceof SPInformation) { - attributes.setSPInformation((SPInformation) childXMLObject); - } else { - super.processChildElement(parentXMLObject, childXMLObject); - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/util/SAMLUtil.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/util/SAMLUtil.java deleted file mode 100644 index faff5e7bd..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/util/SAMLUtil.java +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.util; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.opensaml.Configuration; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeStatement; -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.ws.message.encoder.MessageEncodingException; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.Marshaller; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.io.Unmarshaller; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.schema.XSAny; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.SecurityHelper; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.signature.Signature; -import org.opensaml.xml.signature.SignatureConstants; -import org.opensaml.xml.signature.SignatureException; -import org.opensaml.xml.signature.Signer; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.ValidatorSuite; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Element; - -import eu.stork.vidp.messages.builder.STORKMessagesBuilder; -import eu.stork.vidp.messages.exception.SAMLException; -import eu.stork.vidp.messages.exception.SAMLValidationException; -import eu.stork.vidp.messages.saml.STORKAttribute; - -/** - * - * Helper class for SAML message processing - * @author bzwattendorfer - * - */ -public class SAMLUtil { - - private final static Logger log = LoggerFactory.getLogger(SAMLUtil.class); - - /** - * Signs a SAML object - * @param samlObject SAML object to sign - * @param signingCredential Credentials to be used for signing - * @throws SAMLException - */ - public static void signSAMLObject(SignableSAMLObject samlObject, Credential signingCredential) throws SAMLException { - - log.trace("Signing " + samlObject.getElementQName()); - - Signature signature = STORKMessagesBuilder.buildXMLObject(Signature.DEFAULT_ELEMENT_NAME); - - signature.setSigningCredential(signingCredential); - - //TODO: Make signing algorithm configurable - signature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1); - signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - try { - //TODO SecurityConfiguration, default signature credentials - SecurityHelper.prepareSignatureParams(signature, signingCredential, null, null); - } catch (SecurityException e) { - throw new SAMLException("Error preparing signature for signing", e); - } - - samlObject.setSignature(signature); - - Marshaller assertionMarshaller = Configuration.getMarshallerFactory().getMarshaller(samlObject); - try { - assertionMarshaller.marshall(samlObject); - Signer.signObject(signature); - } catch (MarshallingException e) { - throw new SAMLException("Unable to marshall " + samlObject.getElementQName() + " for signing", e); - } catch (SignatureException e) { - throw new SAMLException("Unable to sign " + samlObject.getElementQName(), e); - } - - } - - /** - * Validated SAML object according the given validation config - * @param samlObject SAML object to validaate - * @param validatorSuiteConfig Validation config - * @throws SAMLValidationException - */ - public static void verifySAMLObjectStandardValidation(SignableSAMLObject samlObject, String validatorSuiteConfig) throws SAMLValidationException { - - ValidatorSuite validatorSuite = Configuration.getValidatorSuite(validatorSuiteConfig); - try { - validatorSuite.validate(samlObject); - } catch (ValidationException e) { - log.error(e.getMessage(), e); - throw new SAMLValidationException("Could not validate " + samlObject.getElementQName(), e); - } - - } - - /** - * Gets the STORK attribute status from a SAML attribute - * @param attribute SAML attribute - * @return STORK attribute status - */ - public static String getStatusFromAttribute(Attribute attribute) { - return attribute.getUnknownAttributes().get(STORKAttribute.DEFAULT_STORK_ATTRIBUTE_QNAME); - } - - /** - * Gets the XML value of an XML object as String - * @param xmlObj XML object - * @return XML value as String - */ - public static String getStringValueFromXMLObject(XMLObject xmlObj) { - if (xmlObj instanceof XSString) { - return ((XSString) xmlObj).getValue(); - } else if (xmlObj instanceof XSAny) { - return ((XSAny) xmlObj).getTextContent(); - } - return null; - } - - /** - * Gets the attribute value as String of an attribute whereas the attribute is in a given list - * @param attrList List of attributes - * @param name Name of the attribute where the value should be extracted - * @return attribute value as String - */ - public static String getAttributeStringValue(List attrList, String name) { - XMLObject xmlObj = getAttributeValue(attrList, name); - return getStringValueFromXMLObject(xmlObj); - } - - /** - * Gets the attribute value as String of an attribute - * @param attribute Attribute - * @return attribute value as String - */ - public static String getAttributeStringValue(Attribute attribute) { - return ((XSString) attribute.getAttributeValues().get(0)).getValue(); - } - - /** - * Gets the attribute value as anyType of an attribute - * @param attribute Attribute - * @return value as anyType - */ - public static XSAny getAttributeXSAnyValue(Attribute attribute) { - return (XSAny) attribute.getAttributeValues().get(0); - } - - /** - * Gets the attribute value as anyType of an attribute whereas the attribute is in a given list - * @param attrList List of attributes - * @param name Name of the attribute where the value should be extracted - * @return attribute value as anyType - */ - public static XSAny getXSAnyAttributeValue(List attrList, String name) { - //XMLObject xmlObj = getAttributeValue(attrList, name); - return (XSAny) getAttributeValue(attrList, name); - } - - /** - * Gets the attribute value as XMLObject of an attribute whereas the attribute is in a given list - * @param attrList List of attributes - * @param name Name of the attribute where the value should be extracted - * @return attribute value as XMLObject - */ - public static XMLObject getAttributeValue(List attrList, String name) { - Attribute attribute = getAttribute(attrList, name); - return (attribute != null && !attribute.getAttributeValues().isEmpty()) ? attribute.getAttributeValues().get(0) : null; - } - - /** - * Gets the attribute specified by name out of a list - * @param attrList List of attributes - * @param name attribute name of the attribute to extract - * @return attribute - */ - public static Attribute getAttribute(List attrList, String name) { - for (Attribute attribute : attrList) { - if (attribute.getName().equals(name)) { - return attribute; - } - } - - return null; - } - - /** - * Gets the attribute specified by name out of a list and immediately removes it from the list - * @param attrList List of attributes - * @param name attribute name of the attribute to extract and remove - * @return attribute - */ - public static String getAttributeStringValueAndRemove(List attrList, String name) { - - Attribute attribute = getAttribute(attrList, name); - String value = getAttributeStringValue(attrList, name); - attrList.remove(attribute); - - return value; - } - - /** - * Checks if an attribute with a given name is present in a SAML assertion - * @param storkAssertion STORK SAML assertion - * @param attributeName attribute name - * @return true if attribute is present - */ - public static boolean containsAttribute(Assertion storkAssertion, String attributeName) { - AttributeStatement attrStatement = storkAssertion.getAttributeStatements().get(0); - - for (Attribute attribute : attrStatement.getAttributes()) { - if (attribute.getName().equals(attributeName) && (SAMLUtil.getStatusFromAttribute(attribute) == null || SAMLUtil.getStatusFromAttribute(attribute).equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_AVAIL))) { - return true; - } - } - - return false; - } - - /** - * Checks if an attribute with a given name is present in a List of attributes - * @param attributeList List of attributes - * @param attributeName attribute name - * @return true if attribute is present - */ - public static boolean containsAttribute(List attributeList, String attributeName) { - for (Attribute attr : attributeList) { - if (attr.getName().equals(attributeName)) - return true; - } - return false; - } - - /** - * Remeoves attribute with a given name from an attribute list - * @param attributeList List of attributes - * @param attributeName name of the attribute to be removed from list - */ - public static void removeAttribute(List attributeList, String attributeName) { - if (containsAttribute(attributeList, attributeName)) { - attributeList.remove(getAttribute(attributeList, attributeName)); - } - } - - /** - * Gets the String value of an XML object (Only if XMLObject contains String) - * @param xmlObj XMLObject - * @return String value of XMLObject - */ - public static String getXSStringValueFromXMLObject(XMLObject xmlObj) { - if (xmlObj instanceof XSString) - return ((XSString) xmlObj).getValue(); - - return null; - } - - - /** - * Marshalls an XMLObject to an XML element (DOM) - * @param message XMLObject - * @return DOM representation of XMLObject - */ - public static Element marshallMessage(XMLObject message) { - - try { - Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(message); - if (marshaller == null) { - log.error("Unable to marshall message, no marshaller registered for message object: " - + message.getElementQName()); - } - Element messageElem = marshaller.marshall(message); - return messageElem; - } catch (MarshallingException e) { - log.error("Encountered error marshalling message to its DOM representation", e); - throw new RuntimeException("Encountered error marshalling message into its DOM representation", e); - } - } - - /** - * Unmarshalls a DOM XML element into an OpenSAML XMLObject - * @param element DOM element - * @return OpenSAML XMLObject - * @throws MessageEncodingException - */ - public static XMLObject unmarshallMessage(Element element) throws MessageEncodingException { - - try { - Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(element); - if (unmarshaller == null) { - log.error("Unable to unmarshall element, no unmarshaller registered for message element: " - + element.getNodeName()); - } - - return unmarshaller.unmarshall(element); - } catch (UnmarshallingException e) { - log.error("Encountered error unmarshalling element to its XMLObject representation", e); - throw new MessageEncodingException("Encountered error unmarshalling element to its XMLObject representation", e); - } - } - - /** - * Releases the DOM element from an XML document - * @param xmlObjList List of XMLObjects to release - * @return List of released XMLObjects - */ - public static List releaseDOM(List xmlObjList) { - - List newXMLObjList = new ArrayList(); - Iterator it = xmlObjList.iterator(); - - while (it.hasNext()) { - XMLObject xmlObj = it.next(); - xmlObj.detach(); - newXMLObjList.add(xmlObj); - } - - return newXMLObjList; - - } - - /** - * Makes a union of two RequestedAttribute lists (first list has priority and overrides attributes in the second list if equal) - * @param priorityList Priority list if attributes might be equal - * @param list low priority list - * @return Union of both lists - */ - public static List buildRequestedAttributesUnion(List priorityList, List list) { - List reqAttrList = new ArrayList(); - - if (priorityList == null || list == null) - return reqAttrList; - - if (priorityList == null || priorityList.isEmpty()) { - if (list == null || list.isEmpty()) { - return reqAttrList; - } else { - reqAttrList.addAll((List) releaseDOM(list)); - return reqAttrList; - } - } else { - if (list == null || list.isEmpty()) { - reqAttrList.addAll((List) releaseDOM(priorityList)); - return reqAttrList; - } else { - reqAttrList.addAll((List) releaseDOM(priorityList)); - for (RequestedAttribute reqAttr : list) { - boolean found = false; - for (RequestedAttribute prioReqAttr : priorityList) { - if (!prioReqAttr.getName().equals(reqAttr.getName())) { - found = true; - } - } - if (!found) { - reqAttr.detach(); - reqAttrList.add(reqAttr); - log.debug("Adding additional requested attribute: {} , isRequired: {}", reqAttr.getName(), reqAttr.isRequired()); - } - } - } - } - - return reqAttrList; - } - - /** - * Validates the signature references using OpenSAML - * @param signableObject Signable SAML Object - * @throws ValidationException thrown if references are not correct - */ - public static void validateSignatureReferences(SignableSAMLObject signableObject) throws ValidationException { - SAMLSignatureProfileValidator sigValidator = new SAMLSignatureProfileValidator(); - sigValidator.validate(signableObject.getSignature()); - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAssertionValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAssertionValidator.java deleted file mode 100644 index c412ba6a0..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAssertionValidator.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.common.SAMLVersion; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.validator.AssertionSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkAssertionValidator extends AssertionSchemaValidator { - - /** - * Constructor - * - */ - public StorkAssertionValidator() { - - super(); - } - - @Override - public void validate(Assertion assertion) throws ValidationException { - - super.validate(assertion); - - if(assertion.getID() == null) { - - throw new ValidationException("ID is required."); - } - - if(assertion.getVersion() == null || !assertion.getVersion().equals(SAMLVersion.VERSION_20)) { - - throw new ValidationException("Version of assertion not present or invalid."); - } - - if(assertion.getIssueInstant() == null) { - - throw new ValidationException("IssueInstant is required."); - } - - if(assertion.getSubject() == null) { - - throw new ValidationException("Subject is required."); - } - - if(assertion.getConditions() == null) { - - throw new ValidationException("Conditions is required."); - } - - if(assertion.getAuthnStatements() == null || - assertion.getAuthnStatements().size() != 1) { - - throw new ValidationException("Incorrect number of AuthnStatements."); - } - - if(assertion.getAttributeStatements() != null) { - - if(assertion.getAttributeStatements().size() != 0 && - assertion.getAttributeStatements().size() != 1) { - - throw new ValidationException("Incorrect number of AttributeStatements."); - } - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAttributeValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAttributeValidator.java deleted file mode 100644 index 6e37725d1..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAttributeValidator.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.regex.Pattern; - -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.validator.AttributeSchemaValidator; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.util.AttributeMap; -import org.opensaml.xml.validation.ValidationException; - -import eu.stork.vidp.messages.common.STORKConstants; -import eu.stork.vidp.messages.saml.STORKAttribute; - -public class StorkAttributeValidator extends AttributeSchemaValidator { - - private static final String PATTERN_EIDENTIFIER = "^[A-Z]{2}/[A-Z]{2}/[A-Za-z0-9+/=\r\n]+$"; - private static final String PATTERN_GENDER = "^[MF]{1}$"; - private static final String PATTERN_COUNTRYCODEOFBIRTH = "^[A-Z]{2}|[A-Z]{4}$"; - private static final String PATTERN_COUNTRYCODE = "^[A-Z]{2}$"; - private static final String PATTERN_MARTIALSTATUS = "^[SMPDW]{1}$"; - private static final String PATTERN_EMAIL = "^[-+.\\w]{1,64}@[-.\\w]{1,64}\\.[-.\\w]{2,6}$"; - private static final String PATTERN_AGE = "^[0-9]{1,3}$"; - private static final int MAX_AGE = 120; - private static final String PATTERN_ISAGEOVER = PATTERN_AGE; - private static final String PATTERN_CITIZENQAALEVEL = "^[1-4]{1}$"; - - - /** - * Constructor - * - */ - public StorkAttributeValidator() { - - super(); - } - - @Override - public void validate(Attribute attr) throws ValidationException { - - super.validate(attr); - - if(attr.getName() == null) { - - throw new ValidationException("Name is required."); - } - - if(attr.getNameFormat() == null) { - - throw new ValidationException("NameFormat is required."); - } - - - if(attr.getUnknownAttributes() != null) { - - AttributeMap map = attr.getUnknownAttributes(); - - String value = map.get(STORKAttribute.DEFAULT_STORK_ATTRIBUTE_QNAME); - - if (value == null || value.equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_AVAIL)) { - //if AttributeStatus not present, default is "Available" thus AttributeValue must be present - if (attr.getAttributeValues().isEmpty()) { - //isAgeOver can have no value - if (!attr.getName().equals(STORKConstants.STORK_ATTRIBUTE_ISAGEOVER)) { - throw new ValidationException("AttributeStatus indicates that attribute is available but no AttributeValue is present."); - } - } - - //throw new ValidationException("AttributeStatus not present."); - - } else if(!value.equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_AVAIL) && - !value.equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_NOT_AVAIL) && - !value.equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_WITHHELD)) { - - throw new ValidationException("AttributeStatus is invalid."); - } - - } - - if (!attr.getAttributeValues().isEmpty()) { - //validate individual attributes if present - XMLObject attrValueObject = attr.getAttributeValues().get(0); - - if (!(attrValueObject instanceof XSString)) { - //Only validate String attributes - return; - } - - String value = ((XSString) attr.getAttributeValues().get(0)).getValue(); - String attrName = attr.getName(); - - //only isAgeOver can be empty if provided - if (value == null) { - //only isAgeOver can be empty if provided - if (attrName.equals(STORKConstants.STORK_ATTRIBUTE_ISAGEOVER)) { - return; - } else { - throw new ValidationException("Provided AttributeValue is empty"); - } - } - - //validate eIdentifier - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_EIDENTIFIER, PATTERN_EIDENTIFIER); - - //validate gender - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_GENDER, PATTERN_GENDER); - - //validate dateOfBirth - if (attrName.equals(STORKConstants.STORK_ATTRIBUTE_DATEOFBIRTH)) { - verifyDate(value); - } - - //validate countryCode of birth - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_COUNTRYCODEOFBIRTH, PATTERN_COUNTRYCODEOFBIRTH); - - //validate countryCode - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_NATIONALITYCODE, PATTERN_COUNTRYCODE); - - //validate martialStatus - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_MARTIALSTATUS, PATTERN_MARTIALSTATUS); - - //validate email - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_EMAIL, PATTERN_EMAIL); - - //validate age and isAgeOver - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_AGE, PATTERN_AGE); - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_ISAGEOVER, PATTERN_ISAGEOVER); - if (attr.getName().equals(STORKConstants.STORK_ATTRIBUTE_AGE) || attr.getName().equals(STORKConstants.STORK_ATTRIBUTE_ISAGEOVER)) { - if (Integer.valueOf(((XSString) attr.getAttributeValues().get(0)).getValue()) > MAX_AGE) { - throw new ValidationException("Maximum age reached"); - } - } - - validateAttributeValueFormat(value, attrName, STORKConstants.STORK_ATTRIBUTE_CITIZENQAALEVEL, PATTERN_CITIZENQAALEVEL); - } - - } - - private void validateAttributeValueFormat(String value, String currentAttrName, String attrNameToTest, String pattern) throws ValidationException { - if (currentAttrName.equals(attrNameToTest)) { - if (!Pattern.matches(pattern, value)) { - throw new ValidationException(attrNameToTest + " has incorrect format."); - } - } - - } - - private static void verifyDate(String pepsDate) throws ValidationException { - DateTimeFormatter fmt = null; - - switch (pepsDate.length()) { - case 4: - fmt = DateTimeFormat.forPattern("yyyy"); - break; - case 6: - fmt = DateTimeFormat.forPattern("yyyyMM"); - break; - case 8: - fmt = DateTimeFormat.forPattern("yyyyMMdd"); - break; - default: - throw new ValidationException("Date has wrong format"); - } - - try { - fmt.parseDateTime(pepsDate); - } catch (IllegalArgumentException e) { - throw new ValidationException("Date has wrong format"); - } - - - } - - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAudienceRestrictionValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAudienceRestrictionValidator.java deleted file mode 100644 index a561d4c33..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAudienceRestrictionValidator.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.AudienceRestriction; -import org.opensaml.saml2.core.validator.AudienceRestrictionSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkAudienceRestrictionValidator extends - AudienceRestrictionSchemaValidator { - - /** - * Constructor - * - */ - public StorkAudienceRestrictionValidator() { - - super(); - } - - @Override - public void validate(AudienceRestriction res) throws ValidationException { - - super.validate(res); - - if(res.getAudiences() == null || res.getAudiences().size() < 1) { - - throw new ValidationException("Audience is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthenticationAttributesValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthenticationAttributesValidator.java deleted file mode 100644 index 1997da7b6..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthenticationAttributesValidator.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class StorkAuthenticationAttributesValidator implements Validator { - - - public StorkAuthenticationAttributesValidator() { - - } - - public void validate(AuthenticationAttributes authenticationAttributes) throws ValidationException { - - //check AuthenticationAttributes for VIDPs - VIDPAuthenticationAttributes vidpAuthenticationAttributes = authenticationAttributes.getVIDPAuthenticationAttributes(); - - if(vidpAuthenticationAttributes == null) { - - throw new ValidationException("VIDPAuthenticationAttributes is required for sending requests to VIDPs."); - } - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnRequestValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnRequestValidator.java deleted file mode 100644 index 0e8722d55..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnRequestValidator.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.common.SAMLVersion; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.validator.AuthnRequestSchemaValidator; -import org.opensaml.xml.util.XMLHelper; -import org.opensaml.xml.validation.ValidationException; - -import eu.stork.mw.messages.saml.STORKAuthnRequest; - -public class StorkAuthnRequestValidator extends AuthnRequestSchemaValidator { - - private static final String ALLOWED_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:unspecified"; - private static final String ALLOWED_PROTOCOL_BINDING_1 = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"; - private static final String ALLOWED_PROTOCOL_BINDING_2 = "urn:oasis:names:tc:SAML:2.0:bindings:SOAP"; - - private static final int MAX_SIZE = 131072; - - /** - * Constructor - * - */ - public StorkAuthnRequestValidator() { - - super(); - } - - @Override - public void validate(AuthnRequest req) throws ValidationException { - - if (XMLHelper.prettyPrintXML(req.getDOM()).getBytes().length > MAX_SIZE) { - throw new ValidationException("SAML AuthnRequest exceeds max size."); - } - - super.validate(req); - - STORKAuthnRequest request = (STORKAuthnRequest) req; - - if (request.getID() == null) { - - throw new ValidationException("ID is required."); - } - - if (request.getVersion() == null) { - - throw new ValidationException("Version is required."); - } else { - - if (!request.getVersion().equals(SAMLVersion.VERSION_20)) { - - throw new ValidationException("Version is invalid."); - } - } - - if (request.getIssueInstant() == null) { - - throw new ValidationException("IssueInstant is required."); - } - - if (request.getConsent() != null) { - - if (!request.getConsent().equals(ALLOWED_CONSENT)) { - - throw new ValidationException("Consent is invalid."); - } - } - - if (request.isForceAuthn() == null) { - - throw new ValidationException("ForceAuthn is required."); - } else if (!request.isForceAuthn()) { - - throw new ValidationException("ForceAuthn is invalid."); - } - - if (request.isPassive() == null) { - - throw new ValidationException("IsPassive is required."); - } else if (request.isPassive()) { - - throw new ValidationException("IsPassive is invalid."); - } - - if (request.getProtocolBinding() == null) { - - throw new ValidationException("ProtocolBinding is required."); - } else { - if (!request.getProtocolBinding() - .equals(ALLOWED_PROTOCOL_BINDING_1) - && !request.getProtocolBinding().equals( - ALLOWED_PROTOCOL_BINDING_2)) { - - throw new ValidationException("ProtocolBinding is invalid."); - } - - } - - if(request.getAssertionConsumerServiceURL() == null) { - - throw new ValidationException("AssertionConsumerServiceURL is required."); - } - - if(request.getProviderName() == null) { - - throw new ValidationException("ProviderName is required."); - } - - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnStatementValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnStatementValidator.java deleted file mode 100644 index b25b5621f..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkAuthnStatementValidator.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.validator.AuthnStatementSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkAuthnStatementValidator extends - AuthnStatementSchemaValidator { - - /** - * Constructor - * - */ - public StorkAuthnStatementValidator() { - - super(); - } - - @Override - public void validate(AuthnStatement stmnt) throws ValidationException { - - super.validate(stmnt); - - if(stmnt.getAuthnInstant() == null) { - - throw new ValidationException("AuthnInstant is required."); - } - - if(stmnt.getSubjectLocality() == null) { - - throw new ValidationException("SubjectLocality is required."); - } - - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkCitizenCountryCodeValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkCitizenCountryCodeValidator.java deleted file mode 100644 index 15f8e2dd1..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkCitizenCountryCodeValidator.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.regex.Pattern; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.CitizenCountryCode; - -public class StorkCitizenCountryCodeValidator implements - Validator { - - public static final String REGEX_PATTERN = "^[A-Za-z]{2}$"; - - public StorkCitizenCountryCodeValidator() { - - } - - public void validate(CitizenCountryCode ccc) throws ValidationException { - - if(ccc == null) { - - throw new ValidationException("CitizenCountryCode is required."); - } - - if (ccc.getValue() == null) { - throw new ValidationException("CitizenCountryCode has no value"); - } - - - if (!Pattern.matches(REGEX_PATTERN, ccc.getValue())) { - throw new ValidationException("CitizenCountryCode not valid: " + ccc.getValue()); - } - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkConditionsValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkConditionsValidator.java deleted file mode 100644 index 81b7957fd..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkConditionsValidator.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.Conditions; -import org.opensaml.saml2.core.validator.ConditionsSpecValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkConditionsValidator extends ConditionsSpecValidator { - - /** - * Constructor - * - */ - public StorkConditionsValidator() { - - super(); - } - - @Override - public void validate(Conditions conditions) throws ValidationException { - - super.validate(conditions); - - if(conditions.getNotBefore() == null) { - - throw new ValidationException("NotBefore is required."); - } - - if(conditions.getNotOnOrAfter() == null) { - - throw new ValidationException("NotOnOrAfter is required."); - } - - if(conditions.getAudienceRestrictions() == null || conditions.getAudienceRestrictions().size() < 1) { - - throw new ValidationException("AudienceRestriction is required."); - } - - if(conditions.getOneTimeUse() == null) { - - throw new ValidationException("OneTimeUse is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEIDSectorShareValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEIDSectorShareValidator.java deleted file mode 100644 index 96555e660..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEIDSectorShareValidator.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.EIDSectorShare; - -/** - * @author bzwattendorfer - * - */ -public class StorkEIDSectorShareValidator implements Validator { - - public StorkEIDSectorShareValidator() { - - } - - public void validate(EIDSectorShare eidSectorShare) throws ValidationException { - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedAttributeValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedAttributeValidator.java deleted file mode 100644 index 48464b6ec..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedAttributeValidator.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.EncryptedAttribute; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -public class StorkEncryptedAttributeValidator implements - Validator { - - public StorkEncryptedAttributeValidator() { - - } - - public void validate(EncryptedAttribute encAttr) throws ValidationException { - - if(encAttr.getEncryptedData() == null) { - - throw new ValidationException("EncryptedData is required."); - } - - - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedIdValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedIdValidator.java deleted file mode 100644 index 79450b1dc..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkEncryptedIdValidator.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.EncryptedID; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -public class StorkEncryptedIdValidator implements Validator { - - /** - * Constructor - * - */ - public StorkEncryptedIdValidator() { - - } - - public void validate(EncryptedID encId) throws ValidationException { - - if(encId.getEncryptedData() == null) { - - throw new ValidationException("EncryptedData is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkExtensionsValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkExtensionsValidator.java deleted file mode 100644 index 21b247071..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkExtensionsValidator.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.List; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.saml.STORKExtensions; -import eu.stork.vidp.messages.stork.AuthenticationAttributes; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class StorkExtensionsValidator implements Validator { - - - public StorkExtensionsValidator() { - - } - - public void validate(STORKExtensions ext) throws ValidationException { - - // check QAALevel - List qaaList = ext.getUnknownXMLObjects(QualityAuthenticationAssuranceLevel.DEFAULT_ELEMENT_NAME); - - if(qaaList == null || qaaList.size() != 1) { - - throw new ValidationException("QAALevel is required."); - } - - //check AuthenticationAttributes for VIDPs -// AuthenticationAttributes authenticationAttributes = ext.getAuthenticationAttributes(); -// -// if(authenticationAttributes == null) { -// -// throw new ValidationException("AuthenticationAttributes is required for sending requests to VIDPs."); -// } - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkIssuerValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkIssuerValidator.java deleted file mode 100644 index df32ee6ad..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkIssuerValidator.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.validator.IssuerSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkIssuerValidator extends IssuerSchemaValidator { - - private static final String FORMAT_ALLOWED_VALUE = "urn:oasis:names:tc:SAML:2.0:nameid-format:entity"; - - /** - * Constructor - * - */ - public StorkIssuerValidator() { - - super(); - } - - @Override - public void validate(Issuer issuer) throws ValidationException { - - super.validate(issuer); - - // format is optional - if(issuer.getFormat() != null) { - - if(!issuer.getFormat().equals(FORMAT_ALLOWED_VALUE)) { - - throw new ValidationException("Format has an invalid value."); - } - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIDValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIDValidator.java deleted file mode 100644 index 85fbeff17..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIDValidator.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.NameID; -import org.opensaml.saml2.core.validator.NameIDSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkNameIDValidator extends NameIDSchemaValidator { - - private static final String FORMAT_ALLOWED_VALUE = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"; - private static final String FORMAT_ALLOWED_VALUE_OLD = "urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified"; - - /** - * Constructor - * - */ - public StorkNameIDValidator() { - - super(); - } - - @Override - public void validate(NameID nameID) throws ValidationException { - - super.validate(nameID); - - if (nameID.getNameQualifier() == null) { - - throw new ValidationException("NameQualifier is required."); - } - - if (nameID.getFormat() == null) { - - throw new ValidationException("Format is required."); - - } else if(!(nameID.getFormat().equals(FORMAT_ALLOWED_VALUE) || nameID.getFormat().equals(FORMAT_ALLOWED_VALUE_OLD))) { - - throw new ValidationException("Format is invalid."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIdPolicyValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIdPolicyValidator.java deleted file mode 100644 index 7d98b5e60..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkNameIdPolicyValidator.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.NameIDPolicy; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -public class StorkNameIdPolicyValidator implements Validator { - - public StorkNameIdPolicyValidator() { - - } - - public void validate(NameIDPolicy nameIDPolicy) throws ValidationException { - - - if(nameIDPolicy.getAllowCreate() != null) { - - if(!nameIDPolicy.getAllowCreate()) { - - throw new ValidationException("AllowCreate is invalid."); - } - } - - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkQualityAuthenticationAssuranceLevelValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkQualityAuthenticationAssuranceLevelValidator.java deleted file mode 100644 index 5c23fe04b..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkQualityAuthenticationAssuranceLevelValidator.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; - -public class StorkQualityAuthenticationAssuranceLevelValidator implements - Validator { - - - private static final int MIN_VAL = 1; - private static final int MAX_VAL = 4; - - public StorkQualityAuthenticationAssuranceLevelValidator() { - - } - - public void validate(QualityAuthenticationAssuranceLevel qaaLevel) - throws ValidationException { - - if(qaaLevel.getValue() < MIN_VAL || qaaLevel.getValue() > MAX_VAL) { - - throw new ValidationException("QAALevel is invalid."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributeValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributeValidator.java deleted file mode 100644 index b9b26a38a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributeValidator.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.regex.Pattern; - -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.opensaml.saml2.metadata.validator.RequestedAttributeSchemaValidator; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSAny; -import org.opensaml.xml.schema.XSString; -import org.opensaml.xml.validation.ValidationException; - -import eu.stork.vidp.messages.common.STORKConstants; - -public class StorkRequestedAttributeValidator extends - RequestedAttributeSchemaValidator { - - private static final String PATTERN_ISAGEOVER = "^[0-9]{1,3}$"; - - public StorkRequestedAttributeValidator() { - - super(); - } - - @Override - public void validate(RequestedAttribute attr) throws ValidationException { - - super.validate(attr); - - if (attr.getName() == null) { - - throw new ValidationException("Name is required."); - } - - if (attr.getNameFormat() == null) { - - throw new ValidationException("NameFormat is required."); - } - - if (!STORKConstants.FULL_STORK_ATTRIBUTE_SET.contains(attr.getName()) && attr.isRequired()) { - throw new ValidationException("Unknown attribute " + attr.getName() + " requested mandatory."); - } - - if (attr.getName().equals(STORKConstants.STORK_ATTRIBUTE_ISAGEOVER)) { - if (attr.getAttributeValues().isEmpty()) { - throw new ValidationException("isAgeOver requires attribute value"); - } - - XMLObject attrValueObject = attr.getAttributeValues().get(0); - - if (attrValueObject instanceof XSString) { - if (!Pattern.matches(PATTERN_ISAGEOVER, ((XSString) attr.getAttributeValues().get(0)).getValue())) { - throw new ValidationException("Value for isAgeOver has incorrect format."); - } - } else if (attrValueObject instanceof XSAny) { - if (!Pattern.matches(PATTERN_ISAGEOVER, ((XSAny) attrValueObject).getTextContent())) { - throw new ValidationException("Value for isAgeOver has incorrect format."); - } - - } else { - throw new ValidationException("Value for isAgeOver has incorrect format."); - } - - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributesValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributesValidator.java deleted file mode 100644 index 0324079f3..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkRequestedAttributesValidator.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.RequestedAttributes; - -public class StorkRequestedAttributesValidator implements - Validator { - - public StorkRequestedAttributesValidator() { - - } - - public void validate(RequestedAttributes attrs) throws ValidationException { - - // empty so far - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkResponseValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkResponseValidator.java deleted file mode 100644 index 8028173fa..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkResponseValidator.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.common.SAMLVersion; -import org.opensaml.saml1.core.StatusCode; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.validator.ResponseSchemaValidator; -import org.opensaml.xml.util.XMLHelper; -import org.opensaml.xml.validation.ValidationException; - -import eu.stork.mw.messages.saml.STORKResponse; - -public class StorkResponseValidator extends ResponseSchemaValidator { - - private static final String CONSENT_ALLOWED_VALUE_1 = "urn:oasis:names:tc:SAML:2.0:consent:obtained"; - private static final String CONSENT_ALLOWED_VALUE_2 = "urn:oasis:names:tc:SAML:2.0:consent:prior"; - private static final String CONSENT_ALLOWED_VALUE_3 = "urn:oasis:names:tc:SAML:2.0:consent:curent-implicit"; - private static final String CONSENT_ALLOWED_VALUE_4 = "urn:oasis:names:tc:SAML:2.0:consent:curent-explicit"; - private static final String CONSENT_ALLOWED_VALUE_5 = "urn:oasis:names:tc:SAML:2.0:consent:unspecified"; - - private static final int MAX_SIZE = 131072; - - /** - * Constructor - * - */ - public StorkResponseValidator() { - - super(); - } - - /** {@inheritDoc} */ - public void validate(Response response) throws ValidationException { - - if (XMLHelper.prettyPrintXML(response.getDOM()).getBytes().length > MAX_SIZE) { - throw new ValidationException("SAML Response exceeds max size."); - } - - super.validate(response); - - STORKResponse resp = (STORKResponse) response; - - if (resp.getID() == null) { - - throw new ValidationException("ID is required"); - } - - if (resp.getInResponseTo() == null) { - - throw new ValidationException("InResponseTo is required"); - } - - if (resp.getVersion() == null) { - - throw new ValidationException("Version is required."); - } else if(!resp.getVersion().equals(SAMLVersion.VERSION_20)) { - - throw new ValidationException("Version is invalid."); - } - - if (resp.getIssueInstant() == null) { - - throw new ValidationException("IssueInstant is required"); - } - - if (resp.getDestination() == null) { - - throw new ValidationException("Destination is required"); - } - - // Consent is optional - if (resp.getConsent() != null) { - - String consent = resp.getConsent(); - - if (!consent.equals(CONSENT_ALLOWED_VALUE_1) - && !consent.equals(CONSENT_ALLOWED_VALUE_2) - && !consent.equals(CONSENT_ALLOWED_VALUE_3) - && !consent.equals(CONSENT_ALLOWED_VALUE_4) - && !consent.equals(CONSENT_ALLOWED_VALUE_5)) { - - throw new ValidationException("Consent is invalid."); - } - } - - - if (resp.getIssuer() == null) { - - throw new ValidationException("Issuer is required."); - } - - if (resp.getStatus() == null) { - - throw new ValidationException("Status is required."); - } - - - if(resp.getSignature() == null) { - - throw new ValidationException("Signature is required."); - } - - - if (resp.getStatus().getStatusCode().getValue().equals(StatusCode.SUCCESS)) { - if (resp.getAssertions() == null || resp.getAssertions().size() == 0) { - - throw new ValidationException("Assertion is required"); - } - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPIDValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPIDValidator.java deleted file mode 100644 index a42d7a453..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPIDValidator.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SPID; - -public class StorkSPIDValidator implements Validator { - - public static final int MIN_SIZE = 1; - public static final int MAX_SIZE = 40; - - public StorkSPIDValidator() { - - } - - public void validate(SPID spid) throws ValidationException { - - - if(spid == null) { - - throw new ValidationException("SPID value is required."); - } - - if(spid != null) { - - if (spid.getValue() == null) { - throw new ValidationException("SPID has no value"); - } - - if (spid.getValue().length() <= MIN_SIZE || spid.getValue().length() > MAX_SIZE) { - throw new ValidationException("SPID has wrong size: " + spid.getValue().length()); - } - } - - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPInformationValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPInformationValidator.java deleted file mode 100644 index 9c54fd620..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSPInformationValidator.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SPInformation; - -public class StorkSPInformationValidator implements Validator { - - public StorkSPInformationValidator() { - - } - - public void validate(SPInformation spi) throws ValidationException { - - if(spi.getSPID() == null) { - - throw new ValidationException("SPID is required."); - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpApplicationValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpApplicationValidator.java deleted file mode 100644 index 08551e03e..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpApplicationValidator.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SpApplication; - -public class StorkSpApplicationValidator implements - Validator { - - public static final int MIN_SIZE = 1; - public static final int MAX_SIZE = 100; - //public static final String REGEX_PATTERN = "^[a-zA-Z0-9]{1,30}$"; - - public StorkSpApplicationValidator() { - - } - - public void validate(SpApplication spApplication) throws ValidationException { - - if(spApplication != null) { - - if (spApplication.getValue() == null) { - throw new ValidationException("spApplication has no value"); - } - -// if (!Pattern.matches(REGEX_PATTERN, spApplication.getValue())) { -// throw new ValidationException("spApplication has wrong format: " + spApplication.getValue()); -// } - - if (spApplication.getValue().length() < MIN_SIZE || spApplication.getValue().length() > MAX_SIZE) { - throw new ValidationException("spApplication has wrong size: " + spApplication.getValue().length()); - } - - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpCountryValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpCountryValidator.java deleted file mode 100644 index e6ae0f1b7..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpCountryValidator.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.regex.Pattern; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SpCountry; - -public class StorkSpCountryValidator implements - Validator { - - public static final String REGEX_PATTERN = "^[A-Z]{2}$"; - - public StorkSpCountryValidator() { - - } - - public void validate(SpCountry spCountry) throws ValidationException { - - if(spCountry != null) { - - if (spCountry.getValue() == null) { - throw new ValidationException("spCountry has no value"); - } - - if (!Pattern.matches(REGEX_PATTERN, spCountry.getValue())) { - throw new ValidationException("spCountry not valid: " + spCountry.getValue()); - } - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpInstitutionValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpInstitutionValidator.java deleted file mode 100644 index 9d50d9122..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpInstitutionValidator.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SpInstitution; - -public class StorkSpInstitutionValidator implements - Validator { - - public static final int MIN_SIZE = 1; - public static final int MAX_SIZE = 50; - //public static final String REGEX_PATTERN = "^[a-zA-Z0-9]{1,50}$"; - - public StorkSpInstitutionValidator() { - - } - - public void validate(SpInstitution spInstitution) throws ValidationException { - - if(spInstitution != null) { - - if (spInstitution.getValue() == null) { - throw new ValidationException("spInstitution has no value"); - } - -// if (!Pattern.matches(REGEX_PATTERN, spApplication.getValue())) { -// throw new ValidationException("spApplication has wrong format: " + spApplication.getValue()); -// } - - if (spInstitution.getValue().length() < MIN_SIZE || spInstitution.getValue().length() > MAX_SIZE) { - throw new ValidationException("spInstitution has wrong size: " + spInstitution.getValue().length()); - } - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpSectorValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpSectorValidator.java deleted file mode 100644 index 2cfaa7a4c..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSpSectorValidator.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.regex.Pattern; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.SpSector; - -public class StorkSpSectorValidator implements - Validator { - - public static final int MIN_SIZE = 1; - public static final int MAX_SIZE = 20; - //public static final String REGEX_PATTERN = "^[a-zA-Z0-9]{1,30}$"; - - public StorkSpSectorValidator() { - - } - - public void validate(SpSector spSector) throws ValidationException { - - if(spSector != null) { - - if (spSector.getValue() == null) { - throw new ValidationException("spSector has no value"); - } - -// if (!Pattern.matches(REGEX_PATTERN, spSector.getValue())) { -// throw new ValidationException("spSector has wrong format: " + spSector.getValue()); -// } - - if (spSector.getValue().length() < MIN_SIZE || spSector.getValue().length() > MAX_SIZE) { - throw new ValidationException("spApplication has wrong size: " + spSector.getValue().length()); - } - - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusCodeValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusCodeValidator.java deleted file mode 100644 index 3ee214c46..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusCodeValidator.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.saml2.core.validator.StatusCodeSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkStatusCodeValidator extends StatusCodeSchemaValidator { - - // supported values according to SAML v2.0 specification - private static String[] ALLOWED_FIRST_LEVEL_STATUS_CODE_VALUES = new String[] { - "urn:oasis:names:tc:SAML:2.0:status:Success", - "urn:oasis:names:tc:SAML:2.0:status:Requester", - "urn:oasis:names:tc:SAML:2.0:status:Responder", - "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"}; - - private static String[] ALLOWED_SECOND_LEVEL_STATUS_CODE_VALUES = new String[] { - "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed", - "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue", - "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy", - "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext", - "urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP", - "urn:oasis:names:tc:SAML:2.0:status:NoPassive", - "urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP", - "urn:oasis:names:tc:SAML:2.0:status:PartialLogout", - "urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded", - "urn:oasis:names:tc:SAML:2.0:status:RequestDenied", - "urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported", - "urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated", - "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh", - "urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow", - "urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized", - "urn:oasis:names:tc:SAML:2.0:status:TooManyResponses", - "urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile", - "urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal", - "urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding", - "http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported" - }; - - /** - * Constructor - * - */ - public StorkStatusCodeValidator() { - - super(); - } - - @Override - public void validate(StatusCode statusCode) throws ValidationException { - - super.validate(statusCode); - - - if(statusCode.getValue() == null) { - - throw new ValidationException("StatusCode is required"); - } - - boolean valid = false; - - if (statusCode.getParent() instanceof Status) { - //first level Status Codes - - String value = statusCode.getValue(); - - - - - for(String allowedVal : ALLOWED_FIRST_LEVEL_STATUS_CODE_VALUES) { - - if(value.equals(allowedVal)) { - - valid = true; - break; - } - } - - if(!valid) { - - throw new ValidationException("First Level StatusCode has an invalid value."); - } - } else { - //parent is status code - //second level Status Codes - - if(statusCode != null) { - - valid = false; - - String subVal = statusCode.getValue(); - - for(String allowedVal : ALLOWED_SECOND_LEVEL_STATUS_CODE_VALUES) { - - if(subVal.equals(allowedVal)) { - - valid = true; - break; - } - } - - if(!valid) { - - throw new ValidationException("Second Level StatusCode has an invalid value."); - } - - } - - } - } - - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusValidator.java deleted file mode 100644 index 36d7ffab5..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkStatusValidator.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.validator.StatusSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkStatusValidator extends StatusSchemaValidator { - - /** - * Constructor - * - */ - public StorkStatusValidator() { - - super(); - } - - @Override - public void validate(Status status) throws ValidationException { - - super.validate(status); - - if(status.getStatusCode() == null) { - - throw new ValidationException("StatusCode is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectConfirmationValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectConfirmationValidator.java deleted file mode 100644 index 0f1fad295..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectConfirmationValidator.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import java.util.List; - -import javax.xml.namespace.QName; - -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.core.validator.SubjectConfirmationSchemaValidator; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.signature.X509Data; -import org.opensaml.xml.validation.ValidationException; - -public class StorkSubjectConfirmationValidator extends - SubjectConfirmationSchemaValidator { - - private static final String ALLOWED_METHOD_1 = "urn:oasis:names:tc:SAML:2.0:cm:bearer"; - private static final String ALLOWED_METHOD_2 = "oasis:names:tc:SAML:2.0:cm:holder-of-key"; - - /** - * Constructor - * - */ - public StorkSubjectConfirmationValidator() { - - super(); - } - - @Override - public void validate(SubjectConfirmation subjectConfirmation) - throws ValidationException { - - super.validate(subjectConfirmation); - - String method = subjectConfirmation.getMethod(); - - if (!(method.equals(ALLOWED_METHOD_1) || method.equals(ALLOWED_METHOD_2))) { - throw new ValidationException("Method is invalid."); - } - - if (subjectConfirmation.getSubjectConfirmationData() == null) { - throw new ValidationException("SubjectConfirmationData required."); - - } - - SubjectConfirmationData confData = subjectConfirmation.getSubjectConfirmationData(); - - - if (method.equals(ALLOWED_METHOD_1)) { - if (confData.getNotBefore() != null) { - throw new ValidationException("NotBefore in SubjectConfirmationData not allowed if confirmation method is \"bearer\"."); - } - - } - - if (confData.getNotOnOrAfter() == null) { - - throw new ValidationException("NotOnOrAfter is required."); - } - - if (confData.getRecipient() == null) { - - throw new ValidationException("Recipient is required."); - } - - if (confData.getInResponseTo() == null) { - - throw new ValidationException("InResponseTo is required."); - } - - if(method.equals(ALLOWED_METHOD_2)) { - - List childrenKeyInfo = confData.getUnknownXMLObjects(new QName("KeyInfo")); - - if(childrenKeyInfo.size() < 1) { - - throw new ValidationException("KeyInfo is required."); - } - - List childrenKeyData = confData.getUnknownXMLObjects(new QName("X509Data")); - - if(childrenKeyData.size() != 1) { - - throw new ValidationException("Invalid number of X509Data elements."); - } else { - - X509Data data = (X509Data)childrenKeyData.get(0); - - if(data.getX509Certificates() == null || data.getX509Certificates().size() < 1 ) { - - throw new ValidationException("X509Certificate is required."); - } - - } - - } - - - - } - - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectLocalityValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectLocalityValidator.java deleted file mode 100644 index 33c7b4478..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectLocalityValidator.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.SubjectLocality; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -public class StorkSubjectLocalityValidator implements - Validator { - - public StorkSubjectLocalityValidator() { - - } - - public void validate(SubjectLocality sloc) throws ValidationException { - - if (sloc.getAddress() == null) { - - throw new ValidationException("Address is required."); - } - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectValidator.java deleted file mode 100644 index 077b6294a..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkSubjectValidator.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.validator.SubjectSchemaValidator; -import org.opensaml.xml.validation.ValidationException; - -public class StorkSubjectValidator extends SubjectSchemaValidator { - - /** - * Constructor - * - */ - public StorkSubjectValidator() { - - super(); - } - - @Override - public void validate(Subject subject) throws ValidationException { - - super.validate(subject); - - if(subject.getNameID() == null && subject.getEncryptedID() == null) { - - throw new ValidationException("Neither NameID nor EncryptedID is provided."); - } - - if(subject.getSubjectConfirmations() == null || subject.getSubjectConfirmations().size() < 1) { - - throw new ValidationException("SubjectConfirmation is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkVIDPAuthenticationAttributesValidator.java b/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkVIDPAuthenticationAttributesValidator.java deleted file mode 100644 index 88ff7bed4..000000000 --- a/id/server/stork-saml-engine/src/main/java/eu/stork/vidp/messages/validation/StorkVIDPAuthenticationAttributesValidator.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package eu.stork.vidp.messages.validation; - -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.vidp.messages.stork.VIDPAuthenticationAttributes; - -public class StorkVIDPAuthenticationAttributesValidator implements - Validator { - - public StorkVIDPAuthenticationAttributesValidator() { - - } - - public void validate(VIDPAuthenticationAttributes attr) - throws ValidationException { - - - if(attr.getCitizenCountryCode() == null) { - - throw new ValidationException("CitizenCountryCode is required."); - } - - - if(attr.getSPInformation() == null) { - - throw new ValidationException("SPInformation is required."); - } - - } - -} diff --git a/id/server/stork-saml-engine/src/main/resources/saml2-post-binding-moa.vm b/id/server/stork-saml-engine/src/main/resources/saml2-post-binding-moa.vm deleted file mode 100644 index cac0bda76..000000000 --- a/id/server/stork-saml-engine/src/main/resources/saml2-post-binding-moa.vm +++ /dev/null @@ -1,38 +0,0 @@ -## -## Velocity Template for SAML 2 HTTP-POST binding -## -## Velocity context may contain the following properties -## action - String - the action URL for the form -## RelayState - String - the relay state for the message -## SAMLRequest - String - the Base64 encoded SAML Request -## SAMLResponse - String - the Base64 encoded SAML Response -## Contains target attribute to delegate PEPS authentication out of iFrame - - - - - - -
-
- #if($RelayState)#end - - #if($SAMLRequest)#end - - #if($SAMLResponse)#end - -
- -
- - - \ No newline at end of file diff --git a/id/server/stork-saml-engine/src/main/resources/saml2-stork-config.xml b/id/server/stork-saml-engine/src/main/resources/saml2-stork-config.xml deleted file mode 100644 index 988480f55..000000000 --- a/id/server/stork-saml-engine/src/main/resources/saml2-stork-config.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3 From 5ee3da37829fa14d70ad827e19364be4800fab37 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 31 Jan 2014 08:55:04 +0100 Subject: fixed target type for MIS info --- .../moa/id/auth/AuthenticationServer.java | 17 +++++++++-------- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 18 +++++++++++++++++- .../moa/id/auth/stork/STORKResponseProcessor.java | 21 +++++++++++---------- 3 files changed, 37 insertions(+), 19 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 60b269059..94cab53d4 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1710,7 +1710,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws SZRGWClientException */ - public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType, String target, String oaFriendlyName, String filters) throws SZRGWClientException { + public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, String filters) throws SZRGWClientException { try { AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance(); @@ -1739,7 +1739,8 @@ public class AuthenticationServer implements MOAIDAuthConstants { MISType mis = new MISType(); Target targetObject = new Target(); - targetObject.setValue(target); + targetObject.setType(targetType); + targetObject.setValue(targetValue); mis.setTarget(targetObject); mis.setOAFriendlyName(oaFriendlyName); @@ -1777,7 +1778,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws ConfigurationException the configuration exception */ public CreateIdentityLinkResponse getIdentityLink(Element signature) throws SZRGWClientException, ConfigurationException { - return getIdentityLink(null, null, null, null, null, XMLHelper.nodeToString(signature), null, null, null); + return getIdentityLink(null, null, null, null, XMLHelper.nodeToString(signature)); } /** @@ -1793,7 +1794,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { * @throws ConfigurationException the configuration exception */ public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature) throws SZRGWClientException { - return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, null, signature, null, null, null); + return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, null, signature, null, null, null, null, null, null, null); } /** @@ -1810,10 +1811,10 @@ public class AuthenticationServer implements MOAIDAuthConstants { */ public CreateIdentityLinkResponse getIdentityLink(String citizenSignature, String representative, String represented, String mandateContent, - String organizationAddress, String organizationType, String target, String oaFriendlyName, String filters) throws SZRGWClientException { + String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, String filters) throws SZRGWClientException { return getIdentityLink(null, null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, - organizationType, target, oaFriendlyName, filters); + organizationType, targetType, targetValue, oaFriendlyName, filters); } /** @@ -1833,10 +1834,10 @@ public class AuthenticationServer implements MOAIDAuthConstants { public CreateIdentityLinkResponse getIdentityLink(String eIdentifier, String givenName, String lastName, String dateOfBirth, String gender, String citizenSignature, String representative, String represented, - String mandate, String target, String oaFriendlyName, String filters) throws SZRGWClientException { + String mandate, String targetType, String targetValue, String oaFriendlyName, String filters) throws SZRGWClientException { return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate, null, - null, target, oaFriendlyName, filters); + null, targetType, targetValue, oaFriendlyName, filters); } /** diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index bd8c6420d..9dfce7838 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -200,6 +200,22 @@ public class PEPSConnectorServlet extends AuthServlet { OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(moasession.getPublicOAURLPrefix()); if (oaParam == null) throw new AuthenticationException("auth.00", new Object[] { moasession.getPublicOAURLPrefix() }); + + // retrieve target + //TODO: check in case of SSO!!! + String targetType = null; + String targetValue = null; + if(oaParam.getBusinessService()) { + String id = oaParam.getIdentityLinkDomainIdentifier(); + if (id.startsWith(AuthenticationSession.REGISTERANDORDNR_PREFIX_)) + targetValue = id.substring(AuthenticationSession.REGISTERANDORDNR_PREFIX_.length()); + else + targetValue = moasession.getDomainIdentifier(); + targetType = AuthenticationSession.REGISTERANDORDNR_PREFIX_; + } else { + targetType = AuthenticationSession.TARGET_PREFIX_; + targetValue = oaParam.getTarget(); + } Logger.debug("Starting connecting SZR Gateway"); //contact SZR Gateway @@ -207,7 +223,7 @@ public class PEPSConnectorServlet extends AuthServlet { try { identityLink = STORKResponseProcessor.connectToSZRGateway(authnResponse.getPersonalAttributeList(), oaParam.getFriendlyName(), - oaParam.getTarget(), + targetType, targetValue, oaParam.getMandateProfiles()); } catch (STORKException e) { // this is really nasty but we work against the system here. We are supposed to get the gender attribute from diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 6d88a1684..20ceb2128 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -144,16 +144,17 @@ public class STORKResponseProcessor { } /** - * Handels connection to SZR-GW and returns Identity Link on success - * @param oaFriendlyName - * @param target - * @param filters - * @param filter - * @param iPersonalAttributeList Received attribute List in assertion + * Handels connection to SZR-GW and returns Identity Link on success. + * + * @param attributeList the attribute list + * @param oaFriendlyName the oa friendly name + * @param targetType the target type + * @param targetValue the target value + * @param filters the filters * @return Identity Link - * @throws STORKException + * @throws STORKException the sTORK exception */ - public static IdentityLink connectToSZRGateway(IPersonalAttributeList attributeList, String oaFriendlyName, String target, String filters) throws STORKException { + public static IdentityLink connectToSZRGateway(IPersonalAttributeList attributeList, String oaFriendlyName, String targetType, String targetValue, String filters) throws STORKException { Logger.trace("Calling SZR Gateway with the following attributes:"); CreateIdentityLinkResponse identityLinkResponse = null; @@ -177,7 +178,7 @@ public class STORKResponseProcessor { String organizationAddress = getAttributeValue("canonicalRegisteredAddress", attributeList); String organizationType = getAttributeValue("translateableType", attributeList); - identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(citizenSignature, representative, represented, mandate, organizationAddress, organizationType, target, oaFriendlyName, filters); + identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(citizenSignature, representative, represented, mandate, organizationAddress, organizationType, targetType, targetValue, oaFriendlyName, filters); } else { // if we get here, we have a natural person representing another natural person String eIdentifier = getAttributeValue("eIdentifier", attributeList); @@ -192,7 +193,7 @@ public class STORKResponseProcessor { identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, - represented, mandate, target, oaFriendlyName, filters); + represented, mandate, targetType, targetValue, oaFriendlyName, filters); } } else { // we do not have a representation case -- cgit v1.2.3 From 2ee0d4beb3b23613b1bdaa3f9c58723d30303b79 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 31 Jan 2014 14:39:04 +0100 Subject: fixed saml post binding template location --- .../main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 94cab53d4..209743f45 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1986,7 +1986,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { Logger.trace("Initialize VelocityEngine..."); VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); - Template template = velocityEngine.getTemplate("/saml2-post-binding-moa.vm"); + Template template = velocityEngine.getTemplate("/resources/templates/saml2-post-binding-moa.vm"); VelocityContext context = new VelocityContext(); context.put("SAMLRequest", PEPSUtil.encodeSAMLToken(authnRequest.getTokenSaml())); context.put("action", destination); -- cgit v1.2.3 From 9122bf6862fe34881e5454f54c69692b7f5ed083 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 31 Jan 2014 16:21:13 +0100 Subject: fixed outgoing signrequest - mostly tested --- .../moa/id/auth/AuthenticationServer.java | 40 +++++++++++++---- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 52 +++++++++++++++++----- .../moa/id/auth/stork/STORKResponseProcessor.java | 51 --------------------- 3 files changed, 73 insertions(+), 70 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 209743f45..146137a2c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -31,6 +31,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; +import java.math.BigInteger; import java.security.NoSuchAlgorithmException; import java.security.Principal; import java.security.cert.CertificateException; @@ -49,6 +50,7 @@ import javax.servlet.http.HttpSession; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; +import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringEscapeUtils; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; @@ -123,7 +125,6 @@ import at.gv.egovernment.moa.id.storage.DBExceptionStoreImpl; import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; import at.gv.egovernment.moa.id.util.Random; -import at.gv.egovernment.moa.id.util.SSLUtils; import at.gv.egovernment.moa.id.util.XMLUtil; import at.gv.egovernment.moa.id.util.client.mis.simple.MISMandate; import at.gv.egovernment.moa.logging.LogMsg; @@ -142,10 +143,14 @@ import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest.PEPSData; import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; import at.gv.util.xsd.srzgw.MISType; import at.gv.util.xsd.srzgw.MISType.Filters; +import eu.stork.oasisdss.api.AdditionalProfiles; import eu.stork.oasisdss.api.ApiUtils; import eu.stork.oasisdss.api.ApiUtilsException; +import eu.stork.oasisdss.api.Profiles; +import eu.stork.oasisdss.api.QualityLevels; +import eu.stork.oasisdss.api.SignatureTypes; +import eu.stork.oasisdss.profile.AnyType; import eu.stork.oasisdss.profile.DocumentType; -import eu.stork.oasisdss.profile.InputDocuments; import eu.stork.oasisdss.profile.SignRequest; import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; @@ -1912,7 +1917,9 @@ public class AuthenticationServer implements MOAIDAuthConstants { PersonalAttribute newAttribute = new PersonalAttribute(); newAttribute.setName("signedDoc"); List value = new ArrayList(); - value.add(generateDssSignRequest(CreateXMLSignatureRequestBuilder.buildForeignIDTextToBeSigned("wie im Signaturzertifikat (as in my signature certificate)", oaParam, moasession), "application/xhtml+xml")); + value.add(generateDssSignRequest(CreateXMLSignatureRequestBuilder.buildForeignIDTextToBeSigned("wie im Signaturzertifikat (as in my signature certificate)", oaParam, moasession), + "application/xhtml+xml", + moasession.getCcc())); newAttribute.setValue(value); attributeList.add(newAttribute); @@ -2004,20 +2011,37 @@ public class AuthenticationServer implements MOAIDAuthConstants { Logger.info("STORK AuthnRequest successfully successfully prepared for client with target location: " + authnRequest.getDestination()); } - private static String generateDssSignRequest(String text, String mimeType) { + private static String generateDssSignRequest(String text, String mimeType, String citizenCountry) { IdentifierGenerator idGenerator; try { idGenerator = new SecureRandomIdentifierGenerator(); DocumentType doc = new DocumentType(); - doc.setBase64XML(Base64.encodeBytes(text.getBytes()).getBytes()); + doc.setBase64XML(text.getBytes()); + doc.setID(idGenerator.generateIdentifier()); SignRequest request = new SignRequest(); request.setInputDocuments(ApiUtils.createInputDocuments(doc)); - request.setRequestID(idGenerator.generateIdentifier()); + String id = idGenerator.generateIdentifier(); + request.setRequestID(id); + request.setDocUI(id); - return ApiUtils.marshalToDocument(request).getTextContent(); + request.setProfile(Profiles.XADES_BES.toString()); + request.setNumberOfSigners(BigInteger.ONE); + request.setTargetCountry(citizenCountry); + + // no, no todo. PEPS will alter this value anyhow. + request.setReturnURL("http://invalid_return"); + + AnyType required = new AnyType(); + required.getAny().add(ApiUtils.createSignatureType(SignatureTypes.XMLSIG_RFC3275.toString())); + required.getAny().add(ApiUtils.createAdditionalProfile(AdditionalProfiles.XADES.toString())); + required.getAny().add(ApiUtils.createQualityRequirements(QualityLevels.QUALITYLEVEL_QUALIFIEDSIG)); + required.getAny().add(ApiUtils.createIncludeObject(doc)); + request.setOptionalInputs(required); + + return IOUtils.toString(ApiUtils.marshalToInputStream(request)); } catch (NoSuchAlgorithmException e) { Logger.error("Cannot generate id", e); throw new RuntimeException(e); @@ -2027,7 +2051,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { } catch (DOMException e) { Logger.error("Could not create SignRequest", e); throw new RuntimeException(e); - } catch (ParserConfigurationException e) { + } catch (IOException e) { Logger.error("Could not create SignRequest", e); throw new RuntimeException(e); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 9dfce7838..a3c8ebe4d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -1,7 +1,10 @@ package at.gv.egovernment.moa.id.auth.servlet; +import iaik.x509.X509Certificate; import java.io.IOException; +import java.io.InputStream; import java.io.StringWriter; +import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -10,19 +13,19 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; import javax.xml.transform.stream.StreamSource; +import org.apache.commons.io.IOUtils; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; -import org.opensaml.saml2.core.Assertion; import org.opensaml.saml2.core.StatusCode; -import org.w3c.dom.Element; import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; -import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute; import at.gv.egovernment.moa.id.auth.data.IdentityLink; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; @@ -33,14 +36,14 @@ import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.ModulUtils; -import at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParser; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; -import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.StringUtils; +import at.gv.util.xsd.xmldsig.SignatureType; +import at.gv.util.xsd.xmldsig.X509DataType; import eu.stork.oasisdss.api.ApiUtils; -import eu.stork.oasisdss.api.LightweightSourceResolver; +import eu.stork.oasisdss.profile.DocumentWithSignature; import eu.stork.oasisdss.profile.SignResponse; import eu.stork.peps.auth.commons.PEPSUtil; import eu.stork.peps.auth.commons.PersonalAttribute; @@ -173,14 +176,41 @@ public class PEPSConnectorServlet extends AuthServlet { //extract signed doc element and citizen signature String citizenSignature = null; try { - citizenSignature = authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0); + String signatureInfo = authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0); + SignResponse dssSignResponse = (SignResponse) ApiUtils.unmarshal(new StreamSource(new java.io.StringReader(signatureInfo))); + + List doclocations = ApiUtils.findNamedElement(dssSignResponse.getOptionalOutputs(), DocumentWithSignature.class.getSimpleName(), DocumentWithSignature.class); + // TODO handle multiple docs? + Logger.debug("trying first doclocation"); + String docUrl = doclocations.get(0).getDocument().getDocumentURL(); + Logger.debug("trying first doclocation successful"); + + // fetch signed doc + URL url = new URL(docUrl); + InputStream incomming = url.openStream(); + citizenSignature = IOUtils.toString(incomming); + incomming.close(); + + JAXBContext ctx = JAXBContext.newInstance(SignatureType.class.getPackage().getName()); + SignatureType root = ((JAXBElement) ctx.createUnmarshaller().unmarshal(IOUtils.toInputStream(citizenSignature))).getValue(); + + // memorize signature into authblock moaSession.setAuthBlock(citizenSignature); + + // extract certificate + for(Object current : root.getKeyInfo().getContent()) + if(((JAXBElement) current).getValue() instanceof X509DataType) { + for(Object currentX509Data : ((JAXBElement) current).getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName()) { + JAXBElement casted = ((JAXBElement) currentX509Data); + if(casted.getName().getLocalPart().equals("X509Certificate")) { + moaSession.setSignerCertificate(new X509Certificate(((String)casted.getValue()).getBytes())); + break; + } + } + } - // FIXME untested - Element sepp = (Element) ApiUtils.unmarshal(new StreamSource(new java.io.StringReader(citizenSignature))); - moaSession.setSignerCertificate(AuthenticationServer.getCertificateFromXML(sepp)); - } catch (Exception e) { + } catch (Throwable e) { Logger.error("Could not extract citizen signature from C-PEPS", e); throw new MOAIDException("stork.09", null); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 20ceb2128..2534110d5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -57,57 +57,6 @@ public class STORKResponseProcessor { /** OASIS DSS Success Message */ public static final String OASIS_DSS_SUCCESS_MSG = "urn:oasis:names:tc:dss:1.0:resultmajor:Success"; - /** - * Extracts the signature value out of a DSS response - * @param signatureResponse DSS signature response - * @return signature - * @throws STORKException - */ - private static Element getSignature(Element signatureResponse) throws STORKException { - - NodeList nList = signatureResponse.getElementsByTagNameNS(OASIS_DSS_NS, "ResultMajor"); - - String resultMajor = XMLUtil.getFirstTextValueFromNodeList(nList); - - if (StringUtils.isEmpty(resultMajor)) { - String msg = "DSS response not correct, ResultMajor element missing."; - Logger.error(msg); - throw new STORKException(msg); - } - - Logger.trace("ResultMajor of DSS response: " + resultMajor); - - if (!OASIS_DSS_SUCCESS_MSG.equals(resultMajor)) { - String msg = "DSS response not correct, ResultMajor is " + resultMajor; - Logger.error(msg); - throw new STORKException(msg); - } - - NodeList nList2 = signatureResponse.getElementsByTagNameNS(OASIS_DSS_NS, "Base64Signature");; - - String base64SigString = XMLUtil.getFirstTextValueFromNodeList(nList2); - - if (StringUtils.isEmpty(base64SigString)) { - String msg = "DSS response not correct, Base64Signature element missing."; - Logger.error(msg); - throw new STORKException(msg); - } - - Logger.trace("Base64Signature element of DSS response: " + base64SigString); - - String sigString = new String(Base64.decode(base64SigString)); - - try { - return XMLUtil.stringToDOM(sigString); - } catch (Exception e) { - String msg = "Unable to extract signature from DSS response"; - Logger.error(msg); - throw new STORKException(msg); - } - - - } - /** * Checks for attribute. * -- cgit v1.2.3 From c2ccb7f48188b369c34cf2116b593a6d7c46b1ac Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 31 Jan 2014 16:29:15 +0100 Subject: refactored gender retrieval --- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 52 ++++++++++------------ .../moa/id/auth/stork/STORKResponseProcessor.java | 3 +- 2 files changed, 26 insertions(+), 29 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index a3c8ebe4d..b1829439a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -167,6 +167,30 @@ public class PEPSConnectorServlet extends AuthServlet { gender.setValue(tmp); authnResponse.getPersonalAttributeList().add(gender); + } else { + // this is really nasty but we work against the system here. We are supposed to get the gender attribute from + // stork. If we do not, we cannot register the person in the ERnP - we have to have the + // gender for the represented person. So here comes the dirty hack. + try { + Logger.trace("Initialize VelocityEngine..."); + + VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); + Template template = velocityEngine.getTemplate("/resources/templates/fetchGender.html"); + VelocityContext context = new VelocityContext(); + context.put("SAMLResponse", request.getParameter("SAMLResponse")); + context.put("action", request.getRequestURL()); + + StringWriter writer = new StringWriter(); + template.merge(context, writer); + + response.getOutputStream().write(writer.toString().getBytes()); + } catch (Exception e1) { + Logger.error("Error sending gender retrival form.", e1); + httpSession.invalidate(); + throw new MOAIDException("stork.10", null); + } + + return; } } @@ -256,34 +280,6 @@ public class PEPSConnectorServlet extends AuthServlet { targetType, targetValue, oaParam.getMandateProfiles()); } catch (STORKException e) { - // this is really nasty but we work against the system here. We are supposed to get the gender attribute from - // stork. If we do not, we cannot register the person in the ERnP - we have to have the - // gender for the represented person. So here comes the dirty hack. - if(e.getMessage().equals("gender not found in response")) { - // fetch gender - - try { - Logger.trace("Initialize VelocityEngine..."); - - VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); - Template template = velocityEngine.getTemplate("/resources/templates/fetchGender.html"); - VelocityContext context = new VelocityContext(); - context.put("SAMLResponse", request.getParameter("SAMLResponse")); - context.put("action", request.getRequestURL()); - - StringWriter writer = new StringWriter(); - template.merge(context, writer); - -// response.setContentType("text/html"); - response.getOutputStream().write(writer.toString().getBytes()); - } catch (Exception e1) { - Logger.error("Error sending gender retrival form.", e1); - httpSession.invalidate(); - throw new MOAIDException("stork.10", null); - } - - return; - } Logger.error("Error connecting SZR Gateway", e); throw new MOAIDException("stork.10", null); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java index 2534110d5..344e842b2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java @@ -136,7 +136,8 @@ public class STORKResponseProcessor { String dateOfBirth = getAttributeValue("dateOfBirth", attributeList); // gender attribute is mandatory here because of some legal stuff -// String gender = getAttributeValue("gender", attributeList); + String gender = getAttributeValue("gender", attributeList); + if (!StringUtils.isEmpty(dateOfBirth)) dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth); -- cgit v1.2.3 From 3c1884ee275350e7b2a78256342d9610b1766898 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 31 Jan 2014 16:31:50 +0100 Subject: remove testing Citizen Country Code from auth flow --- .../main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 146137a2c..67824bb44 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -1953,8 +1953,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { authnRequest.setEIDCrossSectorShare(true); authnRequest.setEIDSectorShare(true); - authnRequest.setCitizenCountryCode("LOCAL"); -// authnRequest.setCitizenCountryCode(moasession.getCcc()); + authnRequest.setCitizenCountryCode(moasession.getCcc()); Logger.debug("STORK AuthnRequest succesfully assembled."); -- cgit v1.2.3 From 080e499cc22a0065ea7f47e04b6c0f336533e21e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 3 Feb 2014 07:17:34 +0100 Subject: *update Assembly script *move demoOA to moa.id.demoOA *change name of moa-id configuration-tool --- id/server/auth/pom.xml | 1 + id/server/idserverlib/pom.xml | 76 ++++++++++++---------- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 2 + 3 files changed, 45 insertions(+), 34 deletions(-) (limited to 'id/server') diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml index 93009173d..987ae1951 100644 --- a/id/server/auth/pom.xml +++ b/id/server/auth/pom.xml @@ -79,6 +79,7 @@ MOA.id.server moa-id-lib
+ iaik.prod diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 9b2711249..b137fa7ca 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -60,15 +60,12 @@ webservices-tools 2.0.1 - + com.sun webservices-rt 2.0.1 - - - + javax.mail mail @@ -78,22 +75,45 @@ servlet-api provided - - xerces - xercesImpl - - - xalan-bin-dist - xml-apis - - - xalan-bin-dist - xalan - - - xalan-bin-dist - serializer - + + + xalan-bin-dist + xalan + + provided + + + xerces + xercesImpl + + provided + + + xalan-bin-dist + xml-apis + + provided + + + xalan-bin-dist + serializer + + provided + + + iaik.prod + iaik_jce_full + + provided + + + iaik.prod + iaik_ecc + + provided + + + junit junit @@ -127,15 +147,6 @@ iaik.prod iaik_moa - - iaik.prod - iaik_ecc - - - iaik.prod - iaik_jce_full - provided - iaik.prod iaik_ixsil @@ -161,10 +172,7 @@ regexp regexp - - + commons-lang commons-lang diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 93f17dd70..9a13129d8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import javax.xml.bind.JAXBContext; import org.opensaml.saml2.core.Assertion; import org.opensaml.saml2.core.StatusCode; @@ -52,6 +53,7 @@ import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.StringUtils; +import at.gv.util.xsd.xmldsig.SignatureType; import eu.stork.mw.messages.saml.STORKAuthnRequest; import eu.stork.mw.messages.saml.STORKResponse; import eu.stork.vidp.messages.util.XMLUtil; -- cgit v1.2.3 From 7f6eb6ab2e007a90f42505523e1623823d5df383 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 3 Feb 2014 08:22:24 +0100 Subject: unrefactoreed gender retrieval --- .../moa/id/auth/servlet/PEPSConnectorServlet.java | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index b1829439a..f5193c80f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -32,7 +32,6 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.stork.STORKException; import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor; import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; -import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.ModulUtils; @@ -167,30 +166,6 @@ public class PEPSConnectorServlet extends AuthServlet { gender.setValue(tmp); authnResponse.getPersonalAttributeList().add(gender); - } else { - // this is really nasty but we work against the system here. We are supposed to get the gender attribute from - // stork. If we do not, we cannot register the person in the ERnP - we have to have the - // gender for the represented person. So here comes the dirty hack. - try { - Logger.trace("Initialize VelocityEngine..."); - - VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); - Template template = velocityEngine.getTemplate("/resources/templates/fetchGender.html"); - VelocityContext context = new VelocityContext(); - context.put("SAMLResponse", request.getParameter("SAMLResponse")); - context.put("action", request.getRequestURL()); - - StringWriter writer = new StringWriter(); - template.merge(context, writer); - - response.getOutputStream().write(writer.toString().getBytes()); - } catch (Exception e1) { - Logger.error("Error sending gender retrival form.", e1); - httpSession.invalidate(); - throw new MOAIDException("stork.10", null); - } - - return; } } @@ -280,6 +255,32 @@ public class PEPSConnectorServlet extends AuthServlet { targetType, targetValue, oaParam.getMandateProfiles()); } catch (STORKException e) { + // this is really nasty but we work against the system here. We are supposed to get the gender attribute from + // stork. If we do not, we cannot register the person in the ERnP - we have to have the + // gender for the represented person. So here comes the dirty hack. + if(e.getCause() instanceof STORKException && e.getCause().getMessage().equals("gender not found in response")) { + try { + Logger.trace("Initialize VelocityEngine..."); + + VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); + Template template = velocityEngine.getTemplate("/resources/templates/fetchGender.html"); + VelocityContext context = new VelocityContext(); + context.put("SAMLResponse", request.getParameter("SAMLResponse")); + context.put("action", request.getRequestURL()); + + StringWriter writer = new StringWriter(); + template.merge(context, writer); + + response.getOutputStream().write(writer.toString().getBytes()); + } catch (Exception e1) { + Logger.error("Error sending gender retrival form.", e1); + httpSession.invalidate(); + throw new MOAIDException("stork.10", null); + } + + return; + } + Logger.error("Error connecting SZR Gateway", e); throw new MOAIDException("stork.10", null); } -- cgit v1.2.3 From ff390ac6c2f0ca181075218ee16bf292e47a299c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Mon, 3 Feb 2014 08:25:42 +0100 Subject: stork commons as lib --- id/server/stork2-commons/Releases | 62 -- id/server/stork2-commons/pom.xml | 213 ------ .../src/main/config/embedded/pepsUtil.properties | 267 -------- .../peps/auth/commons/AttributeConstants.java | 72 -- .../eu/stork/peps/auth/commons/AttributeName.java | 74 -- .../stork/peps/auth/commons/AttributeProvider.java | 80 --- .../peps/auth/commons/AttributeProvidersMap.java | 96 --- .../stork/peps/auth/commons/AttributeSource.java | 188 ------ .../eu/stork/peps/auth/commons/AttributeUtil.java | 231 ------- .../eu/stork/peps/auth/commons/CitizenConsent.java | 123 ---- .../java/eu/stork/peps/auth/commons/Country.java | 95 --- .../eu/stork/peps/auth/commons/CountryCodes.java | 79 --- .../java/eu/stork/peps/auth/commons/DateUtil.java | 169 ----- .../peps/auth/commons/IAttributeListProcessor.java | 148 ---- .../peps/auth/commons/IAttributeProvidersMap.java | 82 --- .../peps/auth/commons/IPersonalAttributeList.java | 194 ------ .../eu/stork/peps/auth/commons/IStorkLogger.java | 239 ------- .../eu/stork/peps/auth/commons/IStorkSession.java | 85 --- .../java/eu/stork/peps/auth/commons/Linker.java | 316 --------- .../eu/stork/peps/auth/commons/PEPSErrors.java | 392 ----------- .../eu/stork/peps/auth/commons/PEPSParameters.java | 619 ----------------- .../java/eu/stork/peps/auth/commons/PEPSUtil.java | 353 ---------- .../eu/stork/peps/auth/commons/PEPSValues.java | 329 --------- .../stork/peps/auth/commons/PersonalAttribute.java | 348 ---------- .../peps/auth/commons/PersonalAttributeList.java | 396 ----------- .../peps/auth/commons/STORKAttrQueryRequest.java | 447 ------------ .../peps/auth/commons/STORKAttrQueryResponse.java | 388 ----------- .../stork/peps/auth/commons/STORKAuthnRequest.java | 495 -------------- .../peps/auth/commons/STORKAuthnResponse.java | 383 ----------- .../peps/auth/commons/STORKLogoutRequest.java | 197 ------ .../peps/auth/commons/STORKLogoutResponse.java | 250 ------- .../stork/peps/auth/commons/STORKStatusCode.java | 68 -- .../peps/auth/commons/STORKSubStatusCode.java | 71 -- .../commons/exceptions/AbstractPEPSException.java | 173 ----- .../auth/commons/exceptions/CPEPSException.java | 143 ---- .../exceptions/InternalErrorPEPSException.java | 74 -- .../exceptions/InvalidParameterPEPSException.java | 54 -- .../exceptions/InvalidSessionPEPSException.java | 46 -- .../commons/exceptions/SecurityPEPSException.java | 67 -- .../commons/exceptions/StorkPEPSException.java | 53 -- .../peps/auth/commons/exceptions/package-info.java | 7 - .../eu/stork/peps/auth/commons/package-info.java | 9 - .../eu/stork/peps/auth/specific/IAUService.java | 215 ------ .../peps/auth/specific/ICheckAttributeValue.java | 37 - .../stork/peps/auth/specific/IDeriveAttribute.java | 40 -- .../stork/peps/auth/specific/INormaliseValue.java | 35 - .../peps/auth/specific/ITranslatorService.java | 100 --- .../eu/stork/peps/auth/specific/package-info.java | 8 - .../stork2-commons/src/main/resources/log4j.xml | 19 - .../peps/tests/AttributeProvidersMapTestCase.java | 134 ---- .../stork/peps/tests/AttributeSourceTestCase.java | 88 --- .../eu/stork/peps/tests/AttributeUtilTestCase.java | 537 --------------- .../java/eu/stork/peps/tests/DateUtilTestCase.java | 294 -------- .../java/eu/stork/peps/tests/PEPSUtilTestCase.java | 553 --------------- .../peps/tests/PersonalAttributeListTestCase.java | 747 --------------------- .../peps/tests/PersonalAttributeTestCase.java | 182 ----- .../java/eu/stork/peps/tests/package-info.java | 5 - .../stork2-commons/src/test/resources/log4j.xml | 19 - 58 files changed, 11188 deletions(-) delete mode 100644 id/server/stork2-commons/Releases delete mode 100644 id/server/stork2-commons/pom.xml delete mode 100644 id/server/stork2-commons/src/main/config/embedded/pepsUtil.properties delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java delete mode 100644 id/server/stork2-commons/src/main/resources/log4j.xml delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java delete mode 100644 id/server/stork2-commons/src/test/resources/log4j.xml (limited to 'id/server') diff --git a/id/server/stork2-commons/Releases b/id/server/stork2-commons/Releases deleted file mode 100644 index 54aeb9313..000000000 --- a/id/server/stork2-commons/Releases +++ /dev/null @@ -1,62 +0,0 @@ -Created 06-04-2011 - -Branch : STORKCommons_0_5_UPDATE_06042011 -Date : 06-04-2011 -Changes: No changes. - -Branch : STORKCommons_0_5_UPDATE_07072011 -Date : 07-07-2011 -Changes: Inserted constants to HttpOnly HTTP Header. - -Branch : STORKCommons_0_6 -Date : 07-11-2011 -Changes: Improved error exception handling (few changes on the exception classes). - Improved Constansts (unused removed, others added). - Unit Tests include (almost all the code is cover). - Fix some minor bugs found on unit tests. - New Copyright License added. - PEPUtils refactored. - Improved error code message (three kind of messages: to citizen, admin and saml token). - -Branch : STORKCommons_0_6_1 -Date : 28-11-2011 -Changes: Removed unnecessary javadoc package file. - Updated pepsUtils.properties file (check attribute value had old error message) - -Branch : STORKCommons_0_9 -Date : 02-12-2011 -Changes: Updated Version to 0.9 - -Branch : STORKCommons_1_0 -Date : 02-12-2011 -Changes: Updated Version to 1.0 - -Branch : STORKCommons_1_1_0 -Date : 01-11-2013 -Changes: Updated Version to 1.1.0 - Dependencies updated - Business Logic Part I changes - SAML Engine Changes merged (from SamlEngine/1.1.0/Commons branch to be easier to merge this branch with trunk) - Fixed some errors on Test Case - -Branch : STORKCommons_1_1_1 -Date : 02-12-2013 -Changes: Updated Version to 1.1.1 - Added mandate error code - PMD quality code changes (some final identifier missing) - Added new methods to personal attribute list to get Mandatory/Optional and/or Simple/Complex attributes - Added new unit tests - -Branch : Commons (Trunk) -Date : 15-01-2014 -Version: 1.2.0 -Release: 2 -Changes: Updated Version to 1.2.0 - dded request flow of PV (incomplete) - Added AP mandatory attribute to get data for business attributes - *) based on configuration file it adds the missing attributes (eIdentifier, givenName, surname and dateOfBirth) or change isRequired to true. - changes original isRequired state in response - Added new Interface (IAttributeListProcessor) to make some operations on attribute lists - Power Validation is complete now - Business Logic I and II integration (Request Complete!) - Added new method to Personal attribute List to check if there is at least one attribute with no value. diff --git a/id/server/stork2-commons/pom.xml b/id/server/stork2-commons/pom.xml deleted file mode 100644 index a71ee1628..000000000 --- a/id/server/stork2-commons/pom.xml +++ /dev/null @@ -1,213 +0,0 @@ - - 4.0.0 - eu.stork - Commons - jar - Stork Commons - - UTF-8 - 1.2.0 - 2.6.0 - - ${stork.version} - - The STORKCommons library provides beans, Java Interfaces and utility classes to integrate PEPS and SAML Engine. - - - - - - - joda-time - joda-time - 2.3 - - - - - log4j - log4j - 1.2.17 - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - mail - javax.mail - - - - - - org.opensaml - opensaml - ${opensaml.version} - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - jul-to-slf4j - - - - - - - org.bouncycastle - bcprov-jdk16 - 1.46 - - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - commons-lang - commons-lang - 2.6 - jar - compile - - - junit - junit - 4.11 - test - - - - - commons - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-surefire-plugin - - reversealphabetical - false - - reversealphabetical - **/PEPSUtilTest.java - **/PersonalAttributeTestCase.java - **/PersonalAttributeListTestCase.java - **/DateUtilTestCase.java - **/AttributeUtilTest.java - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - http://commons.apache.org/lang/api/ - http://java.sun.com/j2se/1.6.0/docs/api/ - http://www.bouncycastle.org/docs/docs1.6/ - http://docs.oracle.com/javase/6/docs/api/ - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - verify - - jar-no-fork - - - - - - - - src/test/resources - - log4j.xml - - - - - - - embedded - - - - ${project.basedir}/src/main/resources - - - ${project.basedir}/src/main/config/embedded - - - - - - metrics - - - - org.codehaus.mojo - cobertura-maven-plugin - 2.5.1 - - - html - xml - - - - - - - - diff --git a/id/server/stork2-commons/src/main/config/embedded/pepsUtil.properties b/id/server/stork2-commons/src/main/config/embedded/pepsUtil.properties deleted file mode 100644 index 1e92f390d..000000000 --- a/id/server/stork2-commons/src/main/config/embedded/pepsUtil.properties +++ /dev/null @@ -1,267 +0,0 @@ -#Max allowed params size -validation.active=true -max.spUrl.size=150 -max.attrList.size=20000 -max.invalidAttributeList.size=20000 -max.attrName.size=100 -max.callback.size=300 -max.idp.url.size=300 -max.atp.url.size=300 -max.cpepsURL.size=300 -max.attrValue.size=20000 -max.attrType.size=25 -max.spId.size=40 -max.providerName.size=128 -max.spName.size=25 -max.country.size=150 -max.qaaLevel.size=1 -max.spQaaLevel.size=1 -max.errorCode.size=5 -max.errorMessage.size=300 -max.username.size=30 -max.spepsRedirectUrl.size=300 -max.speps.redirectUrl.size=300 -max.cpeps.redirectUrl.size=300 -max.cpepsRedirectUrl.size=300 -max.spepsAssertionUrl.size=300 -max.SAMLRequest.size=131072 -max.SAMLResponse.size=131072 -max.RelayState.size=80 -max.remoteAddr.size=300 -max.remoteHost.size=300 -max.localAddr.size=300 -max.localName.size=300 -max.apepsUrl.size=300 -max.apeps.callbackUrl.size=300 - -#ERROR codes/messages (accordingly to specification) - -#CountrySelector Interface errors -spCountrySelector.invalidSPQAA.code=0000001 -spCountrySelector.invalidSPQAA.message=invalid.spQAA.parameter - -spCountrySelector.invalidQaaSPid.code=0000001 -spCountrySelector.invalidQaaSPid.message=invalid.spQAAId.parameter - -spCountrySelector.invalidSpId.code=000002 -spCountrySelector.invalidSpId.message=invalid.spId.parameter - -spCountrySelector.invalidSpURL.code=000003 -spCountrySelector.invalidSpURL.message=invalid.spUrl.parameter - -domain.CountrySelectorAction.code=000003 -domain.CountrySelectorAction.message=invalid.cs.domain - -requests.CountrySelectorAction.code=000004 -requests.CountrySelectorAction.message=reached.max.requests.cs - -spCountrySelector.spNotAllowed.code=000006 -spCountrySelector.spNotAllowed.message=attr.access.deny - -spCountrySelector.invalidAttr.code=000007 -spCountrySelector.invalidAttr.message=invalid.spAttr.parameter - -spCountrySelector.invalidProviderName.code=000008 -spCountrySelector.invalidProviderName.message=invalid.spProvidername.parameter - -spCountrySelector.errorCreatingSAML.code=203001 -spCountrySelector.errorCreatingSAML.message=error.create.sp.saml - -spepsSAMLRequest.code=203001 -spepsSAMLRequest.message=error.create.saml.speps - -#ServiceProvider Interface errors -sProviderAction.invalidSPQAA.code=200001 -sProviderAction.invalidSPQAA.message=invalid.sp.qaa - -sProviderAction.invalidSPQAAId.code=200001 -sProviderAction.invalidSPQAAId.message=invalid.sp.qaaid - -sProviderAction.invalidSPId.code=200002 -sProviderAction.invalidSPId.message=invalid.sp.id - -domain.ServiceProviderAction.code=200003 -domain.ServiceProviderAction.message=invalid.sp.domain - -sProviderAction.invalidSPDomain.code=200003 -sProviderAction.invalidSPDomain.message=invalid.sp.domain - -sProviderAction.invalidCountry.code=200004 -sProviderAction.invalidCountry.message=invalid.sp.country - -sProviderAction.spNotAllowed.code=200005 -sProviderAction.spNotAllowed.message=sp.not.allowed - -sProviderAction.invalidSaml.code=200006 -sProviderAction.invalidSaml.message=invalid.sp.samlrequest - -sProviderAction.invalidSPProviderName.code=200007 -sProviderAction.invalidSPProviderName.message=sp.not.identified - -sProviderAction.invalidSPRedirect.code=200008 -sProviderAction.invalidSPRedirect.message=invalid.sp.redirectUrl - -sProviderAction.invalidRelayState.code=200009 -sProviderAction.invalidRelayState.message=invalid.sp.relaystate - -sProviderAction.invalidAttr.code=200011 -sProviderAction.invalidAttr.message=invalid.sp.attr - -requests.ServiceProviderAction.code=200012 -requests.ServiceProviderAction.message=reached.max.requests.sp - -sPPowerValidationAction.invalidSPPVAttrList.code=200013 -sPPowerValidationAction.invalidSPPVAttrList.message=invalid.sp.pv.attrlist - -invalid.sp.pv.attrlist.code=200013 -invalid.sp.pv.attrlist.message=invalid.sp.pv.attrlist - -sProviderAction.invalidSPAlias.code=203003 -sProviderAction.invalidSPAlias.message=invalid.sp.alias - -sProviderAction.errorCreatingSAML.code=203001 -sProviderAction.errorCreatingSAML.message=error.create.saml.speps - -#Internal Error -internalError.code=203001 -internalError.message=internalError - -attrList.code=202005 -attrList.message=invalid.attrList.parameter - -missing.sessionId.code=203010 -missing.sessionId.message=missing.session.id - -sessionError.code=203011 -sessionError.message=invalid.session.id - -invalid.sessionId.code=203011 -invalid.sessionId.message=invalid.session.id - -missing.mandate.code=203013 -missing.mandate.message=missing.mandate - -invalid.session.code=203012 -invalid.session.message=invalid.session - -callback.code=203006 -callback.message=invalid.callback.url - -idp.url.code=203006 -idp.url.message=invalid.idp.url - -IdPSAMLResponse.code=002001 -IdPSAMLResponse.message=invalid.idp.response - -authenticationFailed.code=003002 -authenticationFailed.message=authentication.failed - -username.code=003002 -username.message=authentication.failed - -invalidAttributeList.code=203001 -invalidAttributeList.message=invalid.attrlist - -invalidAttributeValue.code=203001 -invalidAttributeValue.message=invalid.attr.value - -attVerification.mandatory.code=202010 -attVerification.mandatory.message=missing.mandatory.attr - -attrValue.verification.code=203008 -attrValue.verification.message=invalid.stork.attrValue - -cpepsSAMLResponse.code=202012 -cpepsSAMLResponse.message=error.gen.cpeps.saml - -AtPSAMLResponse.code=202009 -AtPSAMLResponse.message=error.gen.atp.saml - -atp.url.code=203006 -atp.url.message=invalid.atp.url - -hash.error.code=203001 -hash.error.message=error.hash - -qaaLevel.code=203006 -qaaLevel.message=invalid.cpeps.qaalevel - -SAMLRequest.code=203001 -SAMLRequest.message=invalid.SAMLRequest - -atp.response.error.code=202011 -atp.response.error.message=atp.response.error - -#Colleague Request Interface errors - -colleagueRequest.invalidSAML.code=201002 -colleagueRequest.invalidSAML.message=invalid.speps.samlrequest - -colleagueRequest.invalidCountryCode.code=002001 -colleagueRequest.invalidCountryCode.message=country.cpeps.nomatch - -colleagueRequest.errorCreatingSAML.code=203001 -colleagueRequest.errorCreatingSAML.message=error.create.saml.cpeps - -colleagueRequest.invalidQaa.code=202004 -colleagueRequest.invalidQaa.message=invalid.requested.cpeps.qaalevel - -colleagueRequest.attrNull.code=202005 -colleagueRequest.attrNull.message=invalid.requested.attrlist.cpeps - -colleaguePVRequest.invalidPVAttrList.code=202013 -colleaguePVRequest.invalidPVAttrList.message=invalid.speps.pv.attrlist - -colleagueRequest.invalidRedirect.code=202001 -colleagueRequest.invalidRedirect.message=invalid.redirecturl.cpeps - -colleagueRequest.invalidDestUrl.code=203006 -colleagueRequest.invalidDestUrl.message=invalid.cpeps.destUrl - -cpepsRedirectUrl.code=203006 -cpepsRedirectUrl.message=invalid.cpeps.redirectUrl - -#Citizen Consent Interfaces errors - -citizenResponse.mandatory.code=202007 -citizenResponse.mandatory.message=no.consent.mand.attr - -cPeps.attrNull.code=202005 -cPeps.attrNull.message=invalid.attrList.cpeps - -citizenNoConsent.mandatory.code=202012 -citizenNoConsent.mandatory.message=no.consent.val.mand.attr - -#Colleague Response Interface errors - -colleagueResponse.invalidSAML.code=202002 -colleagueResponse.invalidSAML.message=invalid.cpeps.samlresp - -auRequestIdError.code=201005 -auRequestIdError.message=invalid.speps.saml.id - -audienceRestrictionError.code=201004 -audienceRestrictionError.message=speps.saml.condition.notmet - -spepsSAMLResponse.code=200010 -spepsSAMLResponse.message=error.gen.speps.saml - - -invalid.apepsRedirectUrl.code=001001 -invalid.apepsRedirectUrl.message=invalid.apeps.redirectUrl - -apepsSAMLRequest.code=001002 -apepsSAMLRequest.message=invalid.apeps.saml.request - -apepsSAMLResponse.code=001003 -apepsSAMLResponse.message=invalid.apeps.saml.response - -invalid.apepsCallbackUrl.code=001004 -invalid.apepsCallbackUrl.message=invalid.apeps.callback.url - -colleagueAttributeRequest.invalidSAML.code=001005 -colleagueAttributeRequest.invalidSAML.message=invalid.attr.request.saml - - -#Hash Digests -hashDigest.className=org.bouncycastle.crypto.digests.SHA512Digest diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java deleted file mode 100644 index 09769641c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific errors - * constant identifiers. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum AttributeConstants { - - /** - * Represents the attribute's name index. - */ - ATTR_NAME_INDEX(0), - /** - * Represents the attribute's type index. - */ - ATTR_TYPE_INDEX(1), - /** - * Represents the attribute's value index. - */ - ATTR_VALUE_INDEX(2), - /** - * Represents the attribute's status index. - */ - ATTR_STATUS_INDEX(3), - /** - * Represents the number of allowed tuples. - */ - NUMBER_TUPLES(4); - - /** - * Represents the constant's value. - */ - private int attribute; - - /** - * Solo Constructor. - * - * @param attr The Attribute Constant value. - */ - AttributeConstants(final int attr) { - - this.attribute = attr; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public int intValue() { - - return attribute; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java deleted file mode 100644 index a44768c7e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java +++ /dev/null @@ -1,74 +0,0 @@ -package eu.stork.peps.auth.commons; - -/** - * This class is a bean used to store information relative to Attribute Names. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.00 $, $Date: 2013-11-26 $ - */ -public final class AttributeName { - - /** - * Attribute Id. - */ - private String attributeId; - - /** - * Attribute Name. - */ - private String attributeName; - - /** - * Attribute Name Constructor. - * - * @param aId Id of the Attribute Name. - * @param aName Name of the Attribute Name. - */ - public AttributeName(final String aId, final String aName) { - - this.attributeId = aId; - this.attributeName = aName; - } - - /** - * Getter for the attributeId value. - * - * @return The attributeId value. - */ - public String getAttributeId() { - - return attributeId; - } - - /** - * Setter for the attributeId value. - * - * @param aId Id of the Attribute Name. - */ - public void setAttributeId(final String aId) { - - this.attributeId = aId; - } - - /** - * Getter for the attributeName value. - * - * @return The attributeName value. - */ - public String getAttributeName() { - - return attributeName; - } - - /** - * Setter for the attributeName value. - * - * @param name Name of the Attribute Name. - */ - public void setAttributeName(final String name) { - - this.attributeName = name; - } - -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java deleted file mode 100644 index fc776db81..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java +++ /dev/null @@ -1,80 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -/** - * This class is a bean used to store the information relative to the Attribute Provider. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.01 $, $Date: 2013-11-28 $ - */ -public final class AttributeProvider implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = 7210186241917444559L; - - /** - * Provider Id. - */ - private String providerId; - - /** - * Provider Name. - */ - private String providerName; - - /** - * Attribute Provider Constructor. - * - * @param pId Id of the Attribute Provider. - * @param pName Name of the Attribute Provider. - */ - public AttributeProvider(final String pId, final String pName) { - - this.providerId = pId; - this.providerName = pName; - } - - /** - * Getter for the providerId value. - * - * @return The providerId value. - */ - public String getProviderId() { - - return providerId; - } - - /** - * Setter for the providerId value. - * - * @param pId Id of the Attribute Provider. - */ - public void setProviderId(final String pId) { - - this.providerId = pId; - } - - /** - * Getter for the providerName value. - * - * @return The providerName value. - */ - public String getProviderName() { - - return providerName; - } - - /** - * Setter for the providerName value. - * - * @param name Name of the Attribute Provider. - */ - public void setProviderName(final String name) { - - this.providerName = name; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java deleted file mode 100644 index 85aec2625..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java +++ /dev/null @@ -1,96 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; -import java.util.LinkedHashMap; - -import org.apache.log4j.Logger; - -/** - * Implementation of the AttributeProviderMap using a LinkedHashMap. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.01 $, $Date: 2013-09-20 $ - * - * @see LinkedHashMap - */ -public class AttributeProvidersMap extends LinkedHashMap - implements IAttributeProvidersMap { - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(AttributeProvidersMap.class.getName()); - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 8949081185106296122L; - - /** - * {@inheritDoc} - */ - @Override - public IPersonalAttributeList get(final AttributeSource key) { - return this.get((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public IPersonalAttributeList remove(final AttributeSource key) { - return this.remove((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean containsKey(final AttributeSource key) { - return this.containsKey((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public Iterator keyIterator() { - return this.keySet().iterator(); - } - - public void trace() { - Iterator iterator; - Iterator iterator2; - AttributeSource source; - IPersonalAttributeList pal; - PersonalAttribute pa; - - iterator = this.keyIterator(); - LOG.trace("Start dumping of AttributeProvidersMap\n======================="); - while (iterator.hasNext()) { - source = iterator.next(); - - LOG.trace("Source details: type [" + source.getSourceType() + "], URL [" + source.getProviderURL() + "]"); - - if(source.getSourceType() == AttributeSource.SOURCE_LOCAL_APROVIDER) { - LOG.trace("-> Attribute Provider: ID [" + source.getProvider().getProviderId() + "], name [" + source.getProvider().getProviderName() + "]"); - } - else { - LOG.trace("-> Country: ID [" + source.getCountry().getCountryId() + "], name [" + source.getCountry().getCountryName() + "]"); - } - - pal = this.get(source); - LOG.trace("++++++++=>"); - iterator2 = pal.iterator(); - while (iterator2.hasNext()) { - pa = iterator2.next(); - - LOG.trace("-> Citizen Attribute: name [" + pa.getName() + "], required [" + pa.isRequired() + "]"); - } - LOG.trace("<=++++++++"); - - LOG.trace("-----------------------"); - } - LOG.trace("END\n======================="); - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java deleted file mode 100644 index 846f54f67..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java +++ /dev/null @@ -1,188 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the Attribute Source (either AttributeProvider or Country). - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.10 $, $Date: 2013-11-29 $ - */ -public final class AttributeSource implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = 432243595968469014L; - - public static final int SOURCE_LOCAL_APROVIDER = 1; - public static final int SOURCE_REMOTE_COUNTRY = 2; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(AttributeSource.class.getName()); - - /** - * Provider source. - */ - private int sourceType; - - /** - * Provider URL. - */ - private String providerURL; - - /** - * The local Attribute Provider. - */ - private AttributeProvider provider; - - /** - * The remote Country. - */ - private Country country; - - /** - * Attribute Source Constructor. - * - * @param provider The local Attribute Provider. - * @param pURL URL of the Attribute Provider. - */ - public AttributeSource(final AttributeProvider provider, final String pURL) { - this.setSourceType(SOURCE_LOCAL_APROVIDER); - - this.setProvider(provider); - this.setProviderURL(pURL); - } - - /** - * Attribute Source Constructor. - * - * @param country The remote Country. - * @param pURL URL of the Country. - */ - public AttributeSource(final Country country, final String pURL) { - this.setSourceType(SOURCE_REMOTE_COUNTRY); - - this.setCountry(country); - this.setProviderURL(pURL); - } - - /** - * @param sourceType the sourceType to set - */ - public void setSourceType(final int sourceType) { - this.sourceType = sourceType; - } - - /** - * @return the sourceType - */ - public int getSourceType() { - return sourceType; - } - - /** - * @param providerURL the providerURL to set - */ - public void setProviderURL(final String providerURL) { - this.providerURL = providerURL; - } - - /** - * @return the providerURL - */ - public String getProviderURL() { - return providerURL; - } - - /** - * @param provider the provider to set - */ - public void setProvider(final AttributeProvider provider) { - this.setSourceType(SOURCE_LOCAL_APROVIDER); - - this.provider = provider; - } - - /** - * @return the provider - */ - public AttributeProvider getProvider() { - return provider; - } - - /** - * @param country the country to set - */ - public void setCountry(final Country country) { - this.setSourceType(SOURCE_REMOTE_COUNTRY); - - this.country = country; - } - - /** - * @return the country - */ - public Country getCountry() { - return country; - } - - /** - * {@inheritDoc} - */ - public boolean equals(Object obj) { - boolean outcome = false; - - LOG.debug("Calling equals with Object."); - if ( obj instanceof AttributeSource ) { - LOG.debug("Calling equals with AttributeSource."); - outcome = this.equals((AttributeSource)obj); - } - - LOG.debug("Object equals outcome: " + outcome); - return outcome; - } - - /** - * Compare the given AttributeSource with the current object in order to determinine - * if they are equal. - * - * @param obj The AttributeSource to compare to - * - * @return true if the two objects are equal - */ - public boolean equals(AttributeSource obj) { - boolean outcome = false; - - if ( this.sourceType==obj.getSourceType() ) { - if ( this.sourceType==AttributeSource.SOURCE_LOCAL_APROVIDER ) { - if ( this.provider.getProviderId().equals(obj.getProvider().getProviderId()) ) - outcome = true; - } - else if ( this.sourceType==AttributeSource.SOURCE_REMOTE_COUNTRY ) { - if ( this.country.getCountryId().equals(obj.getCountry().getCountryId()) ) - outcome = true; - } - } - - LOG.debug("AttributeSource equals outcome: " + outcome); - return outcome; - } - - /** - * {@inheritDoc} - */ - public int hashCode() { - int hash = 1; - hash = hash * 17 + this.sourceType; - if ( this.sourceType==AttributeSource.SOURCE_LOCAL_APROVIDER ) - hash = hash * 31 + this.provider.getProviderName().hashCode(); - else - hash = hash * 31 + this.country.getCountryName().hashCode(); - return hash; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java deleted file mode 100644 index af7ab6cf3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.commons.lang.StringUtils; - -/** - * This class holds static helper methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.5 $, $Date: 2010-12-15 23:19:59 $ - */ -public final class AttributeUtil { - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private AttributeUtil() { - // empty constructor - } - - /** - * Safe escape any given string. - * - * @param value The HTTP Value to escaped. - * - * @return The value escaped value. - */ - public static String escape(final String value) { - - final String attrSep = PEPSValues.ATTRIBUTE_SEP.toString(); - final String attrTupleSep = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - final String attrValueSep = PEPSValues.ATTRIBUTE_VALUE_SEP.toString(); - - final String escAttrSep = "%" + (int) attrSep.charAt(0); - final String escAttrTupleSep = "%" + (int) attrTupleSep.charAt(0); - final String escAttrValueSep = "%" + (int) attrValueSep.charAt(0); - - return value.replace(attrSep, escAttrSep) - .replace(attrTupleSep, escAttrTupleSep) - .replace(attrValueSep, escAttrValueSep); - } - - /** - * Unescape any given string. - * - * @param value The HTTP Value to be unescaped. - * - * @return The value unescaped value. - */ - public static String unescape(final String value) { - final String attrSep = PEPSValues.ATTRIBUTE_SEP.toString(); - final String attrTupleSep = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - final String attrValueSep = PEPSValues.ATTRIBUTE_VALUE_SEP.toString(); - - final String escAttrSep = "%" + (int) attrSep.charAt(0); - final String escAttrTupleSep = "%" + (int) attrTupleSep.charAt(0); - final String escAttrValueSep = "%" + (int) attrValueSep.charAt(0); - - return value.replace(escAttrSep, attrSep) - .replace(escAttrTupleSep, attrTupleSep) - .replace(escAttrValueSep, attrValueSep); - } - - /** - * Appends the string representation of an object to a StringBuilder. - * - * @param strBuilder The StringBuilder to append to. - * @param val The string representation of an object. - */ - public static void appendIfNotNull(final StringBuilder strBuilder, - final Object val) { - - if (val != null) { - strBuilder.append(val); - } - } - - /** - * Given a separator and a list of strings, joins the list, as a string, - * separated by the separator string. - * - * @param list The list of strings to join. - * @param separator The separator string. - * @return the list, as a string, separated by the separator string. - */ - public static String listToString(final List list, - final String separator) { - - final StringBuilder strBuilder = new StringBuilder(); - for (final String s : list) { - if (!StringUtils.isEmpty(s)) { - strBuilder.append(AttributeUtil.escape(s) + separator); - } - } - return strBuilder.toString(); - } - - /** - * Given a separator and a map of strings to strings, joins the map, as a - * string, separated by the separator string with the pair key/value - * concatenated with a '='. - * - * @param map The map of strings to join. - * @param separator The separator string. - * - * @return the map of strings, as a string, separated by the separator string - * with the pair key/value concatenated with a '='. - */ - public static String mapToString(final Map map, - final String separator) { - - final StringBuilder strBuilder = new StringBuilder(); - final Iterator> valuesIt = map.entrySet().iterator(); - while (valuesIt.hasNext()) { - final Entry entry = valuesIt.next(); - strBuilder.append(entry.getKey()); - strBuilder.append('='); - strBuilder.append(AttributeUtil.escape(entry.getValue())); - strBuilder.append(separator); - } - return strBuilder.toString(); - } - - /** - * Validates the attribute value format. - * - * @param value The attribute value to validate. - * - * @return true if value has a valid format. - */ - public static boolean isValidValue(final String value) { - boolean retVal = false; - if (value != null && value.charAt(0) == '[' && value.endsWith("]")) { - final String tmpAttrValue = value.substring(1, value.length() - 1); - final String[] vals = - tmpAttrValue.split(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - if (tmpAttrValue.length() >= 0 - || (vals.length > 0 && vals[0].length() > 0)) { - retVal = true; - } - } - return retVal; - } - - /** - * Validates the attribute type value. It's case insensitive. E.g. return true - * value to: a) "true", "TRUE", "True", ... b) "false", "FALSE", "False", ... - * - * @param type The attribute type value. - * - * @return true if type has a true or false (case insensitive) value. - */ - public static boolean isValidType(final String type) { - return StringUtils.isNotEmpty(type) && (PEPSValues.TRUE.toString().equalsIgnoreCase(type) || PEPSValues.FALSE.toString().equalsIgnoreCase(type)) ; - } - - /** - * Validates the Personal attribute tuple. E.g. name:type:[value]:status - * - * @param tuples The Personal attribute's tuple. - * - * @return true if the tuples' format is valid. - * - * @see PEPSUtil#validateParameter(String, String, String) - * @see String#equalsIgnoreCase(String) - */ - public static boolean hasValidTuples(final String[] tuples) { - boolean retVal = false; - - final int numberTuples = AttributeConstants.NUMBER_TUPLES.intValue(); - if (tuples != null && tuples.length == numberTuples) { - // validate attrName - final int attrNameIndex = AttributeConstants.ATTR_NAME_INDEX.intValue(); - final int attrTypeIndex = AttributeConstants.ATTR_TYPE_INDEX.intValue(); - final int attrValueIndex = AttributeConstants.ATTR_VALUE_INDEX.intValue(); - - retVal = - StringUtils.isNotEmpty(tuples[attrNameIndex]) - && StringUtils.isNotEmpty(tuples[attrTypeIndex]) - && StringUtils.isNotEmpty(tuples[attrValueIndex]) - && AttributeUtil.isValidType(tuples[attrTypeIndex]) - && AttributeUtil.isValidValue(tuples[attrValueIndex]); - } - return retVal; - } - - /** - * Check if all mandatory attributes have values. - * - * @param personalAttrList The Personal Attributes List. - * - * @return true if all mandatory attributes have values, false if at least one - * attribute doesn't have value. - */ - public static boolean checkMandatoryAttributes( - final IPersonalAttributeList personalAttrList) { - - final Iterator itAttributes = - personalAttrList.values().iterator(); - boolean retVal = true; - while (itAttributes.hasNext() && retVal) { - final PersonalAttribute attr = itAttributes.next(); - if (attr.isRequired() - && !STORKStatusCode.STATUS_AVAILABLE.toString() - .equals(attr.getStatus())) { - retVal = false; - } - } - return retVal; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java deleted file mode 100644 index 9ebcfbd5a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.ArrayList; -import java.util.List; - -/** - * This class is a bean used to store the information relative to the Citizen - * Consent. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class CitizenConsent { - - /** - * Mandatory attributes list. - */ - private List mandatoryList; - - /** - * Optional attributes list. - */ - private List optionalList; - - /** - * Citizen Consent default Constructor. - */ - public CitizenConsent() { - this.mandatoryList = new ArrayList(); - this.optionalList = new ArrayList(); - } - - /** - * Getter for the mandatoryList value. - * - * @return The mandatoryList value. - */ - public List getMandatoryList() { - return this.mandatoryList; - } - - /** - * Setter for the mandatoryList value. - * - * @param mandatoryAttrList Mandatory parameters list. - */ - public void setMandatoryList(final List mandatoryAttrList) { - this.mandatoryList = mandatoryAttrList; - } - - /** - * Setter for some mandatoryAttribute. Adds the input parameter to the - * mandatoryList. - * - * @param mandatoryAttr Attribute to add to the mandatoryList. - */ - public void setMandatoryAttribute(final String mandatoryAttr) { - this.mandatoryList.add(mandatoryAttr); - } - - /** - * Getter for the optionalList value. - * - * @return The optionalList value. - */ - public List getOptionalList() { - return optionalList; - } - - /** - * Setter for the optionalList value. - * - * @param optAttrList Optional parameters list. - */ - public void setOptionalList(final List optAttrList) { - this.optionalList = optAttrList; - } - - /** - * Setter for some optionalAttr. Adds the input parameter to the optionalList. - * - * @param optionalAttr Attribute to add to the optionalList. - */ - public void setOptionalAttribute(final String optionalAttr) { - this.optionalList.add(optionalAttr); - } - - /** - * Returns a string in the following format. "Mandatory attributes: - * mandatoryAttr1;mandatoryAttr2;mandatoryAttrN Optional attributes: - * optionalAttr1;optionalAttr2;optionalAttrN" - * - * @return {@inheritDoc} - */ - public String toString() { - final StringBuilder strbldr = new StringBuilder(46); - strbldr.append("Mandatory attributes: "); - for (final String str : mandatoryList) { - strbldr.append(str).append(';'); - } - strbldr.append(" Optional attributes: "); - for (final String str : optionalList) { - strbldr.append(str).append(';'); - } - return strbldr.toString(); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java deleted file mode 100644 index 001f9317a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -/** - * This class is a bean used to store the information relative to the Country. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class Country implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 1135994036496370993L; - -/** - * Country Id. - */ - private String countryId; - - /** - * Country Name. - */ - private String countryName; - - /** - * Country Constructor. - * - * @param cId Id of the Country. - * @param cName Name of the Country. - */ - public Country(final String cId, final String cName) { - - this.countryId = cId; - this.countryName = cName; - } - - /** - * Getter for the countryId value. - * - * @return The countryId value. - */ - public String getCountryId() { - - return countryId; - } - - /** - * Setter for the countryId value. - * - * @param cId Id of the Country. - */ - public void setCountryId(final String cId) { - - this.countryId = cId; - } - - /** - * Getter for the countryName value. - * - * @return The countryName value. - */ - public String getCountryName() { - - return countryName; - } - - /** - * Setter for the countryName value. - * - * @param name Name of the Country. - */ - public void setCountryName(final String name) { - - this.countryName = name; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java deleted file mode 100644 index 54345f3ea..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Arrays; -import java.util.List; - -/** - * This class contains all the ISO 3166-1 Alpha 3 Country Codes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2011-04-14 00:24:56 $ - */ -public final class CountryCodes { - - /** - * Private Constructor. - */ - private CountryCodes() { - - } - - /** - * ISO 3166-1 Alpha 3 Country Codes. - */ - private static List countrysAlpha3 = Arrays.asList("ABW", "AFG", - "AGO", "AIA", "ALA", "ALB", "AND", "ANT", "ARE", "ARG", "ARM", "ASM", - "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", - "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", - "BOL", "BRA", "BRB", "BRN", "BTN", "BUR", "BVT", "BWA", "BYS", "CAF", - "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", - "COL", "COM", "CPV", "CRI", "CSK", "CUB", "CUW", "CXR", "CYM", "CYP", - "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", - "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", - "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", - "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", - "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", - "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", - "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", - "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", - "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", - "MNE", "MNG", "MNP", "MOZ", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", - "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", - "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", - "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", - "ROM", "ROU", "RUS", "RWA", "SAU", "SCG", "SDN", "SEN", "SGP", "SGS", - "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "STP", - "SUR", "SVK", "SVN", "SXW", "SWE", "SWZ", "SYC", "SYR", "TCA", "TCD", - "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TMP", "TON", "TTO", "TUN", - "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", - "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "YEM", - "YUG", "ZAF", "ZAR", "ZMB", "ZWE"); - - /** - * Searches the CountryCode (3166-1 alpha3 format) an return true if it - * exists. - * - * @param countryCode The Country code to search. - * - * @return true if the CountryCode exists, false otherwise. - */ - public static boolean hasCountryCodeAlpha3(final String countryCode) { - - return CountryCodes.countrysAlpha3.contains(countryCode); - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java deleted file mode 100644 index 9c0bd6775..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.sql.Timestamp; -import java.util.GregorianCalendar; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.joda.time.Years; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; - -import eu.stork.peps.auth.commons.exceptions.SecurityPEPSException; - -/** - * This class holds static helper methods for Date Operations. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.4 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class DateUtil { - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(DateUtil.class.getName()); - - /** - * yyyy Date format size. - */ - private static final int YEAR_DATE_SIZE = 4; - - /** - * yyyyMM Date format size. - */ - private static final int MONTH_DATE_SIZE = 6; - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private DateUtil() { - // empty constructor - } - - /** - * Fulfils dateValue with a valid date. The following roles are applied: a) If - * the dateValue only contains the year then fulfils with last year's day. - * e.g. this method returns 19951231 to the 1995 dateValue. b) If the - * dateValue contains the year and the month then fulfils with last month's - * day. e.g. this method returns 19950630 to the 199505 dateValue. - * - * @param dateValue The date to be fulfilled. - * - * @return The dateValue fulfilled. - */ - private static String fulfilDate(final String dateValue) { - - final StringBuffer strBuf = new StringBuffer(); - strBuf.append(dateValue); - // if the IdP just provides the year then we must fullfil the date. - if (dateValue.length() == YEAR_DATE_SIZE) { - strBuf.append(PEPSValues.LAST_MONTH.toString()); - } - // if the IdP provides the year and the month then we must fullfil the - // date. - if (dateValue.length() == MONTH_DATE_SIZE - || strBuf.length() == MONTH_DATE_SIZE) { - // IdP doesn't provide the day, so we will use DateTime to - // calculate it. - final String noDayCons = PEPSValues.NO_DAY_DATE_FORMAT.toString(); - final DateTimeFormatter fmt = DateTimeFormat.forPattern(noDayCons); - final DateTime dateTime = fmt.parseDateTime(strBuf.toString()); - // Append the last month's day. - strBuf.append(dateTime.dayOfMonth().withMaximumValue().getDayOfMonth()); - } - - return strBuf.toString(); - } - - /** - * Validates the dateValue format: a) if has a valid size; b) if has a numeric - * value; Note: dateValue must have the format yyyyMMdd. - * - * @param dateValueTmp The date to be validated. - * @param pattern The accepted date format. - * - * @return true if the date has a valid format. - */ - public static boolean isValidFormatDate(final String dateValueTmp, - final String pattern) { - - boolean retVal = true; - try { - final String dateValue = DateUtil.fulfilDate(dateValueTmp); - - final DateTimeFormatter fmt = DateTimeFormat.forPattern(pattern); - fmt.parseDateTime(dateValue); - } catch (final Exception e) { - // We catch Exception because we only have to return false - // value! - retVal = false; - } - return retVal; - } - - /** - * Calculates the age for a given date string. - * - * @param dateVal The date to be validated. - * @param now The current date. - * @param pattern The date pattern. - * - * @return The age value. - */ - public static int calculateAge(final String dateVal, final DateTime now, - final String pattern) { - - if (DateUtil.isValidFormatDate(dateVal, pattern)) { - try { - final String dateValueTemp = DateUtil.fulfilDate(dateVal); - final DateTimeFormatter fmt = DateTimeFormat.forPattern(pattern); - final DateTime dateTime = fmt.parseDateTime(dateValueTemp); - // Calculating age - final Years age = Years.yearsBetween(dateTime, now); - - return age.getYears(); - } catch (final IllegalArgumentException e) { - LOG.warn("Invalid date format (" + pattern - + ") or an invalid dateValue."); - throw new SecurityPEPSException( - PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorCode()), - PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorMessage()), - e); - } - } else { - LOG.warn("Couldn't calculate Age, invalid date!"); - throw new SecurityPEPSException( - PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorCode()), - PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorMessage())); - } - - } - - /** - * Generates the current timestamp. - * - * @return timestamp The current timestamp - */ - public static Timestamp currentTimeStamp() { - final GregorianCalendar cal = new GregorianCalendar(); - final long millis = cal.getTimeInMillis(); - return new Timestamp(millis); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java deleted file mode 100644 index b13c70f04..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java +++ /dev/null @@ -1,148 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.List; -import java.util.Map; - -/** - * Interface for {@link AttributeListProcessor}. - * - * @author ricardo.ferreira@multicert.com - * - * @version $Revision: $, $Date: $ - * - * @see IPersonalAttributeList - */ -public interface IAttributeListProcessor { - - /** - * Checks if attribute list only contains allowed attributes. - * - * @param attrList the requested attribute list - * @param attributes the allowed attributes - * - * @return true is all the attributes are allowed. - * - * @see IPersonalAttributeList - */ - boolean hasAllowedAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Lookup for business attribute. - * - * @param attrList the requested attribute list - * @param normalAttributes the normal attributes - * - * @return true is at least one business attribute was requested. - * - * @see IPersonalAttributeList - */ - boolean hasBusinessAttributes(final IPersonalAttributeList attrList, final List normalAttributes); - - /** - * Lookup for business attribute in normal attribute list (loaded by - * implementation). - * - * @param attrList the requested attribute list - * - * @return true is at least one business attribute was requested. - * - * @see IPersonalAttributeList - */ - boolean hasBusinessAttributes(final IPersonalAttributeList attrList); - - /** - * Adds eIdentifier, name, surname, and DateOfBirth attributes to get business - * attributes from some AP. - * - * @param attrList the requested attribute list - * @param attributes the list of attributes to add (eIdentifier, name, - * surname, and DateOfBirth). - * - * @return the requested attribute list and the new attributes added - * (eIdentifier, name, surname, and DateOfBirth). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList addAPMandatoryAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Adds eIdentifier, name, surname, and DateOfBirth attributes, loaded by - * implementation, to get business attributes from some AP. - * - * @param attrList the requested attribute list - * - * @return the requested attribute list and the new attributes added - * (eIdentifier, name, surname, and DateOfBirth). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList addAPMandatoryAttributes(final IPersonalAttributeList attrList); - - /** - * Removes from attribute list the given list of attributes. - * - * @param attrList the requested attribute list - * @param attributes the list of attributes to remove. - * - * @return the requested attribute list and the attributes removed. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList removeAPMandatoryAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Removes from attribute list the given list of attributes and change - * attributes status if attribute was optional in the request. - * - * @param attrList the requested attribute list - * @param attributes the map of attributes (attribute name, mandatory/optional) to remove. - * - * @return the requested attribute list and the attributes removed - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList removeAPMandatoryAttributes(IPersonalAttributeList attrList, Map attributes); - - /** - * Checks if mandate attribute exist in the requested Attribute List. Power - * attribute name to lookup is loaded by implementation. - * - * @param attrList the requested attribute list. - * - * @return true if mandate attribute exists or false otherwise. - * - * @see IPersonalAttributeList - */ - boolean hasPowerAttribute(final IPersonalAttributeList attrList); - - /** - * Checks if attribute name was requested and has value. - * - * @param attrList the requested attribute list. - * @param attrName the attribute name to lookup for . - * - * @return true if attribute was requested and has value or false otherwise. - * - * @see IPersonalAttributeList - */ - boolean hasAttributeValue(final IPersonalAttributeList attrList, final String attrName); - - /** - * Checks if attribute has value. - * - * @param attr the attribute to check. - * - * @return true if has value; - * - * @see PersonalAttribute - */ - boolean hasAttributeValue(final PersonalAttribute attr); - - /** - * Gets a map (attribute name, attribute isRequired) of attributes added to attribute list. - * - * @return the Map of attributes added and if is required to attribute list. - */ - Map getNormalAttributesAdded(); - -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java deleted file mode 100644 index 733399ca3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java +++ /dev/null @@ -1,82 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; - -/** - * Interface for Attributes Providers map. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.00 $, $Date: 2013-09-20 $ - */ -public interface IAttributeProvidersMap { - - /** - * Returns the object associated the the given key. - * - * @param key with which the specified value is to be associated. - * - * @return The object associated the the given key. - */ - IPersonalAttributeList get(AttributeSource key); - - /** - * Associates a key to a value, and inserts them in the session object. - * - * @param key with which the specified value is to be associated. - * @param value to be associated with the specified key. - * - * @return previous value associated with specified key, or null if there was - * no mapping for key. A null return can also indicate that the map - * previously associated null with the specified key. - */ - Object put(AttributeSource key, IPersonalAttributeList value); - - /** - * Removes the mapping for this key. - * - * @param key with which the specified value is to be associated. - * - * @return previous value associated with specified key, or null if there was - * no mapping for key. A null return can also indicate that the map - * previously associated null with the specified key. - */ - IPersonalAttributeList remove(AttributeSource key); - - /** - * Returns the number of key-value mappings in this map. - * - * @return the number of key-value mappings in this map. - */ - int size(); - - /** - * Returns true if this map contains a mapping for the specified key. - * - * @param key with which the specified value is to be associated. - * - * @return true if this map contains a mapping for the specified key. - */ - boolean containsKey(AttributeSource key); - - /** - * Removes all mappings from this map. - */ - void clear(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); - - /** - * Returns an Iterator of the keys contained in this map. The implementation must - * take care in order for the Iterator to have predictable order of the returned - * keys. - * - * @return an iterator of the keys contained in this map - */ - Iterator keyIterator(); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java deleted file mode 100644 index b24c915c0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Collection; -import java.util.Iterator; -import java.util.Set; - -/** - * Interface for {@link PersonalAttributeList}. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.16 $, $Date: 2010-11-17 05:15:28 $ - * - * @see PersonalAttribute - */ -@SuppressWarnings("PMD.CloneMethodMustImplementCloneable") -public interface IPersonalAttributeList extends Iterable, - Cloneable { - - /** - * Associates the specified value with the specified key in this Personal - * Attribute List. - * - * @param key with which the specified value is to be associated. - * @param value to be associated with the specified key. - * - * @return the previous value associated with key, or null if there was no - * mapping for key. - * - * @see PersonalAttribute - */ - PersonalAttribute put(String key, PersonalAttribute value); - - /** - * Returns the value to which the specified key is mapped, or null if this map - * contains no mapping for the key. - * - * @param key whose associated value is to be returned. - * - * @return The value to which the specified key is mapped, or null if this map - * contains no mapping for the key. - * - * @see PersonalAttribute - */ - PersonalAttribute get(Object key); - - /** - * Adds to the PersonalAttributeList the given PersonalAttribute. It sets the - * attribute name as the key to the attribute value. - * - * @param value PersonalAttribute to add to the PersonalAttributeList - */ - void add(PersonalAttribute value); - - /** - * Get the size of the Personal Attribute List. - * - * @return size of the Personal Attribute List. - */ - int size(); - - /** - * Checks if the Personal Attribute List contains the given key. - * - * @param key with which the specified value is to be associated. - * - * @return true if the Personal Attribute List contains the given key, false - * otherwise. - */ - boolean containsKey(Object key); - - /** - * Getter for the iterator of the Personal Attribute List values. - * - * @return The iterator for the Personal Attribute List values. - * - * @see PersonalAttribute - */ - Iterator iterator(); - - /** - * Creates a Personal Attribute List from a String representing an Attribute - * List. - * - * @param attrList String Object representing the attribute list. - */ - void populate(String attrList); - - /** - * Removes the mapping for this key from this map if present. - * - * @param key key whose mapping is to be removed from the map. - * @return previous value associated with specified key, or null if - * there was no mapping for key. A null return can also - * indicate that the map previously associated null with the - * specified key. - */ - PersonalAttribute remove(Object key); - - /** - * Returns a collection view of the values contained in this map. The - * collection is backed by the map, so changes to the map are reflected in the - * collection, and vice-versa. The collection supports element removal, which - * removes the corresponding mapping from this map, via the - * Iterator.remove, Collection.remove, removeAll, - * retainAll, and clear operations. It does not support the - * add or addAll operations. - * - * @return a collection view of the values contained in this map. - */ - Collection values(); - - /** - * Returns a {@link Set} view of the keys contained in this map. - * The set is backed by the map, so changes to the map are - * reflected in the set, and vice-versa. If the map is modified - * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of - * the iteration are undefined. The set supports element removal, - * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll - * operations. - * - * @return a set view of the keys contained in this map - */ - Set keySet(); - - - /** - * Returns a IPersonalAttributeList of the complex attributes. - * - * @return an IPersonalAttributeList of the complex attributes. - */ - IPersonalAttributeList getComplexAttributes(); - - /** - * Returns a IPersonalAttributeList of the simple value attributes. - * - * @return an IPersonalAttributeList of the simple value attributes. - */ - IPersonalAttributeList getSimpleValueAttributes(); - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - IPersonalAttributeList getMandatoryAttributes(); - - /** - * Returns a IPersonalAttributeList of the optional attributes in this map. - * - * @return an IPersonalAttributeList of the optional attributes contained in this map. - */ - IPersonalAttributeList getOptionalAttributes(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); - - /** - * Returns true if this map contains at least one element that doesn't have value. - * - * @return true if this map contains at least one element that doesn't have value. - */ - boolean hasMissingValues(); - - /** - * Returns a copy of this IPersonalAttributeList instance. - * - * @return The copy of this IPersonalAttributeList. - */ - Object clone() throws CloneNotSupportedException; - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java deleted file mode 100644 index 33eb618f0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * Interface for stork logging. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2011-02-17 22:44:34 $ - */ -public interface IStorkLogger { - - /** - * Getter for SpApplication. - * - * @return The SpApplication value. - */ - String getSpApplication(); - - /** - * Setter for SpApplication. - * - * @param spApplication The SP Application. - */ - void setSpApplication(String spApplication); - - /** - * Getter for ProviderName. - * - * @return The ProviderName value. - */ - String getProviderName(); - - /** - * Setter for ProviderName. - * - * @param providerName The provider name. - */ - void setProviderName(String providerName); - - /** - * - * Getter for Origin. - * - * @return The Origin value. - * - */ - String getOrigin(); - - /** - * Setter for Origin. - * - * @param origin The origin. - */ - void setOrigin(String origin); - - /** - * - * Getter for QAA Level. - * - * @return The QAA Level value. - * - */ - int getQaaLevel(); - - /** - * Setter for QAA Level. - * - * @param qaaLevel The qaa level. - */ - void setQaaLevel(int qaaLevel); - - /** - * - * Getter for timestamp. - * - * @return The timestamp value. - * - */ - String getTimestamp(); - - /** - * Setter for timestamp. - * - * @param timestamp The request's timestamp. - */ - void setTimestamp(String timestamp); - - /** - * Getter for InResponseTo. - * - * @return The InResponseTo value. - */ - String getInResponseTo(); - - /** - * Setter for InResponseTo. - * - * @param inResponseTo The Saml's response id. - */ - void setInResponseTo(String inResponseTo); - - /** - * Getter for InResponseToSPReq. - * - * @return The InResponseToSPReq value. - */ - String getInResponseToSPReq(); - - /** - * Setter for InResponseToSPRequ. - * - * @param inResponseToSPReq The Saml's response id. - */ - void setInResponseToSPReq(String inResponseToSPReq); - - /** - * Getter for opType. - * - * @return The opType value. - */ - String getOpType(); - - /** - * Setter for opType. - * - * @param opType The operation type. - */ - void setOpType(String opType); - - /** - * Getter for destination. - * - * @return The destination value. - */ - String getDestination(); - - /** - * Setter for destinationIp. - * - * @param destination The remote IP. - */ - void setDestination(String destination); - - /** - * Getter for message or assertion consumer. - * - * @return The message or assertion consumer. - */ - String getMessage(); - - /** - * Setter for message or assertion consumer. - * - * @param message or assertion consumer. - */ - void setMessage(String message); - - /** - * Getter for country. - * - * @return The country value. - */ - String getCountry(); - - /** - * Setter for country. - * - * @param country The country. - */ - void setCountry(String country); - - /** - * Getter for samlHash. - * - * @return The samlHash value. - */ - byte[] getSamlHash(); - - /** - * Setter for samlHash. - * - * @param samlHash the encrypted SAML token - */ - void setSamlHash(byte[] samlHash); - - /** - * Getter for msgId. - * - * @return the msgId - */ - String getMsgId(); - - /** - * Setter for msgId. - * - * @param msgId the ID of the originator of this message - */ - void setMsgId(String msgId); - - /** - * Getter for sPMsgId. - * - * @return the sPMsgId - */ - String getSPMsgId(); - - /** - * Setter for sPMsgId. - * - * @param sPMsgId the ID of the originator of this message - */ - void setSPMsgId(String sPMsgId); - - /** - * The format of the returned String must be the following: - * "requestCounter#ddMMMyyyykk:mm:ss#opType#originIp#originName - * #destinationIp#destinationName#samlHash#[originatorName#msgId#]" - * - * The values enclosed in '[]' only apply when logging responses. - * - * @return {@inheritDoc} - */ - @Override - String toString(); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java deleted file mode 100644 index f38b41838..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * Interface for stork session. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ - */ -public interface IStorkSession { - - /** - * Returns the object associated the the given key. - * - * @param key with which the specified value is to be associated. - * - * @return The object associated the the given key. - */ - Object get(Object key); - - /** - * Associates a key to a value, and inserts them in the session object. - * - * @param key with which the specified value is to be associated. - * @param value to be associated with the specified key. - * - * @return previous value associated with specified key, or null if there was - * no mapping for key. A null return can also indicate that the map - * previously associated null with the specified key. - */ - Object put(String key, Object value); - - /** - * Removes the mapping for this key. - * - * @param key with which the specified value is to be associated. - * - * @return previous value associated with specified key, or null if there was - * no mapping for key. A null return can also indicate that the map - * previously associated null with the specified key. - */ - Object remove(Object key); - - /** - * Returns the number of key-value mappings in this map. - * - * @return the number of key-value mappings in this map. - */ - int size(); - - /** - * Returns true if this map contains a mapping for the specified key. - * - * @param key with which the specified value is to be associated. - * - * @return true if this map contains a mapping for the specified key. - */ - boolean containsKey(Object key); - - /** - * Removes all mappings from this map. - */ - void clear(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java deleted file mode 100644 index 6e7c891da..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java +++ /dev/null @@ -1,316 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information of Attribute Providers, the Attribute - * List to be requested, the Assertions returned by the Attribute Providers and the values - * that each Attribute has. This information along with the current status of the Linker (the - * attribute providers that were queried and the remaining providers) is used by the PEPS - * actions in order to complete the Attribute gathering. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.50 $, $Date: 2013-11-28 $ - */ -public final class Linker implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = -3268006381745987237L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(Linker.class.getName()); - - /** - * Attributes Providers map. - */ - private IAttributeProvidersMap attributeProvidersMap; - - /** - * Assertion map. - */ - private LinkedHashMap assertions; - - /** - * The current index of local (domestic) Attribute Providers. - */ - private int localIndex; - - /** - * The current index of remote (foreign) Attribute Providers - countries. - */ - private int remoteIndex; - - /** - * Constructs an empty Linker object. - */ - public Linker() { - localIndex = 0; - remoteIndex = 0; - - assertions = new LinkedHashMap(); - } - - /** - * Based on the internal state of the Linker it returns the next local Attribute Source - * - * @return The next Attribute Source or null if not found - * - * @see AttributeSource - */ - public AttributeSource getNextLocalProvider() { - Iterator iterator; - AttributeSource source, found; - int curIndex = 0; - - found = null; - - if ( attributeProvidersMap!=null && !attributeProvidersMap.isEmpty() ) { - iterator = attributeProvidersMap.keyIterator(); - while (iterator.hasNext()) { - source = iterator.next(); - - if ( source.getSourceType()==AttributeSource.SOURCE_LOCAL_APROVIDER ) { - if ( curIndex>=localIndex ) { - found = source; - - break; - } - - curIndex++; - } - } - } - - return found; - } - - /** - * Based on the internal state of the Linker it returns the next remote Attribute Source - * - * @return The next Attribute Source or null if not found - * - * @see AttributeSource - */ - public AttributeSource getNextRemoteProvider() { - Iterator iterator; - AttributeSource source, found; - int curIndex = 0; - - found = null; - - if ( attributeProvidersMap !=null && !attributeProvidersMap.isEmpty() ) { - iterator = attributeProvidersMap.keyIterator(); - while (iterator.hasNext()) { - source = iterator.next(); - - if ( source.getSourceType()==AttributeSource.SOURCE_REMOTE_COUNTRY ) { - if ( curIndex>=remoteIndex ) { - found = source; - - break; - } - - curIndex++; - } - } - } - - return found; - } - - /** - * It updates the Linker with the values returned by the Attribute Source. It also advances - * to the next index in order to mark this attribute source as completed. - * - * @param source The Attribute Source that was queried for attribute values. - * @param attrResponse The attrResponse returned by the Attribute Source that contains the attribute values. - * - * @see AttributeSource, STORKAttrQueryResponse - */ - public void setProviderReponse(AttributeSource source, STORKAttrQueryResponse attrResponse) { - if ( source.getSourceType()==AttributeSource.SOURCE_REMOTE_COUNTRY ) - remoteIndex++; - else - localIndex++; - - //Assertion storage - this.assertions.put(source, attrResponse); - - this.attributeProvidersMap.put(source, attrResponse.getPersonalAttributeList()); - //this.attributeProvidersMap.put(source, attrResponse.getTotalPersonalAttributeList()); - } - - /** - * Reset the internal state of the local Attribute Source in order to start over. - */ - public void resetLocalIndex() { - localIndex = 0; - } - - /** - * Reset the internal state of the remote Attribute Source in order to start over. - */ - public void resetRemoteIndex() { - remoteIndex = 0; - } - - /** - * Setter for attributeProvidersMap. - * - * @param attributeProvidersMap The attributeProvidersMap to set. - */ - public void setAttributeProvidersMap(IAttributeProvidersMap attributeProvidersMap) { - this.attributeProvidersMap = attributeProvidersMap; - } - - /** - * Getter for attributeProvidersMap. - * - * @return attributeProvidersMap - */ - public IAttributeProvidersMap getAttributeProvidersMap() { - return attributeProvidersMap; - } - - /** - * Returns the Personal Attribute list of the provided Attribute Source. - * - * @param source The attributeSource in reference - * - * @return The IPersonalAttributeList assosiated with this source or null if empty - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getProviderAttributes(AttributeSource source) { - if ( attributeProvidersMap.containsKey(source) ) - return attributeProvidersMap.get(source); - else - return null; - } - - /** - * Returns the merged Personal Attribute list from all the Attribute Sources. - * - * @return The IPersonalAttributeList merged Personal Attribute list or null if empty - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getAllAttributes() { - Iterator iterator; - AttributeSource source; - IPersonalAttributeList list, merged; - - merged = null; - - if ( attributeProvidersMap !=null && !attributeProvidersMap.isEmpty() ) { - iterator = attributeProvidersMap.keyIterator(); - - merged = new PersonalAttributeList(); - while (iterator.hasNext()) { - source = iterator.next(); - list = this.getProviderAttributes(source); - - for (final PersonalAttribute pa : list) { - merged.add(pa); - } - } - } - - return merged; - } - - /** - * Returns a List with all the assertions gathered by the AAS-PEPS module - * returned both by local APs or remote A-PEPS. - * - * @return The assertions returned from the APs and A-PEPS - */ - public List getAttrQueryResponseList() { - List originalAssertions; - - originalAssertions = new ArrayList(); - - //Gather all assertions - for (STORKAttrQueryResponse element : this.assertions.values()) { - originalAssertions.add(element); - } - - return originalAssertions; - } - - /** - * Checks the internal state of the Linker and if all Attribute Sources where visited - * returns true, otherwise it returns false. So if you go directly from AtPLinkerAction - * to MoreAttributesAction the call will have, since the method setProviderReponse - * was not executed from every Attribute Source. - * - * @return true if everything is OK, false otherwise - */ - public boolean isComplete() { - boolean outcome = false; - - LOG.debug("Check if linkder is complete: R[" + remoteIndex + "], L[" + localIndex + "], S[" + attributeProvidersMap.size() + "]"); - if ( attributeProvidersMap !=null && !attributeProvidersMap.isEmpty() ) { - if ( (remoteIndex + localIndex)==attributeProvidersMap.size() ) - outcome = true; - } - else { - outcome = true; - } - - return outcome; - } - - /** - * Merge the two Linker objects. - * - * @param previous The other Linker object to merge with this one. - */ - public void mergeWith(Linker previous) { - //BEFORE - if ( LOG.isDebugEnabled() ) { - LOG.debug("The attributeProvidersMap from the current object."); - ((AttributeProvidersMap)this.attributeProvidersMap).trace(); - LOG.debug("The attributeProvidersMap from the provided object."); - ((AttributeProvidersMap)previous.getAttributeProvidersMap()).trace(); - } - - IAttributeProvidersMap map = previous.getAttributeProvidersMap(); - Iterator items = map.keyIterator(); - while( items.hasNext() ) { - AttributeSource item = items.next(); - IPersonalAttributeList pal = map.get(item); - - if ( this.attributeProvidersMap.containsKey(item) ) { - IPersonalAttributeList new_pal = this.attributeProvidersMap.get(item); - - for(PersonalAttribute pa : pal) - new_pal.add(pa); - } - else { - if ( item.getSourceType()==AttributeSource.SOURCE_REMOTE_COUNTRY ) - remoteIndex++; - else - localIndex++; - - this.attributeProvidersMap.put(item, pal); - } - } - - //AFTER - if ( LOG.isDebugEnabled() ) { - LOG.debug("The attributeProvidersMap after the merge."); - ((AttributeProvidersMap)this.attributeProvidersMap).trace(); - } - } -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java deleted file mode 100644 index 5da9ba494..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific errors - * constant identifiers. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2011-02-17 22:44:34 $ - */ -public enum PEPSErrors { - - /** - * Represents the 'authenticationFailed' constant error identifier. - */ - AUTHENTICATION_FAILED_ERROR("authenticationFailed"), - /** - * Represents the 'spCountrySelector.errorCreatingSAML' constant error - * identifier. - */ - SP_COUNTRY_SELECTOR_ERROR_CREATE_SAML("spCountrySelector.errorCreatingSAML"), - /** - * Represents the 'spCountrySelector.destNull' constant error identifier. - */ - SP_COUNTRY_SELECTOR_DESTNULL("spCountrySelector.destNull"), - /** - * Represents the 'spCountrySelector.invalidAttr' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_ATTR("spCountrySelector.invalidAttr"), - /** - * Represents the 'spCountrySelector.invalidProviderName' constant error - * identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_PROVIDER_NAME( - "spCountrySelector.invalidProviderName"), - /** - * Represents the 'spCountrySelector.invalidQaaSPid' constant error - * identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_QAASPID("spCountrySelector.invalidQaaSPid"), - /** - * Represents the 'spCountrySelector.invalidSpId' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPID("spCountrySelector.invalidSpId"), - /** - * Represents the 'spCountrySelector.invalidSPQAA' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPQAA("spCountrySelector.invalidSPQAA"), - /** - * Represents the 'spCountrySelector.invalidSpURL' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPURL("spCountrySelector.invalidSpURL"), - /** - * Represents the 'spCountrySelector.spNotAllowed' constant error identifier. - */ - SP_COUNTRY_SELECTOR_SPNOTALLOWED("spCountrySelector.spNotAllowed"), - - /** - * Represents the 'sProviderAction.errorCreatingSAML' constant error - * identifier. - */ - SPROVIDER_SELECTOR_ERROR_CREATE_SAML("sProviderAction.errorCreatingSAML"), - /** - * Represents the 'sProviderAction.attr' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_ATTR("sProviderAction.invalidAttr"), - /** - * Represents the 'sProviderAction.country' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_COUNTRY("sProviderAction.invalidCountry"), - /** - * Represents the 'sProviderAction.relayState' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_RELAY_STATE("sProviderAction.invalidRelayState"), - /** - * Represents the 'sProviderAction.saml' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SAML("sProviderAction.invalidSaml"), - /** - * Represents the 'sProviderAction.spAlias' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPALIAS("sProviderAction.invalidSPAlias"), - /** - * Represents the 'sProviderAction.spDomain' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPDOMAIN("sProviderAction.invalidSPDomain"), - /** - * Represents the 'sProviderAction.spId' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPID("sProviderAction.invalidSPId"), - /** - * Represents the 'sProviderAction.spQAA' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPQAA("sProviderAction.invalidSPQAA"), - /** - * Represents the 'sProviderAction.spQAAId' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPQAAID("sProviderAction.invalidSPQAAId"), - /** - * Represents the 'sProviderAction.spRedirect' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPREDIRECT("sProviderAction.invalidSPRedirect"), - /** - * Represents the 'sPPowerValidationAction.invalidSPPVAttrList' constant error identifier. - */ - SPPOWERVALIDATION_SELECTOR_INVALID_SP_PV_ATTR_LIST("sPPowerValidationAction.invalidSPPVAttrList"), - - /** - * Represents the 'sProviderAction.invalidSPProviderName' constant error - * identifier. - */ - SPROVIDER_SELECTOR_INVALID_SP_PROVIDERNAME( - "sProviderAction.invalidSPProviderName"), - /** - * Represents the 'sProviderAction.spNotAllowed' constant error identifier. - */ - SPROVIDER_SELECTOR_SPNOTALLOWED("sProviderAction.spNotAllowed"), - - - /** - * Represents the 'internalError' constant error identifier. - */ - INTERNAL_ERROR("internalError"), - - /** - * Represents the 'colleagueRequest.attrNull' constant error identifier. - */ - COLLEAGUE_REQ_ATTR_NULL("colleagueRequest.attrNull"), - /** - * Represents the 'colleagueRequest.errorCreatingSAML' constant error - * identifier. - */ - COLLEAGUE_REQ_ERROR_CREATE_SAML("colleagueRequest.errorCreatingSAML"), - /** - * Represents the 'colleagueRequest.invalidCountryCode' constant error - * identifier. - */ - COLLEAGUE_REQ_INVALID_COUNTRYCODE("colleagueRequest.invalidCountryCode"), - /** - * Represents the 'colleagueRequest.invalidDestUrl' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_DEST_URL("colleagueRequest.invalidDestUrl"), - /** - * Represents the 'colleagueRequest.invalidQaa' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_QAA("colleagueRequest.invalidQaa"), - /** - * Represents the 'colleagueRequest.invalidRedirect' constant error - * identifier. - */ - COLLEAGUE_REQ_INVALID_REDIRECT("colleagueRequest.invalidRedirect"), - /** - * Represents the 'colleagueRequest.invalidSAML' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_SAML("colleagueRequest.invalidSAML"), - - /** - * Represents the 'colleaguePVRequest.invalidPVAttrList' constant error identifier. - */ - COLLEAGUE_PV_REQ_INVALID_PV_ATTR_LIST("colleaguePVRequest.invalidPVAttrList"), - - - /** - * Represents the 'cpepsRedirectUrl' constant error identifier. - */ - CPEPS_REDIRECT_URL("cpepsRedirectUrl"), - /** - * Represents the 'spepsRedirectUrl' constant error identifier. - */ - SPEPS_REDIRECT_URL("spepsRedirectUrl"), - /** - * Represents the 'sProviderAction.invCountry' constant error identifier. - */ - SP_ACTION_INV_COUNTRY("sProviderAction.invCountry"), - - /** - * Represents the 'providernameAlias.invalid' constant error identifier. - */ - PROVIDER_ALIAS_INVALID("providernameAlias.invalid"), - - - /** - * Represents the 'cPeps.attrNull' constant error identifier. - */ - CPEPS_ATTR_NULL("cPeps.attrNull"), - - /** - * Represents the 'colleagueResponse.invalidSAML' constant error identifier. - */ - COLLEAGUE_RESP_INVALID_SAML("colleagueResponse.invalidSAML"), - - /** - * Represents the 'citizenNoConsent.mandatory' constant error identifier. - */ - CITIZEN_NO_CONSENT_MANDATORY("citizenNoConsent.mandatory"), - /** - * Represents the 'citizenResponse.mandatory' constant error identifier. - */ - CITIZEN_RESPONSE_MANDATORY("citizenResponse.mandatory"), - /** - * Represents the 'attVerification.mandatory' constant error identifier. - */ - ATT_VERIFICATION_MANDATORY("attVerification.mandatory"), - /** - * Represents the 'attrValue.verification' constant error identifier. - */ - ATTR_VALUE_VERIFICATION("attrValue.verification"), - - /** - * Represents the 'audienceRestrictionError' constant error identifier. - */ - AUDIENCE_RESTRICTION("audienceRestrictionError"), - /** - * Represents the 'auRequestIdError' constant error identifier. - */ - AU_REQUEST_ID("auRequestIdError"), - /** - * Represents the 'domain' constant error identifier. - */ - DOMAIN("domain"), - /** - * Represents the 'hash.error' constant error identifier. - */ - HASH_ERROR("hash.error"), - /** - * Represents the 'invalidAttributeList' constant error identifier. - */ - INVALID_ATTRIBUTE_LIST("invalidAttributeList"), - /** - * Represents the 'invalidAttributeValue' constant error identifier. - */ - INVALID_ATTRIBUTE_VALUE("invalidAttributeValue"), - /** - * Represents the 'qaaLevel' constant error identifier. - */ - QAALEVEL("qaaLevel"), - /** - * Represents the 'requests' constant error identifier. - */ - REQUESTS("requests"), - /** - * Represents the 'SPSAMLRequest' constant error identifier. - */ - SP_SAML_REQUEST("SPSAMLRequest"), - /** - * Represents the 'spepsSAMLRequest' constant error identifier. - */ - SPEPS_SAML_REQUEST("spepsSAMLRequest"), - /** - * Represents the 'IdPSAMLResponse' constant error identifier. - */ - IDP_SAML_RESPONSE("IdPSAMLResponse"), - /** - * Represents the 'cpepsSAMLResponse' constant error identifier. - */ - CPEPS_SAML_RESPONSE("cpepsSAMLResponse"), - /** - * Represents the 'cpepsSAMLResponse' constant error identifier. - */ - SPEPS_SAML_RESPONSE("spepsSAMLResponse"), - /** - * Represents the 'session' constant error identifier. - */ - SESSION("session"), - /** - * Represents the 'invalid.session' constant error identifier. - */ - INVALID_SESSION("invalid.session"), - /** - * Represents the 'invalid.sessionId' constant error identifier. - */ - INVALID_SESSION_ID("invalid.sessionId"), - /** - * Represents the 'missing.sessionId' constant error identifier. - */ - MISSING_SESSION_ID("sessionError"), - /** - * Represents the 'missing.mandate' constant error identifier. - */ - MISSING_MANDATE("missing.mandate"), - /** - * Represents the 'AtPSAMLResponse' constant error identifier. - */ - ATP_SAML_RESPONSE("AtPSAMLResponse"), - - /** - * Represents the 'AtPSAMLResponse' constant error identifier. - */ - ATP_RESPONSE_ERROR("atp.response.error"), - - /** - * Represents the 'apepsSAMLRequest' constant error identifier. - */ - APEPS_SAML_REQUEST("apepsSAMLRequest"), - - /** - * Represents the 'apepsSAMLResponse' constant error identifier. - */ - APEPS_SAML_RESPONSE("apepsSAMLResponse"), - - /** - * Represents the 'invalid.apepsRedirectUrl' constant error identifier. - */ - INVALID_APEPS_REDIRECT_URL("invalid.apepsRedirectUrl"), - - /** - * Represents the 'invalid.apepsCallbackUrl' constant error identifier. - */ - INVALID_APEPS_CALLBACK_URL("invalid.apepsCallbackUrl"), - - /** - * Represents the 'colleagueAttributeRequest.invalidSAML' constant error identifier. - */ - COLLEAGUE_ATTR_REQ_INVALID_SAML("colleagueAttributeRequest.invalidSAML"); - - /** - * Represents the constant's value. - */ - private String error; - - /** - * Solo Constructor. - * - * @param nError The Constant error value. - */ - PEPSErrors(final String nError) { - this.error = nError; - } - - /** - * Construct the errorCode Constant value. - * - * @return The errorCode Constant. - */ - public String errorCode() { - return error + ".code"; - } - - /** - * Construct the errorCode Constant value with the given code text. - * - * @param text the code text to append to the constant. - * - * @return The errorCode Constant for the given code text. - */ - public String errorCode(final String text) { - return error + "." + text + ".code"; - } - - /** - * Construct the errorMessage constant value. - * - * @return The errorMessage constant. - */ - public String errorMessage() { - return error + ".message"; - } - - /** - * Construct the errorMessage Constant value with the given message text. - * - * @param text the message text to append to the constant. - * - * @return The errorMessage Constant for the given text. - */ - public String errorMessage(final String text) { - return error + "." + text + ".message"; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - return error; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java deleted file mode 100644 index 146e4c39d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java +++ /dev/null @@ -1,619 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific Parameters. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2011-07-07 20:48:45 $ - */ -public enum PEPSParameters { - - /** - * Represents the 'apId' parameter constant. - */ - AP_ID("apId"), - /** - * Represents the 'apUrl' parameter constant. - */ - AP_URL("apUrl"), - /** - * Represents the 'ap.number' parameter constant. - */ - AP_NUMBER("ap.number"), - - /** - * Represents the 'assertionConsumerServiceURL' parameter constant. - */ - ASSERTION_CONSUMER_S_URL("assertionConsumerServiceURL"), - - /** - * Represents the 'auth' parameter constant. - */ - AUTHENTICATION("auth"), - - /** - * Represents the 'auth-on-behalf-of' parameter constant. - */ - AUTHENTICATION_ON_BEHALF_OF("auth-on-behalf-of"), - - /** - * Represents the 'attr' parameter constant. - */ - ATTRIBUTE("attr"), - /** - * Represents the 'attrName' parameter constant. - */ - ATTRIBUTE_NAME("attrName"), - /** - * Represents the 'attrStatus' parameter constant. - */ - ATTRIBUTE_STATUS("attrStatus"), - /** - * Represents the 'attrType' parameter constant. - */ - ATTRIBUTE_TYPE("attrType"), - /** - * Represents the 'attrValue' parameter constant. - */ - ATTRIBUTE_VALUE("attrValue"), - /** - * Represents the 'attrList' parameter constant. - */ - ATTRIBUTE_LIST("attrList"), - /** - * Represents the 'apMandAttrList' parameter constant. - */ - AP_MANDATORY_ATTRIBUTE_LIST("apMandAttrList"), - /** - * Represents the 'attrTuple' parameter constant. - */ - ATTRIBUTE_TUPLE("attrTuple"), - /** - * Represents the 'attribute-missing' parameter constant. - */ - ATTRIBUTE_MISSING("attribute-missing"), - /** - * Represents the 'attributesNotAllowed' parameter constant. - */ - ATTRIBUTES_NOT_ALLOWED("attributesNotAllowed"), - /** - * Represents the 'authnRequest' parameter constant. - */ - AUTH_REQUEST("authnRequest"), - - /** - * Represents the 'attrValue.number' parameter constant. - */ - ATTR_VALUE_NUMBER("attrValue.number"), - - /** - * Represents the 'derivation.date.format' parameter constant. - */ - DERIVATION_DATE_FORMAT("derivation.date.format"), - /** - * Represents the 'deriveAttr.number' parameter constant. - */ - DERIVE_ATTRIBUTE_NUMBER("deriveAttr.number"), - - /** - * Represents the complex attributes parameter constant. - */ - COMPLEX_ADDRESS_VALUE("canonicalResidenceAddress"), - COMPLEX_NEWATTRIBUTE_VALUE("newAttribute2"), - COMPLEX_HASDEGREE_VALUE("hasDegree"), - COMPLEX_MANDATECONTENT_VALUE("mandateContent"), - /** - * Represents the 'consent-type' parameter constant. - */ - CONSENT_TYPE("consent-type"), - /** - * Represents the 'consent-value' parameter constant. - */ - CONSENT_VALUE("consent-value"), - /** - * Represents the 'country' parameter constant. - */ - COUNTRY("country"), - /** - * Represents the 'countryOrigin' parameter constant. - */ - COUNTRY_ORIGIN("countryOrigin"), - - /** - * Represents the 'cpepsURL' parameter constant. - */ - CPEPS_URL("cpepsURL"), - /** - * Represents the 'callback' parameter constant. - */ - CPEPS_CALLBACK("callback"), - /** - * Represents the 'peps.specificidpredirect.url' parameter constant. - */ - CPEPS_IDP_CALLBACK_VALUE("peps.specificidpredirect.url"), - /** - * Represents the 'peps.specificapredirect.url' parameter constant. - */ - CPEPS_AP_CALLBACK_VALUE("peps.specificapredirect.url"), - - /** - * Represents the 'errorCode' parameter constant. - */ - ERROR_CODE("errorCode"), - /** - * Represents the 'subCode' parameter constant. - */ - ERROR_SUBCODE("subCode"), - /** - * Represents the 'errorMessage' parameter constant. - */ - ERROR_MESSAGE("errorMessage"), - /** - * Represents the 'errorRedirectUrl' parameter constant. - */ - ERROR_REDIRECT_URL("errorRedirectUrl"), - - /** - * errorRedirectUrl Represents the 'external-authentication' parameter - * constant. - */ - EXTERNAL_AUTH("external-authentication"), - /** - * Represents the 'external-ap' parameter constant. - */ - EXTERNAL_AP("external-ap"), - /** - * Represents the 'external-pv' parameter constant. - */ - EXTERNAL_PV("external-pv"), - /** - * Represents the 'external-sig-module' parameter constant. - */ - EXT_SIG_CREATOR_MOD("external-sig-module"), - - /** - * Represents the 'http-x-forwarded-for' parameter constant. - */ - HTTP_X_FORWARDED_FOR("http-x-forwarded-for"), - - /** - * Represents the 'idp.url' parameter constant. - */ - IDP_URL("idp.url"), - /** - * Represents the 'idpAUB.url' parameter constant. - */ - IDPAUB_URL("idpAUB.url"), - /** - * Represents the 'internal-authentication' parameter constant. - */ - INTERNAL_AUTH("internal-authentication"), - /** - * Represents the 'internal-ap' parameter constant. - */ - INTERNAL_AP("internal-ap"), - /** - * Represents the 'internal-pv' parameter constant. - */ - INTERNAL_PV("internal-pv"), - - /** - * Represents the 'samlIssuer' parameter constant. - */ - ISSUER("samlIssuer"), - /** - * Represents the 'samlIssuer.idp' parameter constant. - */ - ISSUER_IDP("samlIssuer.idp"), - /** - * Represents the 'samlIssuer.atp' parameter constant. - */ - ISSUER_ATP("samlIssuer.atp"), - - /** - * Represents the 'mandatory' parameter constant. - */ - MANDATORY("mandatory"), - /** - * Represents the 'mandatoryAttributeMissing' parameter constant. - */ - MANDATORY_ATTR_MISSING("mandatoryAttributeMissing"), - /** - * Represents the 'mandatoryConsentAttrMissing' parameter constant. - */ - MANDATORY_CONSENT_MISSING("mandatoryConsentAttrMissing"), - /** - * Represents the 'missing-attrs' parameter constant. - */ - MISSING_ATTRS("missing-attrs"), - /** - * Represents the 'no-more-attrs' parameter constant. - */ - NO_MORE_ATTRS("no-more-attrs"), - - /** - * Represents the 'optional' parameter constant. - */ - OPTIONAL("optional"), - - /** - * Represents the 'no-consent-type' parameter constant. - */ - NO_CONSENT_TYPE("no-consent-type"), - /** - * Represents the 'no-consent-value' parameter constant. - */ - NO_CONSENT_VALUE("no-consent-value"), - - /** - * Represents the 'provider.name' parameter constant. - */ - PROVIDER_NAME_VALUE("providerName"), - /** - * Represents the 'cpeps.askconsent' parameter constant. - */ - PEPS_ASK_CONSENT("cpeps.askconsent"), - /** - * Represents the 'cpeps.askconsentvalue' parameter constant. - */ - PEPS_ASK_CONSENT_VALUE("cpeps.askconsentvalue"), - /** - * Represents the 'pepsAuth' parameter constant. - */ - PEPS_AUTH_CONSENT("pepsAuth"), - /** - * Represents the 'validation.bypass' parameter constant. - */ - PEPS_BYPASS("validation.bypass"), - /** - * Represents the 'cpeps.number' parameter constant. - */ - PEPS_NUMBER("cpeps.number"), - /** - * Represents the 'cpeps.specificapredirect.url' parameter constant. - */ - PEPS_SPECIFIC_URL("cpeps.specificapredirect.url"), - /** - * Represents the 'pv.url' parameter constant. - */ - PV_URL("pv.url"), - - /** - * Represents the 'qaaLevel' parameter constant. - */ - QAALEVEL("qaaLevel"), - - /** - * Represents the 'speps.redirectUrl' parameter constant. - */ - SPEPS_REDIRECT_URL("speps.redirectUrl"), - - /** - * Represents the 'sp.redirectUrl' parameter constant. - */ - SP_REDIRECT_URL("sp.redirectUrl"), - /** - * Represents the 'cpeps.redirectUrl' parameter constant. - */ - CPEPS_REDIRECT_URL("cpeps.redirectUrl"), - /** - * Represents the 'RelayState' parameter constant. - */ - RELAY_STATE("RelayState"), - /** - * Represents the 'remoteAddr' parameter constant. - */ - REMOTE_ADDR("remoteAddr"), - /** - * Represents the 'remoteUser' parameter constant. - */ - REMOTE_USER("remoteUser"), - - /** - * Represents the 'SAMLRequest' parameter constant. - */ - SAML_REQUEST("SAMLRequest"), - /** - * Represents the 'SAMLResponse' parameter constant. - */ - SAML_RESPONSE("SAMLResponse"), - /** - * Represents the 'SAMLFail' parameter constant. - */ - SAML_TOKEN_FAIL("SAMLFail"), - /** - * Represents the 'TokenId' parameter constant. - */ - SAML_TOKEN_ID("TokenId"), - /** - * Represents the 'inResponseTo' parameter constant. - */ - SAML_IN_RESPONSE_TO("inResponseTo"), - /** - * Represents the 'inResponseTo.idp' parameter constant. - */ - SAML_IN_RESPONSE_TO_IDP("inResponseTo.idp"), - /** - * Represents the 'inResponseTo.atp' parameter constant. - */ - SAML_IN_RESPONSE_TO_ATP("inResponseTo.atp"), - /** - * Represents the 'SignatureResponse' parameter constant. - */ - SIGNATURE_RESPONSE("SignatureResponse"), - - /** - * Represents the 'cPepsSession' parameter constant. - */ - SESSION_ID_URL("cPepsSession"), - /** - * Represents the 'spId' parameter constant. - */ - SP_ID("spId"), - /** - * Represents the 'spQaaLevel' parameter constant. - */ - SP_QAALEVEL("spQaaLevel"), - /** - * Represents the 'spUrl' parameter constant. - */ - SP_URL("spUrl"), - - /** - * Represents the 'allow.derivation.all' parameter constant. - */ - SPECIFIC_ALLOW_DERIVATION_ALL("allow.derivation.all"), - /** - * Represents the ''allow.unknowns parameter constant. - */ - SPECIFIC_ALLOW_UNKNOWNS("allow.unknowns"), - /** - * Represents the 'derivation.date.separator' parameter constant. - */ - SPECIFIC_DERIVATION_DATE_SEP("derivation.date.separator"), - /** - * Represents the 'derivation.month.position' parameter constant. - */ - SPECIFIC_DERIVATION_MONTH_POS("derivation.month.position"), - /** - * Represents the 'derivation.day.position' parameter constant. - */ - SPECIFIC_DERIVATION_DAY_POS("derivation.day.position"), - /** - * Represents the 'derivation.year.position' parameter constant. - */ - SPECIFIC_DERIVATION_YEAR_POS("derivation.year.position"), - - /** - * sp.authorized.parameters Represents the '' parameter constant. - */ - SPEPS_AUTHORIZED("sp.authorized.parameters"), - - /** - * Represents the 'spSector' constant value. - */ - SPSECTOR("spSector"), - /** - * Represents the 'spApplication' constant value. - */ - SPAPPLICATION("spApplication"), - /** - * Represents the 'spCountry' constant value. - */ - SPCOUNTRY("spCountry"), - /** - * Represents the 'spInstitution' constant value. - */ - SPINSTITUTION("spInstitution"), - /** - * Represents the 'storkAttribute.number' parameter constant. - */ - STORK_ATTRIBUTE_NUMBER("storkAttribute.number"), - /** - * Represents the 'storkAttributeValue.number' parameter constant. - */ - STORK_ATTRIBUTE_VALUE_NUMBER("storkAttributeValue.number"), - - /** - * Represents the 'username' parameter constant. - */ - USERNAME("username"), - - /** - * Represents the 'tooManyParameters' parameter constant. - */ - TOO_MANY_PARAMETERS("tooManyParameters"), - /** - * Represents the 'validation.active' parameter constant. - */ - VALIDATION_ACTIVE("validation.active"), - - /** - * Represents the 'x-forwarded-for' parameter constant. - */ - X_FORWARDED_FOR("x-forwarded-for"), - /** - * Represents the 'x-forwarded-host' parameter constant. - */ - X_FORWARDED_HOST("x-forwarded-host"), - /** - * Represents the 'XMLResponse' parameter constant. - */ - XML_RESPONSE("XMLResponse"), - - /** - * Represents the 'ap-cpeps.number' parameter constant. - */ - AP_PEPS_NUMBER("ap-cpeps.number"), - - /** - * Represents the 'atp.number' parameter constant. - */ - ATTRIBUTE_PROVIDER_NUMBER("atp.number"), - - /** - * Represents the 'atn.number' parameter constant. - */ - ATTRIBUTE_NAME_NUMBER("atn.number"), - - /** - * Represents the 'apLinker' parameter constant. - */ - AP_LINKER("apLinker"), - - /** - * Represents the 'prevApLinker' parameter constant. - */ - PREV_AP_LINKER("prevApLinker"), - - /** - * Represents the 'NOSEL' parameter constant (no attribute provider selected). - */ - AP_NO_SELECTION("NOSEL"), - - /** - * Represents the 'OCSEL' parameter constant (attribute provider in another country). - */ - AP_OTHER_COUNTRY("OCSEL"), - - /** - * Represents the '_provider' suffix parameter constant. - */ - AP_PROVIDER_SELECT_SUFFIX("_provider"), - - /** - * Represents the '_country' suffix parameter constant. - */ - AP_COUNTRY_SELECT_SUFFIX("_country"), - - /** - * Represents the '_name' suffix parameter constant. - */ - AP_NAME_SELECT_SUFFIX("_name"), - - /** - * Represents the 'next-ap' parameter constant. - */ - NEXT_AP("next-ap"), - - /** - * Represents the 'next-apeps' parameter constant. - */ - NEXT_APEPS("next-apeps"), - - /** - * Represents the 'back-to-apeps' parameter constant. - */ - BACK_TO_APEPS("back-to-apeps"), - - /** - * Represents the 'is-remote-apeps' parameter constant. - */ - IS_REMOTE_APEPS("is-remote-apeps"), - - /** - * Represents the 'more-attributes' parameter constant. - */ - MORE_ATTRIBUTES("more-attributes"), - - /** - * Represents the 'attr-filter.number' parameter constant. - */ - ATTRIBUTES_FILTER_NUMBER("attr-filter.number"), - - /** - * Represents the 'atp.url' parameter constant. - */ - ATP_URL("atp.url"), - /** - * Represents the 'apepsURL' parameter constant. - */ - APEPS_URL("apepsUrl"), - - /** - * Represents the 'apepsCountry' parameter constant. - */ - APEPS_COUNTRY("apepsCountry"), - - /** - * Represents the 'apepsAuthRequest' parameter constant. - */ - APEPS_ATTR_REQUEST("apepsAttrRequest"), - - /** - * Represents the 'isApepsRequest' parameter constant. - */ - APEPS_REQUEST_COMPLETE("apeps-request-complete"), - - /** - * Represents the 'apeps.callbackUrl' parameter constant. - */ - APEPS_CALLBACK_URL("apeps.callbackUrl"), - /** - * Represents the 'attrListMand' parameter constant. - */ - ATTR_LIST_MAND("attrListMand"), - - /** - * Represents the 'attrListOpt' parameter constant. - */ - ATTR_LIST_OPT("attrListOpt"), - - /** - * Represents the 'simpleAttrListMand' parameter constant. - */ - SIMPLE_ATTR_LIST_MAND("simpleAttrListMand"), - - /** - * Represents the 'simpleAttrListOpt' parameter constant. - */ - SIMPLE_ATTR_LIST_OPT("simpleAttrListOpt"), - - /** - * Represents the 'complexAttrListMand' parameter constant. - */ - COMPLEX_ATTR_LIST_MAND("complexAttrListMand"), - - /** - * Represents the 'complexAttrListOpt' parameter constant. - */ - COMPLEX_ATTR_LIST_OPT("complexAttrListOpt"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param nValue The Constant value. - */ - PEPSParameters(final String nValue) { - this.value = nValue; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java deleted file mode 100644 index a16b03edb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java +++ /dev/null @@ -1,353 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.UnsupportedEncodingException; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; -import org.bouncycastle.crypto.Digest; -import org.bouncycastle.util.encoders.Base64; - -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; -import eu.stork.peps.auth.commons.exceptions.InvalidParameterPEPSException; - -/** - * This class holds static helper methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.75 $, $Date: 2010-11-23 00:05:35 $ - */ -public final class PEPSUtil { - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(PEPSUtil.class.getName()); - - /** - * Configurations object. - */ - private static Properties configs; - - /** - * Max prefix. - */ - private static final String MAX_PARAM_PREFIX = "max."; - - /** - * Code prefix to get error code. - */ - private static final String CODE_PARAM_SUFFIX = ".code"; - - /** - * param's size prefix to get max param size. - */ - private static final String MAX_PARAM_SUFFIX = ".size"; - - /** - * Message prefix to get error message. - */ - private static final String MSG_PARAM_SUFFIX = ".message"; - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private PEPSUtil() { - // empty constructor - } - - /** - * Creates a single instance of this class and sets the properties. - * - * @param nConfigs The set of available configurations. - * - * @return The created PEPSUtil's class. - */ - public static PEPSUtil createInstance(final Properties nConfigs) { - if (nConfigs != null) { - PEPSUtil.configs = nConfigs; - } - return new PEPSUtil(); - } - - /** - * Getter for the Properties. - * - * @return configs The properties value. - */ - public Properties getConfigs() { - return configs; - } - - /** - * Setter for the Properties. - * - * @param nConfigs The new properties value. - */ - public static void setConfigs(final Properties nConfigs) { - if (nConfigs != null) { - PEPSUtil.configs = nConfigs; - } - } - - /** - * Returns the identifier of some configuration given a set of configurations - * and the corresponding configuration key. - * - * @param configKey The key that IDs some configuration. - * - * @return The configuration String value. - */ - public static String getConfig(final String configKey) { - return configs.getProperty(configKey); - } - - /** - * Validates the input paramValue identified by the paramName. - * - * @param paramName The name of the parameter to validate. - * @param paramValue The value of the parameter to validate. - * - * @return true if the parameter is valid. - */ - public static boolean isValidParameter(final String paramName, - final String paramValue) { - - final String validationParam = - PEPSUtil.getConfig(PEPSParameters.VALIDATION_ACTIVE.toString()); - boolean retVal = true; - - final String paramConf = MAX_PARAM_PREFIX + paramName + MAX_PARAM_SUFFIX; - - if (PEPSValues.TRUE.toString().equals(validationParam)) { - final String paramSizeStr = PEPSUtil.getConfig(paramConf); - // Checking if the parameter size exists and if it's numeric - if (StringUtils.isNumeric(paramSizeStr)) { - final int maxParamSize = Integer.valueOf(paramSizeStr); - if (StringUtils.isEmpty(paramValue) - || paramValue.length() > maxParamSize) { - retVal = false; - LOG.warn("Invalid parameter [" + paramName + "] value " + paramValue); - } - } else { - retVal = false; - LOG.error("Missing " + paramConf - + " configuration in the pepsUtils.properties configuration file"); - } - } - return retVal; - } - - /** - * Validates the Parameter and throws an exception if an error occurs. Throws - * an InvalidParameterPEPSException runtime exception if the parameter is - * invalid. - * - * @param className The Class Name that invoked the method. - * @param paramName The name of the parameter to validate. - * @param paramValue The value of the parameter to validate. - */ - public static void validateParameter(final String className, - final String paramName, final Object paramValue) { - - if (paramValue == null) { - PEPSUtil.validateParameter(className, paramName, ""); - } else { - PEPSUtil.validateParameter(className, paramName, paramValue.toString()); - } - } - - /** - * Validates the Parameters and throws an exception if an error occurs. - * - * @param className The Class Name that invoked the method. - * @param paramName The name of the parameter to validate. - * @param paramValue The value of the parameter to validate. - */ - public static void validateParameter(final String className, - final String paramName, final String paramValue) { - - PEPSUtil.validateParameter(className, paramName, paramValue, - PEPSUtil.getErrorCode(paramName), PEPSUtil.getErrorMessage(paramName)); - } - - /** - * Validates the Parameters and throws an exception if an error occurs. - * - * @param className The Class Name that invoked the method. - * @param paramName The name of the parameter to validate. - * @param paramValue The value of the parameter to validate. - * @param error The PEPSError to get error code and messages from configs. - */ - public static void validateParameter(final String className, - final String paramName, final String paramValue, final PEPSErrors error) { - - PEPSUtil.validateParameter(className, paramName, paramValue, - PEPSUtil.getConfig(error.errorCode()), - PEPSUtil.getConfig(error.errorMessage())); - } - - /** - * Validates the HTTP Parameter and throws an exception if an error occurs. - * Throws an InvalidParameterPEPSException runtime exception if the parameter - * is invalid. - * - * @param className The Class Name that invoked the method. - * @param paramName The name of the parameter to validate. - * @param paramValue The value of the parameter to validate. - * @param errorCode The error code to include on the exception. - * @param errorMessage The error message to include on the exception. - */ - public static void validateParameter(final String className, - final String paramName, final String paramValue, final String errorCode, - final String errorMessage) { - - if (!isValidParameter(paramName, paramValue)) { - LOG.warn("Invalid parameter [" + paramName + "] value found at " - + className); - throw new InvalidParameterPEPSException(errorCode, errorMessage); - } - } - - /** - * Getter for the error code of some given error related to the input param. - * - * @param paramName The name of the parameter associated with the error. - * - * @return The code of the error. - */ - private static String getErrorCode(final String paramName) { - return getConfig(paramName + CODE_PARAM_SUFFIX); - } - - /** - * Getter for the error message of some given error related to the input - * parameter. - * - * @param paramName The name of the parameter associated with the message. - * - * @return The message for the error. - */ - private static String getErrorMessage(final String paramName) { - return getConfig(paramName + MSG_PARAM_SUFFIX); - } - - /** - * {@link Base64} encodes the input samlToken parameter. - * - * @param samlToken the SAML Token to be encoded. - * - * @return The Base64 String representing the samlToken. - * - * @see Base64#encode - */ - public static String encodeSAMLToken(final byte[] samlToken) { - try { - return new String(Base64.encode(samlToken), "UTF8"); - } catch (UnsupportedEncodingException e) { - LOG.error(PEPSErrors.INTERNAL_ERROR.errorMessage(), e); - return null; - } - } - - /** - * Decodes the {@link Base64} String input parameter representing a samlToken. - * - * @param samlToken the SAML Token to be decoded. - * - * @return The samlToken decoded bytes. - * - * @see Base64#decode - */ - public static byte[] decodeSAMLToken(final String samlToken) { - return Base64.decode(samlToken); - } - - /** - * Hashes a SAML token. Throws an InternalErrorPEPSException runtime exception - * if the Cryptographic Engine fails. - * - * @param samlToken the SAML Token to be hashed. - * - * @return byte[] with the hashed SAML Token. - */ - public static byte[] hashPersonalToken(final byte[] samlToken) { - try { - final String className = - PEPSUtil.getConfig(PEPSValues.HASH_DIGEST_CLASS.toString()); - - final Digest digest = - (Digest) Class.forName(className).getConstructor() - .newInstance((Object[]) null); - digest.update(samlToken, 0, samlToken.length); - - final int retLength = digest.getDigestSize(); - final byte[] ret = new byte[retLength]; - - digest.doFinal(ret, 0); - return ret; - - } catch (final Exception e) { - // For all those exceptions that could be thrown, we always log it and - // thrown an InternalErrorPEPSException. - LOG.error(PEPSErrors.HASH_ERROR.errorMessage(), e); - throw new InternalErrorPEPSException( - PEPSUtil.getConfig(PEPSErrors.HASH_ERROR.errorCode()), - PEPSUtil.getConfig(PEPSErrors.HASH_ERROR.errorMessage()), e); - } - } - - /** - * Gets the Stork error code in the error message if exists! - * - * @param errorMessage The message to get the error code if exists; - * - * @return the error code if exists. Returns null otherwise. - */ - public static String getStorkErrorCode(final String errorMessage) { - if (StringUtils.isNotBlank(errorMessage) - && errorMessage.indexOf(PEPSValues.ERROR_MESSAGE_SEP.toString()) >= 0) { - final String[] msgSplitted = - errorMessage.split(PEPSValues.ERROR_MESSAGE_SEP.toString()); - if (msgSplitted.length == 2 && StringUtils.isNumeric(msgSplitted[0])) { - return msgSplitted[0]; - } - } - return null; - } - - /** - * Gets the Stork error message in the saml message if exists! - * - * @param errorMessage The message to get in the saml message if exists; - * - * @return the error message if exists. Returns the original message - * otherwise. - */ - public static String getStorkErrorMessage(final String errorMessage) { - if (StringUtils.isNotBlank(errorMessage) - && errorMessage.indexOf(PEPSValues.ERROR_MESSAGE_SEP.toString()) >= 0) { - final String[] msgSplitted = - errorMessage.split(PEPSValues.ERROR_MESSAGE_SEP.toString()); - if (msgSplitted.length == 2 && StringUtils.isNumeric(msgSplitted[0])) { - return msgSplitted[1]; - } - } - return errorMessage; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java deleted file mode 100644 index e14c21cb5..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the value constants. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.17 $, $Date: 2011-07-07 20:48:45 $ - */ -public enum PEPSValues { - - /** - * Represents the 'all' constant value. - */ - ALL("all"), - /** - * Represents the 'none' constant value. - */ - NONE("none"), - /** - * Represents the 'true' constant value. - */ - TRUE("true"), - /** - * Represents the 'false' constant value. - */ - FALSE("false"), - /** - * Represents the empty string constant value. - */ - EMPTY_STRING(""), - - /** - * Represents the ',' separator constant value. - */ - ATTRIBUTE_VALUE_SEP(","), - /** - * Represents the ';' separator constant value. - */ - ATTRIBUTE_SEP(";"), - /** - * Represents the ':' separator constant value. - */ - ATTRIBUTE_TUPLE_SEP(":"), - /** - * Represents the '/' separator constant value. - */ - EID_SEPARATOR("/"), - /** - * Represents the ' - ' separator constant value. - */ - ERROR_MESSAGE_SEP(" - "), - /** - * Represents the '#' parameter constant value. - */ - LOGGER_SEP("#"), - /** - * Represents the 'NOT_AVAILABLE' parameter constant value. - */ - NOT_AVAILABLE("NotAvailable"), - /** - * Represents the ';' parameter constant value. - */ - SPEPS_AUTHORIZED_SEP(";"), - - /** - * Represents the 'ap' constant value. - */ - AP("ap"), - /** - * Represents the 'C-PEPS' constant value. - */ - CPEPS("C-PEPS"), - /** - * Represents the 'cpeps' constant value. - */ - CPEPS_PREFIX("cpeps"), - /** - * Represents the 'peps' constant value. - */ - PEPS("peps"), - /** - * Represents the '-PEPS' constant value. - */ - PEPS_SUFFIX("-PEPS"), - /** - * Represents the 'SP' constant value. - */ - SP("SP"), - /** - * Represents the 'S-PEPS' constant value. - */ - SPEPS("S-PEPS"), - /** - * Represents the 'speps' constant value. - */ - SPEPS_PREFIX("speps"), - /** - * Represents the 'sp.default.parameters' constant value. - */ - DEFAULT("sp.default.parameters"), - /** - * Represents the default saml id constant value. - */ - DEFAULT_SAML_ID("1"), - /** - * Represents the 'hashDigest.className' constant value. - */ - HASH_DIGEST_CLASS("hashDigest.className"), - - /** - * Represents the 'eu.stork.communication.requests' constant value. - */ - STORK_PACKAGE_REQUEST_LOGGER_VALUE("eu.stork.communication.requests"), - /** - * Represents the 'eu.stork.communication.responses' constant value. - */ - STORK_PACKAGE_RESPONSE_LOGGER_VALUE("eu.stork.communication.responses"), - - /** - * Represents the 'S-PEPS receives request from SP' constant value. - */ - SP_REQUEST("S-PEPS receives request from SP"), - /** - * Represents the 'Get Citizen Consent' constant value. - */ - CITIZEN_CONSENT_LOG("Get Citizen Consent"), - /** - * Represents the 'C-PEPS receives request from S-PEPS' constant value. - */ - CPEPS_REQUEST("C-PEPS receives request from S-PEPS"), - /** - * Represents the 'C-PEPS generates response to S-PEPS' constant value. - */ - CPEPS_RESPONSE("C-PEPS generates response to S-PEPS"), - /** - * Represents the 'S-PEPS generates request to C-PEPS' constant value. - */ - SPEPS_REQUEST("S-PEPS generates request to C-PEPS"), - /** - * Represents the 'S-PEPS receives response from C-PEPS' constant value. - */ - SPEPS_RESPONSE("S-PEPS receives response from C-PEPS"), - /** - * Represents the 'S-PEPS generates response to SP' constant value. - */ - SP_RESPONSE("S-PEPS generates response to SP"), - /** - * Represents the 'Success' constant value. - */ - SUCCESS("Success"), - /** - * Represents the December's month number constant value. - */ - LAST_MONTH("12"), - /** - * Represents the yyyyMM constant value. - */ - NO_DAY_DATE_FORMAT("yyyyMM"), - - /** - * Represents the 'attrValue' constant value. - */ - ATTRIBUTE("attrValue"), - /** - * Represents the 'derivedAttr' constant value. - */ - DERIVE_ATTRIBUTE("deriveAttr"), - /** - * Represents the 'storkAttribute' constant value. - */ - STORK_ATTRIBUTE("storkAttribute"), - - /** - * Represents the 'properties' constant value. - */ - PROPERTIES("properties"), - /** - * Represents the 'referer' constant value. - */ - REFERER("referer"), - /** - * Represents the 'host' constant value. - */ - HOST("host"), - /** - * Represents the 'spid' constant value. - */ - SPID("spid"), - /** - * Represents the 'domain' constant value. - */ - DOMAIN("domain"), - /** - * Represents the '.validation' constant value. - */ - VALIDATION_SUFFIX(".validation"), - /** - * Represents the 'jsessionid' constant value. - */ - EQUAL("="), - /** - * Represents the 'HttpOnly' constant value. - */ - HTTP_ONLY("HttpOnly"), - /** - * Represents the 'SET-COOKIE' constant value. - */ - JSSESSION("JSESSIONID"), - /** - * Represents the '=' constant value. - */ - SETCOOKIE("SET-COOKIE"), - /** - * Represents the ';' constant value. - */ - SEMICOLON(";"), - /** - * Represents the ' ' constant value. - */ - SPACE(" "), - /** - * Represents the 'atp' constant value. - */ - APROVIDER_PREFIX("atp"), - /** - * Represents the 'atn' constant value. - */ - ANAME_PREFIX("atn"), - /** - * Represents the 'ap-cpeps' constant value. - */ - AP_CPEPS_PREFIX("ap-cpeps"), - /** - * Represents the 'attr-filter' constant value. - */ - AP_ATTRFILTER_PREFIX("attr-filter"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val The Constant value. - */ - PEPSValues(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } - - /** - * Construct the return value with the following structure - * CONSTANT_VALUE+index+".id". - * - * @param index the number. - * - * @return The concatenated String value. - */ - public String index(final int index) { - - return value + index + ".id"; - } - - /** - * Construct the return value with the following structure - * CONSTANT_VALUE+index+".value". - * - * @param index the number. - * - * @return The concatenated string value. - */ - public String value(final int index) { - - return value + index + ".value"; - } - - /** - * Construct the return value with the following structure - * CONSTANT_VALUE+index+".name". - * - * @param index the number. - * - * @return The concatenated String value. - */ - public String name(final int index) { - - return value + index + ".name"; - } - - /** - * Construct the return value with the following structure - * CONSTANT_VALUE+index+".url". - * - * @param index the number. - * - * @return The concatenated String value. - */ - public String url(final int index) { - - return value + index + ".url"; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java deleted file mode 100644 index 5d8281445..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.apache.log4j.Logger; - -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; - -/** - * This class is a bean used to store the information relative to the - * PersonalAttribute. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.22 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class PersonalAttribute implements Serializable, Cloneable { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 2612951678412632174L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(PersonalAttribute.class - .getName()); - - /** - * Name of the personal attribute. - */ - private String name; - - /** - * Values of the personal attribute. - */ - private List value = new ArrayList(); - - /** - * Type of the personal attribute. - */ - private String type; - - /** - * Complex values of the personal attribute. - */ - private Map complexValue = new ConcurrentHashMap(); - - /** - * Is the personal attribute mandatory? - */ - private transient boolean required; - - /** - * Returned status of the attribute from the IdP. - */ - private String status; - - /** - * Name of the personal attribute. - */ - private String friendlyName; - - /** - * Empty Constructor. - */ - public PersonalAttribute() { - super(); - } - - /** - * PersonalAttribute Constructor for complex values. - * - * @param attrName The attribute name. - * @param attrIsRequired The attribute type value. - * @param attrComplexValue The attribute's value. - * @param attrStatus The attribute's status value. - */ - public PersonalAttribute(final String attrName, final boolean attrIsRequired, - final List attrComplexValue, final String attrStatus) { - this.setName(attrName); - this.setIsRequired(attrIsRequired); - this.setValue(attrComplexValue); - this.setStatus(attrStatus); - } - - /** - * PersonalAttribute Constructor for complex values. - * - * @param attrName The attribute name. - * @param attrIsRequired The attribute type value. - * @param attrComplexValue The attribute's complex value. - * @param attrStatus The attribute's status value. - */ - public PersonalAttribute(final String attrName, final boolean attrIsRequired, - final Map attrComplexValue, final String attrStatus) { - this.setName(attrName); - this.setIsRequired(attrIsRequired); - this.setComplexValue(attrComplexValue); - this.setStatus(attrStatus); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public Object clone() { - - try { - final PersonalAttribute personalAttr = (PersonalAttribute) super.clone(); - personalAttr.setIsRequired(this.isRequired()); - personalAttr.setName(this.getName()); - personalAttr.setStatus(this.getStatus()); - if (!isEmptyValue()) { - final List val = - (List) ((ArrayList) this.getValue()).clone(); - personalAttr.setValue(val); - } - if (!isEmptyComplexValue()) { - final Map complexVal = - (Map) ((HashMap) this - .getComplexValue()).clone(); - personalAttr.setComplexValue(complexVal); - } - return personalAttr; - } catch (final CloneNotSupportedException e) { - // assert false; - LOG.trace("Nothing to do."); - throw new InternalErrorPEPSException( - PEPSUtil.getConfig(PEPSErrors.INTERNAL_ERROR.errorCode()), - PEPSUtil.getConfig(PEPSErrors.INTERNAL_ERROR.errorMessage()), e); - } - } - - /** - * Getter for the required value. - * - * @return The required value. - */ - public boolean isRequired() { - return required; - } - - /** - * Setter for the required value. - * - * @param attrIsRequired this attribute? - */ - public void setIsRequired(final boolean attrIsRequired) { - this.required = attrIsRequired; - } - - /** - * Getter for the name value. - * - * @return The name value. - */ - public String getName() { - return name; - } - - /** - * Setter for the name value. - * - * @param attrName The personal attribute name. - */ - public void setName(final String attrName) { - this.name = attrName; - } - - /** - * Getter for the value. - * - * @return The list of values. - */ - public List getValue() { - return value; - } - - /** - * Setter for the list of values. - * - * @param attrValue The personal attribute value. - */ - public void setValue(final List attrValue) { - if (attrValue != null) { - this.value = attrValue; - } - } - - - /** - * Getter for the type value. - * - * @return The name value. - */ - public String getType() { - return type; - } - - /** - * Setter for the type value. - * - * @param attrName The personal attribute type. - */ - public void setType(final String attrType) { - this.type = attrType; - } - - /** - * Getter for the status. - * - * @return The status value. - */ - public String getStatus() { - return status; - } - - /** - * Setter for the status value. - * - * @param attrStatus The personal attribute status. - */ - public void setStatus(final String attrStatus) { - this.status = attrStatus; - } - - /** - * Getter for the complex value. - * - * @return The complex value. - */ - public Map getComplexValue() { - return complexValue; - } - - /** - * Setter for the complex value. - * - * @param complexVal The personal attribute Complex value. - */ - public void setComplexValue(final Map complexVal) { - if (complexVal != null) { - this.complexValue = complexVal; - } - } - - /** - * Getter for the personal's friendly name. - * - * @return The personal's friendly name value. - */ - public String getFriendlyName() { - return friendlyName; - } - - /** - * Setter for the personal's friendly name. - * - * @param fName The personal's friendly name. - */ - public void setFriendlyName(final String fName) { - this.friendlyName = fName; - } - - /** - * Return true the value is empty. - * - * @return True if the value is empty "[]"; - */ - public boolean isEmptyValue() { - return value.isEmpty() || (value.size() == 1 && value.get(0).length() == 0); - } - - /** - * Returns true if the Complex Value is empty. - * - * @return True if the Complex Value is empty; - */ - public boolean isEmptyComplexValue() { - return complexValue.isEmpty(); - } - - /** - * Returns true if the Status is empty. - * - * @return True if the Status is empty; - */ - public boolean isEmptyStatus() { - return (status == null || status.length() == 0); - } - - /** - * Prints the PersonalAttribute in the following format. - * name:required:[v,a,l,u,e,s]|[v=a,l=u,e=s]:status; - * - * @return The PersonalAttribute as a string. - */ - public String toString() { - final StringBuilder strBuild = new StringBuilder(); - - AttributeUtil.appendIfNotNull(strBuild, getName()); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - AttributeUtil.appendIfNotNull(strBuild, String.valueOf(isRequired())); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - strBuild.append('['); - - if (isEmptyValue()) { - if (!isEmptyComplexValue()) { - AttributeUtil.appendIfNotNull(strBuild, AttributeUtil.mapToString( - getComplexValue(), PEPSValues.ATTRIBUTE_VALUE_SEP.toString())); - } - } else { - AttributeUtil.appendIfNotNull( - strBuild, - AttributeUtil.listToString(getValue(), - PEPSValues.ATTRIBUTE_VALUE_SEP.toString())); - } - - strBuild.append(']'); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - AttributeUtil.appendIfNotNull(strBuild, getStatus()); - strBuild.append(PEPSValues.ATTRIBUTE_SEP.toString()); - - return strBuild.toString(); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java deleted file mode 100644 index 642b249d4..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.StringTokenizer; - -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the - * PersonalAttributeList. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.27 $, $Date: 2010-11-18 22:54:56 $ - * - * @see PersonalAttribute - */ -@SuppressWarnings("PMD") -public final class PersonalAttributeList extends - ConcurrentHashMap implements IPersonalAttributeList{ - - /** - * Logger object. - */ - private static final Logger LOG = Logger - .getLogger(PersonalAttributeList.class.getName()); - - /** - * Serial id. - */ - private static final long serialVersionUID = 7375127363889975062L; - - /** - * Hash with the latest fetched attribute name alias. - */ - private final transient Map latestAttrAlias = - new HashMap(); - - /** - * Hash with mapping number of alias or the attribute name. - */ - private final transient Map attrAliasNumber = - new HashMap(); - - /** - * Default constructor. - */ - public PersonalAttributeList() { - // The best practices recommend to call the super constructor. - super(); - } - - /** - * Constructor with initial capacity for the PersonalAttributeList size. - * - * @param capacity The initial capacity for the PersonalAttributeList. - */ - public PersonalAttributeList(final int capacity) { - super(capacity); - } - - /** - * {@inheritDoc} - */ - public Iterator iterator() { - return this.values().iterator(); - } - - /** - * {@inheritDoc} - */ - public PersonalAttribute get(final Object key) { - String attrName = (String) key; - - if (this.latestAttrAlias.containsKey(key)) { - attrName = attrName + this.latestAttrAlias.get(key); - } else { - if (this.attrAliasNumber.containsKey(key)) { - this.latestAttrAlias.put(attrName, this.attrAliasNumber.get(key)); - } - } - return super.get(attrName); - } - - /** - * {@inheritDoc} - */ - public void add(final PersonalAttribute value) { - if (value != null) { - this.put(value.getName(), value); - } - } - - /** - * {@inheritDoc} - */ - public PersonalAttribute put(final String key, final PersonalAttribute val) { - if (StringUtils.isNotEmpty(key) && val != null) { - // Validate if attribute name already exists! - String attrAlias = key; - if (this.containsKey(attrAlias)) { - //TODO isAgeOver should not be hardcoded, a better way of handling multipe isAgeOver requests should be implemented. - if (!val.isEmptyValue() && StringUtils.isNumeric(val.getValue().get(0)) && "isAgeOver".equals( val.getName() ) ) { - final String attrValue = val.getValue().get(0); - attrAlias = key + attrValue; - this.attrAliasNumber.put(key, Integer.valueOf(attrValue)); - } else { - final PersonalAttribute attr = super.get(key); - if (!attr.isEmptyValue() - && StringUtils.isNumeric(attr.getValue().get(0))) { - attrAlias = key + attr.getValue().get(0); - super.put(key, (PersonalAttribute) attr); - this.attrAliasNumber.put(key, null); - } - } - } - return super.put(attrAlias, val); - } else { - return null; - } - } - - /** - * {@inheritDoc} - */ - public void populate(final String attrList) { - final StringTokenizer strToken = - new StringTokenizer(attrList, PEPSValues.ATTRIBUTE_SEP.toString()); - - while (strToken.hasMoreTokens()) { - final PersonalAttribute persAttr = new PersonalAttribute(); - String[] tuples = - strToken.nextToken().split(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(), - AttributeConstants.NUMBER_TUPLES.intValue()); - - // Convert to the new format if needed! - tuples = convertFormat(tuples); - - if (AttributeUtil.hasValidTuples(tuples)) { - final int attrValueIndex = - AttributeConstants.ATTR_VALUE_INDEX.intValue(); - final String tmpAttrValue = - tuples[attrValueIndex].substring(1, - tuples[attrValueIndex].length() - 1); - final String[] vals = - tmpAttrValue.split(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - persAttr.setName(tuples[AttributeConstants.ATTR_NAME_INDEX.intValue()]); - persAttr.setIsRequired(Boolean - .valueOf(tuples[AttributeConstants.ATTR_TYPE_INDEX.intValue()])); - - // check if it is a complex value - if (isComplexValue(vals)) { - persAttr.setComplexValue(createComplexValue(vals)); - } - else - { - persAttr.setValue(createValues(vals)); - } - - if (tuples.length == AttributeConstants.NUMBER_TUPLES.intValue()) { - persAttr.setStatus(tuples[AttributeConstants.ATTR_STATUS_INDEX - .intValue()]); - } - this.put(tuples[AttributeConstants.ATTR_NAME_INDEX.intValue()], - persAttr); - - } else { - LOG.warn("Invalid personal attribute list tuples"); - } - - } - } - - /** - * Returns a copy of this IPersonalAttributeList instance. - * - * @return The copy of this IPersonalAttributeList. - */ - public Object clone() { - try { - return (PersonalAttributeList) super.clone(); - } catch (CloneNotSupportedException e) { - return null; - } - } - - /** - * Creates a string in the following format. - * - * attrName:attrType:[attrValue1,attrValue2=attrComplexValue]:attrStatus; - * - * @return {@inheritDoc} - */ - @Override - public String toString() { - final Iterator> itAttrs = - this.entrySet().iterator(); - final StringBuilder strBuilder = new StringBuilder(); - - while (itAttrs.hasNext()) { - final Entry attrEntry = itAttrs.next(); - final PersonalAttribute attr = attrEntry.getValue(); - //strBuilder.append(attr.toString()); - strBuilder.insert(0, attr.toString()); - } - - return strBuilder.toString(); - } - - /** - * Validates and creates the attribute's complex values. - * - * @param values The complex values. - * - * @return The {@link Map} with the complex values. - * - * @see Map - */ - private Map createComplexValue(final String[] values) { - final Map complexValue = new HashMap(); - for (final String val : values) { - final String[] tVal = val.split("="); - if (StringUtils.isNotEmpty(val) && tVal.length == 2) { - complexValue.put(tVal[0], AttributeUtil.unescape(tVal[1])); - } - } - return complexValue; - } - - /** - * Checks if value is complex or not - * @param values The values to check - * @return True if succesful - */ - private boolean isComplexValue(final String[] values) { - boolean isComplex = false; - if (values.length > 0) { - final String[] tVal = values[0].split("="); - if (StringUtils.isNotEmpty(values[0]) && tVal.length == 2) { - isComplex = true; - } - } - return isComplex; - } - - /** - * Validates and creates the attribute values. - * - * @param vals The attribute values. - * - * @return The {@link List} with the attribute values. - * - * @see List - */ - private List createValues(final String[] vals) { - final List values = new ArrayList(); - for (final String val : vals) { - if (StringUtils.isNotEmpty(val)) { - values.add(AttributeUtil.unescape(val)); - } - } - return values; - } - - /** - * Converts the attribute tuple (attrName:attrType...) to the new format. - * - * @param tuples The attribute tuples to convert. - * - * @return The attribute tuples in the new format. - */ - private String[] convertFormat(final String[] tuples) { - final String[] newFormatTuples = - new String[AttributeConstants.NUMBER_TUPLES.intValue()]; - if (tuples != null) { - System.arraycopy(tuples, 0, newFormatTuples, 0, tuples.length); - - for (int i = tuples.length; i < newFormatTuples.length; i++) { - if (i == AttributeConstants.ATTR_VALUE_INDEX.intValue()) { - newFormatTuples[i] = "[]"; - } else { - newFormatTuples[i] = ""; - } - } - } - return newFormatTuples; - } - - /** - * Returns a IPersonalAttributeList of the complex attributes in this map. - * - * @return an IPersonalAttributeList of the complex attributes contained in this map. - */ - public IPersonalAttributeList getComplexAttributes() { - LOG.info("get complex attributes"); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for(PersonalAttribute attr: this) { - if(!attr.getComplexValue().isEmpty()) { - attrList.put(attr.getName(), attr); - LOG.info("adding complex attribute:"+attr.getName()); - } - } - return attrList; - } - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - public IPersonalAttributeList getSimpleValueAttributes() { - LOG.info("get simple attributes"); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for(PersonalAttribute attr: this) { - if(attr.getComplexValue().isEmpty()) { - attrList.put(attr.getName(), attr); - LOG.info("adding simple attribute:"+attr.getName()); - } - } - return attrList; - } - - - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - public IPersonalAttributeList getMandatoryAttributes() { - return getAttributesByParam(true); - } - - - /** - * Returns a IPersonalAttributeList of the attributes in this map by parameter value. - * - * @param compareValue The boolean to get mandatory (true) or optional (false) attributes. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map if compareValue is true or optional otherwise. - */ - private IPersonalAttributeList getAttributesByParam(final boolean compareValue) { - LOG.info("get attributes by param :"+compareValue); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for(PersonalAttribute attr: this) { - if(attr.isRequired() == compareValue) { - attrList.put(attr.getName(), attr); - LOG.info("adding attribute:"+attr.getName()); - } - } - return attrList; - } - - - /** - * Returns a IPersonalAttributeList of the optional attributes in this map. - * - * @return an IPersonalAttributeList of the optional attributes contained in this map. - */ - public IPersonalAttributeList getOptionalAttributes() { - return getAttributesByParam(false); - } - - /** - * {@inheritDoc} - */ - public boolean hasMissingValues() { - for(PersonalAttribute attr: this) { - if(attr.isEmptyValue() && attr.isEmptyComplexValue()) { - return true; - } - } - return false; - } -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java deleted file mode 100644 index 65936f1a8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java +++ /dev/null @@ -1,447 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -import org.apache.log4j.Logger; - -public class STORKAttrQueryRequest implements Serializable, Cloneable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4778480781609392750L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAttrQueryRequest.class - .getName()); - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The assertion consumer service url. */ - private String serviceURL; - - /** The distinguished name. */ - private String distinguishedName; - - /** The e id sector share. */ - private boolean eIDSectorShare; - - /** The e id cross sector share. */ - private boolean eIDCrossSectorShare; - - /** The e id cross border share. */ - private boolean eIDCrossBorderShare; - - /** The personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The country. */ - private String country; - - /** The citizen country code. */ - private String citizenCountry; - - /** The Service Provider ID. */ - private String sPID; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the SP ID. - * - * @return sPID The SP ID. - */ - public String getSPID() { - return sPID; - } - - /** - * Sets the SP ID. - * - * @param sPId The new sp samlId. - */ - public void setSPID(final String sPId) { - this.sPID = sPId; - } - - /** - * Gets the citizen country code. - * - * @return The citizen country code value. - */ - public String getCitizenCountryCode() { - return citizenCountry; - } - - /** - * Sets the citizen country code. - * - * @param countryCode the new citizen country code value. - */ - public void setCitizenCountryCode(final String countryCode) { - this.citizenCountry = countryCode; - } - - /** - * Gets the sp country. - * - * @return The sp country value. - */ - public String getSpCountry() { - return spCountry; - } - - /** - * Sets the sp country. - * - * @param sPCountry the new sp country value. - */ - public void setSpCountry(final String sPCountry) { - this.spCountry = sPCountry; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the serviceURL value. - * - * @return The serviceURL value. - */ - public String getAssertionConsumerServiceURL() { - return serviceURL; - } - - /** - * Setter for the serviceURL value. - * - * @param newServiceURL the assertion consumer service URL. - */ - public void setAssertionConsumerServiceURL(final String newServiceURL) { - this.serviceURL = newServiceURL; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - - /** - * Getter for the attributeList value. - * - * @return The attributeList value. - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) attributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the attributeList value. - * - * @param attrList the personal attribute list value. - * - * @see IPersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** - * Gets the service provider sector. - * - * @return The service provider sector value. - */ - public String getSpSector() { - return spSector; - } - - /** - * Sets the service provider sector. - * - * @param samlSPSector the new service provider sector value. - */ - public void setSpSector(final String samlSPSector) { - this.spSector = samlSPSector; - } - - /** - * Gets the service provider institution. - * - * @return The service provider institution value. - */ - public String getSpInstitution() { - return spInstitution; - } - - /** - * Sets the service provider institution. - * - * @param samlSPInst the new service provider institution value. - */ - public void setSpInstitution(final String samlSPInst) { - this.spInstitution = samlSPInst; - } - - /** - * Gets the service provider application. - * - * @return The service provider application value. - */ - public String getSpApplication() { - return spApplication; - } - - /** - * Sets the service provider application. - * - * @param samlSPApp the new service provider application value. - */ - public void setSpApplication(final String samlSPApp) { - this.spApplication = samlSPApp; - } - - /** - * Checks if is eId sector share. - * - * @return true, if is eId sector share. - */ - public boolean isEIDSectorShare() { - return eIDSectorShare; - } - - /** - * Sets the eId sector share. - * - * @param eIdSectorShare the new eId sector share value. - */ - public void setEIDSectorShare(final boolean eIdSectorShare) { - this.eIDSectorShare = eIdSectorShare; - } - - /** - * Checks if is eId cross sector share. - * - * @return true, if is eId cross sector share. - */ - public boolean isEIDCrossSectorShare() { - return eIDCrossSectorShare; - } - - /** - * Sets the eId cross sector share. - * - * @param eIdCrossSectorShare the new eId cross sector share value. - */ - public void setEIDCrossSectorShare(final boolean eIdCrossSectorShare) { - this.eIDCrossSectorShare = eIdCrossSectorShare; - } - - /** - * Checks if is eId cross border share. - * - * @return true, if is eId cross border share. - */ - public boolean isEIDCrossBorderShare() { - return eIDCrossBorderShare; - } - - /** - * Sets the eId cross border share. - * - * @param eIdCrossBorderShare the new eId cross border share value. - */ - public void setEIDCrossBorderShare(final boolean eIdCrossBorderShare) { - this.eIDCrossBorderShare = eIdCrossBorderShare; - } - - /** - * Returns a copy of this STORKAttrQueryRequest instance. - * - * @return The copy of this STORKAttrQueryRequest. - * @throws CloneNotSupportedException on clone exception - */ - @Override - public Object clone() throws CloneNotSupportedException{ - STORKAttrQueryRequest storkAttrQueryReq = null; - storkAttrQueryReq = (STORKAttrQueryRequest) super.clone(); - storkAttrQueryReq.setPersonalAttributeList(getPersonalAttributeList()); - storkAttrQueryReq.setTokenSaml(getTokenSaml()); - return storkAttrQueryReq; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java deleted file mode 100644 index 4e40d6d01..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.List; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; - -public class STORKAttrQueryResponse { - - /** Response Id. */ - private String samlId; - - /** Request failed? */ - private boolean fail; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Audience restriction. */ - private transient String audienceRest; - - /** Error message. */ - private String message; - - /** Id of the request that originated this response. */ - private String inResponseTo; - - /** Expiration date. */ - private DateTime notOnOrAfter; - - /** Creation date. */ - private DateTime notBefore; - - /** The SAML token. */ - private byte[] tokenSaml = new byte[0]; - - /** Country. */ - private String country; - - /** The complete assertion **/ - private Assertion assertion; - - /** List of all assertions in response **/ - private List assertions; - - /** The complete list from all assertions **/ - private transient IPersonalAttributeList totalAttributeList = new PersonalAttributeList(); - - /** All personal attribute lists **/ - private List attributeLists; - - /** Citizen's personal attribute list. */ - private transient IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAttrQueryResponse.class.getName()); - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Getter for audienceRest. - * - * @return The audienceRest value. - */ - public String getAudienceRestriction() { - return audienceRest; - } - - /** - * Setter for audienceRest. - * - * @param audRest the new audienceRest value. - */ - public void setAudienceRestriction(final String audRest) { - this.audienceRest = audRest; - } - - /** - * Getter for the samlToken. - * - * @return The samlToken value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Setter for samlToken. - * - * @param samlToken the new tokenSaml value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Getter for the country name. - * - * @return The country name value. - */ - public String getCountry() { - return country; - } - - /** - * Setter for the country name. - * - * @param cCountry the new country name value. - */ - public void setCountry(final String cCountry) { - this.country = cCountry; - } - - /** - * Getter for pal value. - * - * @return The pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) attributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the inResponseTo value. - * - * @return The inResponseTo value. - */ - public String getInResponseTo() { - return inResponseTo; - } - - /** - * Setter for the inResponseTo value. - * - * @param samlInResponseTo the new inResponseTo value. - */ - public void setInResponseTo(final String samlInResponseTo) { - this.inResponseTo = samlInResponseTo; - } - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the message value. - * - * @return The message value. - */ - public String getMessage() { - return message; - } - - /** - * Setter for the message value. - * - * @param msg the new message value. - */ - public void setMessage(final String msg) { - this.message = msg; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Setter for the statusCode value. - * - * @param status the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param nSamlId the new samlId value. - */ - public void setSamlId(final String nSamlId) { - this.samlId = nSamlId; - } - - /** - * Getter for the notOnOrAfter value. - * - * @return The notOnOrAfter value. - * - * @see DateTime - */ - public DateTime getNotOnOrAfter() { - return this.notOnOrAfter; - } - - /** - * Setter for the notOnOrAfter value. - * - * @param nOnOrAfter the new notOnOrAfter value. - * - * @see DateTime - */ - public void setNotOnOrAfter(final DateTime nOnOrAfter) { - this.notOnOrAfter = nOnOrAfter; - } - - /** - * Getter for the notBefore value. - * - * @return The notBefore value. - * - * @see DateTime - */ - public DateTime getNotBefore() { - return notBefore; - } - - /** - * Setter for the notBefore value. - * - * @param nBefore the new notBefore value. - * - * @see DateTime - */ - public void setNotBefore(final DateTime nBefore) { - this.notBefore = nBefore; - } - - /** Get the assertion from the response **/ - public Assertion getAssertion() { - return assertion; - } - - /** Set the assertion in the response **/ - public void setAssertion(final Assertion nAssertion) { - this.assertion = nAssertion; - } - - public void setAssertions(List newAssert) { - this.assertions = newAssert; - } - - public List getAssertions() { - return assertions; - } - - /** - * Getter for the toal pal value. - * - * @return The total pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getTotalPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) totalAttributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the total Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setTotalPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.totalAttributeList = attrList; - } - } - - /** - * Getter for personal attribute lists - * - * @return The lists - * - * @see PersonalAttributeList - */ - public List getPersonalAttributeLists() { - return attributeLists; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeLists(final List attrLists) { - if (attrLists != null) { - this.attributeLists = attrLists; - } - } - -} - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java deleted file mode 100644 index 2354d0eb1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the - * STORKAuthnRequest (SAML Token Request). - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.21 $, $Date: 2011-02-17 22:44:34 $ - */ -public final class STORKAuthnRequest implements Serializable, Cloneable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4778480781609392750L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAuthnRequest.class - .getName()); - - /** The samlId. */ - private String samlId; - - /** The assertion consumer service url. */ - private String serviceURL; - - /** The destination. */ - private String destination; - - /** The provider name. */ - private String providerName; - - /** The distinguished name. */ - private String distinguishedName; - - /** The e id sector share. */ - private boolean eIDSectorShare; - - /** The e id cross sector share. */ - private boolean eIDCrossSectorShare; - - /** The e id cross border share. */ - private boolean eIDCrossBorderShare; - - /** The personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The country. */ - private String country; - - /** The citizen country code. */ - private String citizenCountry; - - /** The Service Provider ID. */ - private String sPID; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the SP ID. - * - * @return sPID The SP ID. - */ - public String getSPID() { - return sPID; - } - - /** - * Sets the SP ID. - * - * @param sPId The new sp samlId. - */ - public void setSPID(final String sPId) { - this.sPID = sPId; - } - - /** - * Gets the citizen country code. - * - * @return The citizen country code value. - */ - public String getCitizenCountryCode() { - return citizenCountry; - } - - /** - * Sets the citizen country code. - * - * @param countryCode the new citizen country code value. - */ - public void setCitizenCountryCode(final String countryCode) { - this.citizenCountry = countryCode; - } - - /** - * Gets the sp country. - * - * @return The sp country value. - */ - public String getSpCountry() { - return spCountry; - } - - /** - * Sets the sp country. - * - * @param sPCountry the new sp country value. - */ - public void setSpCountry(final String sPCountry) { - this.spCountry = sPCountry; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the serviceURL value. - * - * @return The serviceURL value. - */ - public String getAssertionConsumerServiceURL() { - return serviceURL; - } - - /** - * Setter for the serviceURL value. - * - * @param newServiceURL the assertion consumer service URL. - */ - public void setAssertionConsumerServiceURL(final String newServiceURL) { - this.serviceURL = newServiceURL; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the providerName value. - * - * @return The provider name value. - */ - public String getProviderName() { - return providerName; - } - - /** - * Setter for the providerName value. - * - * @param samlProvider the provider name value. - */ - public void setProviderName(final String samlProvider) { - this.providerName = samlProvider; - } - - /** - * Getter for the attributeList value. - * - * @return The attributeList value. - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) attributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the attributeList value. - * - * @param attrList the personal attribute list value. - * - * @see IPersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** - * Gets the service provider sector. - * - * @return The service provider sector value. - */ - public String getSpSector() { - return spSector; - } - - /** - * Sets the service provider sector. - * - * @param samlSPSector the new service provider sector value. - */ - public void setSpSector(final String samlSPSector) { - this.spSector = samlSPSector; - } - - /** - * Gets the service provider institution. - * - * @return The service provider institution value. - */ - public String getSpInstitution() { - return spInstitution; - } - - /** - * Sets the service provider institution. - * - * @param samlSPInst the new service provider institution value. - */ - public void setSpInstitution(final String samlSPInst) { - this.spInstitution = samlSPInst; - } - - /** - * Gets the service provider application. - * - * @return The service provider application value. - */ - public String getSpApplication() { - return spApplication; - } - - /** - * Sets the service provider application. - * - * @param samlSPApp the new service provider application value. - */ - public void setSpApplication(final String samlSPApp) { - this.spApplication = samlSPApp; - } - - /** - * Checks if is eId sector share. - * - * @return true, if is eId sector share. - */ - public boolean isEIDSectorShare() { - return eIDSectorShare; - } - - /** - * Sets the eId sector share. - * - * @param eIdSectorShare the new eId sector share value. - */ - public void setEIDSectorShare(final boolean eIdSectorShare) { - this.eIDSectorShare = eIdSectorShare; - } - - /** - * Checks if is eId cross sector share. - * - * @return true, if is eId cross sector share. - */ - public boolean isEIDCrossSectorShare() { - return eIDCrossSectorShare; - } - - /** - * Sets the eId cross sector share. - * - * @param eIdCrossSectorShare the new eId cross sector share value. - */ - public void setEIDCrossSectorShare(final boolean eIdCrossSectorShare) { - this.eIDCrossSectorShare = eIdCrossSectorShare; - } - - /** - * Checks if is eId cross border share. - * - * @return true, if is eId cross border share. - */ - public boolean isEIDCrossBorderShare() { - return eIDCrossBorderShare; - } - - /** - * Sets the eId cross border share. - * - * @param eIdCrossBorderShare the new eId cross border share value. - */ - public void setEIDCrossBorderShare(final boolean eIdCrossBorderShare) { - this.eIDCrossBorderShare = eIdCrossBorderShare; - } - - /** - * Returns a copy of this STORKAuthnRequest instance. - * - * @return The copy of this STORKAuthnRequest. - * @throws CloneNotSupportedException on clone exception - */ - @Override - public Object clone() throws CloneNotSupportedException{ - STORKAuthnRequest storkAuthnReq = null; - try { - storkAuthnReq = (STORKAuthnRequest) super.clone(); - storkAuthnReq.setPersonalAttributeList(getPersonalAttributeList()); - storkAuthnReq.setTokenSaml(getTokenSaml()); - } catch (final CloneNotSupportedException e) { - // assert false; - LOG.trace("[PersonalAttribute] Nothing to do."); - } - - return storkAuthnReq; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java deleted file mode 100644 index 84fadd023..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.List; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; - -/** - * This class is a bean used to store the information relative to the - * STORKAuthnResponse. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class STORKAuthnResponse { - - /** Response Id. */ - private String samlId; - - /** Authentication failed? */ - private boolean fail; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Audience restriction. */ - private transient String audienceRest; - - /** Error message. */ - private String message; - - /** Id of the request that originated this response. */ - private String inResponseTo; - - /** Expiration date. */ - private DateTime notOnOrAfter; - - /** Creation date. */ - private DateTime notBefore; - - /** The SAML token. */ - private byte[] tokenSaml = new byte[0]; - - /** Country. */ - private String country; - - /** Citizen's personal attribute list. */ - private transient IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** List of all assertions in response **/ - private List assertions; - - /** The complete list from all assertions **/ - private transient IPersonalAttributeList totalAttributeList = new PersonalAttributeList(); - - /** All personal attribute lists **/ - private List attributeLists; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAuthnResponse.class.getName()); - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Getter for audienceRest. - * - * @return The audienceRest value. - */ - public String getAudienceRestriction() { - return audienceRest; - } - - /** - * Setter for audienceRest. - * - * @param audRest the new audienceRest value. - */ - public void setAudienceRestriction(final String audRest) { - this.audienceRest = audRest; - } - - /** - * Getter for the samlToken. - * - * @return The samlToken value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Setter for samlToken. - * - * @param samlToken the new tokenSaml value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Getter for the country name. - * - * @return The country name value. - */ - public String getCountry() { - return country; - } - - /** - * Setter for the country name. - * - * @param cCountry the new country name value. - */ - public void setCountry(final String cCountry) { - this.country = cCountry; - } - - /** - * Getter for pal value. - * - * @return The pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) attributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the inResponseTo value. - * - * @return The inResponseTo value. - */ - public String getInResponseTo() { - return inResponseTo; - } - - /** - * Setter for the inResponseTo value. - * - * @param samlInResponseTo the new inResponseTo value. - */ - public void setInResponseTo(final String samlInResponseTo) { - this.inResponseTo = samlInResponseTo; - } - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the message value. - * - * @return The message value. - */ - public String getMessage() { - return message; - } - - /** - * Setter for the message value. - * - * @param msg the new message value. - */ - public void setMessage(final String msg) { - this.message = msg; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Setter for the statusCode value. - * - * @param status the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param nSamlId the new samlId value. - */ - public void setSamlId(final String nSamlId) { - this.samlId = nSamlId; - } - - /** - * Getter for the notOnOrAfter value. - * - * @return The notOnOrAfter value. - * - * @see DateTime - */ - public DateTime getNotOnOrAfter() { - return this.notOnOrAfter; - } - - /** - * Setter for the notOnOrAfter value. - * - * @param nOnOrAfter the new notOnOrAfter value. - * - * @see DateTime - */ - public void setNotOnOrAfter(final DateTime nOnOrAfter) { - this.notOnOrAfter = nOnOrAfter; - } - - /** - * Getter for the notBefore value. - * - * @return The notBefore value. - * - * @see DateTime - */ - public DateTime getNotBefore() { - return notBefore; - } - - /** - * Setter for the notBefore value. - * - * @param nBefore the new notBefore value. - * - * @see DateTime - */ - public void setNotBefore(final DateTime nBefore) { - this.notBefore = nBefore; - } - - public void setAssertions(List newAssert) { - this.assertions = newAssert; - } - - public List getAssertions() { - return assertions; - } - - /** - * Getter for the toal pal value. - * - * @return The total pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getTotalPersonalAttributeList() { - IPersonalAttributeList personnalAttributeList = null; - try { - personnalAttributeList = (IPersonalAttributeList) totalAttributeList.clone(); - } catch (CloneNotSupportedException e1) { - LOG.trace("[PersonalAttribute] Nothing to do."); - } - return personnalAttributeList; - } - - /** - * Setter for the total Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setTotalPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.totalAttributeList = attrList; - } - } - - /** - * Getter for personal attribute lists - * - * @return The lists - * - * @see PersonalAttributeList - */ - public List getPersonalAttributeLists() { - return attributeLists; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeLists(final List attrLists) { - if (attrLists != null) { - this.attributeLists = attrLists; - } - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java deleted file mode 100644 index 44811aee2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java +++ /dev/null @@ -1,197 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -public class STORKLogoutRequest implements Serializable, Cloneable { - private static final long serialVersionUID = 4778480781609392750L; - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The distinguished name. */ - private String distinguishedName; - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The country. */ - private String country; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** The ID of principal as known to SP **/ - private String spProvidedId; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** Getter for spProvidedId **/ - public String getSpProvidedId() { - return spProvidedId; - } - - public void setSpProvidedId(final String nSpProvidedId) { - this.spProvidedId = nSpProvidedId; - } - - @Override - public Object clone() throws CloneNotSupportedException{ - STORKLogoutRequest storkLogoutRequest = null; - storkLogoutRequest = (STORKLogoutRequest) super.clone(); - storkLogoutRequest.setTokenSaml(getTokenSaml()); - return storkLogoutRequest; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java deleted file mode 100644 index 21b53a652..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java +++ /dev/null @@ -1,250 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -public class STORKLogoutResponse implements Serializable, Cloneable { - private static final long serialVersionUID = 4778480781609392750L; - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The distinguished name. */ - private String distinguishedName; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The country. */ - private String country; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Status message. */ - private String statusMessage; - - /** Logout failed? */ - private boolean fail; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Setter for the statusMessage value. - * - * @param status the new statusMessage value. - */ - public void setStatusMessage(final String status) { - this.statusMessage = status; - } - - /** - * Getter for the statusMessage value. - * - * @return The statusMessage value. - */ - public String getStatusMessage() { - return statusMessage; - } - - /** - * Setter for the statusCode value. - * - * @param status the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - @Override - public Object clone() throws CloneNotSupportedException{ - STORKLogoutResponse storkLogoutResponse = null; - storkLogoutResponse = (STORKLogoutResponse) super.clone(); - storkLogoutResponse.setTokenSaml(getTokenSaml()); - return storkLogoutResponse; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java deleted file mode 100644 index a9c4a156b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains the SAML Token Status Code. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum STORKStatusCode { - - /** URI for Requester status code. */ - REQUESTER_URI("urn:oasis:names:tc:SAML:2.0:status:Requester"), - - /** URI for Responder status code. */ - RESPONDER_URI("urn:oasis:names:tc:SAML:2.0:status:Responder"), - - /** URI for Success status code. */ - SUCCESS_URI("urn:oasis:names:tc:SAML:2.0:status:Success"), - - /** Attribute is Available. */ - STATUS_AVAILABLE("Available"), - - /** Attribute is NotAvailable. */ - STATUS_NOT_AVAILABLE("NotAvailable"), - - /** Attribute is Withheld. */ - STATUS_WITHHELD("Withheld"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val The Constant value. - */ - private STORKStatusCode(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java deleted file mode 100644 index 0a711c9b7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains the SAML Token Sub Status Code. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.7 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum STORKSubStatusCode { - - /** URI for AuthnFailed status code. */ - AUTHN_FAILED_URI("urn:oasis:names:tc:SAML:2.0:status:AuthnFailed"), - - /** URI for InvalidAttrNameOrValue status code. */ - INVALID_ATTR_NAME_VALUE_URI( - "urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue"), - - /** URI for InvalidNameIDPolicy status code. */ - INVALID_NAMEID_POLICY_URI( - "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"), - - /** URI for VersionMismatch status code. */ - VERSION_MISMATCH_URI("urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"), - - /** URI for RequestDenied status code. */ - REQUEST_DENIED_URI("urn:oasis:names:tc:SAML:2.0:status:RequestDenied"), - - /** URI for QaaNotSupported status code. */ - QAA_NOT_SUPPORTED( - "http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val The Constant value. - */ - private STORKSubStatusCode(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java deleted file mode 100644 index e9a96d7c2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -import java.io.Serializable; - -/** - * Abstract class to represent the various PEPS exceptions. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - */ -public abstract class AbstractPEPSException extends RuntimeException implements - Serializable { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = -1884417567740138022L; - - /** - * Error code. - */ - private String errorCode; - - /** - * Error message. - */ - private String errorMessage; - - /** - * SAML token. - */ - private String samlTokenFail; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param code The error code value. - * @param message The error message value. - */ - public AbstractPEPSException(final String code, final String message) { - - super(message); - this.errorCode = code; - this.errorMessage = message; - } - - /** - * Exception Constructor with the errorMessage as parameters and the Throwable - * cause. - * - * @param message The error message value. - * @param cause The throwable object. - */ - public AbstractPEPSException(final String message, final Throwable cause) { - - super(message, cause); - this.errorMessage = message; - } - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters and the Throwable cause. - * - * @param code The error code value. - * @param message The error message value. - * @param cause The throwable object. - */ - public AbstractPEPSException(final String code, final String message, - final Throwable cause) { - - super(message, cause); - this.errorCode = code; - this.errorMessage = message; - } - - /** - * Exception Constructor with three Strings representing the errorCode, - * errorMessage and encoded samlToken as parameters. - * - * @param code The error code value. - * @param message The error message value. - * @param samlToken The error SAML Token. - */ - public AbstractPEPSException(final String code, final String message, - final String samlToken) { - - super(message); - this.errorCode = code; - this.errorMessage = message; - this.samlTokenFail = samlToken; - } - - /** - * Constructor with SAML Token as argument. Error message and error code are - * embedded in the SAML. - * - * @param samlToken The error SAML Token. - */ - public AbstractPEPSException(final String samlToken) { - super(); - this.samlTokenFail = samlToken; - } - - /** - * Getter for errorCode. - * - * @return The errorCode value. - */ - public final String getErrorCode() { - return errorCode; - } - - /** - * Setter for errorCode. - * - * @param code The error code value. - */ - public final void setErrorCode(final String code) { - this.errorCode = code; - } - - /** - * Getter for errorMessage. - * - * @return The error Message value. - */ - public final String getErrorMessage() { - return errorMessage; - } - - /** - * Setter for errorMessage. - * - * @param message The error message value. - */ - public final void setErrorMessage(final String message) { - this.errorMessage = message; - } - - /** - * Getter for SAMLTokenFail. - * - * @return The error SAML Token. - */ - public final String getSamlTokenFail() { - return samlTokenFail; - } - - /** - * Setter for SAMLTokenFail. - * - * @param samlToken The error SAML token. - */ - public final void setSamlTokenFail(final String samlToken) { - this.samlTokenFail = samlToken; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java deleted file mode 100644 index 69cb20fdd..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * This exception is thrown by the C-PEPS service and holds the relative - * information to present to the citizen. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class CPEPSException extends RuntimeException { - - /** - * Serial id. - */ - private static final long serialVersionUID = -4012295047127999362L; - - /** - * Error code. - */ - private String errorCode; - - /** - * Error message. - */ - private String errorMessage; - - /** - * SAML token. - */ - private String samlTokenFail; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param samlToken The SAML Token. - * @param code The error code value. - * @param message The error message value. - */ - public CPEPSException(final String samlToken, final String code, - final String message) { - - super(message); - this.setErrorCode(code); - this.setErrorMessage(message); - this.setSamlTokenFail(samlToken); - } - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param samlToken The SAML Token. - * @param code The error code value. - * @param message The error message value. - * @param cause The original exception; - */ - public CPEPSException(final String samlToken, final String code, - final String message, final Throwable cause) { - - super(message, cause); - this.setErrorCode(code); - this.setErrorMessage(message); - this.setSamlTokenFail(samlToken); - } - - /** - * {@inheritDoc} - */ - public String getMessage() { - return this.getErrorMessage() + " (" + this.getErrorCode() + ")"; - } - - /** - * Getter for the error code. - * - * @return The errorCode value. - */ - public String getErrorCode() { - return errorCode; - } - - /** - * Setter for the error code. - * - * @param code The error code. - */ - public void setErrorCode(final String code) { - this.errorCode = code; - } - - /** - * Getter for the error message. - * - * @return The errorMessage value. - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Setter for the error message. - * - * @param message The error message. - */ - public void setErrorMessage(final String message) { - this.errorMessage = message; - } - - /** - * Getter for the samlTokenFail. - * - * @return The samlTokenFail value. - */ - public String getSamlTokenFail() { - return samlTokenFail; - } - - /** - * Setter for the samlTokenFail. - * - * @param samlToken The error Saml Token. - */ - public void setSamlTokenFail(final String samlToken) { - this.samlTokenFail = samlToken; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java deleted file mode 100644 index 67514d4fe..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Internal Error Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class InternalErrorPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 1193001455410319795L; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters and the Throwable cause. - * - * @param errorCode The error code value. - * @param errorMessage The error message value. - * @param cause The throwable object. - */ - public InternalErrorPEPSException(final String errorCode, - final String errorMessage, final Throwable cause) { - - super(errorCode, errorMessage, cause); - } - - /** - * Exception Constructor with three strings representing the errorCode, - * errorMessage and encoded samlToken as parameters. - * - * @param errorCode The error code value. - * @param errorMessage The error message value. - * @param samlTokenFail The error SAML Token. - */ - public InternalErrorPEPSException(final String errorCode, - final String errorMessage, final String samlTokenFail) { - - super(errorCode, errorMessage, samlTokenFail); - } - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param errorCode The error code value. - * @param errorMessage The error message value. - */ - public InternalErrorPEPSException(final String errorCode, - final String errorMessage) { - - super(errorCode, errorMessage); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java deleted file mode 100644 index 12c83b589..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Invalid Parameter Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.11 $, $Date: 2010-11-17 05:15:28 $ - * - * @see InvalidParameterPEPSException - */ -public class InvalidParameterPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 2046282148740524875L; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param errorCode The error code value. - * @param errorMessage The error code message value. - */ - public InvalidParameterPEPSException(final String errorCode, - final String errorMessage) { - super(errorCode, errorMessage); - } - - /** - * Exception Constructor with one String representing the encoded samlToken. - * - * @param samlTokenFail The error SAML Token. - */ - public InvalidParameterPEPSException(final String samlTokenFail) { - super(samlTokenFail); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java deleted file mode 100644 index 800525eee..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Invalid session Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.14 $, $Date: 2010-11-17 05:15:28 $ - * - * @see InvalidParameterPEPSException - */ -public class InvalidSessionPEPSException extends InvalidParameterPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 7147090160978319016L; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param errorCode The error code value. - * @param errorMessage The error message value. - */ - public InvalidSessionPEPSException(final String errorCode, - final String errorMessage) { - - super(errorCode, errorMessage); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java deleted file mode 100644 index fc27371d2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Security PEPS Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.18 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class SecurityPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 5605743302478554967L; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param errorCode The error code value. - * @param errorMsg The error message value. - */ - public SecurityPEPSException(final String errorCode, final String errorMsg) { - super(errorCode, errorMsg); - } - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters and the Throwable cause. - * - * @param errorCode The error code value. - * @param errorMessage The error message value. - * @param cause The throwable object. - */ - public SecurityPEPSException(final String errorCode, - final String errorMessage, final Throwable cause) { - - super(errorCode, errorMessage, cause); - } - - /** - * Exception Constructor with one String representing the encoded samlToken. - * - * @param samlTokenFail The error SAML Token. - */ - public SecurityPEPSException(final String samlTokenFail) { - super(samlTokenFail); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java deleted file mode 100644 index a2da61a02..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Security PEPS Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class StorkPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 8048033129798427574L; - - /** - * Exception Constructor with two Strings representing the errorCode and - * errorMessage as parameters. - * - * @param errorCode The error code value. - * @param errorMsg The error message value. - */ - public StorkPEPSException(final String errorCode, final String errorMsg) { - super(errorCode, errorMsg); - } - - /** - * {@inheritDoc} - */ - public String getMessage() { - - return "Security Error (" + this.getErrorCode() + ") processing request : " - + this.getErrorMessage(); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java deleted file mode 100644 index d83068beb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Package for the PEPS’ Exceptions handling. - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons.exceptions; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java deleted file mode 100644 index 19d45aaa2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Common Authentication Service functionalities to be deployed in every PEPS - * is contained in this package. - * In particular, it contains the SAML Engine that implements the SAML messages - * management - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons; diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java deleted file mode 100644 index 5c24cc5a8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import java.util.Map; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnResponse; - -/** - * Interface for Specific Authentication methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface IAUService { - - /** - * Prepares the citizen to be redirected to the IdP. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param session The session object. - * @param requestAttributes The Requested attributes. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] prepareCitizenAuthentication(IPersonalAttributeList personalList, - Map parameters, Map requestAttributes, - IStorkSession session); - - /** - * Prepares the citizen to be redirected to the PV. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param session The session object. - * @param requestAttributes The Requested attributes. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] preparePVRequest(IPersonalAttributeList personalList, - Map parameters, Map requestAttributes, - IStorkSession session); - - /** - * Authenticates a citizen. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param requestAttributes The requested attributes. - * - * @return The updated Personal Attribute List. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList authenticateCitizen( - IPersonalAttributeList personalList, Map parameters, - Map requestAttributes); - - /** - * Validates a power. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param requestAttributes The requested attributes. - * - * @return The updated Personal Attribute List (power validated). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList powerValidation( - IPersonalAttributeList personalList, Map parameters, - Map requestAttributes); - - /** - * Prepares the Citizen browser to be redirected to the AP. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param session The session object. - * @param requestAttributes The requested attributes. - * - * @return true in case of no error. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - boolean prepareAPRedirect(IPersonalAttributeList personalList, - Map parameters, Map requestAttributes, - IStorkSession session); - - /** - * Returns the attributes values from the AP. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param requestAttributes The request attributes. - * - * @return The updated Personal Attribute List. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList getAttributesFromAttributeProviders( - IPersonalAttributeList personalList, Map parameters, - Map requestAttributes); - - /** - * Get the attributes from the AP with verification. - * - * @param personalList The Personal Attribute List. - * @param parameters The HTTP Parameters. - * @param requestAttributes The requested Attributes. - * @param session The session object. - * @param auProcessId The SAML identifier. - * - * @return true if the attributes were correctly verified. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - boolean getAttributesWithVerification(IPersonalAttributeList personalList, - Map parameters, Map requestAttributes, - IStorkSession session, String auProcessId); - - /** - * Validates a SAML Response. - * - * @param samlToken The SAML Token. - * @param session The session object. - * - * @return the STORKAuthnResponse associated with the validated response. - * - * @see IStorkSession - */ - STORKAuthnResponse processAuthenticationResponse(byte[] samlToken, - IStorkSession session); - - /** - * Generates a SAML Response in case of error. - * - * @param inResponseTo The SAML's identifier to response. - * @param issuer The issuer value. - * @param assertionURL The assertion URL. - * @param code The error code. - * @param subcode The sub error code. - * @param message The error message. - * @param ipUserAddress The user IP address. - * - * @return byte[] containing the SAML Response. - */ - byte[] generateErrorAuthenticationResponse(String inResponseTo, - String issuer, String assertionURL, String code, String subcode, - String message, String ipUserAddress); - - /** - * Compares two given personal attribute lists. - * - * @param original The original Personal Attribute List. - * @param modified The modified Personal Attribute List. - * @return true if the original list contains the modified one. False - * otherwise. - * - * @see IPersonalAttributeList - */ - boolean comparePersonalAttributeLists(IPersonalAttributeList original, - IPersonalAttributeList modified); - - /** - * Prepares the citizen to be redirected to the AtP. - * - * @param personalList The Personal Attribute List. - * @param parameters The parameters. - * @param session The session object. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] prepareAttributeRequest(IPersonalAttributeList personalList, - Map parameters, IStorkSession session); - - /** - * Validates a SAML Response. - * - * @param samlToken The SAML Token. - * @param session The session object. - * - * @return the STORKAttrQueryResponse associated with the validated response. - * - * @see IStorkSession - */ - STORKAttrQueryResponse processAttributeResponse(byte[] samlToken, - IStorkSession session); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java deleted file mode 100644 index 31a8d78ff..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import java.util.List; - -/** - * Interface that defines the methods to work with the validation of attributes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface ICheckAttributeValue { - - /** - * Checks if the list of values contains the expected value. - * - * @param values The List of values. - * @param expectedValue The value to check if it exists on the list. - * - * @return boolean true, if the value is present in the list. False, - * otherwise. - */ - boolean checkValue(List values, String expectedValue); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java deleted file mode 100644 index 78eb53004..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.PersonalAttribute; - -/** - * Interface that defines the methods to work with derivation of attributes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface IDeriveAttribute { - - /** - * Derives the attribute value. Set the Personal Attribute value to null if - * the value in session or the value of age are invalid (non-numeric or null). - * - * @param personalAttrList The Personal Attribute List. - * @param session The session object. - * - * @see PersonalAttribute The personal Attribute - * @see IStorkSession The session object. - */ - void deriveAttributeToData(PersonalAttribute personalAttrList, - IStorkSession session); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java deleted file mode 100644 index ca2114e32..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.PersonalAttribute; - -/** - * Interface for attribute's value normalisation. - * - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface INormaliseValue { - - /** - * Translates the attribute's value from local format to STORK format. - * - * @param personalAttribute The Personal Attribute to normalise the value. - * - * @see PersonalAttribute - */ - void normaliseAttributeValueToStork(PersonalAttribute personalAttribute); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java deleted file mode 100644 index 8a33897d8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.STORKAuthnRequest; - -/** - * Interface for attributes normalization. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface ITranslatorService { - - /** - * Translates the attributes from local format to STORK format. - * - * @param personalList The Personal Attribute List. - * - * @return The Personal Attribute List with normalised attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeNamesToStork( - IPersonalAttributeList personalList); - - /** - * Translates the attributes values from local format to STORK format. - * - * @param personalList The Personal Attribute List. - * - * @return The PersonalAttributeList with normalised values. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeValuesToStork( - IPersonalAttributeList personalList); - - /** - * Translates the attributes from STORK format to local format. - * - * @param personalList The Personal Attribute List. - * - * @return The PersonalAttributeList with normalised attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeNamesFromStork( - IPersonalAttributeList personalList); - - /** - * Derive Attribute Names To Stork format. - * - * @param personalList The Personal Attribute List, - * - * @return The PersonalAttributeList with derived attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList deriveAttributeFromStork( - IPersonalAttributeList personalList); - - /** - * Derive Attribute Names from Stork format. - * - * @param session The session object. - * @param modifiedList The Personal Attribute List. - * - * @return The PersonalAttributeList with derived attributes. - * - * @see IStorkSession - * @see IPersonalAttributeList - */ - IPersonalAttributeList deriveAttributeToStork(IStorkSession session, - IPersonalAttributeList modifiedList); - - /** - * Validate the values of the attributes. - * - * @param pal The attribute list - * - * @return True, if all the attributes have values. False, otherwise. - * - * @see STORKAuthnRequest - */ - boolean checkAttributeValues(IPersonalAttributeList pa); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java deleted file mode 100644 index a25c52311..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Specific PEPS Interfaces that implements functionality of the Authentication - * Service. - * - * @since 1.0 - */ -package eu.stork.peps.auth.specific; - diff --git a/id/server/stork2-commons/src/main/resources/log4j.xml b/id/server/stork2-commons/src/main/resources/log4j.xml deleted file mode 100644 index 8bce0bec0..000000000 --- a/id/server/stork2-commons/src/main/resources/log4j.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java deleted file mode 100644 index 2e8cc2e62..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java +++ /dev/null @@ -1,134 +0,0 @@ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeProvider; -import eu.stork.peps.auth.commons.AttributeProvidersMap; -import eu.stork.peps.auth.commons.AttributeSource; -import eu.stork.peps.auth.commons.Country; -import eu.stork.peps.auth.commons.IAttributeProvidersMap; -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttributeList; - -/** - * The AttributeSource's Test Case. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: $, $Date: $ - */ -public class AttributeProvidersMapTestCase { - - @Test - public void testObjectOK1() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(source) ) { - outcome = true; - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK2() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(source) ) { - if ( map.get(source)!=null ) { - outcome = true; - } - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK3() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(target) ) { - outcome = true; - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK4() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(target) ) { - if ( map.get(target)!=null ) { - outcome = true; - } - } - - assertTrue(outcome); - } - - @Test - public void testObjectNOK1() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - AttributeSource target = new AttributeSource(new Country("ID1", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(target) ) { - outcome = true; - } - - assertFalse(outcome); - } - - @Test - public void testObjectNOK2() { - IAttributeProvidersMap map = new AttributeProvidersMap(); - AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL"); - AttributeSource target = new AttributeSource(new AttributeProvider("ID2", "Name 1"), "URL"); - IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if ( map.containsKey(target) ) { - outcome = true; - } - - assertFalse(outcome); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java deleted file mode 100644 index 31cabb612..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java +++ /dev/null @@ -1,88 +0,0 @@ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeProvider; -import eu.stork.peps.auth.commons.AttributeSource; -import eu.stork.peps.auth.commons.Country; - -/** - * The AttributeSource's Test Case. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: $, $Date: $ - */ -public final class AttributeSourceTestCase { - private AttributeSource ap1 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); - private AttributeSource ap2 = new AttributeSource(new AttributeProvider("ID2", "Name 2"), "URL2"); - private AttributeSource ap3 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL2"); - private AttributeSource ap4 = new AttributeSource(new AttributeProvider("ID1", "Name 2"), "URL1"); - private AttributeSource ap5 = new AttributeSource(new AttributeProvider("ID1", "Name 1"), "URL1"); - - private AttributeSource c1 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - private AttributeSource c2 = new AttributeSource(new Country("ID2", "Name 2"), "URL2"); - private AttributeSource c3 = new AttributeSource(new Country("ID1", "Name 2"), "URL2"); - private AttributeSource c4 = new AttributeSource(new Country("ID1", "Name 2"), "URL1"); - private AttributeSource c5 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - - @Test - public void testNotEquals1() { - assertFalse(ap1.equals(ap2)); - } - - @Test - public void testNotEquals2() { - assertFalse(ap1.equals(c1)); - } - - @Test - public void testNotEquals3() { - assertFalse(c1.equals(c2)); - } - - @Test - public void testEquals1() { - assertTrue(ap1.equals(ap3)); - } - - @Test - public void testEquals2() { - assertTrue(ap1.equals(ap4)); - } - - @Test - public void testEquals3() { - assertTrue(ap1.equals(ap5)); - } - - @Test - public void testEquals4() { - assertTrue(c1.equals(c3)); - } - - @Test - public void testEquals5() { - assertTrue(c1.equals(c4)); - } - - @Test - public void testEquals6() { - assertTrue(c1.equals(c5)); - } - - @Test - public void testEquals7() { - Object obj = ap5; - assertTrue(ap1.equals(obj)); - } - - @Test - public void testEquals8() { - Object obj = c5; - assertTrue(c1.equals(obj)); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java deleted file mode 100644 index 77fc4b9c2..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java +++ /dev/null @@ -1,537 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeUtil; -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSValues; -import eu.stork.peps.auth.commons.PersonalAttributeList; - -/** - * The AttributeUtil's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com - * - * @version $Revision: $, $Date: $ - */ -public final class AttributeUtilTestCase { - - /** - * Empty String to be used on the tests. - */ - private static final String EMPTY_STRING = ""; - - /** - * Tuple value sample to be used on the tests. - */ - private static final String[] TUPLE_STRING = new String[] { "age", "true", - "[18]", "Available" }; - - /** - * Complex value to be used on escape/unescape tests. - */ - private static final String COMPLEX_VAL = "postalCode=4100," - + "apartmentNumber=A,state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto,"; - - /** - * Escaped Complex value to be used on escape/unescape tests. - */ - private static final String ESC_COMPLEX_VAL = "postalCode=4100%44" - + "apartmentNumber=A%44state=Porto%44countryCodeAddress=PT%44" - + "streetNumber=379%44streetName=Avenida Sidonio Pais%44town=Porto%44"; - - /** - * Simple value to be used on escape/unescape tests. - */ - private static final String SIMPLE_VAL = "Avenida da Boavista, Porto"; - - /** - * Escaped simple value to be used on escape/unescape tests. - */ - private static final String ESC_SIMPLE_VAL = "Avenida da Boavista%44 Porto"; - - /** - * Simple text to be used on escape/unescape tests. Must match the escaped - * text. - */ - private static final String SIMPLE_TEXT = "John Doe"; - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given complex - * attribute value (canonical address' example attribute value). - */ - @Test - public void testEscapeSpecialCharsComplexVal() { - assertEquals(AttributeUtil.escape(COMPLEX_VAL), ESC_COMPLEX_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * attribute value. - */ - @Test - public void testEscapeSpecialCharsVal() { - assertEquals(AttributeUtil.escape(SIMPLE_VAL), ESC_SIMPLE_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given simple - * text: no special characters to escape. - */ - @Test - public void testEscapeNormalChars() { - assertEquals(AttributeUtil.escape(SIMPLE_TEXT), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#unescape(String)} method for the given - * escape complex attribute value (canonical address' example attribute - * value). - */ - @Test - public void testUnescapeSpecialCharsComplexVal() { - assertEquals(AttributeUtil.unescape(ESC_COMPLEX_VAL), COMPLEX_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given escape - * attribute value. - */ - @Test - public void testUnescapeSpecialCharsVal() { - assertEquals(AttributeUtil.unescape(ESC_SIMPLE_VAL), SIMPLE_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given simple - * text: no special characters to unescape. - */ - @Test - public void testUnescapeNormalChars() { - assertEquals(AttributeUtil.unescape(SIMPLE_TEXT), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given empty string. - */ - @Test - public void testAppendIfNotNullEmptyStr() { - final StringBuilder strBuilder = new StringBuilder(SIMPLE_TEXT); - AttributeUtil.appendIfNotNull(strBuilder, EMPTY_STRING); - assertEquals(strBuilder.toString(), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given string. - */ - @Test - public void testAppendIfNotNullStr() { - final StringBuilder strBuilder = new StringBuilder(); - AttributeUtil.appendIfNotNull(strBuilder, SIMPLE_TEXT); - assertEquals(strBuilder.toString(), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given null value. - */ - @Test - public void testAppendIfNotNull() { - final StringBuilder strBuilder = new StringBuilder(); - AttributeUtil.appendIfNotNull(strBuilder, null); - assertEquals(strBuilder.toString(), EMPTY_STRING); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with two values. - */ - @Test - public void testListToStringTwoVals() { - final List vals = new ArrayList(); - vals.add(SIMPLE_VAL); - vals.add(SIMPLE_TEXT); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with one values. - */ - @Test - public void testListToStringOneVal() { - final List vals = new ArrayList(); - vals.add(SIMPLE_VAL); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with one value. - */ - @Test - public void testListToStringEmptyVal() { - final List vals = new ArrayList(); - - final StringBuilder strBuilder = new StringBuilder(); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#mapToString(java.util.Map, String)} method - * for the given Map with one value. - */ - @Test - public void testMapToStringOneVal() { - final Map vals = new HashMap(); - vals.put("CanonicalAddress", COMPLEX_VAL); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("CanonicalAddress="); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals(AttributeUtil.mapToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#mapToString(java.util.Map, String)} method - * for the given empty Map. - */ - @Test - public void testMapToStringEmptyVal() { - final Map vals = new HashMap(); - - final StringBuilder strBuilder = new StringBuilder(); - - assertEquals(AttributeUtil.mapToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * invalid List. - */ - @Test - public void testIsValidValueInvalidList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append("]"); - assertFalse(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * null value. - */ - @Test - public void testIsValidValueNullList() { - assertFalse(AttributeUtil.isValidValue(null)); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * empty List. - */ - @Test - public void testIsValidValueEmptyList() { - assertTrue(AttributeUtil.isValidValue("[]")); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * empty List. - */ - @Test - public void testIsValidValueEmptyCommaList() { - assertTrue(AttributeUtil.isValidValue("[,]")); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one simple value List. - */ - @Test - public void testIsValidValueOneValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one simple value List. - */ - @Test - public void testIsValidValueOneValueCommaList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one complex value List. - */ - @Test - public void testIsValidValueOneComplexValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one complex value List. - */ - @Test - public void testIsValidValueOneComplexValueCommaList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * multi value List. - */ - @Test - public void testIsValidValueMultiValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * invalid multi value List. - */ - @Test - public void testIsValidValueInvalidMultiValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertFalse(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * true type. - */ - @Test - public void testIsValidTypetrue() { - assertTrue(AttributeUtil.isValidType("true")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * True type. - */ - @Test - public void testIsValidTypeTrue() { - assertTrue(AttributeUtil.isValidType("True")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * TRUE type. - */ - @Test - public void testIsValidTypeTRUE() { - assertTrue(AttributeUtil.isValidType("TRUE")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * invalid type. - */ - @Test - public void testIsValidTypeInvalidType() { - assertFalse(AttributeUtil.isValidType("str")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * false type. - */ - @Test - public void testIsValidTypefalse() { - assertTrue(AttributeUtil.isValidType("false")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * False type. - */ - @Test - public void testIsValidTypeFalse() { - assertTrue(AttributeUtil.isValidType("False")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * FALSE type. - */ - @Test - public void testIsValidTypeFALSEVal() { - assertTrue(AttributeUtil.isValidType("False")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * null. - */ - @Test - public void testIsValidTypeNullVal() { - assertFalse(AttributeUtil.isValidType(null)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given valid tuple. - */ - @Test - public void testHasValidTuples() { - assertTrue(AttributeUtil.hasValidTuples(TUPLE_STRING)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given invalid tuple. - */ - @Test - public void testHasValidTuplesInvalid() { - final String[] tuple = new String[]{"name", "type"}; - assertFalse(AttributeUtil.hasValidTuples(tuple)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given invalid tuple with valid size. - */ - @Test - public void testHasValidTuplesSameSizeInvalidValues() { - final String[] tuple = new String[] { "age", "type", "[18]", "Available"}; - assertFalse(AttributeUtil.hasValidTuples(tuple)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given null value. - */ - @Test - public void testHasValidTuplesNull() { - assertFalse(AttributeUtil.hasValidTuples(null)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given attribute list.. - */ - @Test - public void testCheckMandatoryAttributes() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - attrList.populate("isAgeOver:true:[18,]:Available;"); - assertTrue(AttributeUtil.checkMandatoryAttributes(attrList)); - - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given null value. - */ - @Test(expected = NullPointerException.class) - public void testCheckMandatoryAttributesNullAttrList() { - assertTrue(AttributeUtil.checkMandatoryAttributes(null)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given empty attribute list. - */ - @Test - public void testCheckMandatoryAttributesEmptyAttrList() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - assertTrue(AttributeUtil.checkMandatoryAttributes(attrList)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given attribute list (missing mandatory attribute). - */ - @Test - public void testCheckMandatoryAttributesMissingAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - attrList.populate("isAgeOver:true:[]:NotAvailable;"); - assertFalse(AttributeUtil.checkMandatoryAttributes(attrList)); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java deleted file mode 100644 index 5d2296997..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.sql.Timestamp; -import java.util.Properties; - -import org.joda.time.DateTime; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.DateUtil; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.exceptions.SecurityPEPSException; - -/** - * The PersonalAttribute's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2010-11-17 05:17:03 $ - */ -public final class DateUtilTestCase { - - /** - * Stork Format date. - */ - private static final String FORMAT = "yyyyMMdd"; - - /** - * Expected 10 value. - */ - private static final int TEN = 10; - - /** - * Expected 11 value. - */ - private static final int ELEVEN = 11; - - /** - * The testing Date ("current" date). - */ - private static final DateTime TESTDATE = new DateTime(2011, 10, 10, 15, 20, - 0, 0); - - /** - * Init DateUtilTestCase class. - */ - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Properties configs = new Properties(); - configs.setProperty("invalidAgeDateValue.code", "35"); - configs.setProperty("invalidAttributeValue.code", "34"); - configs - .setProperty( - "invalidAttributeValue.message", - "Unexpected or invalid content was encountered within a " - + " or element."); - PEPSUtil.createInstance(configs); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year against - * the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromYear() { - Assert.assertTrue(TEN == DateUtil.calculateAge("2000", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and month - * against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromEarlyMonth() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("200001", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and month - * against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromSameMonth() { - Assert.assertTrue(TEN == DateUtil.calculateAge("200010", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and month - * against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromLaterMonth() { - Assert.assertTrue(TEN == DateUtil.calculateAge("200011", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromEarlyFullDate() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("20000101", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromSameDay() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("20001010", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromLaterFullDate() { - Assert.assertTrue(TEN == DateUtil - .calculateAge("20001011", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidDate() { - DateUtil.calculateAge("200", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidMonth() { - DateUtil.calculateAge("200013", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidDay() { - DateUtil.calculateAge("20000230", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullDate() { - DateUtil.calculateAge(null, TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullCurDate() { - DateUtil.calculateAge("2000", null, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullFormat() { - DateUtil.calculateAge("2000", TESTDATE, null); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return true - */ - @Test - public void isValidFormatDateFromYear() { - Assert.assertTrue(DateUtil.isValidFormatDate("2000", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year and - * month. Must return true. - */ - @Test - public void isValidFormatDateFromMonth() { - Assert.assertTrue(DateUtil.isValidFormatDate("200001", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDate() { - Assert.assertTrue(DateUtil.isValidFormatDate("20000101", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidYear() { - Assert.assertFalse(DateUtil.isValidFormatDate("200", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidMonth() { - Assert.assertFalse(DateUtil.isValidFormatDate("200013", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidDate() { - Assert.assertFalse(DateUtil.isValidFormatDate("20010229", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateNullDate() { - Assert.assertFalse(DateUtil.isValidFormatDate(null, FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateNullFormat() { - Assert.assertFalse(DateUtil.isValidFormatDate("2000", null)); - } - - /** - * Tests the {@link DateUtil#currentTimeStamp()} method for the current - * TimeStamp (TS). Must return true. - */ - @Test - public void testCurrentTimeStampBefore() { - Timestamp ts = DateUtil.currentTimeStamp(); - Assert.assertNotSame(ts, DateUtil.currentTimeStamp()); - } - - /** - * Tests the {@link DateUtil#currentTimeStamp()} method for the current - * TimeStamp (TS). Must return true. - */ - @Test - public void testCurrentTimeStampAfter() { - Timestamp ts = DateUtil.currentTimeStamp(); - Assert.assertEquals(DateUtil.currentTimeStamp(), ts); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java deleted file mode 100644 index d4841ed43..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; - -import java.util.Properties; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSErrors; -import eu.stork.peps.auth.commons.PEPSParameters; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; -import eu.stork.peps.auth.commons.exceptions.InvalidParameterPEPSException; - -/** - * The PEPSUtil's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com - * - * @version $Revision: $, $Date: $ - */ -public final class PEPSUtilTestCase { - - /** - * Message example. - */ - private static final String MESSAGE_SAMPLE = "003002 - Authentication Failed"; - - /** - * Error message example. - */ - private static final String ERROR_MESSAGE_SAMPLE = "Authentication Failed"; - - /** - * Error code example. - */ - private static final String ERROR_CODE_SAMPLE = "003002"; - - /** - * Properties values for testing proposes. - */ - private static final Properties CONFIGS1 = new Properties(); - - /** - * Properties values for testing proposes. - */ - private static final Properties CONFIGS2 = new Properties(); - - /** - * The empty string value: "". - */ - private static final String EMPTY_STRING = ""; - - /** - * The empty byte value: []. - */ - private static final byte[] EMPTY_BYTE = new byte[] {}; - - /** - * The empty byte hash value. - */ - private static final byte[] EMPTY_HASH_BYTE = new byte[] { -49, -125, -31, - 53, 126, -17, -72, -67, -15, 84, 40, 80, -42, 109, -128, 7, -42, 32, -28, - 5, 11, 87, 21, -36, -125, -12, -87, 33, -45, 108, -23, -50, 71, -48, -47, - 60, 93, -123, -14, -80, -1, -125, 24, -46, -121, 126, -20, 47, 99, -71, 49, - -67, 71, 65, 122, -127, -91, 56, 50, 122, -7, 39, -38, 62 }; - - /** - * The SAML example byte[] value. - */ - private static final byte[] SAML_BYTE_SAMPLE = new byte[] { 60, 115, 97, 109, - 108, 62, 46, 46, 46, 60, 47, 115, 97, 109, 108 }; - - /** - * The SAML's Base64 example value. - */ - private static final String SAML_BASE64_SAMPLE = "PHNhbWw+Li4uPC9zYW1s"; - - /** - * The SAML's Base64 byte[] example value. - */ - private static byte[] SAML_BASE64_BYTE_SAMPLE = new byte[] { 80, 72, 78, 104, - 98, 87, 119, 43, 76, 105, 52, 117, 80, 67, 57, 122, 89, 87, 49, 115 }; - - /** - * The SAML's Base64 Hash byte[] example value. - */ - private static byte[] HASH_BYTE_SAMPLE = new byte[] { 67, 38, 11, 115, 49, - -5, 54, -85, 38, 43, -99, 96, 71, -41, 50, -96, 71, -86, 90, -97, 66, -67, - 90, 101, 30, 82, -13, 60, -106, -72, -103, -75, 19, 2, -107, 107, -6, -56, - 34, -111, -44, -57, -26, -5, 33, 78, -1, 30, 21, 74, -26, 118, -46, -12, - -102, 12, -56, 30, -59, -104, -21, -42, -103, 82 }; - - /** - * Init PEPSUtilTestCase class. - */ - @BeforeClass - public static void runsBeforeTheTestSuite() { - - CONFIGS1.setProperty("max.attrList.size", "20000"); - CONFIGS1.setProperty("attrList.code", "202005"); - CONFIGS1.setProperty("attrList.message", "invalid.attrList.parameter"); - - CONFIGS1.setProperty("max.qaaLevel.size", "1"); - CONFIGS1.setProperty("max.spUrl.size", "inv"); - CONFIGS1.setProperty("validation.active", "true"); - CONFIGS1.setProperty("hashDigest.className", - "org.bouncycastle.crypto.digests.SHA512Digest"); - CONFIGS1.setProperty("invalidAgeDateValue.code", "35"); - CONFIGS1.setProperty("invalidAttributeValue.code", "34"); - CONFIGS1.setProperty("invalidAttributeValue.message", - "Unexpected or invalid content was encountered within a " - + " or element."); - } - - /** - * Tests the {@link PEPSUtil#createInstance(Properties)} method for the given - * properties object. - */ - @Test - public void testCreateInstance() { - Assert.assertNotNull(PEPSUtil.createInstance(CONFIGS2)); - } - - /** - * Tests the {@link PEPSUtil#getConfigs()}. - */ - @Test - public void testGetConfigs() { - final PEPSUtil pepsUtils = PEPSUtil.createInstance(CONFIGS1); - assertEquals(pepsUtils.getConfigs(), CONFIGS1); - } - - /** - * Tests the {@link PEPSUtil#getConfigs()}. - */ - @Test - public void testGetConfigsDifferent() { - final PEPSUtil pepsUtils = PEPSUtil.createInstance(CONFIGS1); - assertNotSame(pepsUtils.getConfigs(), CONFIGS2); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given existing - * config. - */ - @Test - public void testGetConfigExists() { - assertEquals(PEPSUtil.getConfig("hashDigest.className"), - "org.bouncycastle.crypto.digests.SHA512Digest"); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given not - * existing config. - */ - @Test - public void testGetConfigNoExists() { - assertNull(PEPSUtil.getConfig("doesnt.exists")); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given null - * value. - */ - @Test(expected = NullPointerException.class) - public void testGetConfigNull() { - assertNull(PEPSUtil.getConfig(null)); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterExists() { - assertTrue(PEPSUtil.isValidParameter("qaaLevel", "1")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterExistsGreat() { - assertFalse(PEPSUtil.isValidParameter("qaaLevel", "12")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterExistsIvalidConf() { - assertFalse(PEPSUtil - .isValidParameter("spUrl", "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterNotExists() { - assertFalse(PEPSUtil.isValidParameter("doesntexists", - "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterNullParamName() { - assertFalse(PEPSUtil.isValidParameter(null, "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for the - * given param values. - */ - @Test - public void testIsValidParameterNullParamValue() { - assertFalse(PEPSUtil.isValidParameter("spUrl", null)); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, Object)} method - * for the given object values. - */ - @Test - public void testValidateParameterValid() { - final IPersonalAttributeList persAttrList = new PersonalAttributeList(); - persAttrList.populate("isAgeOver:true:[15,]:Available;"); - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), persAttrList); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, Object)} method - * for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNull() { - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), null); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, String)} method - * for the given string values. - * - * The tested class just invokes - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * so further tests will be later. - */ - @Test - public void testValidateParameter() { - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), - "isAgeOver:true:[15,]:Available;"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, PEPSErrors)} - * method for the given string value and {@link PEPSErrors} enum. - * - * The tested class just invokes - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * so further tests will be later. - */ - @Test - public void testValidateParameterPEPSErrors() { - PEPSUtil.validateParameter("CountrySelectorAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), - "isAgeOver:true:[15,]:Available;", - PEPSErrors.SP_COUNTRY_SELECTOR_INVALID_ATTR); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test - public void testValidateParameterValidParams() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterInvalidParamValue() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", "10", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterInvalidParamName() { - PEPSUtil.validateParameter("ServiceProviderAction", "doesnt.exists", "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNullParamName() { - PEPSUtil.validateParameter("ServiceProviderAction", null, "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNullParamValue() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", null, - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * string value. - */ - @Test - public void testEncodeSAMLToken() { - assertEquals(PEPSUtil.encodeSAMLToken(SAML_BYTE_SAMPLE), SAML_BASE64_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * null. - */ - @Test(expected = NullPointerException.class) - public void testEncodeSAMLTokenNull() { - assertNotSame(PEPSUtil.encodeSAMLToken(null), SAML_BASE64_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * empty byte[] value. - */ - @Test - public void testEncodeSAMLTokenEmpty() { - assertEquals(PEPSUtil.encodeSAMLToken(EMPTY_BYTE), EMPTY_STRING); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * byte[] value. - */ - @Test - public void testDecodeSAMLToken() { - assertArrayEquals(PEPSUtil.decodeSAMLToken(SAML_BASE64_SAMPLE), - SAML_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * null value. - */ - @Test(expected = NullPointerException.class) - public void testDecodeSAMLTokenNull() { - assertNotSame(PEPSUtil.decodeSAMLToken(null), SAML_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * empty string value. - */ - @Test(expected = StringIndexOutOfBoundsException.class) - public void testDecodeSAMLTokenEmpty() { - assertTrue(PEPSUtil.decodeSAMLToken(EMPTY_STRING) == EMPTY_BYTE); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * byte[] value. - */ - @Test - public void testHashPersonalToken() { - assertArrayEquals(PEPSUtil.hashPersonalToken(SAML_BASE64_BYTE_SAMPLE), - HASH_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * null value. - */ - @Test(expected = InternalErrorPEPSException.class) - public void testHashPersonalTokenNull() { - assertNull(PEPSUtil.hashPersonalToken(null)); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * empty value. - */ - @Test - public void testHashPersonalTokenEmpty() { - assertArrayEquals(PEPSUtil.hashPersonalToken(EMPTY_BYTE), EMPTY_HASH_BYTE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * correct message. - */ - @Test - public void testGetStorkErrorCodeExists() { - assertEquals(PEPSUtil.getStorkErrorCode(MESSAGE_SAMPLE), ERROR_CODE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeNoExists() { - assertNull(PEPSUtil.getStorkErrorCode(ERROR_MESSAGE_SAMPLE)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * empty message. - */ - @Test - public void testGetStorkErrorCodeEmpty() { - assertNull(PEPSUtil.getStorkErrorCode(EMPTY_STRING)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * null message. - */ - @Test - public void testGetStorkErrorCodeNull() { - assertNull(PEPSUtil.getStorkErrorCode(null)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeWithSepFake() { - assertNull(PEPSUtil.getStorkErrorCode("-")); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeWithSepAndCodeFake() { - assertNull(PEPSUtil.getStorkErrorCode("000001 -")); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given correct message. - */ - @Test - public void testGetStorkErrorMessageExists() { - assertEquals(PEPSUtil.getStorkErrorMessage(MESSAGE_SAMPLE), - ERROR_MESSAGE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageNoExists() { - assertEquals(PEPSUtil.getStorkErrorMessage(ERROR_MESSAGE_SAMPLE), - ERROR_MESSAGE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given empty message. - */ - @Test - public void testGetStorkErrorMessageEmpty() { - assertEquals(PEPSUtil.getStorkErrorMessage(EMPTY_STRING), - EMPTY_STRING); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given null message. - */ - @Test - public void testGetStorkErrorMessageNull() { - assertNull(PEPSUtil.getStorkErrorMessage(null)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageWithSepFake() { - assertEquals(PEPSUtil.getStorkErrorMessage("-"),"-"); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageWithSepAndCodeFake() { - assertEquals(PEPSUtil.getStorkErrorMessage("000001 -"),"000001 -"); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java deleted file mode 100644 index 7052b320a..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java +++ /dev/null @@ -1,747 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKStatusCode; - -/** - * The PersonalAttributeList's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.5 $, $Date: 2010-11-17 05:17:02 $ - */ -public final class PersonalAttributeListTestCase { - - /** - * isAgeOver constant value. - */ - private static final String ISAGEOVER_CONS = "isAgeOver"; - - /** - * 1 constant value. - */ - private static final int ONE_CONS = 1; - - /** - * 2 constant value. - */ - private static final int TWO_CONS = 2; - - /** - * An empty attribute. - */ - @SuppressWarnings("unused") - private static final PersonalAttributeList EMPTY_ATTR_LIST = - new PersonalAttributeList(0); - - /** - * An attribute with a complex value (canonicalResidenceAddress). - */ - private static PersonalAttribute complexAttrValue = null; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST = - "isAgeOver:true:[15,]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST2 = - "isAgeOver:true:[18,]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST3 = - "isAgeOver:true:[15,]:Available;isAgeOver:true:[18,]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST3_REVERSE = - "isAgeOver:true:[18,]:Available;isAgeOver:true:[15,]:Available;"; - /** - * Simple attribute value list string. - */ - private static final String COMPLEX_ATTRLIST = - "canonicalResidenceAddress:true:[postalCode=4100,apartmentNumber=Ed. B," - + "state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto,]:Available;"; - /** - * Mix attribute list string. - */ - private static final String STR_MIX_ATTR_LIST = - "isAgeOver:true:[15,]:Available;canonicalResidenceAddress:true:[" - + "postalCode=4100,apartmentNumber=Ed.B,state=Porto,countryCodeAddress=PT," - + "streetNumber=379,streetName=Avenida Sidonio Pais,town=Porto,]:" - + "Available;"; - - /** - * Mix attribute list 2 string. - */ - private static final String STR_MIX_ATTR_LIST2 = - "isAgeOver:true:[15,]:Available;canonicalResidenceAddress:true:[" - + "postalCode=4100,apartmentNumber=Ed.B,state=Porto,countryCodeAddress=PT," - + "streetNumber=379,streetName=Avenida Sidonio Pais,town=Porto,]:Available;" - + "mandateContent:true:[" - + "isJoint=\"isjoint\",typeOfPower=\"power\",ValidTo=\"validto\",validfrom=\"validfrom\",AQAA=\"3\",isChained=\"ischained\",]:" - + "Available;"; - - /** - * Attribute List example. - */ - @SuppressWarnings({ "serial" }) - private static final PersonalAttribute ATTR_VALUE = new PersonalAttribute( - "age", true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - /** - * Init PersonalAttributeListTestCase class. - */ - @SuppressWarnings("serial") - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Map values = new HashMap() { - { - put("countryCodeAddress", "PT"); - put("state", "Porto"); - put("town", "Porto"); - put("postalCode", "4100"); - put("streetName", "Avenida Sidonio Pais"); - put("streetNumber", "379"); - put("apartmentNumber", "Ed. B"); - } - }; - - complexAttrValue = - new PersonalAttribute("canonicalResidenceAddress", true, values, - STORKStatusCode.STATUS_AVAILABLE.toString()); - - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must be - * size 1 - Simple attribute. - */ - @Test - public void testAddSimpleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(ATTR_VALUE); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must be - * size 1 - Complex attribute. - */ - @Test - public void testAddCompleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(complexAttrValue); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must be - * size 0 - no attribute. - */ - @Test - public void testAddNull() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(null); - Assert.assertTrue(attrList.size() == 0); - } - - /** - * Testing Personal Attribute List add method. Same attribute name added - * twice. Personal Attribute list must be size 2 - IsAgeOver attribute added - * twice. - */ - @SuppressWarnings("serial") - @Test - public void testAddSameAttrName() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertTrue(attrList.size() == 2); - } - - /** - * Testing Personal Attribute List add method. Same attribute name added - * twice. Personal Attribute list must be size 2 - IsAgeOver attribute added - * twice. - */ - @SuppressWarnings("serial") - @Test - public void testAddSameAttrNameEmpty() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add(""); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertTrue(attrList.size() == 2); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must be - * size 1 - Simple Value. - */ - @Test - public void testPutSimpleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(ATTR_VALUE.getName(), ATTR_VALUE); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must be - * size 1 - Complex Value. - */ - @Test - public void testPutComplexAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(ATTR_VALUE.getName(), complexAttrValue); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must be - * size 0 - no attribute. - */ - @Test - public void testPutNull() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put("", null); - Assert.assertTrue(attrList.size() == 0); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must be - * size 2 - IsAgeOver attribute added twice. - */ - @SuppressWarnings("serial") - @Test - public void testPutSameAttrName() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertTrue(attrList.size() == 2); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must be - * size 2 - IsAgeOver attribute added twice. - */ - @SuppressWarnings("serial") - @Test - public void testPutSameAttrNameEmpty() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add(""); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertTrue(attrList.size() == 2); - } - - /** - * Testing Personal Attribute List get method. Personal Attribute list must be - * size 1 - Simple attribute. - */ - @Test - public void testGetSimpleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(ATTR_VALUE); - Assert.assertEquals(ATTR_VALUE, attrList.get(ATTR_VALUE.getName())); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must be - * size 1 - Complex attribute. - */ - @Test - public void testGetCompleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(complexAttrValue); - Assert.assertEquals(complexAttrValue.toString(), - attrList.get(complexAttrValue.getName()).toString()); - } - - /** - * Testing Personal Attribute List get method. Personal Attribute list must be - * size 2 - IsAgeOver attribute. - */ - @SuppressWarnings("serial") - @Test - public void testGetIsAgeOverAttr() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertEquals(SIMPLE_ATTRLIST, - attrList.get(attrValueUnder.getName()).toString()); - Assert.assertEquals(SIMPLE_ATTRLIST2, - attrList.get(attrValueOver.getName()).toString()); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Simple attribute. - */ - @Test - public void testPopulateSimpleAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(SIMPLE_ATTRLIST); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Complex attribute. - */ - @Test - public void testPopulateComplexAttr() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(COMPLEX_ATTRLIST); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Simple and Complex attribute. - */ - @Test - public void testPopulateMixAttrs() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(attrList.size() == 2); - } - - /** - * Testing Personal Attribute List toString method using add. - */ - @SuppressWarnings("serial") - @Test - public void testToStringFromAdd() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertEquals(SIMPLE_ATTRLIST3_REVERSE, attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using put. - * - */ - @SuppressWarnings("serial") - @Test - public void testToStringFromPut() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertEquals(SIMPLE_ATTRLIST3_REVERSE, attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using populate. - */ - @Test - public void testToStringFromSimplePopulate() { - final String strAttrList = "isAgeOver:true"; - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(strAttrList); - Assert.assertEquals("isAgeOver:true:[]:;", attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using populate. - */ - @Test - public void testToStringFromPopulate() { - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(SIMPLE_ATTRLIST3); - Assert.assertEquals(SIMPLE_ATTRLIST3_REVERSE, attrList.toString()); - } - - /** - * Testing Personal Attribute List populate method, with invalid values. - */ - @Test - public void testPopulateWithInvalidValuesFormat() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate("name:type:values:status;"); - Assert.assertEquals(pal, new PersonalAttributeList()); - } - - /** - * Testing Personal Attribute List populate method, with invalid format. - */ - @Test - public void testPopulateWithInvalidFormat() { - - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate("name:type::status;"); - Assert.assertEquals(pal, new PersonalAttributeList()); - } - - /** - * Testing Personal Attribute List clone method using add. - */ - @SuppressWarnings("serial") - @Test - public void testCloneFromAdd() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertNotSame(attrList, attrList.clone()); - } - - /** - * Testing Personal Attribute List clone method using put. - */ - @SuppressWarnings("serial") - @Test - public void testCloneFromPut() { - final PersonalAttribute attrValueUnder = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver = - new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final PersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertNotSame(attrList, attrList.clone()); - } - - /** - * Testing Personal Attribute List clone method using populate. - */ - @Test - public void testCloneFromPopulate() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST3); - Assert.assertNotSame(pal, pal.clone()); - } - - /** - * Testing Personal Attribute List iterator. - */ - @Test - public void testIterator() { - final String strAttrList = - "isAgeOver:true:[15,]:Available;isAgeOver:true:[18,]:Available;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - final Iterator itAttr = pal.iterator(); - while (itAttr.hasNext()) { - final PersonalAttribute attr = itAttr.next(); - Assert.assertEquals(ISAGEOVER_CONS, attr.getName()); - } - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with empty attribute list. - */ - @Test - public void testGetOptionalAttributesWithEmptyList() { - final PersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getOptionalAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method without optional attributes. - */ - @Test - public void testGetOptionalAttributesWithoutOptional() { - final String strAttrList = - "isAgeOver:true:[15,]:Available;isAgeOver:true:[18,]:Available;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with one optional attribute. - */ - @Test - public void testGetOptionalAttributesWithOneOptional() { - final String strAttrList = - "age:false:[]:;isAgeOver:true:[15,]:;isAgeOver:true:[18,]:;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with two optional attribute. - */ - @Test - public void testGetOptionalAttributesWithOnlyOptional() { - final String strAttrList = - "age:false:[]:;isAgeOver:false:[18,]:;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().size() == TWO_CONS); - } - - /** - * Testing Personal Attribute List's getMandatoryAttributes method with empty attribute list. - */ - @Test - public void testGetMandatoryAttributesWithEmptyList() { - final PersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getMandatoryAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getMandatoryAttributes method without mandatory attributes. - */ - @Test - public void testGetMandatoryAttributesWithoutMandatory() { - final String strAttrList = - "isAgeOver:false:[15,]:Available;isAgeOver:false:[18,]:Available;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with one mandatory attribute. - */ - @Test - public void testGetMandatoryAttributesWithOneMandatory() { - final String strAttrList = - "age:true:[]:;isAgeOver:false:[15,]:;isAgeOver:false:[18,]:;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with two mandatory attribute. - */ - @Test - public void testGetMandatoryAttributesWithOnlyMandatory() { - final String strAttrList = - "age:true:[]:;isAgeOver:true:[18,]:;"; - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().size() == TWO_CONS); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes method with empty attribute list. - */ - @Test - public void testGetSimpleValueAttributesWithEmptyList() { - final PersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getSimpleValueAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes() method without simple attributes. - */ - @Test - public void testGetSimpleValueAttributesWithoutSimple() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(COMPLEX_ATTRLIST); - Assert.assertTrue(pal.getSimpleValueAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes() method with one simple attribute. - */ - @Test - public void testGetSimpleValueAttributesWithOneSimple() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(pal.getSimpleValueAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with two simple attribute. - */ - @Test - public void testGetSimpleValueAttributesWithOnlySimple() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST3); - Assert.assertTrue(pal.getSimpleValueAttributes().size() == TWO_CONS); - } - - /** - * Testing Personal Attribute List's getComplexValueAttributes method with empty attribute list. - */ - @Test - public void testGetComplexAttributesWithEmptyList() { - final PersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getComplexAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getComplexAttributes() method without complex attributes. - */ - @Test - public void testGetComplexAttributesWithoutSimple() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST2); - Assert.assertTrue(pal.getComplexAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getComplexAttributes() method with one complex attribute. - */ - @Test - public void testGetComplexAttributesWithOneComplex() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(pal.getComplexAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with only two Complex attribute. - */ - @Test - public void testGetComplexAttributesWithOnlyComplex() { - final PersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST2); - Assert.assertTrue(pal.getComplexAttributes().size() == TWO_CONS); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java deleted file mode 100644 index 458d510e0..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.Assert; - -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.STORKStatusCode; - -/** - * The PersonalAttribute's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.4 $, $Date: 2010-11-17 05:17:03 $ - */ -public final class PersonalAttributeTestCase { - - /** - * An empty attribute. - */ - private static final PersonalAttribute EMPTYATTR = new PersonalAttribute(); - - /** - * An attribute with a complex value (canonicalResidenceAddress). - */ - private static PersonalAttribute complexAttrValue = null; - - /** - * An attribute with a simple value (age). - */ - @SuppressWarnings("serial") - private static final PersonalAttribute ATTR_VALUE = new PersonalAttribute( - "age", true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - /** - * Init PersonalAttributeTestCase class. - */ - @SuppressWarnings("serial") - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Map values = new HashMap() { - { - put("countryCodeAddress", "PT"); - put("state", "Porto"); - put("town", "Porto"); - put("postalCode", "4100"); - put("streetName", "Avenida Sidonio Pais"); - put("streetNumber", "379"); - put("apartmentNumber", "B"); - } - }; - - complexAttrValue = - new PersonalAttribute("canonicalResidenceAddress", true, values, - STORKStatusCode.STATUS_AVAILABLE.toString()); - - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given simple - * attribute value. Values must match. - */ - @Test - public void testToStringValues() { - Assert.assertEquals("age:true:[15,]:Available;", ATTR_VALUE.toString()); - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given complex - * attribute value. Values must match. - */ - @Test - public void testToStringComplexValues() { - Assert.assertEquals( - "canonicalResidenceAddress:true:[postalCode=4100,apartmentNumber=B," - + "state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto,]:Available;", - complexAttrValue.toString()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithNull() { - Assert.assertTrue(EMPTYATTR.isEmptyStatus()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * new attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithEmptyString() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setStatus(""); - Assert.assertTrue(attr.isEmptyStatus()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setValue(null); - Assert.assertTrue(attr.isEmptyValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValue() { - Assert.assertTrue(EMPTYATTR.isEmptyValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setComplexValue(null); - Assert.assertTrue(attr.isEmptyComplexValue()); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithEmptyComplexValue() { - Assert.assertTrue(EMPTYATTR.isEmptyComplexValue()); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given attribute. - * Must return true. - */ - @Test - public void testCloneToComplexValue() { - Assert.assertNotSame(complexAttrValue, complexAttrValue.clone()); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given attribute. - * Must return true. - */ - @Test - public void testCloneToValue() { - Assert.assertNotSame(ATTR_VALUE, ATTR_VALUE.clone()); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java deleted file mode 100644 index 452602210..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This package provides all JUnit test classes. - */ -package eu.stork.peps.tests; - diff --git a/id/server/stork2-commons/src/test/resources/log4j.xml b/id/server/stork2-commons/src/test/resources/log4j.xml deleted file mode 100644 index 0ad2ea9a4..000000000 --- a/id/server/stork2-commons/src/test/resources/log4j.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From 24029880580770543d788d95b39526853ff5e6dd Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 3 Feb 2014 08:33:32 +0100 Subject: add Repo --- id/server/stork2-commons/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'id/server') diff --git a/id/server/stork2-commons/pom.xml b/id/server/stork2-commons/pom.xml index a71ee1628..b658a8e12 100644 --- a/id/server/stork2-commons/pom.xml +++ b/id/server/stork2-commons/pom.xml @@ -15,6 +15,15 @@ The STORKCommons library provides beans, Java Interfaces and utility classes to integrate PEPS and SAML Engine. + + + + shibboleth.internet2.edu + Internet2 + https://build.shibboleth.net/nexus/content/groups/public/ + + + -- cgit v1.2.3 From ef35deb727190363d17d693d10f27171787cc92c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 3 Feb 2014 15:38:24 +0100 Subject: Solve some merge problems --- id/server/idserverlib/pom.xml | 43 +- .../moa/id/auth/AuthenticationServer.java | 7 +- .../moa/id/auth/data/AuthenticationSession.java | 31 +- .../moa/id/auth/servlet/GetForeignIDServlet.java | 4 + .../id/auth/servlet/GetMISSessionIDServlet.java | 4 + .../moa/id/auth/servlet/PEPSConnectorServlet.java | 14 + .../moa/id/auth/stork/CredentialProvider.java | 72 -- .../id/auth/stork/KeyStoreCredentialProvider.java | 148 ---- .../auth/stork/PEPSConnectorAssertionVerifier.java | 263 ------- .../auth/stork/PEPSConnectorResponseVerifier.java | 182 ----- .../moa/id/auth/stork/ResponseVerifier.java | 66 -- .../id/auth/stork/STORKAuthnRequestProcessor.java | 187 ----- .../id/config/auth/AuthConfigurationProvider.java | 7 +- .../moa/id/config/auth/OAAuthParameter.java | 14 +- .../moa/id/protocols/pvp2x/PVPConstants.java | 1 + .../protocols/pvp2x/binding/RedirectBinding.java | 1 - .../builder/assertion/PVP2AssertionBuilder.java | 81 ++- .../attributes/BirthdateAttributeBuilder.java | 17 +- .../pvp2x/requestHandler/AuthnRequestHandler.java | 10 - .../protocols/pvp2x/signer/CredentialProvider.java | 1 - .../verification/MetadataSignatureFilter.java | 6 +- .../pvp2x/verification/TrustEngineFactory.java | 50 +- .../java/at/gv/util/wsdl/szrgw/SZRGWService.java | 18 +- .../main/java/at/gv/util/wsdl/szrgw/SZRGWType.java | 2 +- .../gv/util/xsd/persondata/AbstractPersonType.java | 10 +- .../xsd/persondata/CompactCorporateBodyType.java | 2 +- .../util/xsd/persondata/CompactPersonDataType.java | 18 +- .../xsd/persondata/CompactPhysicalPersonType.java | 2 +- .../gv/util/xsd/persondata/CorporateBodyType.java | 2 +- .../gv/util/xsd/persondata/IdentificationType.java | 2 +- .../util/xsd/persondata/InternetAddressType.java | 2 +- .../at/gv/util/xsd/persondata/NationalityType.java | 10 +- .../at/gv/util/xsd/persondata/PersonDataType.java | 18 +- .../gv/util/xsd/persondata/PhysicalPersonType.java | 2 +- .../util/xsd/persondata/TelephoneAddressType.java | 2 +- .../xsd/persondata/TypedPostalAddressType.java | 2 +- .../at/gv/util/xsd/saml/assertion/AdviceType.java | 6 +- .../at/gv/util/xsd/saml/assertion/SubjectType.java | 4 +- .../java/at/gv/util/xsd/xmldsig/KeyInfoType.java | 22 +- .../java/at/gv/util/xsd/xmldsig/KeyValueType.java | 8 +- .../java/at/gv/util/xsd/xmldsig/ObjectFactory.java | 76 +- .../java/at/gv/util/xsd/xmldsig/PGPDataType.java | 8 +- .../java/at/gv/util/xsd/xmldsig/SPKIDataType.java | 2 +- .../gv/util/xsd/xmldsig/SignatureMethodType.java | 4 +- .../java/at/gv/util/xsd/xmldsig/TransformType.java | 4 +- .../java/at/gv/util/xsd/xmldsig/X509DataType.java | 16 +- .../resources/properties/id_messages_de.properties | 1 + .../resources/templates/loginFormFull.html | 789 ++++++++++----------- id/server/pom.xml | 2 +- .../proxy/src/main/webapp/META-INF/MANIFEST.MF | 1 - id/server/stork2-saml-engine/pom.xml | 6 + 51 files changed, 692 insertions(+), 1558 deletions(-) delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/CredentialProvider.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/KeyStoreCredentialProvider.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorAssertionVerifier.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorResponseVerifier.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/ResponseVerifier.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKAuthnRequestProcessor.java (limited to 'id/server') diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index e5670f9a7..81213f721 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -25,16 +25,17 @@ - - eu.stork - SamlEngine - 1.1.0 - - - eu.stork - oasis-dss-api - 1.0.0-SNAPSHOT - + + eu.stork + SamlEngine + 1.1.0 + + + eu.stork + oasis-dss-api + 1.0.0-SNAPSHOT + + MOA.id.server moa-id-commons @@ -60,7 +61,7 @@ axis - + javax.mail @@ -162,7 +163,7 @@ - + + + + org.opensaml + opensaml + 2.6.0 + + + + org.opensaml + xmltooling + 1.4.0 regexp @@ -228,8 +241,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.5 - 1.5 + 1.6 + 1.6 diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index e9c8dbc75..06d5b01bd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -97,6 +97,7 @@ import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.config.stork.CPEPS; import at.gv.egovernment.moa.id.config.stork.STORKConfig; import at.gv.egovernment.moa.id.data.AuthenticationData; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.storage.AssertionStorage; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.storage.DBExceptionStoreImpl; @@ -1269,7 +1270,11 @@ public class AuthenticationServer implements MOAIDAuthConstants { session.setAuthenticatedUsed(false); session.setAuthenticated(true); - + + //set QAA Level four in case of card authentifcation + session.setQAALevel(PVPConstants.STORK_QAA_1_4); + + String oldsessionID = session.getSessionID(); //Session is implicte stored in changeSessionID!!! diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java index 767172823..896feed9e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java @@ -231,6 +231,8 @@ public class AuthenticationSession implements Serializable { private boolean ssoRequested = false; + private String QAALevel = null; + // private OAuth20SessionObject oAuth20SessionObject; // /** @@ -1005,20 +1007,21 @@ public class AuthenticationSession implements Serializable { public IPersonalAttributeList getStorkAttributes() { return this.storkAttributes; } - + /** -// * @return the oAuth20SessionObject -// */ -// public OAuth20SessionObject getoAuth20SessionObject() { -// return oAuth20SessionObject; -// } -// -// /** -// * @param oAuth20SessionObject -// * the oAuth20SessionObject to set -// */ -// public void setoAuth20SessionObject(OAuth20SessionObject oAuth20SessionObject) { -// this.oAuth20SessionObject = oAuth20SessionObject; -// } + * @return the qAALevel + */ + public String getQAALevel() { + return QAALevel; + } + + /** + * @param qAALevel the qAALevel to set + */ + public void setQAALevel(String qAALevel) { + QAALevel = qAALevel; + } + + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java index 7908578ef..f4212cc78 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java @@ -73,6 +73,7 @@ import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; import at.gv.egovernment.moa.id.client.SZRGWClientException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.moduls.ModulUtils; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.logging.Logger; @@ -197,6 +198,9 @@ public class GetForeignIDServlet extends AuthServlet { IdentityLink identitylink = ilParser.parseIdentityLink(); session.setIdentityLink(identitylink); + //set QAA Level four in case of card authentifcation + session.setQAALevel(PVPConstants.STORK_QAA_1_4); + String samlArtifactBase64 = AuthenticationServer.getInstance().getForeignAuthenticationData(session); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java index b2224e10c..8bf437cca 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java @@ -72,6 +72,7 @@ import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils; import at.gv.egovernment.moa.id.config.ConnectionParameter; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.ModulUtils; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.id.util.SSLUtils; @@ -218,6 +219,9 @@ public class GetMISSessionIDServlet extends AuthServlet { session.setAuthenticatedUsed(false); session.setAuthenticated(true); + //set QAA Level four in case of card authentifcation + session.setQAALevel(PVPConstants.STORK_QAA_1_4); + String oldsessionID = session.getSessionID(); //Session is implicite stored in changeSessionID!!! diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index 23eb138d9..b356c6f35 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -54,9 +54,11 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.stork.STORKException; import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor; import at.gv.egovernment.moa.id.auth.stork.VelocityProvider; +import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.ModulUtils; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage; import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; @@ -327,6 +329,18 @@ public class PEPSConnectorServlet extends AuthServlet { // stork did the authentication step moaSession.setAuthenticated(true); + //TODO: found better solution, but QAA Level in response could be not supported yet + try { + moasession.setQAALevel(authnResponse.getAssertions().get(0). + getAuthnStatements().get(0).getAuthnContext(). + getAuthnContextClassRef().getAuthnContextClassRef()); + + } catch (Throwable e) { + Logger.warn("STORK QAA-Level is not found in AuthnResponse. Set QAA Level to requested level"); + moasession.setQAALevel(PVPConstants.STORK_QAA_PREFIX + oaParam.getQaaLevel()); + + } + //session is implicit stored in changeSessionID!!!! String newMOASessionID = AuthenticationSessionStoreage.changeSessionID(moaSession); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/CredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/CredentialProvider.java deleted file mode 100644 index 80089a423..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/CredentialProvider.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package at.gv.egovernment.moa.id.auth.stork; - -import org.opensaml.xml.security.credential.Credential; - -import eu.stork.vidp.messages.exception.SAMLException; - -/** - * Interface supporting different kinds of Credentials - * - * @author bzwattendorfer - * - */ -public interface CredentialProvider { - - /** - * Gets appropriate credentials - * @return Credential object - * @throws SAMLException - */ - public Credential getCredential() throws SAMLException; - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/KeyStoreCredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/KeyStoreCredentialProvider.java deleted file mode 100644 index cf167ba84..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/KeyStoreCredentialProvider.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package at.gv.egovernment.moa.id.auth.stork; - -import java.security.KeyStore; -import java.security.PrivateKey; -import java.security.cert.X509Certificate; - -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.x509.BasicX509Credential; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import at.gv.egovernment.moa.util.KeyStoreUtils; -import at.gv.egovernment.moa.util.StringUtils; -import eu.stork.vidp.messages.exception.SAMLException; - -/** - * Provides credentials from a KeyStore - * @author bzwattendorfer - * - */ -public class KeyStoreCredentialProvider implements CredentialProvider { - - private final static Logger log = LoggerFactory.getLogger(KeyStoreCredentialProvider.class); - - /** KeyStore Path */ - private String keyStorePath; - - /** KeyStore Password */ - private String keyStorePassword; - - /** Specific Key Name as Credential */ - private String keyName; - - /** Key password */ - private String keyPassword; - - /** - * Creates a KeyStoreCredentialProvider object - * @param keyStorePath KeyStore Path - * @param keyStorePassword KeyStore Password - * @param keyName KeyName of the key to be retrieved - * @param keyPassword Password for the Key - */ - public KeyStoreCredentialProvider(String keyStorePath, - String keyStorePassword, String keyName, String keyPassword) { - super(); - this.keyStorePath = keyStorePath; - this.keyStorePassword = keyStorePassword; - this.keyName = keyName; - this.keyPassword = keyPassword; - } - - - /** - * Gets the credential object from the KeyStore - */ - public Credential getCredential() throws SAMLException { - log.trace("Retrieving credentials for signing SAML Response."); - - if (StringUtils.isEmpty(this.keyStorePath)) - throw new SAMLException("No keyStorePath specified"); - - //KeyStorePassword optional - //if (StringUtils.isEmpty(this.keyStorePassword)) - // throw new SAMLException("No keyStorePassword specified"); - - if (StringUtils.isEmpty(this.keyName)) - throw new SAMLException("No keyName specified"); - - //KeyStorePassword optional - //if (StringUtils.isEmpty(this.keyPassword)) - // throw new SAMLException("No keyPassword specified"); - - KeyStore ks; - try { - ks = KeyStoreUtils.loadKeyStore(this.keyStorePath, this.keyStorePassword); - } catch (Exception e) { - log.error("Failed to load keystore information", e); - throw new SAMLException(e); - } - - //return new KeyStoreX509CredentialAdapter(ks, keyName, keyPwd.toCharArray()); - BasicX509Credential credential = null; - try { - java.security.cert.X509Certificate certificate = (X509Certificate) ks.getCertificate(this.keyName); - PrivateKey privateKey = (PrivateKey) ks.getKey(this.keyName, this.keyPassword.toCharArray()); - credential = new BasicX509Credential(); - credential.setEntityCertificate(certificate); - credential.setPrivateKey(privateKey); - - } catch (Exception e) { - log.error("Error retrieving signing credentials.", e); - throw new SAMLException(e); - } - - return credential; - - } - - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorAssertionVerifier.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorAssertionVerifier.java deleted file mode 100644 index dcd1a8a1a..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorAssertionVerifier.java +++ /dev/null @@ -1,263 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package at.gv.egovernment.moa.id.auth.stork; - -import java.util.List; - -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.Audience; -import org.opensaml.saml2.core.AudienceRestriction; -import org.opensaml.saml2.core.Conditions; -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.metadata.RequestedAttribute; - -import at.gv.egovernment.moa.logging.Logger; -import eu.stork.vidp.messages.saml.STORKAttribute; -import eu.stork.vidp.messages.util.SAMLUtil; - -/** - * Verifies the SAML assertion according to the STORK specification - * @author bzwattendorfer - * - */ -public class PEPSConnectorAssertionVerifier implements AssertionVerifier { - - private static final int CLOCK_SKEW_MINUTES = 5; - - private static final boolean IS_USERS_CLIENT_IP_ADDRESS_TO_VERIFY = false; - - /* (non-Javadoc) - * @see eu.stork.mw.peps.connector.validation.AssertionVerifier#verifyAssertion(org.opensaml.saml2.core.Assertion, java.lang.String, java.lang.String, java.lang.String) - */ - public void verify(Assertion assertion, String reqIPAddress, - String authnRequestID, String recipient, String audience, List reqAttrList) throws SecurityException { - - //SAML assertion need not to be signed, skipping signature validation - - verifySubjectConfirmation(assertion, reqIPAddress, authnRequestID, recipient); - - Logger.debug("SubjectConfirmationData successfully verified"); - - verifyConditions(assertion, audience); - - Logger.debug("Conditions successfully verified"); - } - - - private void verifySubjectConfirmation(Assertion assertion, String reqAddress, String requestID, String recipient) throws SecurityException { - for (SubjectConfirmation sc : assertion.getSubject().getSubjectConfirmations()) { - verifySubjectConfirmationData(sc.getSubjectConfirmationData(), reqAddress, requestID, recipient); - } - - } - - private void verifySubjectConfirmationData(SubjectConfirmationData scData, String reqAddress, String requestID, String recipient) throws SecurityException { - //NotBefore not allowed in SSO profile - verifyNotOnOrAfter(scData.getNotOnOrAfter()); - - Logger.trace("NotOnOrAfter successfully verified"); - - if(IS_USERS_CLIENT_IP_ADDRESS_TO_VERIFY) { - verifyClientAddress(scData, reqAddress); - Logger.trace("User's client IP address successfully verified."); - } else { - Logger.warn("User's client IP address will not be verified."); - } - - verifyRecipient(scData, recipient); - Logger.trace("Recipient successfully verified"); - - verifyInResponseTo(scData, requestID); - Logger.trace("InResponseTo successfully verified"); - - } - - private void verifyNotBefore(DateTime notBefore) throws SecurityException { - if (notBefore.minusMinutes(CLOCK_SKEW_MINUTES).isAfterNow()) { - String msg = "Subject/Assertion not yet valid, Timestamp: "; - Logger.error(msg + notBefore); - throw new SecurityException(msg); - } - - Logger.trace("Subject/Assertion already valid, notBefore: " + notBefore); - - } - - private void verifyNotOnOrAfter(DateTime notOnOrAfter) throws SecurityException { - if (notOnOrAfter.plusMinutes(CLOCK_SKEW_MINUTES).isBeforeNow()) { - String msg = "Subject/Assertion no longer valid."; - Logger.error(msg); - throw new SecurityException(msg); - } - - Logger.trace("Subject/Assertion still valid, notOnOrAfter: " + notOnOrAfter); - } - - private void verifyClientAddress(SubjectConfirmationData scData, String reqAddress) throws SecurityException { - if (!reqAddress.equals(scData.getAddress())) { - String msg = "Response coming from wrong Client-Address"; - Logger.error("Response coming from wrong Client-Address " + reqAddress + ", expected " + scData.getAddress()); - throw new SecurityException(msg); - } - - } - - private void verifyInResponseTo(SubjectConfirmationData scData, String requestID) throws SecurityException { - if (!scData.getInResponseTo().equals(requestID)) { - String msg = "Assertion issued for wrong request"; - Logger.error(msg); - throw new SecurityException(msg); - } - } - - private void verifyRecipient(SubjectConfirmationData scData, String reqRecipient) throws SecurityException { - if (!scData.getRecipient().equals(reqRecipient)) { - String msg = "Assertion intended for another recipient"; - Logger.error("Assertion intended for recipient " + scData.getRecipient() + "but expected " + reqRecipient); - throw new SecurityException(msg); - } - - } - - private void verifyAudience(AudienceRestriction audienceRestriction, String reqAudience) throws SecurityException { - for (Audience audience : audienceRestriction.getAudiences()) { - if (audience.getAudienceURI().equals(reqAudience)) - return; - } - String msg = "Assertion sent to wrong audience"; - Logger.error("Assertion intended for wrong audience, expected " + reqAudience); - throw new SecurityException(msg); - } - - private void verifyOneTimeUse(String assertionID) { - //not necessarily required to check since notBefore and notOnOrAfter are verified - //check response Store for already existing assertion - - } - - private void verifyConditions(Assertion assertion, String reqAudience) throws SecurityException { - Conditions conditions = assertion.getConditions(); - - verifyNotBefore(conditions.getNotBefore()); - Logger.trace("NotBefore successfully verified"); - - verifyNotOnOrAfter(conditions.getNotOnOrAfter()); - Logger.trace("NotOnOrAfter successfully verified"); - - verifyAudience(conditions.getAudienceRestrictions().get(0), reqAudience); - - Logger.trace("Audience successfully verified"); - - } - - public static void validateRequiredAttributes( - List reqAttrList, - List attrList) - throws STORKException { - - Logger.debug("Starting required attribute validation"); - - if (reqAttrList == null || reqAttrList.isEmpty()) { - Logger.error("Requested Attributes list is empty."); - throw new STORKException("No attributes have been requested"); - } - - if (attrList == null || attrList.isEmpty()) { - Logger.error("STORK AttributeStatement is empty."); - throw new STORKException("No attributes have been received"); - } - - Logger.trace("These attributes have been requested and received: "); - int count = 0; - for (RequestedAttribute reqAttr : reqAttrList) { - Logger.trace("Requested attribute: " + reqAttr.getName() + " isRequired: " + reqAttr.isRequired()); - for(Attribute attr : attrList) { - if (verifyRequestedAttribute(reqAttr, attr)) - count++; - } - } - - int numRequiredReqAttr = getNumberOfRequiredAttributes(reqAttrList); - Logger.trace("Number of requested required attributes: " + numRequiredReqAttr); - Logger.trace("Number of received required attributes: " + count); - - if (count != numRequiredReqAttr) { - Logger.error("Not all required attributes have been received"); - throw new STORKException("Not all required attributes have been received"); - } - Logger.debug("Received all required attributes!"); - - } - - private static boolean verifyRequestedAttribute(RequestedAttribute reqAttr, Attribute attr) { - - if ((reqAttr.getName()).equals(attr.getName())) { - if (reqAttr.isRequired() && SAMLUtil.getStatusFromAttribute(attr).equals(STORKAttribute.ALLOWED_ATTRIBUTE_STATUS_AVAIL)) { - Logger.trace("Received required attribute " + attr.getName() + " status: " + SAMLUtil.getStatusFromAttribute(attr)); - return true; - } - } - return false; - } - - private static int getNumberOfRequiredAttributes(List reqAttrList) { - int count = 0; - for (RequestedAttribute reqAttr : reqAttrList) - if (reqAttr.isRequired()) count++; - - return count; - } - - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorResponseVerifier.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorResponseVerifier.java deleted file mode 100644 index f9589950f..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/PEPSConnectorResponseVerifier.java +++ /dev/null @@ -1,182 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -/** - * - */ -package at.gv.egovernment.moa.id.auth.stork; - -import org.opensaml.xml.validation.ValidationException; -import org.w3c.dom.Element; - -import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder; -import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse; -import at.gv.egovernment.moa.id.auth.exception.BuildException; -import at.gv.egovernment.moa.id.auth.exception.ParseException; -import at.gv.egovernment.moa.id.auth.exception.ServiceException; -import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker; -import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; -import at.gv.egovernment.moa.id.util.XMLUtil; -import at.gv.egovernment.moa.logging.Logger; -import eu.stork.mw.messages.saml.STORKResponse; -import eu.stork.vidp.messages.exception.SAMLValidationException; -import eu.stork.vidp.messages.util.SAMLUtil; - -/** - * Verifies the SMAL response according to the STORK specification - * @author bzwattendorfer - * - */ -public class PEPSConnectorResponseVerifier implements ResponseVerifier { - - - /* (non-Javadoc) - * @see eu.stork.mw.peps.connector.validation.ResponseVerifier#verify(org.opensaml.saml2.core.Response) - */ - public void verify(STORKResponse response) throws SecurityException { - - verifySignature(response); - Logger.debug("Signature of SAML response valid."); - - verifyStandardValidation(response); - - Logger.debug("SAML response format valid."); - - } - - - private void verifySignature(STORKResponse response) throws SecurityException { - //validate Signature - try { - if (response.isSigned()) { - - String trustProfileID = AuthConfigurationProvider.getInstance().getStorkConfig().getSignatureVerificationParameter().getTrustProfileID(); - - Logger.trace("Starting validation of Signature references"); - try { - SAMLUtil.validateSignatureReferences(response); - } catch (ValidationException e) { - Logger.error("Validation of XML Signature refrences failed: " + e.getMessage()); - throw new SecurityException(e); - } - Logger.debug("XML Signature references are OK."); - - Logger.debug("Invoking MOA-SP with TrustProfileID: " + trustProfileID); - - // builds a for a call of MOA-SP - Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder() - .build(XMLUtil.printXML(response.getDOM()).getBytes(), trustProfileID); - - Logger.trace("VerifyXMLSignatureRequest for MOA-SP succesfully built"); - - Logger.trace("Calling MOA-SP"); - // invokes the call - Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker() - .verifyXMLSignature(domVerifyXMLSignatureRequest); - - // parses the - VerifyXMLSignatureResponse verifyXMLSignatureResponse = new VerifyXMLSignatureResponseParser( - domVerifyXMLSignatureResponse).parseData(); - - Logger.trace("Received VerifyXMLSignatureResponse from MOA-SP"); - - if (verifyXMLSignatureResponse.getSignatureCheckCode() != 0) { - String msg = "Signature of SAMLResponse not valid"; - Logger.error(msg); - throw new SecurityException(msg); - } - - Logger.debug("Signature of SAML response successfully verified"); - - if (verifyXMLSignatureResponse.getCertificateCheckCode() != 0) { - String msg = "Certificate of SAMLResponse not valid"; - Logger.error(msg); - throw new SecurityException(msg); - } - - Logger.debug("Signing certificate of SAML response succesfully verified"); - - } else { - String msg = "SAML Response is not signed."; - throw new SecurityException(msg); - } - - } catch (ConfigurationException e) { - String msg = "Unable to load STORK configuration for STORK SAML Response signature verification."; - Logger.error(msg, e); - throw new SecurityException(msg, e); - } catch (ParseException e) { - String msg = "Unable to parse VerifyXMLSignature Request or Response."; - Logger.error(msg, e); - throw new SecurityException(msg, e); - } catch (BuildException e) { - String msg = "Unable to parse VerifyXMLSignature Request or Response."; - Logger.error(msg, e); - throw new SecurityException(msg, e); - } catch (ServiceException e) { - String msg = "Unable to invoke MOA-SP."; - Logger.error(msg, e); - throw new SecurityException(msg, e); - } - - } - - private void verifyStandardValidation(STORKResponse response) throws SecurityException { - try { - SAMLUtil.verifySAMLObjectStandardValidation(response, "saml2-core-schema-and-stork-validator"); - } catch (SAMLValidationException e) { - String msg ="SAML Response received not valid."; - throw new SecurityException(msg, e); - } - - } - - - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/ResponseVerifier.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/ResponseVerifier.java deleted file mode 100644 index ea3d4101b..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/ResponseVerifier.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2011 by Graz University of Technology, Austria - * The Austrian STORK Modules have been developed by the E-Government - * Innovation Center EGIZ, a joint initiative of the Federal Chancellery - * Austria and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package at.gv.egovernment.moa.id.auth.stork; - -import eu.stork.mw.messages.saml.STORKResponse; - -/** - * Interface to be implemented for SAML response verification - * @author bzwattendorfer - * - */ -public interface ResponseVerifier { - - /** - * Verifies a STORK response - * @param response STORK response - * @throws SecurityException - */ - public void verify(STORKResponse response) throws SecurityException; - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKAuthnRequestProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKAuthnRequestProcessor.java deleted file mode 100644 index 5dc615b6c..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKAuthnRequestProcessor.java +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/** - * - */ -package at.gv.egovernment.moa.id.auth.stork; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.velocity.app.VelocityEngine; -import org.opensaml.common.binding.BasicSAMLMessageContext; -import org.opensaml.saml2.binding.encoding.HTTPPostEncoder; -import org.opensaml.saml2.metadata.AssertionConsumerService; -import org.opensaml.saml2.metadata.Endpoint; -import org.opensaml.ws.transport.http.HTTPOutTransport; -import org.opensaml.ws.transport.http.HttpServletResponseAdapter; -import org.opensaml.xml.security.credential.Credential; - -import at.gv.egovernment.moa.logging.Logger; -import eu.stork.mw.messages.saml.STORKAuthnRequest; -import eu.stork.vidp.messages.builder.STORKMessagesBuilder; -import eu.stork.vidp.messages.exception.SAMLException; -import eu.stork.vidp.messages.exception.SAMLValidationException; -import eu.stork.vidp.messages.stork.QualityAuthenticationAssuranceLevel; -import eu.stork.vidp.messages.stork.RequestedAttributes; -import eu.stork.vidp.messages.util.SAMLUtil; - -/** - * Class handling all necessary functionality for STORK AuthnRequest processing - * - * @author bzwattendorfer - * - */ -public class STORKAuthnRequestProcessor { - - /** - * Creates a STORK AuthnRequest - * @param destination Destination URL - * @param acsURL Assertion Consumer Service URL - * @param providerName SP Provider Name - * @param issuerValue Issuer Name - * @param qaaLevel STORK QAALevel to be requested - * @param requestedAttributes Requested Attributes to be requested - * @param spSector Sp Sector - * @param spInstitution SP Institution - * @param spApplication SP Application - * @param spCountry SP Country - * @param textToBeSigned text to be included in signedDoc element - * @param mimeType mimeType for the text to be signed in signedDoc - * @return STORK AuthnRequest - */ - public static STORKAuthnRequest generateSTORKAuthnRequest( - String destination, - String acsURL, - String providerName, - String issuerValue, - QualityAuthenticationAssuranceLevel qaaLevel, - RequestedAttributes requestedAttributes, - String spSector, - String spInstitution, - String spApplication, - String spCountry, - String textToBeSigned, - String mimeType) { - - - STORKAuthnRequest storkAuthnRequest = - STORKMessagesBuilder.buildSTORKAuthnRequest( - destination, - acsURL, - providerName, - issuerValue, - qaaLevel, - requestedAttributes, - spSector, - spInstitution, - spApplication, - spCountry); - - STORKMessagesBuilder.buildAndAddSignatureRequestToAuthnRequest(storkAuthnRequest, textToBeSigned, mimeType, true); - - Logger.debug("Added signedDoc attribute to STORK AuthnRequest"); - - return storkAuthnRequest; - - } - - /** - * Signs a STORK AuthnRequest - * @param storkAuthnRequest STORK AuthRequest to sign - * @param keyStorePath KeyStorePath to the signing key - * @param keyStorePassword KeyStore Password - * @param keyName Signing key name - * @param keyPassword Signing key password - * @return Signed STORK AuthnRequest - * @throws SAMLException - */ - public static STORKAuthnRequest signSTORKAuthnRequest( - STORKAuthnRequest storkAuthnRequest, - String keyStorePath, - String keyStorePassword, - String keyName, - String keyPassword) throws SAMLException { - - Logger.trace("Building Credential Provider for signing process"); - - CredentialProvider credentialProvider = new KeyStoreCredentialProvider(keyStorePath, keyStorePassword, keyName, keyPassword); - - Credential credential = credentialProvider.getCredential(); - - Logger.trace("Credentials found"); - - SAMLUtil.signSAMLObject(storkAuthnRequest, credential); - - return storkAuthnRequest; - } - - /** - * Validates a STORK AuthnRequest - * @param storkAuthnRequest STORK AuthnRequest to validate - * @throws SAMLValidationException - */ - public static void validateSTORKAuthnRequest(STORKAuthnRequest storkAuthnRequest) throws SAMLValidationException { - - SAMLUtil.verifySAMLObjectStandardValidation(storkAuthnRequest, "saml2-core-schema-and-stork-validator"); - - } - - /** - * Sends a STORK AuthnRequest (Endpoint taken out of AuthnRequest) - * @param request HttpServletRequest - * @param response HttpServletResponse - * @param storkAuthnRequest STORK AuthnRequest to send - * @throws Exception - */ - public static void sendSTORKAuthnRequest(HttpServletRequest request, HttpServletResponse response, STORKAuthnRequest storkAuthnRequest) throws Exception { - - Logger.trace("Create endpoint..."); - Endpoint endpoint = STORKMessagesBuilder.buildSAMLObject(AssertionConsumerService.DEFAULT_ELEMENT_NAME); - endpoint.setBinding("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"); - endpoint.setLocation(storkAuthnRequest.getDestination()); - - - Logger.trace("Prepare SAMLMessageContext..."); - HTTPOutTransport outTransport = new HttpServletResponseAdapter(response, request.isSecure()); - BasicSAMLMessageContext samlMessageContext = new BasicSAMLMessageContext(); - samlMessageContext.setOutboundMessageTransport(outTransport); - samlMessageContext.setPeerEntityEndpoint(endpoint); - - Logger.trace("Set STORK SAML AuthnRequest to SAMLMessageContext..."); - samlMessageContext.setOutboundSAMLMessage(storkAuthnRequest); - - Logger.trace("Initialize VelocityEngine..."); - - VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); - -// HTTPPostEncoder encoder = new HTTPPostEncoder(velocityEngine, "/templates/saml2-post-binding.vm"); - HTTPPostEncoder encoder = new HTTPPostEncoder(velocityEngine, "/saml2-post-binding-moa.vm"); - - Logger.trace("HTTP-Post encode SAMLMessageContext..."); - encoder.encode(samlMessageContext); - } - - - -} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java index 1fa7e5eb2..1804b5fd5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java @@ -63,6 +63,7 @@ import javax.xml.bind.JAXBContext; import javax.xml.bind.Unmarshaller; import org.hibernate.cfg.Configuration; +import org.opensaml.DefaultBootstrap; import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; @@ -363,9 +364,9 @@ public class AuthConfigurationProvider extends ConfigurationProvider { //Initialize OpenSAML for STORK -// Logger.info("Starting initialization of OpenSAML..."); -// STORKBootstrap.bootstrap(); -// Logger.debug("OpenSAML successfully initialized"); + Logger.info("Starting initialization of OpenSAML..."); + DefaultBootstrap.bootstrap(); + Logger.debug("OpenSAML successfully initialized"); String legacyconfig = props.getProperty("configuration.xml.legacy"); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java index 998e28f6a..7a38e2afd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java @@ -273,7 +273,12 @@ public boolean isOnlyMandateAllowed() { * @return true, if is we should show stork login */ public boolean isShowStorkLogin() { - return oa_auth.getOASTORK().isStorkLogonEnabled(); + try { + return oa_auth.getOASTORK().isStorkLogonEnabled(); + + } catch (NullPointerException e) { + return false; + } } public Map getFormCustomizaten() { @@ -322,7 +327,12 @@ public Map getFormCustomizaten() { } public Integer getQaaLevel() { - return oa_auth.getOASTORK().getQaa(); + + if (oa_auth.getOASTORK() != null && oa_auth.getOASTORK().getQaa() != null) + return oa_auth.getOASTORK().getQaa(); + + else + return 4; } /** diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java index 5b4843752..0172cce2d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java @@ -24,6 +24,7 @@ package at.gv.egovernment.moa.id.protocols.pvp2x; public interface PVPConstants { + public static final String STORK_QAA_PREFIX = "http://www.stork.gov.eu/1.0/citizenQAALevel/"; public static final String STORK_QAA_1_1 = "http://www.stork.gov.eu/1.0/citizenQAALevel/1"; public static final String STORK_QAA_1_2 = "http://www.stork.gov.eu/1.0/citizenQAALevel/2"; public static final String STORK_QAA_1_3 = "http://www.stork.gov.eu/1.0/citizenQAALevel/3"; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java index 28299871c..7c9cc6259 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java @@ -25,7 +25,6 @@ package at.gv.egovernment.moa.id.protocols.pvp2x.binding; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.jcp.xml.dsig.internal.dom.DOMURIDereferencer; import org.opensaml.common.SAMLObject; import org.opensaml.common.binding.BasicSAMLMessageContext; import org.opensaml.common.xml.SAMLConstants; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java index 17f76d35a..bc90da8df 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java @@ -74,6 +74,7 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.QAANotSupportedExcept import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.UnprovideableAttributeException; import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils; import at.gv.egovernment.moa.id.util.MandateBuilder; +import at.gv.egovernment.moa.id.util.QAALevelVerifier; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Constants; @@ -89,45 +90,59 @@ public class PVP2AssertionBuilder implements PVPConstants { AuthnContextClassRef authnContextClassRef = SAML2Utils .createSAMLObject(AuthnContextClassRef.class); + OAAuthParameter oaParam = AuthConfigurationProvider.getInstance() + .getOnlineApplicationParameter( + peerEntity.getEntityID()); + if (reqAuthnContext == null) { authnContextClassRef.setAuthnContextClassRef(STORK_QAA_1_4); - } else { + } - boolean stork_qaa_1_4_found = false; + boolean stork_qaa_1_4_found = false; + + List reqAuthnContextClassRefIt = reqAuthnContext + .getAuthnContextClassRefs(); - List reqAuthnContextClassRefIt = reqAuthnContext - .getAuthnContextClassRefs(); + if (reqAuthnContextClassRefIt.size() == 0) { + + QAALevelVerifier.verifyQAALevel(authSession.getQAALevel(), + STORK_QAA_1_4); - if (reqAuthnContextClassRefIt.size() == 0) { - stork_qaa_1_4_found = true; - authnContextClassRef.setAuthnContextClassRef(STORK_QAA_1_4); - - } else { - for (AuthnContextClassRef authnClassRef : reqAuthnContextClassRefIt) { - String qaa_uri = authnClassRef.getAuthnContextClassRef(); - if (qaa_uri.trim().equals(STORK_QAA_1_4) - || qaa_uri.trim().equals(STORK_QAA_1_3) - || qaa_uri.trim().equals(STORK_QAA_1_2) - || qaa_uri.trim().equals(STORK_QAA_1_1)) { - - if (authSession.isForeigner()) { - //TODO: insert QAA check - - stork_qaa_1_4_found = false; - - } else { - stork_qaa_1_4_found = true; - authnContextClassRef.setAuthnContextClassRef(STORK_QAA_1_4); - } - break; + stork_qaa_1_4_found = true; + authnContextClassRef.setAuthnContextClassRef(STORK_QAA_1_4); + + } else { + for (AuthnContextClassRef authnClassRef : reqAuthnContextClassRefIt) { + String qaa_uri = authnClassRef.getAuthnContextClassRef(); + if (qaa_uri.trim().equals(STORK_QAA_1_4) + || qaa_uri.trim().equals(STORK_QAA_1_3) + || qaa_uri.trim().equals(STORK_QAA_1_2) + || qaa_uri.trim().equals(STORK_QAA_1_1)) { + + if (authSession.isForeigner()) { + QAALevelVerifier.verifyQAALevel(authSession.getQAALevel(), + STORK_QAA_PREFIX + oaParam.getQaaLevel()); + + stork_qaa_1_4_found = true; + authnContextClassRef.setAuthnContextClassRef(authSession.getQAALevel()); + + } else { + + QAALevelVerifier.verifyQAALevel(authSession.getQAALevel(), + qaa_uri.trim()); + + stork_qaa_1_4_found = true; + authnContextClassRef.setAuthnContextClassRef(authSession.getQAALevel()); + } + break; } } - - if (!stork_qaa_1_4_found) { - throw new QAANotSupportedException(STORK_QAA_1_4); - } + } + + if (!stork_qaa_1_4_found) { + throw new QAANotSupportedException(STORK_QAA_1_4); } // reqAuthnContextClassRefIt = reqAuthnContext.getAuthnContextClassRefs() @@ -209,12 +224,6 @@ public class PVP2AssertionBuilder implements PVPConstants { * null, true); } } */ - // TODO: LOAD oaParam from request and not from MOASession in case of - // SSO - OAAuthParameter oaParam = AuthConfigurationProvider.getInstance() - .getOnlineApplicationParameter( - peerEntity.getEntityID()); - AuthenticationData authData = AuthenticationServer .buildAuthenticationData(authSession, oaParam, oaParam.getTarget()); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/BirthdateAttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/BirthdateAttributeBuilder.java index 523063c6e..f3d815e7d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/BirthdateAttributeBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/attributes/BirthdateAttributeBuilder.java @@ -31,6 +31,7 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.AuthenticationData; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.attributes.exceptions.AttributeException; +import at.gv.egovernment.moa.util.MiscUtil; public class BirthdateAttributeBuilder implements IPVPAttributeBuilder { @@ -44,11 +45,19 @@ public class BirthdateAttributeBuilder implements IPVPAttributeBuilder { IAttributeGenerator g) throws AttributeException { try { DateFormat identityLinkFormat = new SimpleDateFormat(IDENTITY_LINK_DATE_FORMAT); - Date date = identityLinkFormat.parse(authSession.getIdentityLink().getDateOfBirth()); - DateFormat pvpDateFormat = new SimpleDateFormat(BIRTHDATE_FORMAT_PATTERN); - String dateString = pvpDateFormat.format(date); - return g.buildStringAttribute(BIRTHDATE_FRIENDLY_NAME, BIRTHDATE_NAME, dateString); + if (MiscUtil.isNotEmpty(authSession.getIdentityLink().getDateOfBirth())) { + Date date = identityLinkFormat.parse(authSession.getIdentityLink().getDateOfBirth()); + DateFormat pvpDateFormat = new SimpleDateFormat(BIRTHDATE_FORMAT_PATTERN); + String dateString = pvpDateFormat.format(date); + + return g.buildStringAttribute(BIRTHDATE_FRIENDLY_NAME, BIRTHDATE_NAME, dateString); + + } else { + //build empty attribute if no Birthday date is found (STORK2) + return g.buildEmptyAttribute(BIRTHDATE_FRIENDLY_NAME, BIRTHDATE_NAME); + + } //return buildStringAttribute(BIRTHDATE_FRIENDLY_NAME, BIRTHDATE_NAME, dateString); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java index d318792f1..f4b48ece3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java @@ -22,14 +22,11 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.pvp2x.requestHandler; -import java.io.IOException; import java.util.ArrayList; -import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.xml.transform.TransformerException; import org.joda.time.DateTime; import org.opensaml.Configuration; @@ -40,12 +37,10 @@ import org.opensaml.saml2.core.EncryptedAssertion; import org.opensaml.saml2.core.Issuer; import org.opensaml.saml2.core.NameID; import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.impl.EncryptedAssertionBuilder; import org.opensaml.saml2.encryption.Encrypter; import org.opensaml.saml2.encryption.Encrypter.KeyPlacement; import org.opensaml.saml2.metadata.AssertionConsumerService; import org.opensaml.saml2.metadata.EntityDescriptor; -import org.opensaml.saml2.metadata.KeyDescriptor; import org.opensaml.saml2.metadata.SPSSODescriptor; import org.opensaml.security.MetadataCredentialResolver; import org.opensaml.security.MetadataCriteria; @@ -54,17 +49,13 @@ import org.opensaml.xml.encryption.EncryptionConstants; import org.opensaml.xml.encryption.EncryptionException; import org.opensaml.xml.encryption.EncryptionParameters; import org.opensaml.xml.encryption.KeyEncryptionParameters; -import org.opensaml.xml.io.MarshallingException; import org.opensaml.xml.security.CriteriaSet; import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; import org.opensaml.xml.security.credential.UsageType; import org.opensaml.xml.security.criteria.EntityIDCriteria; import org.opensaml.xml.security.criteria.UsageCriteria; import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorFactory; -import org.opensaml.xml.security.x509.BasicX509Credential; import org.opensaml.xml.security.x509.X509Credential; -import org.opensaml.xml.signature.KeyInfo; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; @@ -80,7 +71,6 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.BindingNotSupportedEx import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.InvalidAssertionConsumerServiceException; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.InvalidAssertionEncryptionException; import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.MOAMetadataProvider; -import at.gv.egovernment.moa.id.protocols.pvp2x.utils.PrettyPrinter; import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils; import at.gv.egovernment.moa.logging.Logger; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java index 1963115da..e3e25b1a9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java @@ -37,7 +37,6 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.KeyStoreUtils; -import at.gv.egovernment.moa.util.MiscUtil; public class CredentialProvider { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/MetadataSignatureFilter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/MetadataSignatureFilter.java index d398ca533..f0ae6f446 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/MetadataSignatureFilter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/MetadataSignatureFilter.java @@ -113,10 +113,12 @@ public class MetadataSignatureFilter implements MetadataFilter { throw new MOAIDException("Root element of metadata file has to be signed", null); } processEntitiesDescriptor(entitiesDescriptor); - } /*else if (metadata instanceof EntityDescriptor) { + + } else if (metadata instanceof EntityDescriptor) { EntityDescriptor entityDescriptor = (EntityDescriptor) metadata; processEntityDescriptorr(entityDescriptor); - } */else { + + } else { throw new MOAIDException("Invalid Metadata file Root element is no EntitiesDescriptor", null); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/TrustEngineFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/TrustEngineFactory.java index e48c7bb98..67a91f6e1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/TrustEngineFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/TrustEngineFactory.java @@ -34,36 +34,36 @@ import org.opensaml.xml.security.keyinfo.provider.InlineX509DataProvider; import org.opensaml.xml.security.keyinfo.provider.RSAKeyValueProvider; import org.opensaml.xml.signature.SignatureTrustEngine; import org.opensaml.xml.signature.impl.ExplicitKeySignatureTrustEngine; -import org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine; +//import org.opensaml.xml.signature.impl.PKIXSignatureTrustEngine; import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.MOAMetadataProvider; -import edu.internet2.middleware.shibboleth.common.security.MetadataPKIXValidationInformationResolver; +//import edu.internet2.middleware.shibboleth.common.security.MetadataPKIXValidationInformationResolver; public class TrustEngineFactory { - public static SignatureTrustEngine getSignatureTrustEngine() { - try { - MetadataPKIXValidationInformationResolver mdResolver = new MetadataPKIXValidationInformationResolver( - MOAMetadataProvider.getInstance()); - - List keyInfoProvider = new ArrayList(); - keyInfoProvider.add(new DSAKeyValueProvider()); - keyInfoProvider.add(new RSAKeyValueProvider()); - keyInfoProvider.add(new InlineX509DataProvider()); - - KeyInfoCredentialResolver keyInfoResolver = new BasicProviderKeyInfoCredentialResolver( - keyInfoProvider); - - PKIXSignatureTrustEngine engine = new PKIXSignatureTrustEngine( - mdResolver, keyInfoResolver); - - return engine; - - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } +// public static SignatureTrustEngine getSignatureTrustEngine() { +// try { +// MetadataPKIXValidationInformationResolver mdResolver = new MetadataPKIXValidationInformationResolver( +// MOAMetadataProvider.getInstance()); +// +// List keyInfoProvider = new ArrayList(); +// keyInfoProvider.add(new DSAKeyValueProvider()); +// keyInfoProvider.add(new RSAKeyValueProvider()); +// keyInfoProvider.add(new InlineX509DataProvider()); +// +// KeyInfoCredentialResolver keyInfoResolver = new BasicProviderKeyInfoCredentialResolver( +// keyInfoProvider); +// +// PKIXSignatureTrustEngine engine = new PKIXSignatureTrustEngine( +// mdResolver, keyInfoResolver); +// +// return engine; +// +// } catch (Exception e) { +// e.printStackTrace(); +// return null; +// } +// } public static SignatureTrustEngine getSignatureKnownKeysTrustEngine() { MetadataCredentialResolver resolver; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java index 77969010f..9562d1c42 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWService.java @@ -14,7 +14,7 @@ import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 - * Generated source version: 2.2 + * Generated source version: 2.1 * */ @WebServiceClient(name = "SZRGWService", targetNamespace = "http://reference.e-government.gv.at/namespace/szrgw/20070807/wsdl", wsdlLocation = "file:/D:/Projekte/svn/online-vollmachten/egovutils/src/main/resources/wsdl/szrgw/szrgw.wsdl") @@ -42,26 +42,10 @@ public class SZRGWService super(__getWsdlLocation(), SZRGWSERVICE_QNAME); } - public SZRGWService(WebServiceFeature... features) { - super(__getWsdlLocation(), SZRGWSERVICE_QNAME, features); - } - - public SZRGWService(URL wsdlLocation) { - super(wsdlLocation, SZRGWSERVICE_QNAME); - } - - public SZRGWService(URL wsdlLocation, WebServiceFeature... features) { - super(wsdlLocation, SZRGWSERVICE_QNAME, features); - } - public SZRGWService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } - public SZRGWService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { - super(wsdlLocation, serviceName, features); - } - /** * * @return diff --git a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java index 01ca437c9..9f0a8bd6d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/wsdl/szrgw/SZRGWType.java @@ -14,7 +14,7 @@ import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 - * Generated source version: 2.2 + * Generated source version: 2.1 * */ @WebService(name = "SZRGWType", targetNamespace = "http://reference.e-government.gv.at/namespace/szrgw/20070807/wsdl") diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java index eb9ff0739..ebcee3d1d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/AbstractPersonType.java @@ -62,7 +62,7 @@ public class AbstractPersonType { @XmlElement(name = "Identification") protected List identification; - @XmlElementRef(name = "AbstractSimpleIdentification", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "AbstractSimpleIdentification", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) protected List> abstractSimpleIdentification; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @@ -120,14 +120,14 @@ public class AbstractPersonType { *

* Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} - * {@link JAXBElement }{@code <}{@link Firmenbuchnummer }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} - * {@link JAXBElement }{@code <}{@link ZMRzahl }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} - * {@link JAXBElement }{@code <}{@link ERJPZahl }{@code >} - * {@link JAXBElement }{@code <}{@link Vereinsnummer }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} + * {@link JAXBElement }{@code <}{@link ZMRzahl }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSimpleIdentificationType }{@code >} + * {@link JAXBElement }{@code <}{@link Vereinsnummer }{@code >} + * {@link JAXBElement }{@code <}{@link Firmenbuchnummer }{@code >} + * {@link JAXBElement }{@code <}{@link ERJPZahl }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java index 0a542e073..bd7d32493 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactCorporateBodyType.java @@ -188,8 +188,8 @@ public class CompactCorporateBodyType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java index 1aa6acbf4..aad9fa004 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPersonDataType.java @@ -63,7 +63,7 @@ public class CompactPersonDataType @XmlElementRef(name = "Person", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) protected JAXBElement person; - @XmlElementRef(name = "Address", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "Address", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) protected List> address; @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") protected List signature; @@ -75,11 +75,11 @@ public class CompactPersonDataType * * @return * possible object is - * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} * */ public JAXBElement getPerson() { @@ -91,11 +91,11 @@ public class CompactPersonDataType * * @param value * allowed object is - * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} * */ public void setPerson(JAXBElement value) { @@ -120,12 +120,12 @@ public class CompactPersonDataType * *

* Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} * {@link JAXBElement }{@code <}{@link InternetAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TypedPostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java index 94e97ea12..1e37799b0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CompactPhysicalPersonType.java @@ -240,8 +240,8 @@ public class CompactPhysicalPersonType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java index 19d957d80..6596ae3ac 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/CorporateBodyType.java @@ -256,8 +256,8 @@ public class CorporateBodyType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java index f22d6858a..df20e777f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/IdentificationType.java @@ -172,8 +172,8 @@ public class IdentificationType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java index 2afa51544..90dfd4110 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/InternetAddressType.java @@ -121,8 +121,8 @@ public class InternetAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java index 4a426fc93..ebc563acb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/NationalityType.java @@ -52,10 +52,10 @@ import org.w3c.dom.Element; public class NationalityType { @XmlElementRefs({ - @XmlElementRef(name = "ISOCode3", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), - @XmlElementRef(name = "CountryNameEN", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), @XmlElementRef(name = "CountryNameFR", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), - @XmlElementRef(name = "CountryNameDE", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) + @XmlElementRef(name = "CountryNameEN", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), + @XmlElementRef(name = "CountryNameDE", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class), + @XmlElementRef(name = "ISOCode3", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) }) @XmlMixed @XmlAnyElement(lax = true) @@ -79,13 +79,13 @@ public class NationalityType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link Object } * {@link String } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Element } + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java index cefaa3bbd..699519798 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PersonDataType.java @@ -63,7 +63,7 @@ public class PersonDataType @XmlElementRef(name = "Person", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) protected JAXBElement person; - @XmlElementRef(name = "Address", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "Address", namespace = "http://reference.e-government.gv.at/namespace/persondata/20020228#", type = JAXBElement.class) protected List> address; @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") protected List signature; @@ -75,11 +75,11 @@ public class PersonDataType * * @return * possible object is - * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} * */ public JAXBElement getPerson() { @@ -91,11 +91,11 @@ public class PersonDataType * * @param value * allowed object is - * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPhysicalPersonType }{@code >} + * {@link JAXBElement }{@code <}{@link PhysicalPersonType }{@code >} * {@link JAXBElement }{@code <}{@link CompactCorporateBodyType }{@code >} + * {@link JAXBElement }{@code <}{@link AbstractPersonType }{@code >} * */ public void setPerson(JAXBElement value) { @@ -120,12 +120,12 @@ public class PersonDataType * *

* Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} + * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} * {@link JAXBElement }{@code <}{@link InternetAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TelephoneAddressType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractAddressType }{@code >} * {@link JAXBElement }{@code <}{@link TypedPostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link CompactPostalAddressType }{@code >} - * {@link JAXBElement }{@code <}{@link PostalAddressType }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java index f2727635e..4c5a5e34f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/PhysicalPersonType.java @@ -484,8 +484,8 @@ public class PhysicalPersonType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java index eb7640237..2e8e7e6e3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TelephoneAddressType.java @@ -125,8 +125,8 @@ public class TelephoneAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java index c85e2ec69..0b53e5e6a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/persondata/TypedPostalAddressType.java @@ -120,8 +120,8 @@ public class TypedPostalAddressType * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link Object } + * {@link Element } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java index e8ec84ccf..fb556ea95 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/AdviceType.java @@ -41,8 +41,8 @@ import org.w3c.dom.Element; public class AdviceType { @XmlElementRefs({ - @XmlElementRef(name = "Assertion", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false), - @XmlElementRef(name = "AssertionIDReference", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false) + @XmlElementRef(name = "Assertion", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class), + @XmlElementRef(name = "AssertionIDReference", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class) }) @XmlAnyElement(lax = true) protected List assertionIDReferenceOrAssertionOrAny; @@ -65,10 +65,10 @@ public class AdviceType { * *

* Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Element } * {@link JAXBElement }{@code <}{@link AssertionType }{@code >} * {@link Object } - * {@link JAXBElement }{@code <}{@link String }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java index 6845e807a..89b61c35c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/saml/assertion/SubjectType.java @@ -41,8 +41,8 @@ import javax.xml.bind.annotation.XmlType; public class SubjectType { @XmlElementRefs({ - @XmlElementRef(name = "NameIdentifier", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false), - @XmlElementRef(name = "SubjectConfirmation", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class, required = false) + @XmlElementRef(name = "NameIdentifier", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class), + @XmlElementRef(name = "SubjectConfirmation", namespace = "urn:oasis:names:tc:SAML:1.0:assertion", type = JAXBElement.class) }) protected List> content; diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java index 1f980f6df..c6845af5e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyInfoType.java @@ -53,13 +53,13 @@ import org.w3c.dom.Element; public class KeyInfoType { @XmlElementRefs({ - @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) }) @XmlMixed @XmlAnyElement(lax = true) @@ -88,16 +88,16 @@ public class KeyInfoType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} * {@link JAXBElement }{@code <}{@link X509DataType }{@code >} + * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} - * {@link Object } - * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} * {@link String } * {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} + * {@link Element } + * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java index 55001162c..68693eace 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/KeyValueType.java @@ -42,8 +42,8 @@ import org.w3c.dom.Element; public class KeyValueType { @XmlElementRefs({ - @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) }) @XmlMixed @XmlAnyElement(lax = true) @@ -68,10 +68,10 @@ public class KeyValueType { *

* Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} - * {@link Element } + * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} * {@link String } + * {@link Element } * {@link Object } - * {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java index a32d3badc..167a019bd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/ObjectFactory.java @@ -25,6 +25,7 @@ import javax.xml.namespace.QName; @XmlRegistry public class ObjectFactory { + private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData"); private final static QName _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData"); private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); @@ -49,16 +50,15 @@ public class ObjectFactory { private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); - private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); + private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); + private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); + private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); - private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); - private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); - private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); - private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); + private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: at.gv.util.xsd.xmldsig @@ -243,6 +243,15 @@ public class ObjectFactory { return new X509IssuerSerialType(); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) + public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { + return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }{@code >}} * @@ -463,9 +472,27 @@ public class ObjectFactory { * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} * */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) - public JAXBElement createTransformTypeXPath(String value) { - return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyID(String value) { + return new JAXBElement(_PGPDataTypePGPKeyID_QNAME, String.class, PGPDataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) + public JAXBElement createPGPDataTypePGPKeyPacket(String value) { + return new JAXBElement(_PGPDataTypePGPKeyPacket_QNAME, String.class, PGPDataType.class, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) + public JAXBElement createSPKIDataTypeSPKISexp(String value) { + return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, String.class, SPKIDataType.class, value); } /** @@ -513,40 +540,13 @@ public class ObjectFactory { return new JAXBElement(_X509DataTypeX509CRL_QNAME, String.class, X509DataType.class, value); } - /** - * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) - public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { - return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) - public JAXBElement createSPKIDataTypeSPKISexp(String value) { - return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, String.class, SPKIDataType.class, value); - } - /** * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} * */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) - public JAXBElement createPGPDataTypePGPKeyID(String value) { - return new JAXBElement(_PGPDataTypePGPKeyID_QNAME, String.class, PGPDataType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) - public JAXBElement createPGPDataTypePGPKeyPacket(String value) { - return new JAXBElement(_PGPDataTypePGPKeyPacket_QNAME, String.class, PGPDataType.class, value); + @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) + public JAXBElement createTransformTypeXPath(String value) { + return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); } } diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java index e45501db6..add2d8886 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/PGPDataType.java @@ -47,8 +47,8 @@ import org.w3c.dom.Element; public class PGPDataType { @XmlElementRefs({ - @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) }) @XmlAnyElement(lax = true) protected List content; @@ -81,10 +81,10 @@ public class PGPDataType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link Object } * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java index f829d355d..e6a187e9b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SPKIDataType.java @@ -60,8 +60,8 @@ public class SPKIDataType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Element } * {@link Object } * * diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java index 70695afdf..1a463591b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/SignatureMethodType.java @@ -42,7 +42,7 @@ import javax.xml.bind.annotation.XmlType; }) public class SignatureMethodType { - @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) @XmlMixed @XmlAnyElement(lax = true) protected List content; @@ -68,9 +68,9 @@ public class SignatureMethodType { * *

* Objects of the following type(s) are allowed in the list + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} * {@link String } * {@link Object } - * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} * * */ diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java index 2b96c553e..e92465a4c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/TransformType.java @@ -42,7 +42,7 @@ import org.w3c.dom.Element; }) public class TransformType { - @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) @XmlMixed @XmlAnyElement(lax = true) protected List content; @@ -68,9 +68,9 @@ public class TransformType { * *

* Objects of the following type(s) are allowed in the list + * {@link String } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Element } - * {@link String } * {@link Object } * * diff --git a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java index e3148b2d0..c70b72293 100644 --- a/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java +++ b/id/server/idserverlib/src/main/java/at/gv/util/xsd/xmldsig/X509DataType.java @@ -46,11 +46,11 @@ import org.w3c.dom.Element; public class X509DataType { @XmlElementRefs({ - @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) + @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class), + @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) }) @XmlAnyElement(lax = true) protected List x509IssuerSerialOrX509SKIOrX509SubjectName; @@ -73,13 +73,13 @@ public class X509DataType { * *

* Objects of the following type(s) are allowed in the list - * {@link Element } - * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} - * {@link Object } + * {@link Element } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} + * {@link Object } * * */ diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index dc698782a..a6c0601e4 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -220,6 +220,7 @@ pvp2.13=Interner Server Fehler pvp2.14=SAML Anfrage verweigert pvp2.15=Keine Metadateninformation gefunden pvp2.16=Fehler beim verschl\u00FCsseln der PVP2 Assertion +pvp2.17=Der QAA Level {0} entspricht nicht dem angeforderten QAA Level {1} oauth20.01=Fehlerhafte redirect url oauth20.02=Fehlender Parameter "{0}" diff --git a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html index 3eff06daf..9d6ad4085 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html @@ -3,333 +3,318 @@ - - +*/ + input { + /*border:1px solid #000;*/ + cursor: pointer; + } + + #localBKU input { +/* color: #BUTTON_COLOR#; */ + border: 0px; + display: inline-block; + + } + + #localBKU input:hover, #localBKU input:focus, #localBKU input:active { + text-decoration: underline; + } + + #installJava, #BrowserNOK { + clear:both; + font-size:0.8em; + padding:4px; + } + + .selectText{ + + } + + .selectTextHeader{ + + } + + .sendButton { + width: 30%; + margin-bottom: 1%; + } + + #leftcontent a { + text-decoration:none; + color: #000; + /* display:block;*/ + padding:4px; + } + + #leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active { + text-decoration:underline; + color: #000; + } + + .infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; + } + + .hell { + background-color : #MAIN_BACKGOUNDCOLOR#; + color: #MAIN_COLOR#; + } + + .dunkel { + background-color: #HEADER_BACKGROUNDCOLOR#; + color: #HEADER_COLOR#; + } + + .main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; + + } + + +Anmeldung mittels Bürgerkarte oder Handy-Signatur + + +

+
+

Anmeldung an: #OAName#

+
+
+
+

#HEADER_TEXT#

+
+
+
+
+ + + +
+
+
+
+ OnlineBKU +
+
+ HandyBKU +
+
+
+
+ + +
+
+ +
+

Home Country Selection

+

+ + + i +

+
+ + +
+
+
+
+ +
+ + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html new file mode 100644 index 000000000..b80d654cc --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html @@ -0,0 +1,617 @@ + + + + + + + + + Anmeldung an Online-Applikation + + + + +
+ +
+ + + +
+
+
+

+ Anmeldeinformationen: +

+
+ +
+

Anmeldung an: #OAName#

+ + +
+
+ + + + + +
+
+
+
+ + + + + +
+
+ +
+
+
+
+ +
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/mail/activation_template.html b/id/server/data/deploy/conf/moa-id-configuration/mail/activation_template.html new file mode 100644 index 000000000..adac14f56 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/mail/activation_template.html @@ -0,0 +1,39 @@ + + + + +Benachrichtigung + + + + + +
+

Sehr geehrte(r) #GIVENNAME# #FAMILYNAME#,

+

 

+

Ihr Benutzeraccount für das MOA-ID 2.x Verwaltungs- und Konfigurationstool wurde soeben durch den Administrator freigegeben.

+

Sie können Sich ab nun unter folgendem Link am Konfigurationstool anmelden und Ihre Online-Applikationen verwalten. + #MANDATE_SERVICE_LINK#.

+ +

 

+

Graz, #TODAY_DATE#

+

E-Government Innovationszentrum
+ Inffeldgasse 16a
+ 8010 Graz
+
+ Telefon: +43 (316) 873-5514
+ Fax: +43 (316) 873-5520
+ E-Mail: moa-id-configuration@egiz.gv.at +

+
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/mail/admin_template.html b/id/server/data/deploy/conf/moa-id-configuration/mail/admin_template.html new file mode 100644 index 000000000..dd5872514 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/mail/admin_template.html @@ -0,0 +1,40 @@ + + + + +Benachrichtigung + + + + + +
+

Sehr geehrte(r) Administrator(in),

+

 

+

Am MOA-ID 2.x Verwaltungs- und Konfigurationstool liegen offene Anträge vor.

+ +

Aktuell warten #NUMBER_USERSS# neue Benutzeraccount(s) und #NUMBER_OAS# neue Online-Applikation(en) + auf eine Freigabe durch einen Administrator.

+ +

 

+

Graz, #TODAY_DATE#

+

E-Government Innovationszentrum
+ Inffeldgasse 16a
+ 8010 Graz
+
+ Telefon: +43 (316) 873-5514
+ Fax: +43 (316) 873-5520
+ E-Mail: moa-id-configuration@egiz.gv.at +

+
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/mail/oa_activation_template.html b/id/server/data/deploy/conf/moa-id-configuration/mail/oa_activation_template.html new file mode 100644 index 000000000..e809de743 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/mail/oa_activation_template.html @@ -0,0 +1,37 @@ + + + + +Benachrichtigung + + + + + +
+

Sehr geehrte(r) #GIVENNAME# #FAMILYNAME#,

+

 

+

Ihre Online-Applikation mit der ID #OANAME# wurde soeben durch den Administrator freigegeben.

+ +

 

+

Graz, #TODAY_DATE#

+

E-Government Innovationszentrum
+ Inffeldgasse 16a
+ 8010 Graz
+
+ Telefon: +43 (316) 873-5514
+ Fax: +43 (316) 873-5520
+ E-Mail: moa-id-configuration@egiz.gv.at +

+
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/mail/rejected_template.html b/id/server/data/deploy/conf/moa-id-configuration/mail/rejected_template.html new file mode 100644 index 000000000..b5abff125 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/mail/rejected_template.html @@ -0,0 +1,37 @@ + + + + +Benachrichtigung + + + + + +
+

Sehr geehrte(r) #GIVENNAME# #FAMILYNAME#,

+

 

+

Ihr Benutzeraccount für das MOA-ID 2.x Verwaltungs- und Konfigurationstool wurde soeben durch einen Administrator gelöscht.

+ +

 

+

Graz, #TODAY_DATE#

+

E-Government Innovationszentrum
+ Inffeldgasse 16a
+ 8010 Graz
+
+ Telefon: +43 (316) 873-5514
+ Fax: +43 (316) 873-5520
+ E-Mail: moa-id-configuration@egiz.gv.at +

+
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/mail/verification_template.html b/id/server/data/deploy/conf/moa-id-configuration/mail/verification_template.html new file mode 100644 index 000000000..fb4a3f2c4 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/mail/verification_template.html @@ -0,0 +1,43 @@ + + + + +Benachrichtigung + + + + + +
+

Sehr geehrte(r) #GIVENNAME# #FAMILYNAME#,

+

 

+

Sie haben einen Benutzeraccount für das MOA-ID 2.x Verwaltungs- und Konfigurationstool beantragt.

+

Um Ihren Antrag abzuschließen öffnen Sie bitte den folgenden Link in Ihrem Browser.
+ #MANDATE_SERVICE_LINK#.
+ Anschließend wird Ihre Antrag an den zuständigen Administrator weitergeleitet. + Sie erhalten danach eine weitere Bestätigung sobald Ihr Benutzeraccount freigeschalten wurde.

+ +

Sollten Sie keinen Account beantragt haben können Sie dieses Mail ignorieren.

+ +

 

+

Graz, #TODAY_DATE#

+

E-Government Innovationszentrum
+ Inffeldgasse 16a
+ 8010 Graz
+
+ Telefon: +43 (316) 873-5514
+ Fax: +43 (316) 873-5520
+ E-Mail: moa-id-configuration@egiz.gv.at +

+
+ + diff --git a/id/server/data/deploy/conf/moa-id-configuration/moa-id.properties b/id/server/data/deploy/conf/moa-id-configuration/moa-id.properties new file mode 100644 index 000000000..2bb9cb005 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/moa-id.properties @@ -0,0 +1,75 @@ +#General config +general.login.deaktivate=false +general.publicURLContext=https://localhost:8443/moa-id-configuration + +##Mail +general.mail.host=smtp.localhost... +#general.mail.host.port= +#general.mail.host.username= +#general.mail.host.password= + +general.mail.from.name=MOA-ID 2.x Konfigurationstool +general.mail.from.address=no-reply@localhost + +general.mail.useraccountrequest.verification.subject=MOA-ID 2.x - Benutzerverifikation +general.mail.useraccountrequest.verification.template=mail/verification_template.html + +general.mail.useraccountrequest.isactive.subject=MOA-ID 2.x - Benutzeraktivierung +general.mail.useraccountrequest.isactive.template=mail/activation_template.html +general.mail.useraccountrequest.rejected.template=mail/rejected_template.html + +general.mail.createOArequest.isactive.subject=MOA-ID 2.x - Online-Applikationsaktivierung +general.mail.createOArequest.isactive.template=mail/oa_activation_template.html + +general.mail.admin.adress=admin@localhost +general.mail.admin.subject=MOA-ID 2.x - Statusmeldung +general.mail.admin.adresses.template=mail/admin_template.html + + +general.moaid.instance.url=https://localhost:8443/moa-id-auth/ + +##PVP2 Authentication +general.login.pvp2.isactive=true + +general.login.pvp2.idp.metadata.url=https://localhost:8443/moa-id-auth/pvp2/metadata +general.login.pvp2.idp.metadata.certificate=$PATH_TO_CONFIG$/conf/moa-id-configuration/keys/moa_idp.crt +general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth +general.login.pvp2.idp.sso.logout.url=https://localhost:8443/moa-id-auth/LogOut?redirect= + +general.login.pvp2.metadata.entities.name=MOA-ID 2.x Configuration Tool +general.login.pvp2.keystore.url=$PATH_TO_CONFIG$/conf/moa-id-configuration/keys/application.p12 +general.login.pvp2.keystore.password=password +general.login.pvp2.keystore.type=PKCS12 + +general.login.pvp2.keystore.metadata.key.alias=pvp_metadata +general.login.pvp2.keystore.metadata.key.password=password + +general.login.pvp2.keystore.authrequest.encryption.key.alias=pvp_encryption +general.login.pvp2.keystore.authrequest.encryption.key.password=password + +general.login.pvp2.keystore.authrequest.key.alias=pvp_request +general.login.pvp2.keystore.authrequest.key.password=password + +#UserRequestCleanUP time in hours +general.userrequests.cleanup.delay=18 + +##Hibnerate configuration for MOA-ID 2.0 configuration +hibernate.dialect=org.hibernate.dialect.MySQLDialect +hibernate.connection.url=jdbc:mysql://localhost/moa-id-config?charSet=utf-8&autoReconnect=true +hibernate.connection.charSet=utf-8 +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.connection.username= +hibernate.connection.password= + +hibernate.hbm2ddl.auto=update +hibernate.current_session_context_class=thread +hibernate.transaction.flush_before_completion=true +hibernate.transaction.auto_close_session=true +hibernate.show_sql=false +hibernate.format_sql=true +hibernate.c3p0.acquire_increment=3 +hibernate.c3p0.idle_test_period=300 +hibernate.c3p0.timeout=300 +hibernate.c3p0.max_size=20 +hibernate.c3p0.max_statements=0 +hibernate.c3p0.min_size=3 \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id-configuration/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml b/id/server/data/deploy/conf/moa-id-configuration/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml new file mode 100644 index 000000000..e225ca6e0 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-configuration/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml @@ -0,0 +1,7 @@ +Signatur der Anmeldedaten

Anmeldedaten:

Daten zur Person

Name:
Geburtsdatum:..
Rolle:
Vollmacht:Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde.

Daten zur Anwendung

Name:
Staat:Österreich

Technische Parameter

URL:
Bereich:
+ Vollmachten-Referenz:
:
Identifikator:
OID:
HPI:
SessionTokken:
Datum:..
Uhrzeit:::
application/xhtml+xml
\ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id-oa/oa.properties b/id/server/data/deploy/conf/moa-id-oa/oa.properties new file mode 100644 index 000000000..1a3684fcb --- /dev/null +++ b/id/server/data/deploy/conf/moa-id-oa/oa.properties @@ -0,0 +1,20 @@ +general.login.pvp2.idp.metadata.url=https://localhost:8443/moa-id-auth/pvp2/metadata +general.login.pvp2.idp.metadata.certificate=$PATH_TO_CONFIG$/conf/moa-id-oa/keys/moa_idp.crt +general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth + +general.login.pvp2.OA.metadata.entities.name=MOA-ID 2.x Demo-Application +general.login.pvp2.OA.metadata.entity.name=https://localhost:8443/oa + +general.login.pvp2.OA.keystore.url=$PATH_TO_CONFIG$/conf/moa-id-oa/keys/application.p12 +general.login.pvp2.OA.keystore.password=password +general.login.pvp2.OA.keystore.type=PKCS12 + +general.login.pvp2.OA.keystore.metadata.sign.key.alias=pvp_metadata +general.login.pvp2.OA.keystore.metadata.sign.key.password=password + +general.login.pvp2.keystore.authrequest.sign.key.alias=pvp_request +general.login.pvp2.keystore.authrequest.sign.key.password=password + +general.login.pvp2.keystore.assertion.encryption.key.alias=pvp_encryption +general.login.pvp2.keystore.assertion.encryption.key.password=password + diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html new file mode 100644 index 000000000..9d6ad4085 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -0,0 +1,850 @@ + + + + + + + + + +Anmeldung mittels Bürgerkarte oder Handy-Signatur + + +
+
+

Anmeldung an: #OAName#

+
+
+
+

#HEADER_TEXT#

+
+
+
+
+ + + +
+
+
+
+ OnlineBKU +
+
+ HandyBKU +
+
+
+
+ + +
+
+ +
+

Home Country Selection

+

+ + + i +

+
+ + +
+
+
+
+ +
+ + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html new file mode 100644 index 000000000..b80d654cc --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html @@ -0,0 +1,617 @@ + + + + + + + + + Anmeldung an Online-Applikation + + + + +
+ +
+ + + +
+
+
+

+ Anmeldeinformationen: +

+
+ +
+

Anmeldung an: #OAName#

+ + +
+
+ + + + + +
+
+
+
+ + + + + +
+
+ +
+
+
+
+ +
+ + diff --git a/id/server/data/deploy/conf/moa-id/moa-id.properties b/id/server/data/deploy/conf/moa-id/moa-id.properties new file mode 100644 index 000000000..879cb575a --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/moa-id.properties @@ -0,0 +1,121 @@ +##General MOA-ID 2.0 Configuration + +#MOA-ID 2.0 XML configuration files (necessary, if inmemory database is used) +#configuration.xml=$PATH_TO_CONFIG$/conf/moa-id/MOAIDConfiguration-2.0.xml + +##General MOA-ID 2.0 operations +#MOA-ID 2.0 session information encryption key (PassPhrase) +configuration.moasession.key=SessionEncryptionKey + +#MOA-ID 2.0 Monitoring Servlet +configuration.monitoring.active=false +configuration.monitoring.message.success=All Tests passed! +configuration.monitoring.test.identitylink.url=$PATH_TO_CONFIG$/conf/moa-id/monitoring/identity_link.xml + +#MOA-ID 2.0 Advanced Logging +configuration.advancedlogging.active=false + +##Webservice Client Configuration +#MOA-SP webservice +#service.moasp.acceptedServerCertificates= +#service.moasp.clientKeyStore= +#service.moasp.clientKeyStorePassword= + +#Online mandates webservice (MIS) +service.onlinemandates.acceptedServerCertificates= +service.onlinemandates.clientKeyStore=keys/.... +service.onlinemandates.clientKeyStorePassword= + +#Foreign Identities (SZRGW) +service.foreignidentities.acceptedServerCertificates= +service.foreignidentities.clientKeyStore=keys/.... +service.foreignidentities.clientKeyStorePassword= + + +##STORK configuration +#STORK +stork.samlsigningparameter.signaturecreation.keystore.file=keys/storkDemoKeys.jks +stork.samlsigningparameter.signaturecreation.keystore.password=local-demo +stork.samlsigningparameter.signaturecreation.keyname.name=at-demo-cert +stork.samlsigningparameter.signaturecreation.keyname.password=stork + + +##Protocol configuration## +#PVP2 +protocols.pvp2.idp.ks.file=file:$PATH_TO_CONFIG$/conf/moa-id/keys/moa_idp.p12 +protocols.pvp2.idp.ks.kspassword=password +protocols.pvp2.idp.ks.metadata.alias=pvp_metadata +protocols.pvp2.idp.ks.metadata.keypassword=password +protocols.pvp2.idp.ks.assertion.sign.alias=pvp_assertion +protocols.pvp2.idp.ks.assertion.sign.keypassword=password + +#OpenID connect (OAuth) +protocols.oauth20.jwt.ks.file=file:$PATH_TO_CONFIG$/conf/moa-id/keys/moa_idp.p12 +protocols.oauth20.jwt.ks.password=password +protocols.oauth20.jwt.ks.key.name=oauth +protocols.oauth20.jwt.ks.key.password=password + +##Database configuration## +#Hibnerate configuration for MOA-ID 2.0 session store +moasession.hibernate.dialect=org.hibernate.dialect.MySQLDialect +moasession.hibernate.connection.url=jdbc:mysql://localhost/moa-id-session?charSet=utf-8 +moasession.hibernate.connection.charSet=utf-8 +moasession.hibernate.connection.driver_class=com.mysql.jdbc.Driver +moasession.hibernate.connection.username= +moasession.hibernate.connection.password= + +moasession.hibernate.hbm2ddl.auto=update +moasession.hibernate.current_session_context_class=thread +moasession.hibernate.transaction.flush_before_completion=true +moasession.hibernate.transaction.auto_close_session=true +moasession.hibernate.show_sql=false +moasession.hibernate.format_sql=true +moasession.hibernate.c3p0.acquire_increment=3 +moasession.hibernate.c3p0.idle_test_period=60 +moasession.hibernate.c3p0.timeout=60 +moasession.hibernate.c3p0.max_size=20 +moasession.hibernate.c3p0.max_statements=0 +moasession.hibernate.c3p0.min_size=3 + +#Hibnerate configuration for MOA-ID 2.0 configuration +configuration.hibernate.dialect=org.hibernate.dialect.MySQLDialect +configuration.hibernate.connection.url=jdbc:mysql://localhost/moa-id-config?charSet=utf-8&autoReconnect=true +configuration.hibernate.connection.charSet=utf-8 +configuration.hibernate.connection.driver_class=com.mysql.jdbc.Driver +configuration.hibernate.connection.username= +configuration.hibernate.connection.password= + +configuration.hibernate.hbm2ddl.auto=update +configuration.hibernate.current_session_context_class=thread +configuration.hibernate.transaction.auto_close_session=true +configuration.hibernate.show_sql=false +configuration.hibernate.format_sql=true +configuration.hibernate.connection.provider_class=org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider +configuration.hibernate.c3p0.acquire_increment=3 +configuration.hibernate.c3p0.idle_test_period=60 +configuration.hibernate.c3p0.timeout=300 +configuration.hibernate.c3p0.max_size=20 +configuration.hibernate.c3p0.max_statements=0 +configuration.hibernate.c3p0.min_size=3 + +# +#Hibnerate configuration for MOA-ID 2.0 advanced statistic logging +advancedlogging.hibernate.dialect=org.hibernate.dialect.MySQLDialect +advancedlogging.hibernate.connection.url=jdbc:mysql://localhost/moa-id-statistic?charSet=utf-8&autoReconnect=true +advancedlogging.hibernate.connection.charSet=utf-8 +advancedlogging.hibernate.connection.driver_class=com.mysql.jdbc.Driver +advancedlogging.hibernate.connection.username= +advancedlogging.hibernate.connection.password= + +advancedlogging.hibernate.hbm2ddl.auto=update +advancedlogging.hibernate.current_session_context_class=thread +advancedlogging.hibernate.transaction.auto_close_session=true +advancedlogging.hibernate.show_sql=false +advancedlogging.hibernate.format_sql=true +advancedlogging.hibernate.connection.provider_class=org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider +advancedlogging.hibernate.c3p0.acquire_increment=3 +advancedlogging.hibernate.c3p0.idle_test_period=60 +advancedlogging.hibernate.c3p0.timeout=300 +advancedlogging.hibernate.c3p0.max_size=20 +advancedlogging.hibernate.c3p0.max_statements=0 +advancedlogging.hibernate.c3p0.min_size=3 diff --git a/id/server/data/deploy/conf/moa-id/stork/SamlEngine.xml b/id/server/data/deploy/conf/moa-id/stork/SamlEngine.xml new file mode 100644 index 000000000..563196604 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/stork/SamlEngine.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/stork/SignModule_outgoing.xml b/id/server/data/deploy/conf/moa-id/stork/SignModule_outgoing.xml new file mode 100644 index 000000000..7139c5a41 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/stork/SignModule_outgoing.xml @@ -0,0 +1,12 @@ + + + + + SWModule sign with JKS. + projects/stork2/code/moa-idspss/id/server/stork2-saml-engine/src/test/resources/storkDemoKeys.jks + local-demo + local-demo + CN=local-demo-cert, O=Indra, L=Madrid, ST=Spain, C=ES + 4BA89DB2 + JKS + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml new file mode 100644 index 000000000..79c69aedb --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/stork/StorkSamlEngine_outgoing.xml @@ -0,0 +1,93 @@ + + + + + SAML constants for AuthnRequests and Responses. + + + unspecified + + + obtained + + + entity + + + + HTTP-POST + + + + + + + + + + false + + + true + + + http://S-PEPS.gov.xx + + + http://C-PEPS.gov.xx + + + 300 + + + false + + + + http://www.stork.gov.eu/1.0/eIdentifier + http://www.stork.gov.eu/1.0/givenName + http://www.stork.gov.eu/1.0/surname + http://www.stork.gov.eu/1.0/inheritedFamilyName + http://www.stork.gov.eu/1.0/adoptedFamilyName + http://www.stork.gov.eu/1.0/gender + http://www.stork.gov.eu/1.0/dateOfBirth + http://www.stork.gov.eu/1.0/countryCodeOfBirth + http://www.stork.gov.eu/1.0/nationalityCode + http://www.stork.gov.eu/1.0/maritalStatus + http://www.stork.gov.eu/1.0/residenceAddress + http://www.stork.gov.eu/1.0/eMail + http://www.stork.gov.eu/1.0/academicTitle + http://www.stork.gov.eu/1.0/pseudonym + http://www.stork.gov.eu/1.0/age + http://www.stork.gov.eu/1.0/isAgeOver + + http://www.stork.gov.eu/1.0/textResidenceAddress + http://www.stork.gov.eu/1.0/canonicalResidenceAddress + + http://www.stork.gov.eu/1.0/title + http://www.stork.gov.eu/1.0/residencePermit + + http://www.stork.gov.eu/1.0/signedDoc + http://www.stork.gov.eu/1.0/citizen509Certificate + + http://www.stork.gov.eu/1.0/newAttribute1 + http://www.stork.gov.eu/1.0/newAttribute2 + http://www.stork.gov.eu/1.0/hasDegree + http://www.stork.gov.eu/1.0/mandateContent + http://www.stork.gov.eu/1.0/representative + http://www.stork.gov.eu/1.0/represented + + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml new file mode 100644 index 000000000..1165d8b32 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml @@ -0,0 +1,161 @@ + + + + + + + + + Signatur der Anmeldedaten + + + +

Anmeldedaten:

+

Daten zur Person

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Name: + +
Geburtsdatum: + + . + + . + +
Rolle: + +
Vollmacht: + Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde. +
+

Daten zur Anwendung

+ + + + + + + + + +
Name: + +
Staat:Österreich
+

Technische Parameter

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
URL: + +
Bereich: + +
+ Vollmachten-Referenz: + +
+ : + +
Identifikator: + + +
OID: + +
HPI: + +
Datum: + + . + + . + +
Uhrzeit: + + : + + : + +
+ + +
+
+
+ +
+ + application/xhtml+xml + +
diff --git a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml new file mode 100644 index 000000000..e225ca6e0 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE_2.0.xml @@ -0,0 +1,7 @@ +Signatur der Anmeldedaten

Anmeldedaten:

Daten zur Person

Name:
Geburtsdatum:..
Rolle:
Vollmacht:Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde.

Daten zur Anwendung

Name:
Staat:Österreich

Technische Parameter

URL:
Bereich:
+ Vollmachten-Referenz:
:
Identifikator:
OID:
HPI:
SessionTokken:
Datum:..
Uhrzeit:::
application/xhtml+xml
\ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml index 1352154c5..14acd54f2 100644 --- a/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml +++ b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml @@ -67,6 +67,10 @@ + + MOAIDTransformAuthBlockTable_DE_2.0 + profiles/MOAIDTransformAuthBlockTable_DE_2.0.xml + MOAIDTransformAuthBlockTable_DE profiles/MOAIDTransformAuthBlockTable_DE.xml diff --git a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml new file mode 100644 index 000000000..afeccd25f --- /dev/null +++ b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml @@ -0,0 +1,159 @@ + + + + + + + + + + Signatur der Anmeldedaten + + + +

Anmeldedaten:

+

Daten zur Person

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Name: + +
Geburtsdatum: + + . + + . + +
Rolle: + +
Vollmacht: + Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde. +
+

Daten zur Anwendung

+ + + + + + + + + +
Name: + +
Staat:Österreich
+

Technische Parameter

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
URL: + +
Bereich: + +
+ Vollmachten-Referenz: + +
+ : + +
Identifikator: + + +
OID: + +
HPI: + +
Datum: + + . + + . + +
Uhrzeit: + + : + + : + +
+ + +
+
+
+ +
+
diff --git a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE_2.0.xml b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE_2.0.xml new file mode 100644 index 000000000..dc472efcb --- /dev/null +++ b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE_2.0.xml @@ -0,0 +1,7 @@ +Signatur der Anmeldedaten

Anmeldedaten:

Daten zur Person

Name:
Geburtsdatum:..
Rolle:
Vollmacht:Ich melde mich in Vertretung an. Im nächsten Schritt wird mir eine Liste der für mich verfügbaren Vertretungsverhältnisse angezeigt, aus denen ich eines auswählen werde.

Daten zur Anwendung

Name:
Staat:Österreich

Technische Parameter

URL:
Bereich:
+ Vollmachten-Referenz:
:
Identifikator:
OID:
HPI:
SessionTokken:
Datum:..
Uhrzeit:::
\ No newline at end of file diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java index 151529ad5..402927261 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java @@ -89,7 +89,7 @@ public class MetadataAction implements IAction { idpEntitiesDescriptor.getEntityDescriptors().add(idpEntityDescriptor); idpEntityDescriptor - .setEntityID(PVPConfiguration.getInstance().getIDPPublicPath()); + .setEntityID(PVPConfiguration.getInstance().getIDPSSOMetadataService()); idpEntityDescriptor.setValidUntil(date.plusDays(VALIDUNTIL_IN_DAYES)); -- cgit v1.2.3 From ebe0a4c8c3e63b5cdbd9ee1bd781635059cd5516 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 3 Feb 2014 16:44:14 +0100 Subject: Bugfix: Error Handling --- .../oauth20/json/OAuthSignatureAlgorithm.java | 23 +-- .../oauth20/protocol/OAuth20Protocol.java | 176 ++++++++++----------- .../moa/id/auth/oauth/OAuth20ErrorsTests.java | 28 +--- 3 files changed, 90 insertions(+), 137 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/json/OAuthSignatureAlgorithm.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/json/OAuthSignatureAlgorithm.java index 473efc10a..db15516e7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/json/OAuthSignatureAlgorithm.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/json/OAuthSignatureAlgorithm.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.json; import java.security.NoSuchAlgorithmException; @@ -69,6 +47,7 @@ public enum OAuthSignatureAlgorithm { */ public Signature getSignatureInstance() throws NoSuchAlgorithmException, NoSuchProviderException { if (!StringUtils.isEmpty(this.providerName)) { + //return Signature.getInstance(this.signatureName, this.providerName); return Signature.getInstance(this.signatureName, this.providerName); } else { return Signature.getInstance(this.signatureName); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java index 7ef5a2068..47b81c5ff 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.protocol; import java.net.URLEncoder; @@ -30,10 +8,9 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; +import org.hibernate.annotations.common.util.StringHelper; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; -import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; -import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.moduls.IAction; import at.gv.egovernment.moa.id.moduls.IModulInfo; import at.gv.egovernment.moa.id.moduls.IRequest; @@ -79,13 +56,6 @@ public class OAuth20Protocol implements IModulInfo { */ public IRequest preProcess(HttpServletRequest request, HttpServletResponse resp, String action) throws MOAIDException { // validation is done inside creation - - if (!AuthConfigurationProvider.getInstance().getAllowedProtocols().isOAUTHActive()) { - Logger.info("OAuth is deaktivated!"); - throw new ProtocolNotActiveException("auth.22", new Object[] { NAME }); - - } - OAuth20BaseRequest res = OAuth20BaseRequest.newInstance(action, request); Logger.debug("Created: " + res); return res; @@ -98,10 +68,12 @@ public class OAuth20Protocol implements IModulInfo { * , javax.servlet.http.HttpServletResponse) */ public IAction canHandleRequest(HttpServletRequest request, HttpServletResponse response) { - if (request.getParameter("action").equals(AUTH_ACTION)) { - return getAction(AUTH_ACTION); - } else if (request.getParameter("action").equals(TOKEN_ACTION)) { - return getAction(TOKEN_ACTION); + if (!StringUtils.isEmpty(request.getParameter("action"))) { + if (request.getParameter("action").equals(AUTH_ACTION)) { + return getAction(AUTH_ACTION); + } else if (request.getParameter("action").equals(TOKEN_ACTION)) { + return getAction(TOKEN_ACTION); + } } return null;// getAction(AUTH_ACTION); @@ -116,71 +88,95 @@ public class OAuth20Protocol implements IModulInfo { public boolean generateErrorMessage(Throwable e, HttpServletRequest request, HttpServletResponse response, IRequest protocolRequest) throws Throwable { - StringBuilder url = new StringBuilder(); - - String paramRedirect = request.getParameter(OAuth20Constants.PARAM_REDIRECT_URI); + // get error code and description + String errorCode; + String errorDescription; + // String errorUri = "http://tools.ietf.org/html/draft-ietf-oauth-v2-11"; if (e instanceof OAuth20Exception) { - - String action = request.getParameter("action"); - - Logger.debug("Going to throw O OAuth20Exception for action: " + action); - OAuth20Exception oAuth20Exception = ((OAuth20Exception) e); - - String errorCode = oAuth20Exception.getErrorCode(); - String errorDescription = oAuth20Exception.getMessage(); - // String errorUri = "http://tools.ietf.org/html/draft-ietf-oauth-v2-11"; - - if (action.equals(AUTH_ACTION)) { + errorCode = ((OAuth20Exception) e).getErrorCode(); + errorDescription = URLEncoder.encode(((OAuth20Exception) e).getMessageId() + ": " + e.getMessage(), "UTF-8"); + } else { + errorCode = OAuth20Constants.ERROR_SERVER_ERROR; + errorDescription = URLEncoder.encode(e.getMessage(), "UTF-8"); + } + + String paramRedirect = null; + String state = null; + boolean isAuthRequest = false; + if (protocolRequest != null) { + if (protocolRequest instanceof OAuth20AuthRequest) { + isAuthRequest = true; - // check if given redirect url is ok - if (StringUtils.isNotEmpty(paramRedirect) && OAuth20Util.isUrl(paramRedirect)) { - url.append(paramRedirect); + paramRedirect = ((OAuth20AuthRequest) protocolRequest).getRedirectUri(); + state = ((OAuth20AuthRequest) protocolRequest).getState(); + } else { + isAuthRequest = false; + } + } else { + String action = request.getParameter("action"); + if (!StringHelper.isEmpty(action)) { + if (action.equals(AUTH_ACTION)) { - // otherwise throw an - } else { - throw new MOAIDException("oauth20.01", new Object[] {}); + paramRedirect = request.getParameter(OAuth20Constants.PARAM_REDIRECT_URI); + state = request.getParameter(OAuth20Constants.PARAM_STATE); + isAuthRequest = true; } + } else { + throw new MOAIDException("oauth20.01", new Object[] {}); + } + } + + // if (action.equals(AUTH_ACTION)) { + if (isAuthRequest) { + Logger.debug("Going to throw O OAuth20Exception for auth request"); + + StringBuilder url = new StringBuilder(); + + // check if given redirect url is ok + if (StringUtils.isNotEmpty(paramRedirect) && OAuth20Util.isUrl(paramRedirect)) { + url.append(paramRedirect); - String state = request.getParameter(OAuth20Constants.PARAM_STATE); - - OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR, errorCode); - OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_DESCRIPTION, - URLEncoder.encode(oAuth20Exception.getMessageId() + ": " + errorDescription, "UTF-8")); - // OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_URI, errorUri); - OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_STATE, state); - - response.setContentType("text/html"); - response.setStatus(HttpServletResponse.SC_FOUND); - response.addHeader("Location", url.toString()); - Logger.debug("REDIRECT TO: " + url.toString()); - return true; - - } else if (action.equals(TOKEN_ACTION)) { - Map params = new HashMap(); - params.put(OAuth20Constants.PARAM_ERROR, errorCode); - params.put(OAuth20Constants.PARAM_ERROR_DESCRIPTION, - URLEncoder.encode(oAuth20Exception.getMessageId() + ": " + errorDescription, "UTF-8")); - // params.put(OAuth20Constants.PARAM_ERROR_URI, errorUri); - - // create response - JsonObject jsonObject = new JsonObject(); - OAuth20Util.addProperytiesToJsonObject(jsonObject, params); - String jsonResponse = jsonObject.toString(); - Logger.debug("JSON Response: " + jsonResponse); - - // write respone to http response - response.setContentType("application/json"); - response.setStatus(HttpServletResponse.SC_BAD_REQUEST); - response.getOutputStream().print(jsonResponse); - response.getOutputStream().close(); - - return true; + // otherwise throw an + } else { + throw new MOAIDException("oauth20.01", new Object[] {}); } + OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR, errorCode); + OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_DESCRIPTION, errorDescription); + // OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_ERROR_URI, errorUri); + OAuth20Util.addParameterToURL(url, OAuth20Constants.PARAM_STATE, state); + + response.setContentType("text/html"); + response.setStatus(HttpServletResponse.SC_FOUND); + response.addHeader("Location", url.toString()); + Logger.debug("REDIRECT TO: " + url.toString()); + return true; + + } else { + Logger.debug("Going to throw O OAuth20Exception for token request"); + + Map params = new HashMap(); + params.put(OAuth20Constants.PARAM_ERROR, errorCode); + params.put(OAuth20Constants.PARAM_ERROR_DESCRIPTION, errorDescription); + // params.put(OAuth20Constants.PARAM_ERROR_URI, errorUri); + + // create response + JsonObject jsonObject = new JsonObject(); + OAuth20Util.addProperytiesToJsonObject(jsonObject, params); + String jsonResponse = jsonObject.toString(); + Logger.debug("JSON Response: " + jsonResponse); + + // write respone to http response + response.setContentType("application/json"); + response.setStatus(HttpServletResponse.SC_BAD_REQUEST); + response.getOutputStream().print(jsonResponse); + response.getOutputStream().close(); + + return true; } - return false; + // return false; } diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java index 113a033a6..abfca4f36 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/oauth/OAuth20ErrorsTests.java @@ -1,25 +1,3 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ package test.at.gv.egovernment.moa.id.auth.oauth; import java.io.IOException; @@ -50,11 +28,11 @@ public class OAuth20ErrorsTests { private static VerificationCodeReceiver receiver; // base uri - private static String OAUTH2_BASE_URI = "http://localhost:8080/moa-id-auth/dispatcher"; + private static String OAUTH2_BASE_URI = "https://localhost/moa-id-auth/"; // auth action - private static String OAUTH2_AUTH_URI = OAUTH2_BASE_URI + "?mod=id_oauth20&action=AUTH"; + private static String OAUTH2_AUTH_URI = OAUTH2_BASE_URI + "oauth2/auth"; // token action - private static String OAUTH2_TOKEN_URI = OAUTH2_BASE_URI + "?mod=id_oauth20&action=TOKEN"; + private static String OAUTH2_TOKEN_URI = OAUTH2_BASE_URI + "oauth2/token"; // client id private static String CLIENT_ID = "http://test"; -- cgit v1.2.3