T-110.455 Network Application Frameworks and XML Web Service Security 06.04.2005 Sasu Tarkoma Based on slides by Pekka Nikander.

  • Published on
    04-Jan-2016

  • View
    213

  • Download
    1

Transcript

<ul><li><p>T-110.455 Network Application Frameworks and XML </p><p>Web Service Security</p><p>06.04.2005</p><p>Sasu Tarkoma </p><p>Based on slides by Pekka Nikander</p></li><li><p>AnnouncementsA list of papers to read for the final exam Bob Braden, Architectural Principles of the Internet, IPAM Tutorial March 12, 2002. Jukka Ylitalo and Pekka Nikander, A new Name Space for End-Points: Implementing secure Mobility and Multi-homing across the two versions of IP, in Proceedings of the Fifth European Wireless Conference, Mobile and Wireless Systems beyond 3G (EW2004), pp. 435-441, Barcelona, Spain, February 24-27, 2004. Hari Balakrishnan, Karthik Lakshminarayanan, Sylvia Ratnasamy, Scott Shenker, Ion Stoica, and Michael Walfish, "A Layered Naming Architecture for the Internet", ACM SIGCOMM 2004, Portland, OR, September 2004. We will have an invited lecture on 13.04. by Jaakko Kangasharju on wireless web services. Everyone should attend! </p></li><li><p>ContentsReviewRequirementsSecurity contextsWS security standard revisitedSAMLSummary</p></li><li><p>Standardization GroupsXML EncryptionXML SignatureXKMSXrMLWS-SecurityProvisioningBiometricsXACMLSAMLSecurity Assertion Markup languageXML Common Biometric Format (XCBF)Extensible Rights Markup LanguageeXtensible Access Control Markup Language (XACML)XML Key Management Specification</p></li><li><p>Digital SignaturesMessageNeed to know the message, digest, and algorithm (f.e. SHA1)</p></li><li><p>XML Digital Signatures (cont.)</p><p> (()? )+ ()? ()*</p></li><li><p>Encryption</p></li><li><p>XML Encryption</p><p> ? ? ? ? ? ? ? ? ?</p></li><li><p>Web Services Security RequirementsAccess control to Web servicesWS-Security, XML-SignatureSAML Issuing and validation of SAML assertionsDigital certificate validationContent-filtering XMLFilters based on data format (XSD)Filters based on content (XPath)Filters based on integrity (XML Signature)</p></li><li><p>Functional point of viewRoutingIntegrityValidationContent CheckingAuthenticationAuthorization ManagementConsole</p><p>Design andDeploySecuritypoliciesID ManagementLDAPPKISingle Sign-OnReportingActivityAlertingSecure logging</p></li><li><p>Security Contexts in Web ServicesRemember Web Services goals:Re-use existing servicesCombine services from several domainsSecurity result: Must support several security domainsSOAP intermediariesReusing security tokens from one message in another message</p></li><li><p>Example 1: Pass subject detailsWeb BrowserWebsiteAppl.ServerWeb ServiceMain Point: We need security within AND between security contexts!</p></li><li><p>Example 2: SOAP RoutingMain Point: We need XML validation, encryption, and authentication between security contexts!</p></li><li><p>WS Security IWeb Services Security: SOAP Message Security 1.0 (Oasis Standard 2004)End-to-End securityHeaders are decrypted and processed as neededSelective processingSome parts are plain textSome are encryptedSome are signedHow does it work?SOAP header carries security information (and other info as well)</p></li><li><p>WS Security IIAbility to send security tokens as part of a message, message integrity, and message confidentialitySecurity model in terms of security tokens combined with digital signatures to protect and authenticate SOAP messagesAn X.509 is an example of a signed security token endorsed by a CA.When third party support is not available, receiver may choose to accept the claims in the token based on trust on the entity that sent the message.</p></li><li><p>GoalsMultiple security token formatsMultiple trust domainsMultiple signature formatsMultiple encryption technologiesEnd-to-end message content security and not just transport-level security</p></li><li><p>Non-goalsEstablishing a security context or authentication mechanismKey derivationAdvertisement and exchange of security policyHow trust is established or determinedNon-repudiation</p></li><li><p>Message ProtectionIntegrity mechanism designed to support multiple signaturesUses XML Signature and XML EncryptionSyntax and semantics of signatures within a elementThis is the security block in the SOAP headerSOAP actor/role attribute is used to target header blocksSecurity element includes Security tokensInformation about the use of XML Encryption &amp; Signature in the SOAP header/body/combination</p></li><li><p>Security HeaderMay be present multiple times in a SOAP messageMust have different actor/role attribute values</p><p>Unrecognized extension elements or attributes should cause a faultReceivers MAY ignore elements or extensions within the element, based on local security policy</p><p> .. ... </p></li><li><p>Security Element: enclosing informationUsernameToken blockDefines how username-and-password info is enclosed in SOAPEnd users: SAML Authentication Assertion or Kerberos ticket, shared uname/pwd secretPassword must be protected against eavesdroppers (enc) and replay (timestamp/nonce)BinarySecurityToken blockEncloses binary dataAn X.509 certificate or a Kerberos ticketHas an identifier (Id), a value (ValueType), and an encoding (EncodingType)XML Signature KeyInfo may point to a certificate used in signing using a Reference to its Id.Similar for XML Encryption.So we can sign/encrypt data with a certificate in the header.</p></li><li><p>ID ReferencesA new global attribute: wsu:Id attribute..Note that the SOAP processor needs to support thiswsu:id a WS-Security namespace (wssecurity-secext-1.0.xsd)Recipients do not need to understand the full schema of the message for processing the security elementsTwo wsu:Id attributes within an XML document MUST NO have the same valueRecommended that wsu:Id is used instead of a more general transformation, especially XPath</p></li><li><p>SignaturesDoes not use the Enveloped Signature TransformDue to mutability of SOAP headerDoes not use the Enveloping SignatureExplicitly include the elements to be signedAllows for extensions, multiple signatures, etc.</p></li><li><p>CanonicalizationXML Canonicalization and Exclusive XML CanonicalizationProblemsXML tools change documents, e.g. duplicate namespace declarations can be removed or createdSignature simply covers something like xx:foo, its meaning may change if xx is redefinedThere are mechanisms like XPath, which consider xx=http://example.com; to be different from yy=http://example.com/</p></li><li><p>Inclusive CanonicalizationCopies all the declarations that are currently in forceUseful in the typical case of signing part or all of the SOAP bodyCauses problems for signatures when the context changes (for example by intermediaries)</p></li><li><p>Exclusive CanonicalizationTries to figure out what namespaces are actually used and just copies thoseDoes not look into attribute values or element contentCan happen implicitly because XML processing tools will add xsi:type if schema subtypes are usedUseful when you have an XML document that you wish to insert into another XML documentExample: signed SAML assertionShould be used with WS-Security: SOAP Message Security (recommended)</p></li><li><p>Signing MessagesMultiple signature entries MAY be added into a single SOAP Envelope within one header blockMUST be prepended to the existing content elements contained in the signature should refer to a resource within the enclosing SOAP envelope</p><p>Extensible mechanism that provides an open content model for referencing security tokensNew reference option for XML signatureSTR Deference TransformMeans that the output is the token referenced by the element, not the element itselfYou can conveniently locate and sign security tokens anywhere in the header</p></li><li><p>Example of a Token with signature</p><p> ...</p><p>...</p><p> ... ... </p><p> Open content model for specifying token. It could be XML, URI, We use the content here using #STR-Transform and compute the digest</p></li><li><p>Extended exampleSOAP EnvelopeSOAP HeaderWS SecuritySecurity token (a certificate)Encryption key (passing symmetric key)SignatureSOAP BodyEncrypted content</p></li><li><p>Overall message structure</p><p> ... ... ... ... ... 1.2.3.4.</p></li><li><p>1. Binary security token</p><p> ABCDEF....</p><p>......</p></li><li><p>2. Passing encryption key</p><p> ABCDEF.... ... </p><p>We are using another certificate for asymmetric crypto.Encrypted symmetric keyReference to cipher data</p></li><li><p>3. Actual signature</p><p> ... ... . ..... </p><p>Exclusive canonicalizationReferences &amp; digests to dataReference to certificate.</p></li><li><p>3. SignedInfo in more detail</p><p> ... ... </p></li><li><p>4. Actual message body</p><p> ... </p></li><li><p>Error HandlingSOAP Faults are used to indicate faultsError scenariosSecurity token type unsupportedNote: WS-Policy may be used to convey what security tokens can be understood by different partiesFault code: InvalidSecurity (if contents of the header block cannot be processed)Invalid security tokenFor example: security token corrupted or has invalid signatureFault code: InvalidSecurityTokenSecurity token cannot be authenticatedFor example: given certificate cannot be validatedFault code: FailedAuthenticationSecurity token unavailableFor example: a certificate was referenced that could not be locatedFault code: wsse:SecurityTokenUnavailable</p></li><li><p>SAMLSAML (Security Assertion Markup Language) A XML-based framework (schemas) for the exchange of authentication and authorization information A standard message exchange protocolHow you ask and receive informationMainly for integration, up to relying parties to decide to what authentication authority to trustAssertions can convey information about authentication acts performed by subjects, attributes of subjects, and authorization decisions about whether subjects are allowed to access certain resources Authentication statements merely describe acts of authentication that happened previously Specified by OASIS</p></li><li><p>SAML in a nutshellXML-based framework for exchanging security informationXML-encoded security assertionsXML-encoded request/response protocolRules on using assertions with standard transport and messaging frameworksSAML &amp; WS-Security allow a SOAP message to include information about the end-users authentication status</p></li><li><p>SAML Motivation: Portable Trust Using services in B from A?Authentication at B?Not acceptable!</p></li><li><p>Authenticationserver CTimed updatesTimed updates</p></li><li><p>SAML assertionsAn assertion is a declaration of fact about a subject, e.g. a userAccording to some assertion issuesSAML has three kinds, all related to security:AuthenticationAttributeAuthorization decisionYou can extend SAML to make you own kinds of assertionsAssertions can be digitally signed</p></li><li><p>All assertions have some common informationIssuer and issuance timestampAssertion IDSubjectName plus the security domainOptional subject information, e.g. public keyConditions under which assertion is validSAML clients must reject assertions containing unsupported conditionsSpecial kind of condition: assertion validity periodAdditional adviceE.g. to explain how the assertion was made</p></li><li><p>Authentication assertionAn issuing authority asserts that:Subject Swas authenticated by means Mat time TCaution: actually checking or revoking of credentials is not in the scope of SAML!Password exchangeChallenge-responseEtc.It merely lets you link back to acts of authentication that took place previously</p></li><li><p>Example authentication assertion</p></li><li><p>Attribute assertionAn issuing authority asserts that:subject Sis associated with attributes A,B,..with values a,b,Typically this would be gotten from an LDAP repositoryjohn.doe in example.comis associated with attribute Departmentwith value Human Resources</p></li><li><p>Example attribute assertion</p><p> PaidUp </p></li><li><p>Authorization decision assertionAn issuing authority decides whether to grant the requestby subject Sfor access type Ato resource Rgiven evidence EThe subject could be a human or a programThe resource could be a web page or a web service, for example</p></li><li><p>Example authorization decision assertion</p></li><li><p>A username token in WS-Security SOAP Header</p><p> abc xyzabc ap2oep3oaeap1 ... ... </p></li><li><p>A Binary X.509 Certificate in WS-Security SOAP header</p><p> ABCDEF.. ... ... ...</p></li><li><p>A SAML Assertion in WS-Security SOAP Header</p><p> ... ... ... SecurityToken-123 ...</p><p>SAML does not allow the use of the ID attribute with assertion elements, hence AssertionIDReference is used</p></li><li><p>SAML and XACMLPEPPolicy Enforcement PointWeb ServicePDPPolicy Decision PointPRPPolicy Retrieval PointPIPPolicy Information PointPolicy Store(XACML)PAPPolicy Admin. PointRules are combined: subjects, resources, and attributes. Exported into XACML.PDP queries attributes from PIP (time of day, value, etc.). PIP returns an attribute assertion.Once the PDP has all the relevant information, it evaluates rules and returns a SAML authoriz. AssertionOnce the SAML authoriz. Has ben made it may be included into the SOAP message and used by the target WS.SOAP msg isIntercepted. SAML query is formed, results determine access. Identity info taken from request. There may be multiple PEPs.</p></li><li><p>ImplementationsTrust Services Integration Kit (TSIK), Verisign Java API for creating trusted services, includes a SAML API http://www.xmltrustcenter.org/developer/verisign/tsik/index.htmApache XML-Security, Apache Software Foundation XML Digital Signature and XML Encryption (Java, C++) http://xml.apache.org/security/Web Services Enhancements 2.0, Microsoft.NET implementation of various WS Security specs.http://msdn.microsoft.com/webservices/building/wse/Microsoft Passport, Microsoft Single sign-on support XML Security Suite, IBM XML Digital Signature, XML Encryption and XML Access Control Language (Java)http://www.alphaworks.ibm.com/tech/xmlsecuritysuiteSunONE Identity Server, Sun Microsystems Supports Libertys federated identity and SAML </p></li><li><p>Web Services Enhancements 2.0Implements many of the rules of the WS-* specificationsWorks with HTTP and SOAP (SoapExtensions)Supported specificationsWS-Security, WS-SecurityPolicy, WS-SecureConversation, WS-Trust, WS-Referral, WS-Addressing, WS-Policy, WS-AttachmentsSupports signing/encrypting message elements and policiesMore information and downloads</p></li><li><p>Lecture SummarySecurity contextsSecurity needed within and between contextsXML validation, encryption, and authentication needed between security contexts!WS security standard revisitedSOAP header carries security information (and other info as well)Selective processingSAMLStatements about authorization, authentication, attributesSAML &amp; WS-Security &amp; XACMLImplementations available</p></li></ul>

Recommended

View more >