diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2009-05-13 19:23:03 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2009-05-13 19:23:03 +0400 |
commit | efe4fe84e0931ead1fe9f5e79a5ed558462c1037 (patch) | |
tree | fa300ea3647185cff676622f8124d361098e2fb1 /mcs/class/Mono.ServiceModel.IdentitySelectors | |
parent | 15a72b59fc8f677df5577b75ca983bd2cb799014 (diff) |
moving missing WCF assembly (mono-only one).
svn path=/trunk/mcs/; revision=134063
Diffstat (limited to 'mcs/class/Mono.ServiceModel.IdentitySelectors')
30 files changed, 2421 insertions, 0 deletions
diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/AssemblyInfo.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/AssemblyInfo.cs new file mode 100644 index 00000000000..a1531139e48 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/AssemblyInfo.cs @@ -0,0 +1,59 @@ +// +// AssemblyInfo.cs +// +// Author: +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) +// +// (C) 2003 Ximian, Inc. http://www.ximian.com +// + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Reflection; +using System.Resources; +using System.Security; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about the System.ServiceModel assembly + +[assembly: AssemblyVersion (Consts.FxVersion)] +[assembly: SatelliteContractVersion (Consts.FxVersion)] + +[assembly: AssemblyTitle ("Mono.ServiceModel.IdentitySelectors.dll")] +[assembly: AssemblyDescription ("Mono.ServiceModel.IdentitySelectors.dll")] +[assembly: AssemblyConfiguration ("Development version")] +[assembly: AssemblyCompany ("MONO development team")] +[assembly: AssemblyProduct ("MONO CLI")] +[assembly: AssemblyCopyright ("(c) 2003 Various Authors")] +[assembly: AssemblyTrademark ("")] + +[assembly: CLSCompliant (true)] +[assembly: AssemblyDefaultAlias ("Mono.ServiceModel.IdentitySelectors.dll")] +[assembly: AssemblyInformationalVersion ("0.0.0.1")] +[assembly: NeutralResourcesLanguage ("en-US")] + +[assembly: ComVisible (false)] + +[assembly: AssemblyDelaySign (true)] +[assembly: AssemblyKeyFile("../mono.pub")] diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/ChangeLog new file mode 100644 index 00000000000..8e2f817e643 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Assembly/ChangeLog @@ -0,0 +1,3 @@ +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * AssemblyInfo.cs : initial commit. diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/ChangeLog new file mode 100644 index 00000000000..621dcd554a8 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/ChangeLog @@ -0,0 +1,6 @@ +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * Mono.ServiceModel.IdentitySelectors.dll.sources, + Mono.ServiceModel.IdentitySelectors_test.dll.sources, + Makefile : initial commit. + diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Makefile b/mcs/class/Mono.ServiceModel.IdentitySelectors/Makefile new file mode 100644 index 00000000000..85e800a7d66 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Makefile @@ -0,0 +1,44 @@ +thisdir = class/Mono.ServiceModel.IdentitySelectors +SUBDIRS = +include ../../build/rules.make + +RESOURCE_FILES = \ + resources/schemas-xmlsoap-or-ws-2005-05-identity.rnc + +LIBRARY = Mono.ServiceModel.IdentitySelectors.dll +LIB_MCS_FLAGS = \ + /nowarn:414,169,67,3005,436 \ + /unsafe \ + /r:System.dll \ + /r:System.Xml.dll \ + /r:System.Configuration.dll \ + /r:../lib/net_3_0/System.Runtime.Serialization.dll \ + /r:System.Security.dll \ + /r:../lib/net_3_0/System.IdentityModel.dll \ + /r:../lib/net_3_0/System.IdentityModel.Selectors.dll \ + /r:../lib/net_3_0/System.ServiceModel.dll \ + /r:System.Transactions.dll \ + /r:System.Web.dll \ + /r:System.Web.Services.dll \ + /r:Mono.Security.dll \ + $(RESOURCE_FILES:%=/resource:%) + +TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) + +TEST_EXT_RESOURCES = \ + Test/resources/managed.xml \ + Test/resources/rupert.crds \ + Test/resources/rupert.xml + +EXTRA_DISTFILES = $(RESOURCE_FILES) $(TEST_EXT_REOURCES) + +# This is a WinFX only assembly +VALID_PROFILE := $(filter net_3_0, $(PROFILE)) +ifndef VALID_PROFILE +LIBRARY_NAME = dummy-Mono.ServiceModel.IdentitySelectors.dll +NO_INSTALL = yes +NO_SIGN_ASSEMBLY = yes +NO_TEST = yes +endif + +include ../../build/library.make diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/AsymmetricProofTokenSecurityKey.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/AsymmetricProofTokenSecurityKey.cs new file mode 100644 index 00000000000..4293f2ddacb --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/AsymmetricProofTokenSecurityKey.cs @@ -0,0 +1,110 @@ +// +// AsymmetricProofTokenSecurityKey.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.IdentityModel.Tokens; +using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + class AsymmetricProofTokenSecurityKey : AsymmetricSecurityKey, IDisposable + { + NativeAsymmetricCryptoParameters parameters; + NativeInfocardCryptoHandle handle; + + public AsymmetricProofTokenSecurityKey (NativeAsymmetricCryptoParameters parameters, NativeInfocardCryptoHandle handle) + { + this.parameters = parameters; + this.handle = handle; + } + + void IDisposable.Dispose () + { + CloseCryptoHandle (handle); + } + + public override AsymmetricAlgorithm GetAsymmetricAlgorithm (string algorithm, bool privateKey) + { + throw new NotImplementedException (); + } + + public override HashAlgorithm GetHashAlgorithmForSignature (string algorithm) + { + throw new NotImplementedException (); + } + + public override AsymmetricSignatureFormatter GetSignatureFormatter (string algorithm) + { + throw new NotImplementedException (); + } + + public override AsymmetricSignatureDeformatter GetSignatureDeformatter (string algorithm) + { + throw new NotImplementedException (); + } + + public override byte [] DecryptKey (string algorithm, byte [] input) + { + throw new NotImplementedException (); + } + + public override byte [] EncryptKey (string algorithm, byte [] input) + { + throw new NotImplementedException (); + } + + public override bool IsAsymmetricAlgorithm (string algorithm) + { + throw new NotImplementedException (); + } + + public override bool IsSymmetricAlgorithm (string algorithm) + { + throw new NotImplementedException (); + } + + public override bool IsSupportedAlgorithm (string algorithm) + { + throw new NotImplementedException (); + } + + public override bool HasPrivateKey () + { + return true; + } + + public override int KeySize { + get { return parameters.KeySize; } + } + + [DllImport ("cardspaceapi")] + static extern void CloseCryptoHandle (NativeInfocardCryptoHandle handle); + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSelectorClientWin32.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSelectorClientWin32.cs new file mode 100644 index 00000000000..ef697135692 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSelectorClientWin32.cs @@ -0,0 +1,175 @@ +// +// CardSelectorClientWin32.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.IdentityModel.Claims; +using System.IdentityModel.Policy; +using System.IdentityModel.Selectors; +using System.IdentityModel.Tokens; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + public class CardSelectorClientWin32 : CardSelectorClient + { + public override void Manage () + { + ManageCardSpace (); + } + + public override void Import (string fileName) + { + ImportInformationCard (fileName); + } + + public override GenericXmlSecurityToken GetToken ( + CardSpacePolicyElement [] policyChain, + SecurityTokenSerializer serializer) + { + NativeGenericXmlToken token; + NativeInfocardCryptoHandle proof; + NativePolicyElement [] natives = + new NativePolicyElement [policyChain.Length]; + for (int i = 0; i < policyChain.Length; i++) + natives [i] = new NativePolicyElement ( + policyChain [i].Target, + policyChain [i].Issuer, + policyChain [i].Parameters, + policyChain [i].PolicyNoticeLink, + policyChain [i].PolicyNoticeVersion, + policyChain [i].IsManagedIssuer); + + int hresult = GetToken (policyChain.Length, natives, out token, out proof); + NativeGetTokenResults ret = (NativeGetTokenResults) (hresult & 0xCFFFFFFF); + switch (ret) { + case NativeGetTokenResults.OK: + return token.ToObject (proof, serializer); + case NativeGetTokenResults.UserCancelled: + throw new UserCancellationException (); + case NativeGetTokenResults.InvalidPolicy: + throw new PolicyValidationException (); + case NativeGetTokenResults.ServiceBusy: + throw new ServiceBusyException (); + case NativeGetTokenResults.ServiceUnavailable: + throw new ServiceNotStartedException (); + case NativeGetTokenResults.IdentityVerificationFailed: + case NativeGetTokenResults.InvalidDecryptionKey: + throw new IdentityValidationException (); + case NativeGetTokenResults.ErrorOnCommunication: + throw new StsCommunicationException (); + case NativeGetTokenResults.UntrustedRecipient: + throw new UntrustedRecipientException (); + case NativeGetTokenResults.UnsupportedPolicy: + throw new UnsupportedPolicyOptionsException (); + case NativeGetTokenResults.ErrorOnDataAccess: + case NativeGetTokenResults.ErrorOnExport: + case NativeGetTokenResults.ErrorOnImport: + case NativeGetTokenResults.InvalidArgument: + case NativeGetTokenResults.ErrorInRequest: + case NativeGetTokenResults.ErrorInCardData: + case NativeGetTokenResults.InvalidCertificateLogo: + case NativeGetTokenResults.InvalidPassword: + case NativeGetTokenResults.ProcessDied: + case NativeGetTokenResults.Shuttingdown: + case NativeGetTokenResults.ErrorOnTokenCreation: + case NativeGetTokenResults.TrustExchangeFailure: + case NativeGetTokenResults.ErrorOnStoreImport: + case NativeGetTokenResults.UIStartFailure: + case NativeGetTokenResults.MaxSession: + case NativeGetTokenResults.ImportFileAccessFailure: + case NativeGetTokenResults.MalformedRequest: + case NativeGetTokenResults.RefreshRequired: + case NativeGetTokenResults.MissingAppliesTo: + case NativeGetTokenResults.UnknownReference: + case NativeGetTokenResults.InvalidProofKey: + case NativeGetTokenResults.ClaimsNotProvided: + default: + throw CardspaceError (ret); + } + } + + static Exception CardspaceError (NativeGetTokenResults error) + { + switch (error) { + default: + throw new CardSpaceException (String.Format ("identity selector returned an error: {0:X}", error)); + } + } + + [DllImport ("infocardapi", CharSet = CharSet.Unicode)] + static extern int GetToken (int cPolicyChain, + NativePolicyElement [] pPolicyChain, + out NativeGenericXmlToken securityToken, + out NativeInfocardCryptoHandle phProofTokenCrypto); + + [DllImport ("infocardapi")] + static extern void ManageCardSpace (); + + [DllImport ("infocardapi", CharSet = CharSet.Unicode)] + static extern void ImportInformationCard (string fileName); + + enum NativeGetTokenResults : long + { + OK = 0, + ErrorOnCommunication = 0xC0050100, + ErrorOnDataAccess = 0xC0050101, + ErrorOnExport = 0xC0050102, + IdentityVerificationFailed = 0xC0050103, + ErrorOnImport = 0xC0050104, + InvalidArgument = 0xC0050105, + ErrorInRequest = 0xC0050106, + ErrorInCardData = 0xC0050107, + InvalidDecryptionKey = 0xC0050108, + InvalidCertificateLogo = 0xC0050109, + InvalidPassword = 0xC005010A, + InvalidPolicy = 0xC005010B, + ProcessDied = 0xC005010C, + ServiceBusy = 0xC005010D, + ServiceUnavailable = 0xC005010E, + Shuttingdown = 0xC005010F, + ErrorOnTokenCreation = 0xC0050110, + TrustExchangeFailure = 0xC0050111, + UntrustedRecipient = 0xC0050112, + UserCancelled = 0xC0050113, + ErrorOnStoreImport = 0xC0050114, + UIStartFailure = 0xC0050115, + UnsupportedPolicy = 0xC0050116, + MaxSession = 0xC0050117, + ImportFileAccessFailure = 0xC0050118, + MalformedRequest = 0xC0050119, + RefreshRequired = 0xC0050180, + MissingAppliesTo = 0xC0050181, + InvalidProofKey = 0xC0050182, + UnknownReference = 0xC0050183, + ClaimsNotProvided = 0xC0050184, + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSpaceProofToken.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSpaceProofToken.cs new file mode 100644 index 00000000000..dcb92646ddf --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/CardSpaceProofToken.cs @@ -0,0 +1,63 @@ +// +// CardSpaceProofToken.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.IdentityModel.Tokens; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + class CardSpaceProofToken : SecurityToken + { + DateTime valid_to; + ReadOnlyCollection<SecurityKey> keys; + + public CardSpaceProofToken (DateTime validTo, AsymmetricSecurityKey proofKey) + { + valid_to = validTo; + keys = new ReadOnlyCollection<SecurityKey> (new SecurityKey [] {proofKey}); + } + + public override DateTime ValidFrom { + get { return DateTime.MinValue.ToUniversalTime (); } + } + + public override DateTime ValidTo { + get { return valid_to; } + } + + public override string Id { + get { throw new NotImplementedException (); } + } + + public override ReadOnlyCollection<SecurityKey> SecurityKeys { + get { return keys; } + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/ChangeLog new file mode 100644 index 00000000000..40a2295a0aa --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/ChangeLog @@ -0,0 +1,11 @@ +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * CardSelectorClientWin32.cs : + almost identical to former CardSpaceSelector.cs in S.IM.S.dll. + * CardSpaceProofToken.cs + NativePolicyElement.cs + NativeGenericXmlToken.cs + AsymmetricProofTokenSecurityKey.cs + NativeInfocardCryptoHandle.cs + NativeInfocardHandleType.cs : moved from S.IM.S.dll. + diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeGenericXmlToken.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeGenericXmlToken.cs new file mode 100644 index 00000000000..40a1a2a2db1 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeGenericXmlToken.cs @@ -0,0 +1,99 @@ +// +// NativeGenericXmlToken.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.IdentityModel.Selectors; +using System.IdentityModel.Tokens; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Unicode)] + class NativeGenericXmlToken : IDisposable + { + // This field order must be fixed for win32 API interop: + long created; + long expired; + string xml_token; + string internal_ref; + string external_ref; + + public NativeGenericXmlToken (GenericXmlSecurityToken token, SecurityTokenSerializer serializer) + { + created = token.ValidFrom.ToFileTime (); + expired = token.ValidTo.ToFileTime (); + xml_token = token.TokenXml.OuterXml; + XmlWriterSettings settings = new XmlWriterSettings (); + settings.OmitXmlDeclaration = true; + internal_ref = GetKeyIdentifierClauseXml (serializer, settings, token.InternalTokenReference); + external_ref = GetKeyIdentifierClauseXml (serializer, settings, token.ExternalTokenReference); + } + + void IDisposable.Dispose () + { + FreeToken (this); + } + + public static string GetKeyIdentifierClauseXml (SecurityTokenSerializer serializer, XmlWriterSettings settings, SecurityKeyIdentifierClause item) + { + StringWriter sw = new StringWriter (); + using (XmlWriter xw = XmlWriter.Create (sw)) { + serializer.WriteKeyIdentifierClause (xw, item); + } + return sw.ToString (); + } + + public GenericXmlSecurityToken ToObject (NativeInfocardCryptoHandle proofTokenHandle, SecurityTokenSerializer serializer) + { + XmlDocument doc = new XmlDocument (); + doc.LoadXml (xml_token); + XmlElement token = doc.DocumentElement; + SecurityToken proof = new CardSpaceProofToken (DateTime.FromFileTime (proofTokenHandle.Expiration), proofTokenHandle.GetAsymmetricKey ()); + + DateTime effective = DateTime.FromFileTime (created); + DateTime expiration = DateTime.FromFileTime (expired); + + SecurityKeyIdentifierClause intref = + serializer.ReadKeyIdentifierClause (Create (internal_ref)); + SecurityKeyIdentifierClause extref = + serializer.ReadKeyIdentifierClause (Create (external_ref)); + return new GenericXmlSecurityToken (token, proof, effective, expiration, intref, extref, null); + } + + XmlDictionaryReader Create (string xml) + { + XmlReader xr = XmlReader.Create (new StringReader (xml)); + return XmlDictionaryReader.CreateDictionaryReader (xr); + } + + [DllImport ("infocardapi")] + static extern void FreeToken (NativeGenericXmlToken token); + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardCryptoHandle.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardCryptoHandle.cs new file mode 100644 index 00000000000..317a798eb2f --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardCryptoHandle.cs @@ -0,0 +1,107 @@ +// +// NativeInfocardCryptoHandle.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.IdentityModel.Tokens; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + // see http://msdn2.microsoft.com/en-us/library/aa702727.aspx + + [StructLayout (LayoutKind.Sequential)] + class NativeInfocardCryptoHandle + { + // This field order must be fixed for win32 API interop: + NativeInfocardHandleType handle_type; + long expiration; + IntPtr parameters; + + public long Expiration { + get { return expiration; } + } + + public AsymmetricSecurityKey GetAsymmetricKey () + { + switch (handle_type) { + case NativeInfocardHandleType.Asymmetric: + NativeAsymmetricCryptoParameters a = (NativeAsymmetricCryptoParameters) Marshal.PtrToStructure (parameters, typeof (NativeAsymmetricCryptoParameters)); + return new AsymmetricProofTokenSecurityKey (a, this); + } + throw new NotImplementedException (); + } + } + + [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Unicode)] + struct NativeAsymmetricCryptoParameters + { + int key_size; + string encalg; + string sigalg; + + public int KeySize { + get { return key_size; } + } + + public string EncryptionAlgorithm { + get { return encalg; } + } + + public string SignatureAlgorithm { + get { return sigalg; } + } + } + +#pragma warning disable 169 + [StructLayout (LayoutKind.Sequential)] + struct NativeSymmetricCryptoParameters + { + int key_size; + int block_size; + int feedback_size; + } + + [StructLayout (LayoutKind.Sequential)] + struct NativeTransformCryptoParameters + { + int input_block_size; + int output_block_size; + bool multi_block_supported; + bool reusable; + } + + [StructLayout (LayoutKind.Sequential)] + struct NativeHashCryptoParameters + { + int hash_size; + NativeTransformCryptoParameters transform; + } + +#pragma warning restore 169 +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardHandleType.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardHandleType.cs new file mode 100644 index 00000000000..4f56f5ebf2a --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardHandleType.cs @@ -0,0 +1,38 @@ +// +// NativeInfocardHandleType.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + enum NativeInfocardHandleType + { + Asymmetric = 1, + Symmetric, + Transform, + Hash + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativePolicyElement.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativePolicyElement.cs new file mode 100644 index 00000000000..30987cb18e6 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.Win32/NativePolicyElement.cs @@ -0,0 +1,71 @@ +// +// NativePolicyElement.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#pragma warning disable 414 +using System; +using System.Collections.ObjectModel; +using System.Runtime.InteropServices; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors.Win32 +{ + // FIXME: it does not seem to marshal this object as expected ... + [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Unicode)] + struct NativePolicyElement + { + // This field order must be fixed for win32 API interop: + string target; + string issuer; + string parameters; + string policy_link; + int policy_ver; + bool is_managed; + + public NativePolicyElement ( + XmlElement target, XmlElement issuer, + Collection<XmlElement> parameters, + Uri policyNoticeLink, + int policyNoticeVersion, + bool isManagedIssuer) + { + if (target == null) + throw new ArgumentException ("target"); + if (parameters == null) + throw new ArgumentException ("parameters"); + this.target = target.OuterXml; + this.issuer = issuer != null ? issuer.OuterXml : null; + this.parameters = null; + foreach (XmlElement el in parameters) + this.parameters += el.OuterXml; + this.policy_link = policyNoticeLink != null ? policyNoticeLink.ToString () : null; + policy_ver = policyNoticeVersion; + is_managed = isManagedIssuer; + } + } +} +#pragma warning restore diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.dll.sources b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.dll.sources new file mode 100644 index 00000000000..283b0b7f4ef --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors.dll.sources @@ -0,0 +1,17 @@ +../../build/common/Consts.cs +../../build/common/Locale.cs +../../build/common/MonoTODOAttribute.cs +Assembly/AssemblyInfo.cs +Mono.ServiceModel.IdentitySelectors.Win32/AsymmetricProofTokenSecurityKey.cs +Mono.ServiceModel.IdentitySelectors.Win32/CardSelectorClientWin32.cs +Mono.ServiceModel.IdentitySelectors.Win32/CardSpaceProofToken.cs +Mono.ServiceModel.IdentitySelectors.Win32/NativeGenericXmlToken.cs +Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardCryptoHandle.cs +Mono.ServiceModel.IdentitySelectors.Win32/NativeInfocardHandleType.cs +Mono.ServiceModel.IdentitySelectors.Win32/NativePolicyElement.cs +Mono.ServiceModel.IdentitySelectors/CardSelectionContext.cs +Mono.ServiceModel.IdentitySelectors/CardSelectorClient.cs +Mono.ServiceModel.IdentitySelectors/Constants.cs +Mono.ServiceModel.IdentitySelectors/IdentityCard.cs +Mono.ServiceModel.IdentitySelectors/IdentityCardEncryption.cs +Mono.ServiceModel.IdentitySelectors/IdentityStore.cs diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectionContext.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectionContext.cs new file mode 100644 index 00000000000..8121665df95 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectionContext.cs @@ -0,0 +1,65 @@ +// +// CardSelectionContext.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.IdentityModel.Claims; +using System.IdentityModel.Policy; +using System.IdentityModel.Selectors; +using System.IdentityModel.Tokens; +using System.ServiceModel; +using System.ServiceModel.Security.Tokens; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors +{ + public class CardSelectionContext + { + EndpointAddress target; + EndpointAddress issuer; + Collection<ClaimTypeRequirement> requirements; + Collection<XmlElement> additional_parameters; + Uri policy_link; + int policy_ver; + + public CardSelectionContext ( + EndpointAddress target, + EndpointAddress issuer, + Collection<ClaimTypeRequirement> requirements, + Collection<XmlElement> additionalRequestParameters, + Uri policyNoticeLink, + int policyNoticeVersion) + { + this.target = target; + this.issuer = issuer; + this.requirements = requirements; + additional_parameters = additionalRequestParameters; + policy_link = policyNoticeLink; + policy_ver = policyNoticeVersion; + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectorClient.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectorClient.cs new file mode 100644 index 00000000000..e3828831bd9 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/CardSelectorClient.cs @@ -0,0 +1,207 @@ +// +// CardSelectorClient.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.IdentityModel.Claims; +using System.IdentityModel.Policy; +using System.IdentityModel.Selectors; +using System.IdentityModel.Tokens; +using System.Security.Cryptography.X509Certificates; +using System.ServiceModel; +using System.ServiceModel.Security; +using System.ServiceModel.Security.Tokens; +using System.Xml; + +namespace Mono.ServiceModel.IdentitySelectors +{ + public abstract class CardSelectorClient + { + public abstract void Manage (); + + #region Import + + // This must be implemented unless Import() is overriden. + public virtual string ReceivePassword () + { + throw new NotImplementedException ("Import is not implemented by this identity selector client"); + } + + public virtual void Import (string filename) + { + string password = ReceivePassword (); + if (password == null) + return; + IdentityCard card = ProcessImport (filename, password); + IdentityStore.GetDefaultStore ().StoreCard (card, password); + } + + protected IdentityCard ProcessImport (string filename, string password) + { + string xml = new IdentityCardEncryption ().Decrypt ( + new StreamReader (filename).ReadToEnd (), password); + IdentityCard card = new IdentityCard (); + card.Load (XmlReader.Create (new StringReader (xml))); + return card; + } + + #endregion + + // This is virtual since it might not be required when + // GetToken() is overriden. + public virtual IdentityCard SelectCardToSend (CardSelectionContext context) + { + throw new NotSupportedException (); + } + + #region Default self-issued card processor + // They are used to indicate a service URL when there is no + // overriden behavior of RequestSelfIssuedToken(). + + string self_identity_issuer = Environment.GetEnvironmentVariable ("MONO_IDENTITY_SERVICE_URL") ?? "localhost:7450"; + string self_identity_issuer_cert = Environment.GetEnvironmentVariable ("MONO_IDENTITY_SERVICE_CERTIFICATE"); + + public virtual string SelfIdentityIssuerUrl { + get { return self_identity_issuer; } + } + + public virtual string SelfIdentityIssuerCertificate { + get { return self_identity_issuer_cert; } + } + #endregion + + public virtual GenericXmlSecurityToken GetToken ( + CardSpacePolicyElement [] policyChain, + SecurityTokenSerializer serializer) + { + // FIXME: sort out what is supposed to be done here. + foreach (CardSpacePolicyElement policy in policyChain) + return GetToken (policy.Target, policy.Issuer, + policy.Parameters, + policy.PolicyNoticeLink, + policy.PolicyNoticeVersion); + throw new Exception ("INTERNAL ERROR: no policy to process"); + } + + GenericXmlSecurityToken GetToken ( + XmlElement target, XmlElement issuer, + Collection<XmlElement> parameters, + Uri policyNoticeLink, int policyNoticeVersion) + { + Collection<ClaimTypeRequirement> reqs = new Collection<ClaimTypeRequirement> (); + Collection<XmlElement> alist = new Collection<XmlElement> (); + foreach (XmlElement el in parameters) { + if (el.LocalName == "Claims" && el.NamespaceURI == Constants.WstNamespace) + foreach (XmlElement c in el.ChildNodes) + reqs.Add (new ClaimTypeRequirement (c.GetAttribute ("Uri"), c.GetAttribute ("Optional") == "true")); + else + alist.Add (el); + } + + CardSelectionContext ctx = new CardSelectionContext ( + EndpointAddress.ReadFrom (XmlDictionaryReader.CreateDictionaryReader (new XmlNodeReader (target))), + EndpointAddress.ReadFrom (XmlDictionaryReader.CreateDictionaryReader (new XmlNodeReader (issuer))), + reqs, + alist, + policyNoticeLink, + policyNoticeVersion); + + IdentityCard card = SelectCardToSend (ctx); + + if (card.Issuer != null) + // process WS-Trust RST + return RequestTrustedToken (ctx, card); + else + return RequestSelfIssuedToken (ctx, card); + } + + public virtual GenericXmlSecurityToken RequestTrustedToken (CardSelectionContext ctx, IdentityCard card) + { + X509Certificate2 cert = new X509Certificate2 (card.Certificate); + EndpointAddress issuer = new EndpointAddress (card.Issuer, new X509CertificateEndpointIdentity (cert)); + return RequestToken (issuer, ctx); + } + + public virtual GenericXmlSecurityToken RequestSelfIssuedToken (CardSelectionContext ctx, IdentityCard card) + { + Uri issuerUri = card.Issuer ?? new Uri (SelfIdentityIssuerUrl); + X509Certificate2 cert = new X509Certificate2 (SelfIdentityIssuerCertificate); + EndpointAddress issuer = new EndpointAddress (issuerUri, new X509CertificateEndpointIdentity (cert)); + return RequestToken (issuer, ctx); + } + + // This must be implemented unless other depending methods + // are overriden. + public virtual GenericXmlSecurityToken RequestToken (EndpointAddress issuer, CardSelectionContext ctx) + { + return null; + } + + /* This will be used if we have to implement unmanaged foo. + + public string GetToken ( + string targetXml, + string issuerXml, + string claimTypeRequirementsXml, + string policyNoticeLink, + int policyNoticeVersion, + bool isManagedIssuer) + { + EndpointAddress target = EndpointAddress.ReadFrom ( + XmlDictionaryReader.CreateDictionaryReader ( + XmlReader.Create (new StringReader (targetXml)))); + EndpointAddress issuer = isManagedIssuer ?EndpointAddress.ReadFrom ( + XmlDictionaryReader.CreateDictionaryReader ( + XmlReader.Create (new StringReader (issuerXml)))) : null; + XmlReaderSettings s = new XmlReaderSettings (); + s.ConformanceLevel = ConformanceLevel.Fragment; + Collection<ClaimTypeRequirement> reqs = new Collection<ClaimTypeRequirement> (); + Collection<XmlElement> parameters = new Collection<XmlElement> (); + XmlDictionaryReader dr = XmlDictionaryReader.CreateDictionaryReader ( + XmlReader.Create (new StringReader (claimTypeRequirementsXml))); + XmlDocument doc = new XmlDocument (); + for (dr.MoveToContent (); !dr.EOF; dr.MoveToContent ()) { + XmlElement el = doc.ReadNode (dr) as XmlElement; + if (el.LocalName == "Claims" && el.NamespaceURI == Constants.WstNamespace) + foreach (XmlElement c in el.ChildNodes) + reqs.Add (new ClaimTypeRequirement (c.GetAttribute ("Uri"), c.GetAttribute ("Optional") == "true")); + else + parameters.Add (el); + } + + GenericXmlSecurityToken token = GetToken (target, issuer, reqs, parameters, new Uri (policyNoticeLink), policyNoticeVersion); + StringWriter sw = new StringWriter (); + using (XmlWriter xw = XmlWriter.Create (sw)) { + WSSecurityTokenSerializer.DefaultInstance.WriteToken (xw, token); + } + return sw.ToString (); + } + */ + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/ChangeLog new file mode 100644 index 00000000000..b01e825dd18 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/ChangeLog @@ -0,0 +1,22 @@ +2007-04-27 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCard.cs : TokenService contains UserCredential as well as + EndpointAddress. + +2007-04-26 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCardEncryption.cs, CardSelectorClient.cs : + implemented store encryption. Changed the reader API a bit too. + +2007-04-25 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCard.cs : implemented Save. It was rather xs:dateTime fixes. + * IdentityStore.cs, CardSelectorClient.cs : some store implementation. + +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * CardSelectionContext.cs + CardSelectorClient.cs + Constants.cs + IdentityCard.cs + IdentityCardEncryption.cs : initial commit. diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/Constants.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/Constants.cs new file mode 100644 index 00000000000..b78ea4a1ab3 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/Constants.cs @@ -0,0 +1,106 @@ +// +// Constants.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2006 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + + +namespace Mono.ServiceModel.IdentitySelectors +{ + internal class Constants + { + public const string WSA1 = "http://www.w3.org/2005/08/addressing"; + + public const string WSBasicSecurityProfileCore1 = "http://ws-i.org/profiles/basic-security/core/1.0"; + + public const string WsaAnonymousUri = "http://www.w3.org/2005/08/addressing/anonymous"; + public const string WsaIdentityUri = "http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"; + + public const string MSSerialization = "http://schemas.microsoft.com/2003/10/Serialization/"; + + public const string WssKeyIdentifierX509Thumbptint = "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1"; + + public const string WssBase64BinaryEncodingType = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"; + + public const string WssKeyIdentifierEncryptedKey = "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKeySHA1"; + + public const string XmlDsig = "http://www.w3.org/2000/09/xmldsig#"; + + public const string WSSSamlToken = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"; + public const string WSSX509Token = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"; + public const string WssKeyIdentifierSamlAssertion = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID"; + public const string WSSUserNameToken = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken"; + public const string WsscContextToken = "http://schemas.xmlsoap.org/ws/2005/02/sc/sct"; + public const string WSSKerberosToken = "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ"; + public const string WSSEncryptedKeyToken = "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey"; + + public const string WstNamespace = "http://schemas.xmlsoap.org/ws/2005/02/trust"; + public const string WssNamespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; + public const string Wss11Namespace = "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"; + public const string WspNamespace = "http://schemas.xmlsoap.org/ws/2004/09/policy"; + public const string WsaNamespace = "http://www.w3.org/2005/08/addressing"; + public const string WsuNamespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; + public const string WsscNamespace = "http://schemas.xmlsoap.org/ws/2005/02/sc"; + public const string WsidNamespace = "http://schemas.xmlsoap.org/ws/2005/05/identity"; + + public const string WstIssueAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue"; + public const string WstRenewAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Renew"; + public const string WstCancelAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Cancel"; + public const string WstValidateAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate"; + public const string WstIssueReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue"; + public const string WstRenewReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Renew"; + public const string WstCancelReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Cancel"; + public const string WstValidateReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Validate"; + + public const string WsscDefaultLabel = "WS-SecureConversationWS-SecureConversation"; + + // .NET BUG: it requires extra white space ! + public const string WstBinaryExchangeValueTls = " http://schemas.xmlsoap.org/ws/2005/02/trust/tlsnego"; + public const string WstBinaryExchangeValueGss = "http://schemas.xmlsoap.org/ws/2005/02/trust/spnego"; + + public const string MSTlsnegoTokenContent = "http://schemas.microsoft.com/ws/2006/05/security"; + + public const string WstTlsnegoProofTokenType = "http://schemas.xmlsoap.org/2005/02/trust/tlsnego#TLS_Wrap"; + public const string WstSpnegoProofTokenType = "http://schemas.xmlsoap.org/2005/02/trust/spnego#TLS_Wrap"; + + public const string WstIssueRequest = "http://schemas.xmlsoap.org/ws/2005/02/trust/Issue"; + public const string WstRenewRequest = "http://schemas.xmlsoap.org/ws/2005/02/trust/Renew"; + public const string WstCancelRequest = "http://schemas.xmlsoap.org/ws/2005/02/trust/Cancel"; + public const string WstValidateRequest = "http://schemas.xmlsoap.org/ws/2005/02/trust/Validate"; + + public const string WstSymmetricKeyTypeUri = "http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey"; + public const string WstAsymmetricKeyTypeUri = "http://schemas.xmlsoap.org/ws/2005/02/trust/AsymmetricKey"; + + public const string LifetimeFormat = "yyyy-MM-dd'T'HH:mm:ss.fffZ"; + + // Those OIDs except for Kerberos5 are described here: + // http://www.alvestrand.no/objectid/ + // (searching web for those OIDs would give you pointers.) + public const string OidSpnego = "1.3.6.1.5.5.2"; + public const string OidNtlmSsp = "1.3.6.1.4.1.311.2.2.10"; + public const string OidKerberos5 = "1.2.840.48018.1.2.2"; + public const string OidMIT = "1.2.840.113554.1.2.2"; + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCard.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCard.cs new file mode 100644 index 00000000000..ab61ef112ad --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCard.cs @@ -0,0 +1,448 @@ +// +// IdentityCard.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Collections.ObjectModel; +using System.Security.Cryptography.Xml; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.Xml; +using System.Xml.Schema; +using System.Xml.Serialization; + +namespace Mono.ServiceModel.IdentitySelectors +{ + public class IdentityCard + { + public class ClaimTypeDefinition + { + public ClaimTypeDefinition (string uri, string tag, string description) + { + this.uri = uri; + this.tag = tag; + this.desc = description; + } + + string uri, tag, desc; + + public string Uri { + get { return uri; } + } + + public string DisplayTag { + get { return tag; } + } + + public string Description { + get { return desc; } + } + } + + public class ClaimValue + { + public ClaimValue (string uri, string value) + { + this.uri = uri; + this.value = value; + } + + string uri, value; + + public string Uri { + get { return uri; } + } + public string Value { + get { return value; } + } + } + + public class TokenService + { + EndpointAddress address; + UserCredential credential; + + public EndpointAddress Address { + get { return address; } + set { address = value; } + } + + public UserCredential Credential { + get { return credential; } + set { credential = value; } + } + + public void ReadXml (XmlReader reader) + { + // FIXME: do we need different versions? + address = EndpointAddress.ReadFrom (AddressingVersion.WSAddressing10, reader); + reader.MoveToContent (); + // FIXME: create custom serializer + credential = new XmlSerializer (typeof (UserCredential)).Deserialize (reader) as UserCredential; + } + + public void WriteXml (XmlWriter writer) + { + address.WriteTo (AddressingVersion.WSAddressing10, writer); + // FIXME: create custom serializer + new XmlSerializer (typeof (UserCredential)).Serialize (writer, credential); + } + } + + [XmlRoot ("UserCredential", Namespace = Constants.WsidNamespace)] + public class UserCredential + { + string hint; + UsernamePasswordCredential username; + X509V3Credential x509; + + public string DisplayCredentialHint { + get { return hint; } + set { hint = value; } + } + + public UsernamePasswordCredential Username { + get { return username; } + set { username = value; } + } + + public X509V3Credential X509V3 { + get { return x509; } + set { x509 = value; } + } + } + + public class UsernamePasswordCredential + { + string username; + + public string Username { + get { return username; } + set { username = value; } + } + + // password is not stored. + } + + public class X509V3Credential : IXmlSerializable + { + KeyInfoX509Data data; + + public KeyInfoX509Data X509Data { + get { return data; } + set { data = value; } + } + + public void WriteXml (XmlWriter w) + { + if (data != null) + data.GetXml ().WriteTo (w); + } + + public void ReadXml (XmlReader r) + { + r.MoveToContent (); + XmlDocument doc = new XmlDocument (); + data = new KeyInfoX509Data (); + data.LoadXml (doc.ReadNode (r) as XmlElement); + } + + XmlSchema IXmlSerializable.GetSchema () + { + return null; + } + } + + const string date_format = "yyyy-MM-dd'T'HH:mm:ss.FFFFFFFZ"; + + byte [] certificate; + + // metadata + string lang, id, version, name; + Uri issuer; + DateTime issued, expires; + string image_mime; + byte [] image; + Collection<TokenService> token_services = + new Collection<TokenService> (); + Collection<Uri> supported_token_types = new Collection<Uri> (); + Collection<ClaimTypeDefinition> supported_claim_types = + new Collection<ClaimTypeDefinition> (); + bool self_issued; + byte [] hash_salt; + DateTime last_updated; + string issuer_id, issuer_name; + int back_color; + // private data + byte [] master_key; + Collection<ClaimValue> claim_values = + new Collection<ClaimValue> (); + + public string Id { + get { return id; } + } + + public string Version { + get { return version; } + } + + public string Name { + get { return name; } + } + + public string Lang { + get { return lang; } + } + + public Uri Issuer { + get { return issuer; } + } + + public DateTime TimeIssued { + get { return issued; } + } + + public DateTime TimeExpires { + get { return expires; } + } + + public byte [] Certificate { + get { return certificate; } + } + + public void Load (XmlReader xmlReader) + { + XmlDictionaryReader reader = XmlDictionaryReader.CreateDictionaryReader (xmlReader); + + string ns = Constants.WsidNamespace; + reader.MoveToContent (); + reader.ReadStartElement ("RoamingStore", ns); + reader.MoveToContent (); + reader.ReadStartElement ("RoamingInformationCard", ns); + reader.MoveToContent (); + lang = reader.GetAttribute ("xml:lang"); + // metadata + reader.ReadStartElement ("InformationCardMetaData", ns); + reader.MoveToContent (); + reader.ReadStartElement ("InformationCardReference", ns); + reader.MoveToContent (); + id = reader.ReadElementContentAsString ("CardId", ns); + reader.MoveToContent (); + version = reader.ReadElementContentAsString ("CardVersion", ns); + reader.MoveToContent (); + reader.ReadEndElement (); + reader.MoveToContent (); + name = reader.ReadElementContentAsString ("CardName", ns); + reader.MoveToContent (); + image_mime = reader.GetAttribute ("MimeType"); + image = Convert.FromBase64String ( + reader.ReadElementContentAsString ("CardImage", ns)); + reader.MoveToContent (); + issuer = new Uri ( + reader.ReadElementContentAsString ("Issuer", ns)); + reader.MoveToContent (); + issued = XmlConvert.ToDateTime ( + reader.ReadElementContentAsString ("TimeIssued", ns), XmlDateTimeSerializationMode.Utc); + reader.MoveToContent (); + expires = XmlConvert.ToDateTime ( + reader.ReadElementContentAsString ("TimeExpires", ns), XmlDateTimeSerializationMode.Utc); + reader.MoveToContent (); + if (reader.IsStartElement ("TokenServiceList", ns)) { + reader.ReadStartElement ("TokenServiceList", ns); + reader.MoveToContent (); + for (reader.MoveToContent (); + reader.NodeType == XmlNodeType.Element; + reader.MoveToContent ()) { + reader.ReadStartElement ("TokenService", ns); + reader.MoveToContent (); + TokenService ts = new TokenService (); + ts.ReadXml (reader); + token_services.Add (ts); + reader.MoveToContent (); + reader.ReadEndElement (); + } + reader.ReadEndElement (); + } + + reader.MoveToContent (); + reader.ReadStartElement ("SupportedTokenTypeList", ns); + for (reader.MoveToContent (); + reader.NodeType == XmlNodeType.Element; + reader.MoveToContent ()) + supported_token_types.Add (new Uri ( + reader.ReadElementContentAsString ("TokenType", Constants.WstNamespace))); + reader.ReadEndElement (); + + reader.MoveToContent (); + reader.ReadStartElement ("SupportedClaimTypeList", ns); + for (reader.MoveToContent (); + reader.NodeType == XmlNodeType.Element; + reader.MoveToContent ()) { + string uri = reader.GetAttribute ("Uri"); + reader.ReadStartElement ("SupportedClaimType", ns); + string tag = reader.ReadElementContentAsString ("DisplayTag", ns); + reader.MoveToContent (); + string desc = reader.ReadElementContentAsString ("Description", ns); + reader.MoveToContent (); + reader.ReadEndElement (); + supported_claim_types.Add (new ClaimTypeDefinition (uri, tag, desc)); + } + reader.ReadEndElement (); + + reader.MoveToContent (); + self_issued = reader.ReadElementContentAsBoolean ("IsSelfIssued", ns); + reader.MoveToContent (); + hash_salt = Convert.FromBase64String ( + reader.ReadElementContentAsString ("HashSalt", ns)); + reader.MoveToContent (); + last_updated = XmlConvert.ToDateTime ( + reader.ReadElementContentAsString ("TimeLastUpdated", ns), XmlDateTimeSerializationMode.Utc); + reader.MoveToContent (); + issuer_id = reader.ReadElementContentAsString ("IssuerId", ns); + reader.MoveToContent (); + issuer_name = reader.ReadElementContentAsString ("IssuerName", ns); + reader.MoveToContent (); + back_color = reader.ReadElementContentAsInt ("BackgroundColor", ns); + + reader.MoveToContent (); + reader.ReadEndElement (); // InformationCardMetaData + + // private data + reader.MoveToContent (); + reader.ReadStartElement ("InformationCardPrivateData", ns); + reader.MoveToContent (); + master_key = Convert.FromBase64String ( + reader.ReadElementContentAsString ("MasterKey", ns)); + reader.MoveToContent (); + if (reader.IsStartElement ("ClaimValueList", ns)) { + reader.ReadStartElement ("ClaimValueList", ns); + + reader.MoveToContent (); + for (reader.MoveToContent (); + reader.NodeType == XmlNodeType.Element; + reader.MoveToContent ()) { + string uri = reader.GetAttribute ("Uri"); + reader.ReadStartElement ("ClaimValue", ns); + reader.MoveToContent (); + string value = reader.ReadElementContentAsString ("Value", ns); + reader.MoveToContent (); + reader.ReadEndElement (); + claim_values.Add (new ClaimValue (uri, value)); + } + reader.ReadEndElement (); + reader.MoveToContent (); + } + + reader.ReadEndElement (); // InformationCardPrivateData + + reader.MoveToContent (); + reader.ReadEndElement (); + reader.MoveToContent (); + reader.ReadEndElement (); + } + + public void Save (XmlWriter xmlWriter) + { + XmlDictionaryWriter writer = XmlDictionaryWriter.CreateDictionaryWriter (xmlWriter); + + string ns = Constants.WsidNamespace; + writer.WriteStartElement ("RoamingStore", ns); + writer.WriteStartElement ("RoamingInformationCard", ns); + // metadata + writer.WriteStartElement ("InformationCardMetaData", ns); + writer.WriteAttributeString ("xml:lang", lang); + writer.WriteStartElement ("InformationCardReference", ns); + writer.WriteElementString ("CardId", ns, id); + writer.WriteElementString ("CardVersion", ns, version); + writer.WriteEndElement (); + writer.WriteElementString ("CardName", ns, name); + writer.WriteStartElement ("CardImage", ns); + writer.WriteAttributeString ("MimeType", image_mime); + writer.WriteString (Convert.ToBase64String (image)); + writer.WriteEndElement (); + writer.WriteElementString ("Issuer", ns, issuer.ToString ()); + writer.WriteElementString ("TimeIssued", ns, XmlConvert.ToString (issued, date_format)); + writer.WriteElementString ("TimeExpires", ns, XmlConvert.ToString (expires, date_format)); + if (token_services.Count > 0) { + + writer.WriteStartElement ("TokenServiceList", ns); + foreach (TokenService ts in token_services) { + writer.WriteStartElement ("TokenService", ns); + ts.WriteXml (writer); + writer.WriteEndElement (); + } + writer.WriteEndElement (); + } + + writer.WriteStartElement ("SupportedTokenTypeList", ns); + foreach (Uri u in supported_token_types) + writer.WriteElementString ("TokenType", Constants.WstNamespace, u.ToString ()); + writer.WriteEndElement (); + + writer.WriteStartElement ("SupportedClaimTypeList", ns); + foreach (ClaimTypeDefinition cd in supported_claim_types) { + writer.WriteStartElement ("SupportedClaimType", ns); + writer.WriteAttributeString ("Uri", cd.Uri); + writer.WriteElementString ("DisplayTag", ns, cd.DisplayTag); + writer.WriteElementString ("Description", ns, cd.Description); + writer.WriteEndElement (); + } + writer.WriteEndElement (); + + writer.WriteStartElement ("IsSelfIssued", ns); + writer.WriteString (XmlConvert.ToString (self_issued)); + writer.WriteEndElement (); + writer.WriteStartElement ("HashSalt", ns); + writer.WriteString (Convert.ToBase64String (hash_salt)); + writer.WriteEndElement (); + writer.WriteElementString ("TimeLastUpdated", ns, XmlConvert.ToString (last_updated, XmlDateTimeSerializationMode.Utc)); + writer.WriteElementString ("IssuerId", ns, issuer_id); + writer.WriteElementString ("IssuerName", ns, issuer_name); + writer.WriteElementString ("BackgroundColor", ns, XmlConvert.ToString (back_color)); + + writer.WriteEndElement (); // InformationCardMetaData + + // private data + writer.WriteStartElement ("InformationCardPrivateData", ns); + writer.WriteElementString ("MasterKey", ns, Convert.ToBase64String (master_key)); + if (claim_values.Count > 0) { + writer.WriteStartElement ("ClaimValueList", ns); + foreach (ClaimValue cv in claim_values) { + writer.WriteStartElement ("ClaimValue", ns); + writer.WriteAttributeString ("Uri", cv.Uri); + writer.WriteElementString ("Value", ns, cv.Value); + writer.WriteEndElement (); + } + writer.WriteEndElement (); + } + + writer.WriteEndElement (); // InformationCardPrivateData + + writer.WriteEndElement (); + writer.WriteEndElement (); + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCardEncryption.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCardEncryption.cs new file mode 100644 index 00000000000..37f1639a876 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityCardEncryption.cs @@ -0,0 +1,228 @@ +// +// IdentityCardEncryption.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.Globalization; +using System.IO; +using System.IdentityModel.Selectors; +using System.Security.Cryptography; +using System.Security.Cryptography.Xml; +using System.Text; +using System.Xml; + +// http://msdn2.microsoft.com/en-us/library/bb298802.aspx#infocardprofile_topic9 + +namespace Mono.ServiceModel.IdentitySelectors +{ + public class IdentityCardEncryption + { + static readonly byte [] encEntropy = new byte [] { + 0xd9, 0x59, 0x7b, 0x26, 0x1e, 0xd8, 0xb3, 0x44, + 0x93, 0x23, 0xb3, 0x96, 0x85, 0xde, 0x95, 0xfc }; + static readonly byte [] intEntropy = new byte [] { + 0xc4, 0x01, 0x7b, 0xf1, 0x6b, 0xad, 0x2f, 0x42, + 0xaf, 0xf4, 0x97, 0x7d, 0x4, 0x68, 0x3, 0xdb }; + + public byte [] Encrypt (string plainText, string password) + { + byte [] salt = new byte [16]; + RandomNumberGenerator.Create ().GetNonZeroBytes (salt); + return Encrypt (plainText, password, salt, null); + } + + public byte [] Encrypt (string plainText, string password, byte [] salt, byte [] iv) + { + MemoryStream ms = new MemoryStream (); + StreamWriter sw = new StreamWriter (ms, new UTF8Encoding (true)); + sw.Write (plainText); + sw.Close (); + byte [] plain = ms.ToArray (); + + string ns = "http://schemas.xmlsoap.org/ws/2005/05/identity"; + string encNS = EncryptedXml.XmlEncNamespaceUrl; + + byte [] encKey = CreateEncryptionKey (password, salt); + byte [] intKey = CreateIntegrityKey (password, salt); + + RijndaelManaged aes = CreateAES (); + if (iv == null) + aes.GenerateIV (); + else + aes.IV = iv; + aes.Key = encKey; + iv = aes.IV; + + MemoryStream cms = new MemoryStream (); + CryptoStream cs = new CryptoStream (cms, aes.CreateEncryptor (), CryptoStreamMode.Write); + cs.Write (plain, 0, plain.Length); + cs.Close (); + byte [] results = cms.ToArray (); + + byte [] clearTextBlock = CreateSubArray (plain, plain.Length - 16, 16); + byte [] integrity = SHA256.Create ().ComputeHash (JoinArray (JoinArray (iv, intKey), clearTextBlock)); + + ms = new MemoryStream (); + XmlWriter w = XmlWriter.Create (new StreamWriter (ms, new UTF8Encoding (false))); // no BOM here + w.WriteStartElement ("EncryptedStore", ns); + w.WriteStartElement ("StoreSalt", ns); + w.WriteString (Convert.ToBase64String (salt)); + w.WriteEndElement (); + w.WriteStartElement ("EncryptedData", encNS); + w.WriteStartElement ("CipherData", encNS); + w.WriteStartElement ("CipherValue", encNS); + w.WriteString (Convert.ToBase64String (JoinArray ( + JoinArray (iv, integrity), results))); + w.WriteEndElement (); + w.WriteEndElement (); + w.WriteEndElement (); + w.WriteEndElement (); + w.Close (); + return ms.ToArray (); + } + + // content string -> salt and cipherValue + // cipherValue -> iv, intExpected, content + // iv+content -> bytesToDecrypt + // password+salt+encEntropy -> encKey + // password+salt+intEntropy -> intKey + // AES(iv,encKey)+bytesToDecrypt -> decrypted + // decrypted -> clearTextBlock + // iv,intKey,clearTextBlock -> intComputed + + public string Decrypt (string crdsxml, string password) + { + XmlDocument doc = new XmlDocument (); + doc.LoadXml (crdsxml); + + byte [] salt = Convert.FromBase64String ( + doc.DocumentElement.FirstChild.FirstChild.Value); + if (salt.Length != 16) + throw new ArgumentException (String.Format ("Invalid salt length: expected 16 bytes but got {1} bytes", salt.Length)); + byte [] cipherValue = Convert.FromBase64String ( + doc.DocumentElement.LastChild.InnerText); + + return Decrypt (password, salt, cipherValue); + } + + public string Decrypt (string password, byte [] salt, byte [] cipherValue) + { + byte [] iv = CreateSubArray (cipherValue, 0, 16); + byte [] intExpected = CreateSubArray (cipherValue, 16, 32); + byte [] content = CreateSubArray (cipherValue, 48, cipherValue.Length - 48); + // LAMESPEC: the actual content is iv+content. + byte [] bytesToDecrypt = JoinArray (iv, content); + + EncryptedData ed = new EncryptedData (); + ed.CipherData = new CipherData (); + ed.EncryptionMethod = new EncryptionMethod (); + ed.EncryptionMethod.KeyAlgorithm = EncryptedXml.XmlEncAES256Url ; + ed.EncryptionMethod.KeySize = 256; + ed.CipherData.CipherValue = bytesToDecrypt; + + byte [] encKey = CreateEncryptionKey (password, salt); + if (encKey.Length != 32) + throw new Exception ("INTERNAL ERROR: Unexpected encryption key size: " + encKey.Length); + byte [] intKey = CreateIntegrityKey (password, salt); + if (intKey.Length != 32) + throw new Exception ("INTERNAL ERROR: Unexpected integrity key size: " + intKey.Length); + RijndaelManaged aes = CreateAES (); + aes.IV = iv; + aes.Key = encKey; + + // We need some hook to retrieve TransformFinalBlock + // bytes for integrity check. + byte [] decrypted = new EncryptedXml ().DecryptData (ed, aes); + byte [] clearTextBlock = CreateSubArray (decrypted, decrypted.Length - 16, 16); + + byte [] intComputed = SHA256.Create ().ComputeHash (JoinArray (JoinArray (iv, intKey), clearTextBlock)); + if (!ArrayEquals (intExpected, intComputed)) + throw new CardSpaceException (String.Format ("Integrity check failed: expected {0}, actually {1}", + Convert.ToBase64String (intExpected), + Convert.ToBase64String (intComputed))); + + // since the restored bytes contain BOM, they had + // better be stripped by StreamReader (since I'm not + // sure if future versions of this data keep BOM). + MemoryStream ms = new MemoryStream (decrypted); + string s = new StreamReader (ms, Encoding.UTF8).ReadToEnd (); + return s; + } + + RijndaelManaged CreateAES () + { + RijndaelManaged aes = new RijndaelManaged (); + aes.BlockSize = 128; + aes.Padding = PaddingMode.PKCS7; + aes.Mode = CipherMode.CBC; + return aes; + } + + byte [] CreateEncryptionKey (string password, byte [] salt) + { + return CreateComputedKey (password, salt, encEntropy); + } + + byte [] CreateIntegrityKey (string password, byte [] salt) + { + return CreateComputedKey (password, salt, intEntropy); + } + + byte [] CreateComputedKey (string password, byte [] salt, byte [] entropy) + { + byte [] pkcs5 = new PasswordDeriveBytes ( + // LAMESPEC: the actual password string is decoded as utf-16LE + Encoding.Unicode.GetBytes (password), salt, "SHA256", 1000).GetBytes (32); + + return SHA256.Create ().ComputeHash (JoinArray (entropy, pkcs5)); + } + + public static byte [] CreateSubArray (byte [] array, int index, int length) + { + byte [] ret = new byte [length]; + Array.Copy (array, index, ret, 0, length); + return ret; + } + + public static byte [] JoinArray (byte [] a1, byte [] a2) + { + byte [] ret = new byte [a1.Length + a2.Length]; + Array.Copy (a1, 0, ret, 0, a1.Length); + Array.Copy (a2, 0, ret, a1.Length, a2.Length); + return ret; + } + + public static bool ArrayEquals (byte [] b1, byte [] b2) + { + if (b1.Length != b2.Length) + return false; + for (int i = 0; i < b1.Length; i++) + if (b1 [i] != b2 [i]) + return false; + return true; + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityStore.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityStore.cs new file mode 100644 index 00000000000..592641d19f7 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors/IdentityStore.cs @@ -0,0 +1,50 @@ +using System; +using System.IO; +using System.ServiceModel; +using Mono.ServiceModel.IdentitySelectors; + +namespace Mono.ServiceModel.IdentitySelectors +{ + public abstract class IdentityStore + { + public static IdentityStore GetDefaultStore () + { + return new LocalFileIdentityStore (); + } + + public abstract void StoreCard (IdentityCard card, string password); + } + + public class LocalFileIdentityStore : IdentityStore + { + static string GetStoreFile () + { + return Path.Combine (GetStorePath (), "identity.lst"); + } + + static string GetStorePath () + { + // FIXME: support other alternatives + return Path.Combine ( + Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), + "identities"); + } + + public LocalFileIdentityStore () + : this (GetStoreFile ()) + { + } + + string store_file; + + public LocalFileIdentityStore (string storeFile) + { + store_file = storeFile; + } + + public override void StoreCard (IdentityCard card, string password) + { + // FIXME: store card both as public-only and encrypted state + } + } +} diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors_test.dll.sources b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors_test.dll.sources new file mode 100644 index 00000000000..748daf46c8b --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Mono.ServiceModel.IdentitySelectors_test.dll.sources @@ -0,0 +1,2 @@ +Mono.IdentityModel.Selectors/IdentityCardEncryptionTest.cs +Mono.IdentityModel.Selectors/IdentityCardTest.cs diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/ChangeLog new file mode 100644 index 00000000000..bb26af29015 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/ChangeLog @@ -0,0 +1,16 @@ +2007-04-27 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCardTest.cs : some flexibility on xml declarations. + +2007-04-26 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCardEncryptionTest.cs : added encryption test (roundtrip). + +2007-04-25 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCardTest.cs : added test for Save(). + +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * IdentityCardTest.cs + IdentityCardEncryptionTest.cs : initial commit. diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardEncryptionTest.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardEncryptionTest.cs new file mode 100644 index 00000000000..eca24ec001c --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardEncryptionTest.cs @@ -0,0 +1,67 @@ +// +// IdentityCardEncryptionTest.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.IO; +using System.Text; +using System.Xml; +using Mono.ServiceModel.IdentitySelectors; +using NUnit.Framework; + +namespace MonoTests.Mono.ServiceModel.IdentitySelectors +{ + [TestFixture] + public class IdentityCardEncryptionTest + { + [Test] + public void Import () + { + string encxml = new StreamReader ("Test/resources/rupert.crds").ReadToEnd (); + string xml = new IdentityCardEncryption ().Decrypt ( + encxml, "monkeydance"); + XmlDocument doc = new XmlDocument (); + doc.LoadXml (xml); + } + + [Test] + public void Export () + { + byte [] salt = Convert.FromBase64String ("ofkHGOy0pioOd7++N2a52w=="); + byte [] iv = Convert.FromBase64String ("OzFSoAlrfj11g246TM4How=="); + XmlDocument doc = new XmlDocument (); + doc.Load ("Test/resources/rupert.xml"); + doc.RemoveChild (doc.FirstChild); + byte [] result = new IdentityCardEncryption ().Encrypt (doc.OuterXml, "monkeydance", salt, iv); + string resultText = Encoding.UTF8.GetString (result); + + string roundtrip = new IdentityCardEncryption ().Decrypt (resultText, "monkeydance"); + doc = new XmlDocument (); + doc.LoadXml (roundtrip); + } + } +} + diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardTest.cs b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardTest.cs new file mode 100644 index 00000000000..76fb08965a1 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/Mono.IdentityModel.Selectors/IdentityCardTest.cs @@ -0,0 +1,79 @@ +// +// IdentityCardTest.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// Copyright (C) 2007 Novell, Inc. http://www.novell.com +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +using System; +using System.IO; +using System.Xml; +using Mono.ServiceModel.IdentitySelectors; +using NUnit.Framework; + +namespace MonoTests.Mono.ServiceModel.IdentitySelectors +{ + [TestFixture] + public class IdentityCardTest + { + [Test] + public void Load () + { + IdentityCard ic = new IdentityCard (); + ic.Load (XmlReader.Create ("Test/resources/rupert.xml")); + Assert.AreEqual (DateTimeKind.Utc, ic.TimeIssued.Kind, "#1"); + Assert.AreEqual (11, ic.TimeIssued.Hour, "#2"); + Assert.AreEqual (23, ic.TimeExpires.Hour, "#3"); + new IdentityCard ().Load (XmlReader.Create ( + "Test/resources/managed.xml")); + } + + [Test] + public void SaveRoundtrip () + { + SaveRoundtrip ("Test/resources/rupert.xml"); + SaveRoundtrip ("Test/resources/managed.xml"); + } + + void SaveRoundtrip (string file) + { + IdentityCard ic = new IdentityCard (); + ic.Load (XmlReader.Create (file)); + MemoryStream ms = new MemoryStream (); + XmlWriterSettings xws = new XmlWriterSettings (); + xws.OmitXmlDeclaration = true; + using (XmlWriter xw = XmlWriter.Create (ms, xws)) { + ic.Save (xw); + } + XmlDocument doc = new XmlDocument (); + doc.Load (file); + if (doc.FirstChild is XmlDeclaration) + doc.RemoveChild (doc.FirstChild); + string expected = doc.OuterXml; + doc.Load (new MemoryStream (ms.ToArray ())); + string actual = doc.OuterXml; + Assert.AreEqual (expected, actual, file); + } + } +} + diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/ChangeLog new file mode 100644 index 00000000000..0d492102eff --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/ChangeLog @@ -0,0 +1,4 @@ +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * managed.xml, rupert.xml, rupert.crds : initial commit (managed.xml + is an extracted version of a backup card from pingidentity.com). diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/managed.xml b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/managed.xml new file mode 100644 index 00000000000..c66be3675d2 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/managed.xml @@ -0,0 +1,70 @@ +<RoamingStore xmlns="http://schemas.xmlsoap.org/ws/2005/05/identity">
+ <RoamingInformationCard>
+ <InformationCardMetaData xml:lang="en-us">
+ <InformationCardReference>
+ <CardId>https://infocard.pingidentity.com/idpdemo/sts/cards/ginga</CardId>
+ <CardVersion>1</CardVersion>
+ </InformationCardReference>
+ <CardName>ginga</CardName>
+ <CardImage MimeType="image/jpeg">/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGB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LYMIYyfRTeJJwPEk9fd4Cm9FSwjgliPFO77Uby9S3S5lDi3jEcWEVSAAAMkDmcBRk5OAB3U6XaDVku/K47hIpt1lLRwRpnewSSAoBbIB3jzyAc8hUVRUTEwi1gmJXg3uUqJ5RBJBvnhyOruPFlBAP7TfGl11K6FoLU8BowpQFreNnAPcHK7w+PKmdFSLWnaEg5w2FSWoa3qWoXEc15MkpjfiBOEioWzzYqoAJOOZIye+mtxdySxiEKkUIweHGMAkZ5nvY8zzJOM46U3opCNrcgEzI52ZKc319d3vB8qneUQRLDED0RFGAAK8mvbua2S2luJHhTBVCeWQMA+sgch4DlTeijC0bki5x3peyuriyuVuLWUxyqCAw58iMEEHkQQSCD1BpcareqjLG0EO8rKWht442weo3lUHBBI69OXSmNFBY0m5CA9wFgU7h1G9i06XTo52W1mYM6ADmeXf17hkd+BnoKLTULq2u7K5R8vZEGEHkAAxbHLBxkn400oowNzy2oxuyz2JazuZrS4W4gYLIuQN5QwIIwQQcgggkEHkc0pLqF7LfPfPdSm5cEGTe54I3ceoY5Y8OVNaKZa0m9kBzgLXRRRRTUUUUUUIX//2Q==</CardImage>
+ <Issuer>https://infocard.pingidentity.com/idpdemo/sts</Issuer>
+ <TimeIssued>2007-04-04T17:58:36.742Z</TimeIssued>
+ <TimeExpires>9999-12-31T23:59:59.9999999Z</TimeExpires>
+ <TokenServiceList>
+ <TokenService>
+ <EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
+ <Address>https://infocard.pingidentity.com/idpdemo/sts</Address>
+ <Metadata>
+ <Metadata xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <wsx:MetadataSection xmlns="">
+ <wsx:MetadataReference>
+ <Address xmlns="http://www.w3.org/2005/08/addressing">https://infocard.pingidentity.com/idpdemo/mex</Address>
+ </wsx:MetadataReference>
+ </wsx:MetadataSection>
+ </Metadata>
+ </Metadata>
+ <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
+ <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+ <X509Data>
+ <X509Certificate>MIIDAjCCAmugAwIBAgIDBGV9MA0GCSqGSIb3DQEBBAUAMFoxCzAJBgNVBAYTAlVTMRwwGgYDVQQKExNFcXVpZmF4IFNlY3VyZSBJbmMuMS0wKwYDVQQDEyRFcXVpZmF4IFNlY3VyZSBHbG9iYWwgZUJ1c2luZXNzIENBLTEwHhcNMDYwODAzMTg0MzE2WhcNMDcwOTAzMTg0MzE2WjByMQswCQYDVQQGEwJVUzERMA8GA1UECBMIQ29sb3JhZG8xDzANBgNVBAcTBkRlbnZlcjEiMCAGA1UEChMZUGluZyBJZGVudGl0eSBDb3Jwb3JhdGlvbjEbMBkGA1UEAxQSKi5waW5naWRlbnRpdHkuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAxS/b0dzAEJx86MCKHnXoEy7/6I82hs89Gmv/x4Cg1gd7zkvgcMImn+BIWzNuMMGtzr5TWoPDBcLzg/Lgl3UolNG9S9L+Ii+s/RXzmtZGNUSLEqfkMb6WbtcPLmdDB91R29xDEYU8hda+2wHB27SNqtfMfiXzrgFuShQgkBh8OwIDAQABo4G9MIG6MA4GA1UdDwEB/wQEAwIE8DAdBgNVHQ4EFgQUXhZ/Mr/zlH8uSZ4EbOVZpW7v0VEwOwYDVR0fBDQwMjAwoC6gLIYqaHR0cDovL2NybC5nZW90cnVzdC5jb20vY3Jscy9nbG9iYWxjYTEuY3JsMB8GA1UdIwQYMBaAFL6ooHRyUGtEt8kj2Puo/7NXa2hsMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBACVd368B+WIr9mXaH91WLQKqhc16R481PYLtzr8oJi7S/x6p0MlIziWfpvjCN8IgSvEwTsJlEAlCPHQpZU2l3b6Md7ItXB656UcUKQVOjC2Y7piY806VWxiVros3FGZpPlcILMDyJYUJDAMkUhR6zPtSyZDQFkODvILLeulxD6bY</X509Certificate>
+ </X509Data>
+ </KeyInfo>
+ </Identity>
+ </EndpointReference>
+ <UserCredential>
+ <DisplayCredentialHint>Enter your username and password</DisplayCredentialHint>
+ <UsernamePasswordCredential>
+ <Username>ginga</Username>
+ </UsernamePasswordCredential>
+ </UserCredential>
+ </TokenService>
+ </TokenServiceList>
+ <SupportedTokenTypeList>
+ <TokenType xmlns="http://schemas.xmlsoap.org/ws/2005/02/trust">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</TokenType>
+ </SupportedTokenTypeList>
+ <SupportedClaimTypeList>
+ <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
+ <DisplayTag>Given Name</DisplayTag>
+ <Description>Given Name</Description>
+ </SupportedClaimType>
+ <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
+ <DisplayTag>Last Name</DisplayTag>
+ <Description>Last Name</Description>
+ </SupportedClaimType>
+ <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
+ <DisplayTag>Email Address</DisplayTag>
+ <Description>Email Address</Description>
+ </SupportedClaimType>
+ </SupportedClaimTypeList>
+ <IsSelfIssued>false</IsSelfIssued>
+ <HashSalt>LCDZ1KpaQBQRZLKRcaaP9g==</HashSalt>
+ <TimeLastUpdated>2007-04-04T18:02:31.578125Z</TimeLastUpdated>
+ <IssuerId>mZqA68JI5rctQW9eyKi0q/mXiOS0wsSFtOOG+05XMyQ=</IssuerId>
+ <IssuerName>*.pingidentity.com</IssuerName>
+ <BackgroundColor>0</BackgroundColor>
+ </InformationCardMetaData>
+ <InformationCardPrivateData>
+ <MasterKey>01234567890123456789IOverwroteThisAreaHeheh=</MasterKey>
+ </InformationCardPrivateData>
+ </RoamingInformationCard>
+</RoamingStore>
diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.crds b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.crds new file mode 100644 index 00000000000..c3387cd1bf0 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.crds @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8"?><EncryptedStore xmlns="http://schemas.xmlsoap.org/ws/2005/05/identity"><StoreSalt>ofkHGOy0pioOd7++N2a52w==</StoreSalt><EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#"><CipherData><CipherValue>OzFSoAlrfj11g246TM4Ho7ift/Ywy0HOPDDsoQKouOWvtkyPie30gEZ788f6HmzHLh/aMJJei/i74hgzpiu6tYvHeZNtE5a8bdys0SNZQt9rzaM3ooRjx7HsaM2umaSxcNig20dH26CzmfUv+WsdkWf7T/7Do/Eaa/3/sHlWs4sHerMxzE5buPaUoTc7Qvds1f2U0A8nd7ypJndex3wuRttOcu5u24cSAoHA1Ufskjk8lgLldNzqc7VHmlBKjEnNg4KNi9INmLmqbndJlCl1mz45FfPnaDKISsr8FYhQ0tgFXnG00gGsQngn+3EFI9qEUcvwNPfqT2dyDCwJB/aPBZ1ID8K7k6PDjIuoS6O1v4UinM1FkL9YdOFHf5UgGiB4Z0Lmj778AcpZx8oI16ZOp14Tv1e9QKL8sZHJfGjPclPQE87bZMYAjtcYlvYOXo+3f/uGnDTj+RspJDSoFgbI6PpKiewEKl4XjpGV8g1MymNXSadZI0GJqzA66XkkTmqpXd9n7vrnkc6/uKysoLSxWIm/iK1R7dtRi32PsU1NnAT+lOvGrknoGTJ/JIBy9fe2yCQrqQpLDv8q+jZjjD6I3ibb9cEhX3324BF5vWdcrbVQh99KCMGF9GuLG1b5M03a987lJnyAfw6w8qKC6s47t7tTUsz4WJichFk550DwBZAtSBD24rtU7I3e6JMapv4Eqvai0+4Wx86VvG5K7WtWKihGEPJI9Up8kk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dE7f4DiKCs/Kk0MFKhFW0zR6xDIrLBQA9ahidm1rZM9Hou09kuN9/cXoB3V9bMbC8BULBD6Yn6tdxQYec+olifZO6hn/JGUNAYBEllkUkDlJJpM8KuG17JOXWiYWgaxSeE6MIKCXXHa7bpd/iVdSysX6zfGHdlcga08kiQJFmK2DPL8PKMs/VEEM+z1Ph2F+rybme3xkV4kYjBbxopCWbl+ntGv74o/+09AevCY1FKw3tZUlfE6DCpCEuL0PsZ7fm+bFBIImLqGNytqOCPQrpzPxNRIBxdNYgyrTEWGWF/s63RJS11psa0cAGNQORDgNWPnF5glylyWBEWP9SPRasDiepRJs+OsaE2dnoc0gehvvpf2zqePt7jlssDdrcWqxTxDV+l97QuIz75hebOTUYiteSxR7aBOMHMJ1YsFQMp4sXrtaE1dF0Mn4O/J9Q9CaGPYDhoUlCNQ1hZMfp8fvFakG9UR2Dl8yeYTNfV3l4oo4HzJLNVwcRC+a6ByliOdCMmVXyDhfbDhQCP9MHEQtLA1+fQQYcizQP9fVvZfLUaZ0cJaANH+9vfzwyUp2IRBe7q1g4LSBN0m6ees5KQontbA9vSFiug6riFVzucoROgDriRSoND4WU+y+Zy1II9/VhBW/Ic37E/vw==</CipherValue></CipherData></EncryptedData></EncryptedStore> diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.xml b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.xml new file mode 100644 index 00000000000..e7a20ab9da3 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/Test/resources/rupert.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> +<RoamingStore xmlns="http://schemas.xmlsoap.org/ws/2005/05/identity"> + <RoamingInformationCard> + <InformationCardMetaData xml:lang="ja"> + <InformationCardReference> + <CardId>urn:uuid:4105d42c-ab63-470b-9c0c-2c067c4dccd5</CardId> + <CardVersion>1</CardVersion> + </InformationCardReference> + <CardName>rupert1</CardName> + + <CardImage MimeType="image/j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0+0dNekggmXKDe3yDIBz6df0qrd+GLU3TPe+IY5WZSzS9fm57k5PIxXn08FRpz5r3OuVectkcVM5d2Zjksc5NNMUgTzChCE4Ddq6O5bQtMmBtne6Pl4II4DfX0qpNr4vbhFvLYSWan/UI2zHuD616kZN7I4pR7si0i0trxZI5R+9/hJbFWI4vscrQv94HrXZ6F4F8P+JoUuNA12aC6HLWV5GCw+jKRuH0FaGo/DbWCoAFu5Xo6NWdS9zajOK33OW0+OWSZRDkEc7vSu6snuNO0ifUDK0jY8uIOP4j1P5VDYeDb62jSF3iXPfdkmta/wBPuGvLWwRRHBGmN55Uk/SvPqWbsdynFnPQ6yq4Z42SQdw1XR4uQDH/ALKaytT08Wd9NCzgmNiDjpkVlllz0o9lFl7lyFHuGYOuQB6VZWycMvyxgD25r2KTwJoEhLpatET3jkIrF1Dwtp2k7bu3u5mZW2iJ8EfWumpRnFXOSniISdjFs7dNIsvulp5OWArj/FFlFcgyzQKJHG7iuu1G8EacNjccVyd7efbb0L/CvOK46cpc1z0ZQi42MJdER0jURhY1HAqtqGjK8RGeR90+ldFNKFGKyby8VFI4rojUk3czlRhGNjiHieGRhyCp6ilF1cqpVbiQKecBq0rkK0m8d6rNBHJ22n2rtjNPc8yVGS+FlJppXOWldvcmmHJ71cNkmfv05bWFfvsSarmiR7KoUVXcQqAk1bt7PzH+fgelWE2R/cXHvUcc+WKnipc29jSNFJ3ZpRRywMktvI0bocqytgg+1eheHvilc2qrbeIIXuIxwLmEfOP94d686il+WpkbPWsbvqbyownseyWni7StevC2ltM00K5Imi2jB71Mly99q0BEg2W8qu+eA2K868N2F60puLeXyEYbWbGdw9K7VMouC5JHUiuKq0pGlKg2rHMa1NJe311LGjZaUkY+tZXl33/PNv8Avmu58yMDhRmm+b7LSjVstjpVBrqf/9k=</CardImage> + <Issuer>http://schemas.xmlsoap.org/ws/2005/05/identity/issuer/self</Issuer> + <TimeIssued>2007-04-18T11:08:03.171875Z</TimeIssued> + <TimeExpires>9999-12-31T23:59:59.9999999Z</TimeExpires> + <SupportedTokenTypeList> + <TokenType xmlns="http://schemas.xmlsoap.org/ws/2005/02/trust">urn:oasis:names:tc:SAML:1.0:assertion</TokenType> + + <TokenType xmlns="http://schemas.xmlsoap.org/ws/2005/02/trust">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</TokenType> + </SupportedTokenTypeList> + <SupportedClaimTypeList> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"> + <DisplayTag>First Name</DisplayTag> + <Description>First Name</Description> + </SupportedClaimType> + + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"> + <DisplayTag>Last Name</DisplayTag> + <Description>Last Name</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"> + <DisplayTag>Email Address</DisplayTag> + <Description>Email Address</Description> + + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress"> + <DisplayTag>Street</DisplayTag> + <Description>Street</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality"> + <DisplayTag>City</DisplayTag> + + <Description>City</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince"> + <DisplayTag>State</DisplayTag> + <Description>State</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode"> + + <DisplayTag>Postal Code</DisplayTag> + <Description>Postal Code</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"> + <DisplayTag>Country/Region</DisplayTag> + <Description>Country/Region</Description> + </SupportedClaimType> + + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone"> + <DisplayTag>Home Phone</DisplayTag> + <Description>Home Phone Number</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone"> + <DisplayTag>Other Phone</DisplayTag> + <Description>Other Phone Number</Description> + + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone"> + <DisplayTag>Mobile Phone</DisplayTag> + <Description>Mobile Phone Number</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth"> + <DisplayTag>Date of Birth</DisplayTag> + + <Description>Date of Birth</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender"> + <DisplayTag>Gender</DisplayTag> + <Description>Gender</Description> + </SupportedClaimType> + <SupportedClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage"> + + <DisplayTag>Web Page</DisplayTag> + <Description>Web Page</Description> + </SupportedClaimType> + </SupportedClaimTypeList> + <IsSelfIssued>true</IsSelfIssued> + <HashSalt>EMmXS+TVm+GLiJZDSZ7mPw==</HashSalt> + <TimeLastUpdated>2007-04-18T11:22:03.875Z</TimeLastUpdated> + + <IssuerId/> + <IssuerName>Self</IssuerName> + <BackgroundColor>16777215</BackgroundColor> + </InformationCardMetaData> + <InformationCardPrivateData> + <MasterKey>VTH3VHGQd6YTliRZcGiS4JdKcY2ASe9jKr+zu4PP7tc=</MasterKey> + <ClaimValueList> + + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"> + <Value>Rupert</Value> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"> + <Value>Bonobo</Value> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"> + <Value/> + + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/stateorprovince"> + <Value/> + + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone"> + <Value/> + + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/otherphone"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth"> + <Value/> + + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender"> + <Value/> + </ClaimValue> + <ClaimValue Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage"> + <Value/> + </ClaimValue> + </ClaimValueList> + </InformationCardPrivateData> + + </RoamingInformationCard> +</RoamingStore> + diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/ChangeLog b/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/ChangeLog new file mode 100644 index 00000000000..dc037c190fa --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/ChangeLog @@ -0,0 +1,8 @@ +2007-04-27 Atsushi Enomoto <atsushi@ximian.com> + + * schemas-xmlsoap-or-ws-2005-05-identity.rnc : TokenService element + also contains UserCredential. + +2007-04-18 Atsushi Enomoto <atsushi@ximian.com> + + * schemas-xmlsoap-or-ws-2005-05-identity.rnc : initial commit. diff --git a/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/schemas-xmlsoap-or-ws-2005-05-identity.rnc b/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/schemas-xmlsoap-or-ws-2005-05-identity.rnc new file mode 100644 index 00000000000..fb9548305b0 --- /dev/null +++ b/mcs/class/Mono.ServiceModel.IdentitySelectors/resources/schemas-xmlsoap-or-ws-2005-05-identity.rnc @@ -0,0 +1,96 @@ +default namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity" +datatypes xs = "http://www.w3.org/2001/XMLSchema" +namespace wst = "http://schemas.xmlsoap.org/ws/2005/02/trust" + +grammar { + +start = element RoamingStore { + element RoamingInformationCard { + element InformationCardMetaData { + attribute xml:lang { text }, + element InformationCardReference { + element CardId { text }, + element CardVersion { text } + }, + element CardName { text }, + element CardImage { + attribute MimeType { text }, + xs:base64Binary + }, + element Issuer { xs:anyURI }, + element TimeIssued { xs:dateTime }, + element TimeExpires { xs:dateTime }, + element TokenServiceList { + element TokenService { + element wsa:EndpointReference { + element wsa:Address { xs:anyURI }, + element wsa:Metadata { + element mex:Metadata { + element wsx:MetadataSection { + element wsx:MetadataReference { + element wsa:Address { xs:anyURI } + } + } + } + }*, + element wsa:Identity { + element dsig:KeyInfo { + element dsig:X509Data { + element dsig:X509Certificate { xs:base64Binary } + } + } + }? + }, + element UserCredential { + element DisplayCredentialHint { any* }, + credentialElement + } + }+ + }?, + element SupportedTokenTypeList { + element wst:TokenType { xs:anyURI }+ + }, + element SupportedClaimTypeList { + element SupportedClaimType { + attribute Uri { xs:anyURI }, + element DisplayTag { text }, + element Description { text } + }+ + }, + element IsSelfIssued { xs:boolean }, + element HashSalt { xs:base64Binary }, + element TimeLastUpdated { xs:dateTime }, + element IssuerId { text }, + element IssuerName { text }, + element BackgroundColor { xs:int } + }, + element InformationCardPrivateData { + element MasterKey { xs:base64Binary }, + element ClaimValueList { + element ClaimValue { + attribute Uri { xs:anyURI }, + element Value { text } + }+ + }? + } + }+ +} + +any-content = + element * { attribute * { text }* | any-content* } | + text + +credentialElement = + element UsernamePasswordCredential { + element Username { text }? + } | + element X509V3Credential { + # specified in xmldsig schema + any-content + } | + element KerberosV5Credential { attribute * { text}* } | + element SelfIssuedCredential { + element PrivatePersonalIdentifier { any-content } + } + +} |