Eidas-Node and SAML
Total Page:16
File Type:pdf, Size:1020Kb
eIDAS-Node and SAML Version 2.1 eIDAS-Node and SAML Version 2.1 Document history Version Date Modification reason Modified by 1.0 06/10/2017 Origination DIGIT 2.0 11/04/2018 Editorial improvements DIGIT 2.1 06/07/2018 Reuse of document policy updated and version DIGIT changed to match the corresponding Release. Copyright European Commission — DIGIT Page 2 of 56 eIDAS-Node and SAML Version 2.1 Disclaimer This document is for informational purposes only and the Commission cannot be held responsible for any use which may be made of the information contained therein. References to legal acts or documentation of the European Union (EU) cannot be perceived as amending legislation in force or other EU documentation. The document contains a brief overview of technical nature and is not supplementing or amending terms and conditions of any procurement procedure; therefore, no compensation claim can be based on the contents of the present document. © European Union, 2018 Reuse of this document is authorised provided the source is acknowledged. The Commission's reuse policy is implemented by Commission Decision 2011/833/EU of 12 December 2011 on the reuse of Commission documents. Directorate-General for [Name of the Directorate-General] [Name of the Programme/Activity] 2014 EUR [number] EN eIDAS-Node and SAML Version 2.1 Table of contents DOCUMENT HISTORY ....................................................................................... 2 TABLE OF CONTENTS ....................................................................................... 4 LIST OF FIGURES ............................................................................................ 6 LIST OF TABLES .............................................................................................. 7 1. INTRODUCTION ........................................................................................ 8 1.1. Document aims ................................................................................ 8 1.2. Document structure .......................................................................... 8 1.3. Other technical reference documentation ............................................. 8 2. SAML OVERVIEW ..................................................................................... 10 2.1. Drivers of SAML Adoption ................................................................. 10 3. EIDAS-NODE AND SAML XML ENCRYPTION ................................................. 12 3.1. Requirement description ................................................................... 12 3.2. XML 1.1 Encryption Recommendation ................................................. 12 3.3. Overview of supported features ......................................................... 13 3.4. Encryption ...................................................................................... 13 3.4.1. Encryption of an entire element ............................................. 13 3.4.2. Symmetric key encryption ..................................................... 14 3.5. SAML 2.0 AuthnResponse Assertion Encryption ................................... 15 3.5.1. Assertion encryption support by SAML 2.0 .............................. 15 3.5.2. Pseudo-code implementation of encryption of SAML Response ... 16 3.5.3. Pseudo implementation of decryption of SAML Response ........... 16 3.5.4. Encryption configuration ....................................................... 17 3.5.5. eIDAS SAML 2.0 Encryption example ...................................... 19 3.5.6. eIDAS SAML 2.0 Encryption and Signature .............................. 20 3.5.7. eIDAS SAML 2.0 Encryption with Signature example ................ 20 3.6. XML Encryption/Decryption implementation ........................................ 22 3.6.1. OpenSAML - XML Tooling ...................................................... 22 3.6.2. Component dependencies ..................................................... 23 3.6.3. Code snippet – Certification credential for encryption ............... 23 3.6.4. Code snippet – Data & key encryption parameters ................... 24 3.6.5. Code snippet – Set up open SAML encrypter ........................... 24 3.6.6. Code Snippet – Assertion encryption ...................................... 24 3.6.7. Code snippet – Manage specific namespace prefix .................... 24 3.6.8. Code snippet – Locate & construct the single certificate for decryption in the SAML Response ........................................... 25 3.6.9. Code snippet – Credential based on the certification for decryption ........................................................................... 25 3.6.10. Code snippet – Assertion decryption ....................................... 26 3.7. Sources of further information ........................................................... 26 4. EIDAS NODE AND SAML METADATA ........................................................... 27 4.1. Presentation ................................................................................... 27 4.2. Use cases ....................................................................................... 27 Copyright European Commission — DIGIT Page 4 of 56 eIDAS-Node and SAML Version 2.1 4.2.1. Identification of eIDAS-Nodes ................................................ 27 4.2.2. Request messages verification ............................................... 28 4.2.3. Response messages verification ............................................. 28 4.2.4. Metadata exchange .............................................................. 29 4.3. Message format ............................................................................... 30 4.3.1. Metadata in SAML Requests & SAML Responses ....................... 30 4.3.2. Metadata profile for eIDAS-Nodes .......................................... 30 4.3.3. List of eIDAS metadata ......................................................... 31 4.4. Details of the metadata used in the eIDAS-Node ................................. 31 4.4.1. Support of dynamic and cached use of metadata ..................... 31 4.4.2. Internal cache behaviour ...................................................... 32 4.4.3. Parametrization of the metadata signing certificate and trust chain .................................................................................. 32 5. EIDAS-NODE PROTOCOL ENGINE ............................................................... 34 5.1. Introduction .................................................................................... 34 5.2. Dependencies ................................................................................. 34 5.3. Configuration .................................................................................. 34 5.4. Using eIDAS SAML Engine (public interfaces) ...................................... 38 6. PROTOCOLENGINE CONFIGURATION .......................................................... 40 6.1. Obtaining a ProtocolEngine instance ................................................ 40 6.2. Configuring protocol engines ............................................................. 40 6.2.1. The DefaultProtocolEngineConfigurationFactory ....................... 41 6.2.2. Core properties .................................................................... 42 6.2.3. Signature Configuration ........................................................ 44 6.2.4. The encryption activation file ................................................. 46 6.2.5. ProtocolProcessor configuration ............................................. 47 6.2.6. The Attribute Registry .......................................................... 49 6.2.7. The attribute registry file format ............................................ 54 6.2.8. Clock configuration............................................................... 55 6.2.9. Overriding the configuration with eidas.xml ........................... 55 7. REFERENCES ........................................................................................... 56 Copyright European Commission — DIGIT Page 5 of 56 eIDAS-Node and SAML Version 2.1 List of figures Figure 1: Encryption of an entire element ...............................................................13 Figure 2: Component dependencies .......................................................................23 Copyright European Commission — DIGIT Page 6 of 56 eIDAS-Node and SAML Version 2.1 List of tables Table 1: List of eIDAS metadata ............................................................................31 Table 2: Metadata related parameters .....................................................................32 Table 3: Encryption property keys .........................................................................46 Copyright European Commission — DIGIT Page 7 of 56 eIDAS-Node and SAML Version 2.1 1. Introduction This document is intended for a technical audience consisting of developers, administrators and those requiring detailed technical information on how to configure, build and deploy the eIDAS-Node application. This document describes the W3C recommendations and how SAML XML encryption is implemented and integrated in eID. Encryption of the sensitive data carried in SAML 2.0 Requests and Assertions is discussed alongside the use of AEAD algorithms as essential building blocks. 1.1. Document aims The aim of this document is to describe how the eIDAS-Node implements SAML. 1.2. Document structure This document is divided into the following sections: Chapter 1 − Introduction