+-------------------------------------------+ | IPsec Management System | I2NSF User +-------------------------------------------+ | | I2NSF Consumer-Facing | Interface +-------------------------------------------+ | IKEv2 Configuration, PAD and SPD Entries | I2NSF | Distribution | Controller +-------------------------------------------+ | | I2NSF NSF-Facing | Interface +-------------------------------------------+ | IKEv2 | IPsec(PAD, SPD) | Network |-------------------------------------------| Security | IPsec Data Protection and Forwarding | Function +-------------------------------------------+
+-----------------------------------------+ | IPsec Management System | I2NSF User +-----------------------------------------+ | | I2NSF Consumer-Facing Interface | +-----------------------------------------+ | SPD and SAD Entries | I2NSF | Distribution | Controller +-----------------------------------------+ | | I2NSF NSF-Facing Interface | +-----------------------------------------+ | IPsec (SPD, SAD) | Network |-----------------------------------------| Security | IPsec Data Protection and Forwarding | Function +-----------------------------------------+
module ietf-i2nsf-ikec { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikec"; prefix nsfikec; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types."; } organization "IETF I2NSF Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> WG List: <mailto:i2nsf@ietf.org> Author: Rafael Marin-Lopez <mailto:rafa@um.es> Author: Gabriel Lopez-Millan <mailto:gabilm@um.es> Author: Fernando Pereniguez-Garcia <mailto:fernando.pereniguez@cud.upct.es> "; description "Common data model for the IKE and IKE-less cases defined by the SDN-based IPsec flow protection service. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. Copyright (c) 2021 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9061; see the RFC itself for full legal notices."; revision 2021-07-14 { description "Initial version."; reference "RFC 9061: A YANG Data Model for IPsec Flow Protection Based on Software-Defined Networking (SDN)."; } typedef encr-alg-t { type uint16; description "The encryption algorithm is specified with a 16-bit number extracted from the IANA registry. The acceptable values MUST follow the requirement levels for encryption algorithms for ESP and IKEv2."; reference "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, IKEv2 Transform Attribute Types, Transform Type 1 - Encryption Algorithm Transform IDs RFC 8221: Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH) RFC 8247: Algorithm Implementation Requirements and Usage Guidance for the Internet Key Exchange Protocol Version 2 (IKEv2)."; } typedef intr-alg-t { type uint16; description "The integrity algorithm is specified with a 16-bit number extracted from the IANA registry. The acceptable values MUST follow the requirement levels for integrity algorithms for ESP and IKEv2."; reference "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, IKEv2 Transform Attribute Types, Transform Type 3 - Integrity Algorithm Transform IDs RFC 8221: Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH) RFC 8247: Algorithm Implementation Requirements and Usage Guidance for the Internet Key Exchange Protocol Version 2 (IKEv2)."; } typedef ipsec-mode { type enumeration { enum transport { description "IPsec transport mode. No Network Address Translation (NAT) support."; } enum tunnel { description "IPsec tunnel mode."; } } description "Type definition of IPsec mode: transport or tunnel."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 3.2."; } typedef esp-encap { type enumeration { enum espintcp { description "ESP in TCP encapsulation."; reference "RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; } enum espinudp { description "ESP in UDP encapsulation."; reference "RFC 3948: UDP Encapsulation of IPsec ESP Packets."; } enum none { description "No ESP encapsulation."; } } description "Types of ESP encapsulation when Network Address Translation (NAT) may be present between two NSFs."; reference "RFC 8229: TCP Encapsulation of IKE and IPsec Packets RFC 3948: UDP Encapsulation of IPsec ESP Packets."; } typedef ipsec-protocol-params { type enumeration { enum esp { description "IPsec ESP protocol."; } } description "Only the Encapsulation Security Protocol (ESP) is supported, but it could be extended in the future."; reference "RFC 4303: IP Encapsulating Security Payload (ESP)."; } typedef lifetime-action { type enumeration { enum terminate-clear { description "Terminates the IPsec SA and allows the packets through."; } enum terminate-hold { description "Terminates the IPsec SA and drops the packets."; } enum replace { description "Replaces the IPsec SA with a new one: rekey."; } } description "When the lifetime of an IPsec SA expires, an action needs to be performed for the IPsec SA that reached the lifetime. There are three possible options: terminate-clear, terminate-hold, and replace."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.5."; } typedef ipsec-traffic-direction { type enumeration { enum inbound { description "Inbound traffic."; } enum outbound { description "Outbound traffic."; } } description "IPsec traffic direction is defined in two directions: inbound and outbound. From an NSF perspective, inbound and outbound are defined as mentioned in Section 3.1 in RFC 4301."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 3.1."; } typedef ipsec-spd-action { type enumeration { enum protect { description "PROTECT the traffic with IPsec."; } enum bypass { description "BYPASS the traffic. The packet is forwarded without IPsec protection."; } enum discard { description "DISCARD the traffic. The IP packet is discarded."; } } description "The action when traffic matches an IPsec security policy. According to RFC 4301, there are three possible values: BYPASS, PROTECT, and DISCARD."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1."; } typedef ipsec-inner-protocol { type union { type uint8; type enumeration { enum any { value 256; description "Any IP protocol number value."; } } } default "any"; description "IPsec protection can be applied to specific IP traffic and Layer 4 traffic (TCP, UDP, SCTP, etc.) or ANY protocol in the IP packet payload. The IP protocol number is specified with a uint8 or ANY defining an enumerate with value 256 to indicate the protocol number. Note that in case of IPv6, the protocol in the IP packet payload is indicated in the Next Header field of the IPv6 packet."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.1 IANA: Protocol Numbers."; } grouping encap { description "This group of nodes allows defining of the type of encapsulation in case NAT traversal is required and includes port information."; leaf espencap { type esp-encap; default "none"; description "ESP in TCP, ESP in UDP, or ESP in TLS."; } leaf sport { type inet:port-number; default "4500"; description "Encapsulation source port."; } leaf dport { type inet:port-number; default "4500"; description "Encapsulation destination port."; } leaf-list oaddr { type inet:ip-address; description "If required, this is the original address that was used before NAT was applied over the packet."; } reference "RFC 3947: Negotiation of NAT-Traversal in the IKE RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; } grouping lifetime { description "Different lifetime values limited to an IPsec SA."; leaf time { type uint32; units "seconds"; default "0"; description "Time in seconds since the IPsec SA was added. For example, if this value is 180 seconds, it means the IPsec SA expires in 180 seconds since it was added. The value 0 implies infinite."; } leaf bytes { type uint64; default "0"; description "If the IPsec SA processes the number of bytes expressed in this leaf, the IPsec SA expires and SHOULD be rekeyed. The value 0 implies infinite."; } leaf packets { type uint32; default "0"; description "If the IPsec SA processes the number of packets expressed in this leaf, the IPsec SA expires and SHOULD be rekeyed. The value 0 implies infinite."; } leaf idle { type uint32; units "seconds"; default "0"; description "When an NSF stores an IPsec SA, it consumes system resources. For an idle IPsec SA, this is a waste of resources. If the IPsec SA is idle during this number of seconds, the IPsec SA SHOULD be removed. The value 0 implies infinite."; } reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.2.1."; } grouping port-range { description "This grouping defines a port range, such as that expressed in RFC 4301, for example, 1500 (Start Port Number)-1600 (End Port Number). A port range is used in the Traffic Selector."; leaf start { type inet:port-number; description "Start port number."; } leaf end { type inet:port-number; must '. >= ../start' { error-message "The end port number MUST be equal or greater than the start port number."; } description "End port number. To express a single port, set the same value as start and end."; } reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2."; } grouping tunnel-grouping { description "The parameters required to define the IP tunnel endpoints when IPsec SA requires tunnel mode. The tunnel is defined by two endpoints: the local IP address and the remote IP address."; leaf local { type inet:ip-address; mandatory true; description "Local IP address' tunnel endpoint."; } leaf remote { type inet:ip-address; mandatory true; description "Remote IP address' tunnel endpoint."; } leaf df-bit { type enumeration { enum clear { description "Disable the Don't Fragment (DF) bit in the outer header. This is the default value."; } enum set { description "Enable the DF bit in the outer header."; } enum copy { description "Copy the DF bit to the outer header."; } } default "clear"; description "Allow configuring the DF bit when encapsulating tunnel mode IPsec traffic. RFC 4301 describes three options to handle the DF bit during tunnel encapsulation: clear, set, and copy from the inner IP header. This MUST be ignored or has no meaning when the local/remote IP addresses are IPv6 addresses."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 8.1."; } leaf bypass-dscp { type boolean; default "true"; description "If true, to copy the Differentiated Services Code Point (DSCP) value from inner header to outer header. If false, to map DSCP values from an inner header to values in an outer header following ../dscp-mapping."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2."; } list dscp-mapping { must '../bypass-dscp = "false"'; key "id"; ordered-by user; leaf id { type uint8; description "The index of list with the different mappings."; } leaf inner-dscp { type inet:dscp; description "The DSCP value of the inner IP packet. If this leaf is not defined, it means ANY inner DSCP value."; } leaf outer-dscp { type inet:dscp; default "0"; description "The DSCP value of the outer IP packet."; } description "A list that represents an array with the mapping from the inner DSCP value to outer DSCP value when bypass-dscp is false. To express a default mapping in the list where any other inner dscp value is not matching a node in the list, a new node has to be included at the end of the list where the leaf inner-dscp is not defined (ANY) and the leaf outer-dscp includes the value of the mapping. If there is no value set in the leaf outer-dscp, the default value for this leaf is 0."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2 and Appendix C."; } } grouping selector-grouping { description "This grouping contains the definition of a Traffic Selector, which is used in the IPsec policies and IPsec SAs."; leaf local-prefix { type inet:ip-prefix; mandatory true; description "Local IP address prefix."; } leaf remote-prefix { type inet:ip-prefix; mandatory true; description "Remote IP address prefix."; } leaf inner-protocol { type ipsec-inner-protocol; default "any"; description "Inner protocol that is going to be protected with IPsec."; } list local-ports { key "start end"; uses port-range; description "List of local ports. When the inner protocol is ICMP, this 16-bit value represents code and type. If this list is not defined, it is assumed that start and end are 0 by default (any port)."; } list remote-ports { key "start end"; uses port-range; description "List of remote ports. When the upper layer protocol is ICMP, this 16-bit value represents code and type. If this list is not defined, it is assumed that start and end are 0 by default (any port)."; } reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2."; } grouping ipsec-policy-grouping { description "Holds configuration information for an IPsec SPD entry."; leaf anti-replay-window-size { type uint32; default "64"; description "To set the anti-replay window size. The default value is set to 64, following the recommendation in RFC 4303."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Section 3.4.3."; } container traffic-selector { description "Packets are selected for processing actions based on Traffic Selector values, which refer to IP and inner protocol header information."; uses selector-grouping; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.4.1."; } container processing-info { description "SPD processing. If the required processing action is protect, it contains the required information to process the packet."; leaf action { type ipsec-spd-action; default "discard"; description "If bypass or discard, container ipsec-sa-cfg is empty."; } container ipsec-sa-cfg { when "../action = 'protect'"; description "IPsec SA configuration included in the SPD entry."; leaf pfp-flag { type boolean; default "false"; description "Each selector has a Populate From Packet (PFP) flag. If asserted for a given selector X, the flag indicates that the IPsec SA to be created should take its value (local IP address, remote IP address, Next Layer Protocol, etc.) for X from the value in the packet. Otherwise, the IPsec SA should take its value(s) for X from the value(s) in the SPD entry."; } leaf ext-seq-num { type boolean; default "false"; description "True if this IPsec SA is using extended sequence numbers. If true, the 64-bit extended sequence number counter is used; if false, the normal 32-bit sequence number counter is used."; } leaf seq-overflow { type boolean; default "false"; description "The flag indicating whether overflow of the sequence number counter should prevent transmission of additional packets on the IPsec SA (false) and, therefore, needs to be rekeyed or whether rollover is permitted (true). If Authenticated Encryption with Associated Data (AEAD) is used (leaf esp-algorithms/encryption/algorithm-type), this flag MUST be false. Setting this flag to true is strongly discouraged."; } leaf stateful-frag-check { type boolean; default "false"; description "Indicates whether (true) or not (false) stateful fragment checking applies to the IPsec SA to be created."; } leaf mode { type ipsec-mode; default "transport"; description "IPsec SA has to be processed in transport or tunnel mode."; } leaf protocol-parameters { type ipsec-protocol-params; default "esp"; description "Security protocol of the IPsec SA. Only ESP is supported, but it could be extended in the future."; } container esp-algorithms { when "../protocol-parameters = 'esp'"; description "Configuration of Encapsulating Security Payload (ESP) parameters and algorithms."; leaf-list integrity { type intr-alg-t; default "0"; ordered-by user; description "Configuration of ESP authentication based on the specified integrity algorithm. With AEAD encryption algorithms, the integrity node is not used."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Section 3.2."; } list encryption { key "id"; ordered-by user; leaf id { type uint16; description "An identifier that unequivocally identifies each entry of the list, i.e., an encryption algorithm and its key length (if required)."; } leaf algorithm-type { type encr-alg-t; default "20"; description "Default value 20 (ENCR_AES_GCM_16)."; } leaf key-length { type uint16; default "128"; description "By default, key length is 128 bits."; } description "Encryption or AEAD algorithm for the IPsec SAs. This list is ordered following from the higher priority to lower priority. First node of the list will be the algorithm with higher priority. In case the list is empty, then no encryption algorithm is applied (NULL)."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Section 3.2."; } leaf tfc-pad { type boolean; default "false"; description "If Traffic Flow Confidentiality (TFC) padding for ESP encryption can be used (true) or not (false)."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Section 2.7."; } reference "RFC 4303: IP Encapsulating Security Payload (ESP)."; } container tunnel { when "../mode = 'tunnel'"; uses tunnel-grouping; description "IPsec tunnel endpoints definition."; } } reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2."; } } }
module: ietf-i2nsf-ike +--rw ipsec-ike +--rw pad | +--rw pad-entry* [name] | +--rw name string | +--rw (identity) | | +--:(ipv4-address) | | | +--rw ipv4-address? inet:ipv4-address | | +--:(ipv6-address) | | | +--rw ipv6-address? inet:ipv6-address | | +--:(fqdn-string) | | | +--rw fqdn-string? inet:domain-name | | +--:(rfc822-address-string) | | | +--rw rfc822-address-string? string | | +--:(dnx509) | | | +--rw dnx509? binary | | +--:(gnx509) | | | +--rw gnx509? binary | | +--:(id-key) | | | +--rw id-key? binary | | +--:(id-null) | | +--rw id-null? empty | +--rw auth-protocol? auth-protocol-type | +--rw peer-authentication | +--rw auth-method? auth-method-type | +--rw eap-method | | +--rw eap-type uint64 | +--rw pre-shared | | +--rw secret? yang:hex-string | +--rw digital-signature | +--rw ds-algorithm? uint8 | +--rw (public-key)? | | +--:(raw-public-key) | | | +--rw raw-public-key? binary | | +--:(cert-data) | | +--rw cert-data? binary | +--rw private-key? binary | +--rw ca-data* binary | +--rw crl-data? binary | +--rw crl-uri? inet:uri | +--rw oscp-uri? inet:uri +--rw conn-entry* [name] | +--rw name string | +--rw autostartup? autostartup-type | +--rw initial-contact? boolean | +--rw version? auth-protocol-type | +--rw fragmentation | | +--rw enabled? boolean | | +--rw mtu? uint16 | +--rw ike-sa-lifetime-soft | | +--rw rekey-time? uint32 | | +--rw reauth-time? uint32 | +--rw ike-sa-lifetime-hard | | +--rw over-time? uint32 | +--rw ike-sa-intr-alg* nsfikec:intr-alg-t | +--rw ike-sa-encr-alg* [id] | | +--rw id uint16 | | +--rw algorithm-type? nsfikec:encr-alg-t | | +--rw key-length? uint16 | +--rw dh-group? fs-group | +--rw half-open-ike-sa-timer? uint32 | +--rw half-open-ike-sa-cookie-threshold? uint32 | +--rw local | | +--rw local-pad-entry-name string | +--rw remote | | +--rw remote-pad-entry-name string | +--rw encapsulation-type | | +--rw espencap? esp-encap | | +--rw sport? inet:port-number | | +--rw dport? inet:port-number | | +--rw oaddr* inet:ip-address | +--rw spd | | +--rw spd-entry* [name] | | +--rw name string | | +--rw ipsec-policy-config | | +--rw anti-replay-window-size? uint32 | | +--rw traffic-selector | | | +--rw local-prefix inet:ip-prefix | | | +--rw remote-prefix inet:ip-prefix | | | +--rw inner-protocol? ipsec-inner-protocol | | | +--rw local-ports* [start end] | | | | +--rw start inet:port-number | | | | +--rw end inet:port-number | | | +--rw remote-ports* [start end] | | | +--rw start inet:port-number | | | +--rw end inet:port-number | | +--rw processing-info | | +--rw action? ipsec-spd-action | | +--rw ipsec-sa-cfg | | +--rw pfp-flag? boolean | | +--rw ext-seq-num? boolean | | +--rw seq-overflow? boolean | | +--rw stateful-frag-check? boolean | | +--rw mode? ipsec-mode | | +--rw protocol-parameters? ipsec-protocol-params | | +--rw esp-algorithms | | | +--rw integrity* intr-alg-t | | | +--rw encryption* [id] | | | | +--rw id uint16 | | | | +--rw algorithm-type? encr-alg-t | | | | +--rw key-length? uint16 | | | +--rw tfc-pad? boolean | | +--rw tunnel | | +--rw local inet:ip-address | | +--rw remote inet:ip-address | | +--rw df-bit? enumeration | | +--rw bypass-dscp? boolean | | +--rw dscp-mapping* [id] | | +--rw id uint8 | | +--rw inner-dscp? inet:dscp | | +--rw outer-dscp? inet:dscp | +--rw child-sa-info | | +--rw fs-groups* fs-group | | +--rw child-sa-lifetime-soft | | | +--rw time? uint32 | | | +--rw bytes? yang:counter64 | | | +--rw packets? uint32 | | | +--rw idle? uint32 | | | +--rw action? nsfikec:lifetime-action | | +--rw child-sa-lifetime-hard | | +--rw time? uint32 | | +--rw bytes? yang:counter64 | | +--rw packets? uint32 | | +--rw idle? uint32 | +--ro state | +--ro initiator? boolean | +--ro initiator-ikesa-spi? ike-spi | +--ro responder-ikesa-spi? ike-spi | +--ro nat-local? boolean | +--ro nat-remote? boolean | +--ro encapsulation-type | | +--ro espencap? esp-encap | | +--ro sport? inet:port-number | | +--ro dport? inet:port-number | | +--ro oaddr* inet:ip-address | +--ro established? uint64 | +--ro current-rekey-time? uint64 | +--ro current-reauth-time? uint64 +--ro number-ike-sas +--ro total? yang:gauge64 +--ro half-open? yang:gauge64 +--ro half-open-cookies? yang:gauge64
module ietf-i2nsf-ike { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ike"; prefix nsfike; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types."; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types."; } import ietf-i2nsf-ikec { prefix nsfikec; reference "RFC 9061: A YANG Data Model for IPsec Flow Protection Based on Software-Defined Networking (SDN)."; } import ietf-netconf-acm { prefix nacm; reference "RFC 8341: Network Configuration Access Control Model."; } organization "IETF I2NSF Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> WG List: <mailto:i2nsf@ietf.org> Author: Rafael Marin-Lopez <mailto:rafa@um.es> Author: Gabriel Lopez-Millan <mailto:gabilm@um.es> Author: Fernando Pereniguez-Garcia <mailto:fernando.pereniguez@cud.upct.es> "; description "This module contains the IPsec IKE case model for the SDN-based IPsec flow protection service. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. Copyright (c) 2021 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9061; see the RFC itself for full legal notices."; revision 2021-07-14 { description "Initial version."; reference "RFC 9061: A YANG Data Model for IPsec Flow Protection Based on Software-Defined Networking (SDN)."; } typedef ike-spi { type uint64 { range "0..max"; } description "Security Parameter Index (SPI)'s IKE SA."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.6."; } typedef autostartup-type { type enumeration { enum add { description "IKE/IPsec configuration is only loaded into IKE implementation, but IKE/IPsec SA is not started."; } enum on-demand { description "IKE/IPsec configuration is loaded into IKE implementation. The IPsec policies are transferred to the NSF, but the IPsec SAs are not established immediately. The IKE implementation will negotiate the IPsec SAs when they are required (i.e., through an ACQUIRE notification)."; } enum start { description "IKE/IPsec configuration is loaded and transferred to the NSF's kernel, and the IKEv2-based IPsec SAs are established immediately without waiting for any packet."; } } description "Different policies to set IPsec SA configuration into NSF's kernel when IKEv2 implementation has started."; } typedef fs-group { type uint16; description "DH groups for IKE and IPsec SA rekey."; reference "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, IKEv2 Transform Attribute Types, Transform Type 4 - Diffie-Hellman Group Transform IDs RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 3.3.2."; } typedef auth-protocol-type { type enumeration { enum ikev2 { value 2; description "IKEv2 authentication protocol. It is the only one defined right now. An enum is used for further extensibility."; } } description "IKE authentication protocol version specified in the Peer Authorization Database (PAD). It is defined as enumerated to allow new IKE versions in the future."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)."; } typedef auth-method-type { type enumeration { enum pre-shared { description "Select pre-shared key as the authentication method."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)."; } enum eap { description "Select the Extensible Authentication Protocol (EAP) as the authentication method."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)."; } enum digital-signature { description "Select digital signature as the authentication method."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2) RFC 7427: Signature Authentication in the Internet Key Exchange Version 2 (IKEv2)."; } enum null { description "Null authentication."; reference "RFC 7619: The NULL Authentication Method in the Internet Key Exchange Protocol Version 2 (IKEv2)."; } } description "Peer authentication method specified in the Peer Authorization Database (PAD)."; } container ipsec-ike { description "IKE configuration for an NSF. It includes PAD parameters, IKE connection information, and state data."; container pad { description "Configuration of the Peer Authorization Database (PAD). Each entry of PAD contains authentication information of either the local peer or the remote peer. Therefore, the I2NSF Controller stores authentication information (and credentials) not only for the remote NSF but also for the local NSF. The local NSF MAY use the same identity for different types of authentication and credentials. Pointing to the entry for a local NSF (e.g., A) and the entry for remote NSF (e.g., B) is possible to specify all the required information to carry out the authentication between A and B (see ../conn-entry/local and ../conn-entry/remote)."; list pad-entry { key "name"; ordered-by user; description "Peer Authorization Database (PAD) entry. It is a list of PAD entries ordered by the I2NSF Controller, and each entry is unequivocally identified by a name."; leaf name { type string; description "PAD-unique name to identify this entry."; } choice identity { mandatory true; description "A particular IKE peer will be identified by one of these identities. This peer can be a remote peer or local peer (this NSF)."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.3.1."; case ipv4-address { leaf ipv4-address { type inet:ipv4-address; description "Specifies the identity as a single 4-octet IPv4 address."; } } case ipv6-address { leaf ipv6-address { type inet:ipv6-address; description "Specifies the identity as a single 16-octet IPv6 address. An example is 2001:db8::8:800:200c:417a."; } } case fqdn-string { leaf fqdn-string { type inet:domain-name; description "Specifies the identity as a Fully Qualified Domain Name (FQDN) string. An example is example.com. The string MUST NOT contain any terminators (e.g., NULL, Carriage Return (CR), etc.)."; } } case rfc822-address-string { leaf rfc822-address-string { type string; description "Specifies the identity as a fully qualified email address string (RFC 5322). An example is jsmith@example.com. The string MUST NOT contain any terminators (e.g., NULL, CR, etc.)."; reference "RFC 5322: Internet Message Format."; } } case dnx509 { leaf dnx509 { type binary; description "The binary Distinguished Encoding Rules (DER) encoding of an ASN.1 X.500 Distinguished Name, as specified in IKEv2."; reference "RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 3.5."; } } case gnx509 { leaf gnx509 { type binary; description "ASN.1 X.509 GeneralName structure, as specified in RFC 5280, encoded using ASN.1 Distinguished Encoding Rules (DER), as specified in ITU-T X.690."; reference "RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile."; } } case id-key { leaf id-key { type binary; description "Opaque octet stream that may be used to pass vendor-specific information for proprietary types of identification."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 3.5."; } } case id-null { leaf id-null { type empty; description "The ID_NULL identification is used when the IKE identification payload is not used."; reference "RFC 7619: The NULL Authentication Method in the Internet Key Exchange Protocol Version 2 (IKEv2)."; } } } leaf auth-protocol { type auth-protocol-type; default "ikev2"; description "Only IKEv2 is supported right now, but other authentication protocols may be supported in the future."; } container peer-authentication { description "This container allows the security controller to configure the authentication method (pre-shared key, eap, digital-signature, null) that will be used with a particular peer and the credentials to use, which will depend on the selected authentication method."; leaf auth-method { type auth-method-type; default "pre-shared"; description "Type of authentication method (pre-shared key, eap, digital signature, null)."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.15."; } container eap-method { when "../auth-method = 'eap'"; leaf eap-type { type uint32 { range "1 .. 4294967295"; } mandatory true; description "EAP method type specified with a value extracted from the IANA registry. This information provides the particular EAP method to be used. Depending on the EAP method, pre-shared keys or certificates may be used."; } description "EAP method description used when authentication method is 'eap'."; reference "IANA: Extensible Authentication Protocol (EAP) Registry, Method Types RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.16."; } container pre-shared { when "../auth-method[.='pre-shared' or .='eap']"; leaf secret { nacm:default-deny-all; type yang:hex-string; description "Pre-shared secret value. The NSF has to prevent read access to this value for security reasons. This value MUST be set if the EAP method uses a pre-shared key or pre-shared authentication has been chosen."; } description "Shared secret value for PSK or EAP method authentication based on PSK."; } container digital-signature { when "../auth-method[.='digital-signature' or .='eap']"; leaf ds-algorithm { type uint8; default "14"; description "The digital signature algorithm is specified with a value extracted from the IANA registry. Default is the generic digital signature method. Depending on the algorithm, the following leafs MUST contain information. For example, if digital signature or the EAP method involves a certificate, then leaves 'cert-data' and 'private-key' will contain this information."; reference "IANA: Internet Key Exchange Version 2 (IKEv2) Parameters, IKEv2 Authentication Method."; } choice public-key { leaf raw-public-key { type binary; description "A binary that contains the value of the public key. The interpretation of the content is defined by the digital signature algorithm. For example, an RSA key is represented as RSAPublicKey, as defined in RFC 8017, and an Elliptic Curve Cryptography (ECC) key is represented using the 'publicKey' described in RFC 5915."; reference "RFC 5915: Elliptic Curve Private Key Structure RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } leaf cert-data { type binary; description "X.509 certificate data in DER format. If raw-public-key is defined, this leaf is empty."; reference "RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile."; } description "If the I2NSF Controller knows that the NSF already owns a private key associated to this public key (e.g., the NSF generated the pair public key/private key out of band), it will only configure one of the leaves of this choice but not the leaf private-key. The NSF, based on the public key value, can know the private key to be used."; } leaf private-key { nacm:default-deny-all; type binary; description "A binary that contains the value of the private key. The interpretation of the content is defined by the digital signature algorithm. For example, an RSA key is represented as RSAPrivateKey, as defined in RFC 8017, and an Elliptic Curve Cryptography (ECC) key is represented as ECPrivateKey, as defined in RFC 5915. This value is set if public key is defined and the I2NSF Controller is in charge of configuring the private key. Otherwise, it is not set and the value is kept in secret."; reference "RFC 5915: Elliptic Curve Private Key Structure RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2."; } leaf-list ca-data { type binary; description "List of trusted Certification Authorities (CAs) certificates encoded using ASN.1 Distinguished Encoding Rules (DER). If it is not defined, the default value is empty."; } leaf crl-data { type binary; description "A CertificateList structure, as specified in RFC 5280, encoded using ASN.1 Distinguished Encoding Rules (DER), as specified in ITU-T X.690. If it is not defined, the default value is empty."; reference "RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile."; } leaf crl-uri { type inet:uri; description "X.509 Certificate Revocation List (CRL) certificate URI. If it is not defined, the default value is empty."; reference "RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile."; } leaf oscp-uri { type inet:uri; description "Online Certificate Status Protocol (OCSP) URI. If it is not defined, the default value is empty."; reference "RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile."; } description "digital-signature container."; } /*container digital-signature*/ } /*container peer-authentication*/ } } list conn-entry { key "name"; description "IKE peer connection information. This list contains the IKE connection for this peer with other peers. This will create, in real time, IKE Security Associations established with these nodes."; leaf name { type string; description "Identifier for this connection entry."; } leaf autostartup { type autostartup-type; default "add"; description "By default, only add configuration without starting the security association."; } leaf initial-contact { type boolean; default "false"; description "The goal of this value is to deactivate the usage of INITIAL_CONTACT notification (true). If this flag remains set to false, it means the usage of the INITIAL_CONTACT notification will depend on the IKEv2 implementation."; } leaf version { type auth-protocol-type; default "ikev2"; description "IKE version. Only version 2 is supported."; } container fragmentation { leaf enabled { type boolean; default "false"; description "Whether or not to enable IKEv2 fragmentation (true or false)."; reference "RFC 7383: Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation."; } leaf mtu { when "../enabled='true'"; type uint16 { range "68..65535"; } description "MTU that IKEv2 can use for IKEv2 fragmentation."; reference "RFC 7383: Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation."; } description "IKEv2 fragmentation, as per RFC 7383. If the IKEv2 fragmentation is enabled, it is possible to specify the MTU."; } container ike-sa-lifetime-soft { description "IKE SA lifetime soft. Two lifetime values can be configured: either rekey time of the IKE SA or reauth time of the IKE SA. When the rekey lifetime expires, a rekey of the IKE SA starts. When reauth lifetime expires, an IKE SA reauthentication starts."; leaf rekey-time { type uint32; units "seconds"; default "0"; description "Time in seconds between each IKE SA rekey. The value 0 means infinite."; } leaf reauth-time { type uint32; units "seconds"; default "0"; description "Time in seconds between each IKE SA reauthentication. The value 0 means infinite."; } reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.8."; } container ike-sa-lifetime-hard { description "Hard IKE SA lifetime. When this time is reached, the IKE SA is removed."; leaf over-time { type uint32; units "seconds"; default "0"; description "Time in seconds before the IKE SA is removed. The value 0 means infinite."; } reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)."; } leaf-list ike-sa-intr-alg { type nsfikec:intr-alg-t; default "12"; ordered-by user; description "Integrity algorithm for establishing the IKE SA. This list is ordered following from the higher priority to lower priority. The first node of the list will be the algorithm with higher priority. Default value 12 (AUTH_HMAC_SHA2_256_128)."; } list ike-sa-encr-alg { key "id"; min-elements 1; ordered-by user; leaf id { type uint16; description "An identifier that unequivocally identifies each entry of the list, i.e., an encryption algorithm and its key length (if required)."; } leaf algorithm-type { type nsfikec:encr-alg-t; default "12"; description "Default value 12 (ENCR_AES_CBC)."; } leaf key-length { type uint16; default "128"; description "By default, key length is 128 bits."; } description "Encryption or AEAD algorithm for the IKE SAs. This list is ordered following from the higher priority to lower priority. The first node of the list will be the algorithm with higher priority."; } leaf dh-group { type fs-group; default "14"; description "Group number for Diffie-Hellman Exponentiation used during IKE_SA_INIT for the IKE SA key exchange."; } leaf half-open-ike-sa-timer { type uint32; units "seconds"; default "0"; description "Set the half-open IKE SA timeout duration. The value 0 implies infinite."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2."; } leaf half-open-ike-sa-cookie-threshold { type uint32; default "0"; description "Number of half-open IKE SAs that activate the cookie mechanism. The value 0 implies infinite."; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.6."; } container local { leaf local-pad-entry-name { type string; mandatory true; description "Local peer authentication information. This node points to a specific entry in the PAD where the authorization information about this particular local peer is stored. It MUST match a pad-entry-name."; } description "Local peer authentication information."; } container remote { leaf remote-pad-entry-name { type string; mandatory true; description "Remote peer authentication information. This node points to a specific entry in the PAD where the authorization information about this particular remote peer is stored. It MUST match a pad-entry-name."; } description "Remote peer authentication information."; } container encapsulation-type { uses nsfikec:encap; description "This container carries configuration information about the source and destination ports of encapsulation that IKE should use and the type of encapsulation that should be used when NAT traversal is required. However, this is just a best effort since the IKE implementation may need to use a different encapsulation, as described in RFC 8229."; reference "RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; } container spd { description "Configuration of the Security Policy Database (SPD). This main information is placed in the grouping ipsec-policy-grouping."; list spd-entry { key "name"; ordered-by user; leaf name { type string; description "SPD-entry-unique name to identify the IPsec policy."; } container ipsec-policy-config { description "This container carries the configuration of an IPsec policy."; uses nsfikec:ipsec-policy-grouping; } description "List of entries that will constitute the representation of the SPD. In this case, since the NSF implements IKE, it is only required to send an IPsec policy from this NSF where 'local' is this NSF and 'remote' the other NSF. The IKE implementation will install IPsec policies in the NSF's kernel in both directions (inbound and outbound) and their corresponding IPsec SAs based on the information in this SPD entry."; } reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.9."; } container child-sa-info { leaf-list fs-groups { type fs-group; default "0"; ordered-by user; description "If non-zero, forward secrecy is required when a new IPsec SA is being created, the (non-zero) value indicates the group number to use for the key exchange process used to achieve forward secrecy. This list is ordered following from the higher priority to lower priority. The first node of the list will be the algorithm with higher priority."; } container child-sa-lifetime-soft { description "Soft IPsec SA lifetime. After the lifetime, the action is defined in this container in the leaf action."; uses nsfikec:lifetime; leaf action { type nsfikec:lifetime-action; default "replace"; description "When the lifetime of an IPsec SA expires, an action needs to be performed over the IPsec SA that reached the lifetime. There are three possible options: terminate-clear, terminate-hold, and replace."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.5 RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.8."; } } container child-sa-lifetime-hard { description "IPsec SA lifetime hard. The action will be to terminate the IPsec SA."; uses nsfikec:lifetime; reference "RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2), Section 2.8."; } description "Specific information for IPsec SAs. It includes the Perfect Forward Secrecy (PFS) group and IPsec SAs rekey lifetimes."; } container state { config false; leaf initiator { type boolean; description "It is acting as an initiator for this connection."; } leaf initiator-ikesa-spi { type ike-spi; description "Initiator's IKE SA SPI."; } leaf responder-ikesa-spi { type ike-spi; description "Responder's IKE SA SPI."; } leaf nat-local { type boolean; description "True if local endpoint is behind a NAT."; } leaf nat-remote { type boolean; description "True if remote endpoint is behind a NAT."; } container encapsulation-type { uses nsfikec:encap; description "This container provides information about the source and destination ports of encapsulation that IKE is using and the type of encapsulation when NAT traversal is required."; reference "RFC 8229: TCP Encapsulation of IKE and IPsec Packets."; } leaf established { type uint64; units "seconds"; description "Seconds since this IKE SA has been established."; } leaf current-rekey-time { type uint64; units "seconds"; description "Seconds before IKE SA is rekeyed."; } leaf current-reauth-time { type uint64; units "seconds"; description "Seconds before IKE SA is reauthenticated."; } description "IKE state data for a particular connection."; } /* ike-sa-state */ } /* ike-conn-entries */ container number-ike-sas { config false; leaf total { type yang:gauge64; description "Total number of active IKE SAs."; } leaf half-open { type yang:gauge64; description "Number of half-open active IKE SAs."; } leaf half-open-cookies { type yang:gauge64; description "Number of half-open active IKE SAs with cookie activated."; } description "General information about the IKE SAs. In particular, it provides the current number of IKE SAs."; } } /* container ipsec-ike */ }
module: ietf-i2nsf-ikeless +--rw ipsec-ikeless +--rw spd | +--rw spd-entry* [name] | +--rw name string | +--rw direction nsfikec:ipsec-traffic-direction | +--rw reqid? uint64 | +--rw ipsec-policy-config | +--rw anti-replay-window-size? uint32 | +--rw traffic-selector | | +--rw local-prefix inet:ip-prefix | | +--rw remote-prefix inet:ip-prefix | | +--rw inner-protocol? ipsec-inner-protocol | | +--rw local-ports* [start end] | | | +--rw start inet:port-number | | | +--rw end inet:port-number | | +--rw remote-ports* [start end] | | +--rw start inet:port-number | | +--rw end inet:port-number | +--rw processing-info | +--rw action? ipsec-spd-action | +--rw ipsec-sa-cfg | +--rw pfp-flag? boolean | +--rw ext-seq-num? boolean | +--rw seq-overflow? boolean | +--rw stateful-frag-check? boolean | +--rw mode? ipsec-mode | +--rw protocol-parameters? ipsec-protocol-params | +--rw esp-algorithms | | +--rw integrity* intr-alg-t | | +--rw encryption* [id] | | | +--rw id uint16 | | | +--rw algorithm-type? encr-alg-t | | | +--rw key-length? uint16 | | +--rw tfc-pad? boolean | +--rw tunnel | +--rw local inet:ip-address | +--rw remote inet:ip-address | +--rw df-bit? enumeration | +--rw bypass-dscp? boolean | +--rw dscp-mapping* [id] | +--rw id uint8 | +--rw inner-dscp? inet:dscp | +--rw outer-dscp? inet:dscp +--rw sad +--rw sad-entry* [name] +--rw name string +--rw reqid? uint64 +--rw ipsec-sa-config | +--rw spi uint32 | +--rw ext-seq-num? boolean | +--rw seq-overflow? boolean | +--rw anti-replay-window-size? uint32 | +--rw traffic-selector | | +--rw local-prefix inet:ip-prefix | | +--rw remote-prefix inet:ip-prefix | | +--rw inner-protocol? ipsec-inner-protocol | | +--rw local-ports* [start end] | | | +--rw start inet:port-number | | | +--rw end inet:port-number | | +--rw remote-ports* [start end] | | +--rw start inet:port-number | | +--rw end inet:port-number | +--rw protocol-parameters? nsfikec:ipsec-protocol-params | +--rw mode? nsfikec:ipsec-mode | +--rw esp-sa | | +--rw encryption | | | +--rw encryption-algorithm? nsfikec:encr-alg-t | | | +--rw key? yang:hex-string | | | +--rw iv? yang:hex-string | | +--rw integrity | | +--rw integrity-algorithm? nsfikec:intr-alg-t | | +--rw key? yang:hex-string | +--rw sa-lifetime-hard | | +--rw time? uint32 | | +--rw bytes? yang:counter64 | | +--rw packets? uint32 | | +--rw idle? uint32 | +--rw sa-lifetime-soft | | +--rw time? uint32 | | +--rw bytes? yang:counter64 | | +--rw packets? uint32 | | +--rw idle? uint32 | | +--rw action? nsfikec:lifetime-action | +--rw tunnel | | +--rw local inet:ip-address | | +--rw remote inet:ip-address | | +--rw df-bit? enumeration | | +--rw bypass-dscp? boolean | | +--rw dscp-mapping* [id] | | | +--rw id uint8 | | | +--rw inner-dscp? inet:dscp | | | +--rw outer-dscp? inet:dscp | | +--rw dscp-values* inet:dscp | +--rw encapsulation-type | +--rw espencap? esp-encap | +--rw sport? inet:port-number | +--rw dport? inet:port-number | +--rw oaddr* inet:ip-address +--ro ipsec-sa-state +--ro sa-lifetime-current | +--ro time? uint32 | +--ro bytes? yang:counter64 | +--ro packets? uint32 | +--ro idle? uint32 +--ro replay-stats +--ro replay-window | +--ro w? uint32 | +--ro t? uint64 | +--ro b? uint64 +--ro packet-dropped? yang:counter64 +--ro failed? yang:counter64 +--ro seq-number-counter? uint64 notifications: +---n sadb-acquire {ikeless-notification}? | +--ro ipsec-policy-name string | +--ro traffic-selector | +--ro local-prefix inet:ip-prefix | +--ro remote-prefix inet:ip-prefix | +--ro inner-protocol? ipsec-inner-protocol | +--ro local-ports* [start end] | | +--ro start inet:port-number | | +--ro end inet:port-number | +--ro remote-ports* [start end] | +--ro start inet:port-number | +--ro end inet:port-number +---n sadb-expire {ikeless-notification}? | +--ro ipsec-sa-name string | +--ro soft-lifetime-expire? boolean | +--ro lifetime-current | +--ro time? uint32 | +--ro bytes? yang:counter64 | +--ro packets? uint32 | +--ro idle? uint32 +---n sadb-seq-overflow {ikeless-notification}? | +--ro ipsec-sa-name string +---n sadb-bad-spi {ikeless-notification}? +--ro spi uint32
module ietf-i2nsf-ikeless { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"; prefix nsfikels; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types."; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types."; } import ietf-i2nsf-ikec { prefix nsfikec; reference "RFC 9061: A YANG Data Model for IPsec Flow Protection Based on Software-Defined Networking (SDN)."; } import ietf-netconf-acm { prefix nacm; reference "RFC 8341: Network Configuration Access Control Model."; } organization "IETF I2NSF Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/i2nsf/> WG List: <mailto:i2nsf@ietf.org> Author: Rafael Marin-Lopez <mailto:rafa@um.es> Author: Gabriel Lopez-Millan <mailto:gabilm@um.es> Author: Fernando Pereniguez-Garcia <mailto:fernando.pereniguez@cud.upct.es> "; description "Data model for IKE-less case in the SDN-based IPsec flow protection service. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. Copyright (c) 2021 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9061; see the RFC itself for full legal notices."; revision 2021-07-14 { description "Initial version."; reference "RFC 9061: A YANG Data Model for IPsec Flow Protection Based on Software-Defined Networking (SDN)."; } feature ikeless-notification { description "This feature indicates that the server supports generating notifications in the ikeless module. To ensure broader applicability of this module, the notifications are marked as a feature. For the implementation of the IKE-less case, the NSF is expected to implement this feature."; } container ipsec-ikeless { description "Container for configuration of the IKE-less case. The container contains two additional containers: 'spd' and 'sad'. The first allows the I2NSF Controller to configure IPsec policies in the Security Policy Database (SPD), and the second allows the I2NSF Controller to configure IPsec Security Associations (IPsec SAs) in the Security Association Database (SAD)."; reference "RFC 4301: Security Architecture for the Internet Protocol."; container spd { description "Configuration of the Security Policy Database (SPD)."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.1.2."; list spd-entry { key "name"; ordered-by user; leaf name { type string; description "SPD-entry-unique name to identify this entry."; } leaf direction { type nsfikec:ipsec-traffic-direction; mandatory true; description "Inbound traffic or outbound traffic. In the IKE-less case, the I2NSF Controller needs to specify the policy direction to be applied in the NSF. In the IKE case, this direction does not need to be specified, since IKE will determine the direction that the IPsec policy will require."; } leaf reqid { type uint64; default "0"; description "This value allows linking this IPsec policy with IPsec SAs with the same reqid. It is only required in the IKE-less model since, in the IKE case, this link is handled internally by IKE."; } container ipsec-policy-config { description "This container carries the configuration of an IPsec policy."; uses nsfikec:ipsec-policy-grouping; } description "The SPD is represented as a list of SPD entries, where each SPD entry represents an IPsec policy."; } /*list spd-entry*/ } /*container spd*/ container sad { description "Configuration of the IPsec Security Association Database (SAD)."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.2.1."; list sad-entry { key "name"; ordered-by user; leaf name { type string; description "SAD-entry-unique name to identify this entry."; } leaf reqid { type uint64; default "0"; description "This value allows linking this IPsec SA with an IPsec policy with the same reqid."; } container ipsec-sa-config { description "This container allows configuring details of an IPsec SA."; leaf spi { type uint32 { range "0..max"; } mandatory true; description "IPsec SA of Security Parameter Index (SPI)."; } leaf ext-seq-num { type boolean; default "true"; description "True if this IPsec SA is using extended sequence numbers. If true, the 64-bit extended sequence number counter is used; if false, the normal 32-bit sequence number counter is used."; } leaf seq-overflow { type boolean; default "false"; description "The flag indicating whether overflow of the sequence number counter should prevent transmission of additional packets on the IPsec SA (false) and, therefore, needs to be rekeyed or whether rollover is permitted (true). If Authenticated Encryption with Associated Data (AEAD) is used (leaf esp-algorithms/encryption/algorithm-type), this flag MUST BE false. Setting this flag to true is strongly discouraged."; } leaf anti-replay-window-size { type uint32; default "64"; description "To set the anti-replay window size. The default value is set to 64, following the recommendation in RFC 4303."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Section 3.4.3."; } container traffic-selector { uses nsfikec:selector-grouping; description "The IPsec SA Traffic Selector."; } leaf protocol-parameters { type nsfikec:ipsec-protocol-params; default "esp"; description "Security protocol of IPsec SA, only ESP so far."; } leaf mode { type nsfikec:ipsec-mode; default "transport"; description "Tunnel or transport mode."; } container esp-sa { when "../protocol-parameters = 'esp'"; description "In case the IPsec SA is an Encapsulation Security Payload (ESP), it is required to specify encryption and integrity algorithms and key materials."; container encryption { description "Configuration of encryption or AEAD algorithm for IPsec Encapsulation Security Payload (ESP)."; leaf encryption-algorithm { type nsfikec:encr-alg-t; default "12"; description "Configuration of ESP encryption. With AEAD algorithms, the integrity-algorithm leaf is not used."; } leaf key { nacm:default-deny-all; type yang:hex-string; description "ESP encryption key value. If this leaf is not defined, the key is not defined (e.g., encryption is NULL). The key length is determined by the length of the key set in this leaf. By default, it is 128 bits."; } leaf iv { nacm:default-deny-all; type yang:hex-string; description "ESP encryption IV value. If this leaf is not defined, the IV is not defined (e.g., encryption is NULL)."; } } container integrity { description "Configuration of integrity for IPsec Encapsulation Security Payload (ESP). This container allows configuration of integrity algorithms when no AEAD algorithms are used and integrity is required."; leaf integrity-algorithm { type nsfikec:intr-alg-t; default "12"; description "Message Authentication Code (MAC) algorithm to provide integrity in ESP (default AUTH_HMAC_SHA2_256_128). With AEAD algorithms, the integrity leaf is not used."; } leaf key { nacm:default-deny-all; type yang:hex-string; description "ESP integrity key value. If this leaf is not defined, the key is not defined (e.g., AEAD algorithm is chosen and integrity algorithm is not required). The key length is determined by the length of the key configured."; } } } /*container esp-sa*/ container sa-lifetime-hard { description "IPsec SA hard lifetime. The action associated is terminate and hold."; uses nsfikec:lifetime; } container sa-lifetime-soft { description "IPsec SA soft lifetime."; uses nsfikec:lifetime; leaf action { type nsfikec:lifetime-action; description "Action lifetime: terminate-clear, terminate-hold, or replace."; } } container tunnel { when "../mode = 'tunnel'"; uses nsfikec:tunnel-grouping; leaf-list dscp-values { type inet:dscp; description "DSCP values allowed for ingress packets carried over this IPsec SA. If no values are specified, no DSCP-specific filtering is applied. When ../bypass-dscp is false and a dscp-mapping is defined, each value here would be the same as the 'inner' DSCP value for the DSCP mapping (list dscp-mapping)."; reference "RFC 4301: Security Architecture for the Internet Protocol, Section 4.4.2.1."; } description "Endpoints of the IPsec tunnel."; } container encapsulation-type { uses nsfikec:encap; description "This container carries configuration information about the source and destination ports that will be used for ESP encapsulation of ESP packets and the type of encapsulation when NAT traversal is in place."; } } /*ipsec-sa-config*/ container ipsec-sa-state { config false; description "Container describing IPsec SA state data."; container sa-lifetime-current { uses nsfikec:lifetime; description "SAD lifetime current."; } container replay-stats { description "State data about the anti-replay window."; container replay-window { leaf w { type uint32; description "Size of the replay window."; } leaf t { type uint64; description "Highest sequence number authenticated so far, upper bound of window."; } leaf b { type uint64; description "Lower bound of window."; } description "This container contains three parameters that define the state of the replay window: window size (w), highest sequence number authenticated (t), and lower bound of the window (b), according to Appendix A2.1 in RFC 4303 (w = t - b + 1)."; reference "RFC 4303: IP Encapsulating Security Payload (ESP), Appendix A."; } leaf packet-dropped { type yang:counter64; description "Packets dropped because they are replay packets."; } leaf failed { type yang:counter64; description "Number of packets detected out of the replay window."; } leaf seq-number-counter { type uint64; description "A 64-bit counter when this IPsec SA is using Extended Sequence Number or 32-bit counter when it is not. Current value of sequence number."; } } /* container replay-stats*/ } /*ipsec-sa-state*/ description "List of SAD entries that form the SAD."; } /*list sad-entry*/ } /*container sad*/ } /*container ipsec-ikeless*/ /* Notifications */ notification sadb-acquire { if-feature "ikeless-notification"; description "The NSF detects and notifies that an IPsec SA is required for an outbound IP packet that has matched an SPD entry. The traffic-selector container in this notification contains information about the IP packet that triggered this notification."; leaf ipsec-policy-name { type string; mandatory true; description "It contains the SPD entry name (unique) of the IPsec policy that hits the IP-packet-required IPsec SA. It is assumed the I2NSF Controller will have a copy of the information of this policy so it can extract all the information with this unique identifier. The type of IPsec SA is defined in the policy so the security controller can also know the type of IPsec SA that MUST be generated."; } container traffic-selector { description "The IP packet that triggered the acquire and requires an IPsec SA. Specifically, it will contain the IP source/mask and IP destination/mask, protocol (udp, tcp, etc.), and source and destination ports."; uses nsfikec:selector-grouping; } } notification sadb-expire { if-feature "ikeless-notification"; description "An IPsec SA expiration (soft or hard)."; leaf ipsec-sa-name { type string; mandatory true; description "It contains the SAD entry name (unique) of the IPsec SA that is about to expire. It is assumed the I2NSF Controller will have a copy of the IPsec SA information (except the cryptographic material and state data) indexed by this name (unique identifier) so it can know all the information (crypto algorithms, etc.) about the IPsec SA that has expired in order to perform a rekey (soft lifetime) or delete it (hard lifetime) with this unique identifier."; } leaf soft-lifetime-expire { type boolean; default "true"; description "If this value is true, the lifetime expired is soft. If it is false, the lifetime is hard."; } container lifetime-current { description "IPsec SA current lifetime. If soft-lifetime-expired is true, this container is set with the lifetime information about current soft lifetime. It can help the NSF Controller to know which of the (soft) lifetime limits raised the event: time, bytes, packets, or idle."; uses nsfikec:lifetime; } } notification sadb-seq-overflow { if-feature "ikeless-notification"; description "Sequence overflow notification."; leaf ipsec-sa-name { type string; mandatory true; description "It contains the SAD entry name (unique) of the IPsec SA that is about to have a sequence number overflow, and rollover is not permitted. When the NSF issues this event before reaching a sequence number, overflow is implementation specific and out of scope of this specification. It is assumed the I2NSF Controller will have a copy of the IPsec SA information (except the cryptographic material and state data) indexed by this name (unique identifier) so it can know all the information (crypto algorithms, etc.) about the IPsec SA in order to perform a rekey of the IPsec SA."; } } notification sadb-bad-spi { if-feature "ikeless-notification"; description "Notify when the NSF receives a packet with an incorrect SPI (i.e., not present in the SAD)."; leaf spi { type uint32 { range "0..max"; } mandatory true; description "SPI number contained in the erroneous IPsec packet."; } } }
+------------------+ | I2NSF Controller | +------------------+ I2NSF NSF-Facing | Interface | /-----------------+---------------\ / \ / \ +----+ +--------+ +--------+ +----+ | h1 |--| nsf_h1 |== IPsec_ESP_Tunnel_mode == | nsf_h2 |--| h2 | +----+ +--------+ +--------+ +----+ :1 :100 :200 :1 (2001:db8:1:/64) (2001:db8:123:/64) (2001:db8:2:/64)
<ipsec-ike xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ike" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <pad> <pad-entry> <name>nsf_h1_pad</name> <ipv6-address>2001:db8:123::100</ipv6-address> <peer-authentication> <auth-method>digital-signature</auth-method> <digital-signature> <cert-data>base64encodedvalue==</cert-data> <private-key>base64encodedvalue==</private-key> <ca-data>base64encodedvalue==</ca-data> </digital-signature> </peer-authentication> </pad-entry> <pad-entry> <name>nsf_h2_pad</name> <ipv6-address>2001:db8:123::200</ipv6-address> <auth-protocol>ikev2</auth-protocol> <peer-authentication> <auth-method>digital-signature</auth-method> <digital-signature> <!-- RSA Digital Signature --> <ds-algorithm>1</ds-algorithm> <cert-data>base64encodedvalue==</cert-data> <ca-data>base64encodedvalue==</ca-data> </digital-signature> </peer-authentication> </pad-entry> </pad> <conn-entry> <name>nsf_h1-nsf_h2</name> <autostartup>start</autostartup> <version>ikev2</version> <initial-contact>false</initial-contact> <fragmentation><enabled>false</enabled></fragmentation> <ike-sa-lifetime-soft> <rekey-time>60</rekey-time> <reauth-time>120</reauth-time> </ike-sa-lifetime-soft> <ike-sa-lifetime-hard> <over-time>3600</over-time> </ike-sa-lifetime-hard> <!--AUTH_HMAC_SHA2_512_256--> <ike-sa-intr-alg>14</ike-sa-intr-alg> <!--ENCR_AES_CBC - 128 bits--> <ike-sa-encr-alg> <id>1</id> </ike-sa-encr-alg> <!--8192-bit MODP Group--> <dh-group>18</dh-group> <half-open-ike-sa-timer>30</half-open-ike-sa-timer> <half-open-ike-sa-cookie-threshold> 15 </half-open-ike-sa-cookie-threshold> <local> <local-pad-entry-name>nsf_h1_pad</local-pad-entry-name> </local> <remote> <remote-pad-entry-name>nsf_h2_pad</remote-pad-entry-name> </remote> <spd> <spd-entry> <name>nsf_h1-nsf_h2</name> <ipsec-policy-config> <anti-replay-window-size>64</anti-replay-window-size> <traffic-selector> <local-prefix>2001:db8:1::0/64</local-prefix> <remote-prefix>2001:db8:2::0/64</remote-prefix> <inner-protocol>any</inner-protocol> </traffic-selector> <processing-info> <action>protect</action> <ipsec-sa-cfg> <pfp-flag>false</pfp-flag> <ext-seq-num>true</ext-seq-num> <seq-overflow>false</seq-overflow> <stateful-frag-check>false</stateful-frag-check> <mode>tunnel</mode> <protocol-parameters>esp</protocol-parameters> <esp-algorithms> <!-- AUTH_HMAC_SHA1_96 --> <integrity>2</integrity> <encryption> <!-- ENCR_AES_CBC --> <id>1</id> <algorithm-type>12</algorithm-type> <key-length>128</key-length> </encryption> <encryption> <!-- ENCR_3DES--> <id>2</id> <algorithm-type>3</algorithm-type> </encryption> <tfc-pad>false</tfc-pad> </esp-algorithms> <tunnel> <local>2001:db8:123::100</local> <remote>2001:db8:123::200</remote> <df-bit>clear</df-bit> <bypass-dscp>true</bypass-dscp> </tunnel> </ipsec-sa-cfg> </processing-info> </ipsec-policy-config> </spd-entry> </spd> <child-sa-info> <!--8192-bit MODP Group --> <fs-groups>18</fs-groups> <child-sa-lifetime-soft> <bytes>1000000</bytes> <packets>1000</packets> <time>30</time> <idle>60</idle> <action>replace</action> </child-sa-lifetime-soft> <child-sa-lifetime-hard> <bytes>2000000</bytes> <packets>2000</packets> <time>60</time> <idle>120</idle> </child-sa-lifetime-hard> </child-sa-info> </conn-entry> </ipsec-ike>
+------------------+ | I2NSF Controller | +------------------+ I2NSF NSF-Facing | Interface | /--------------------+-------------------\ / \ / \ +--------+ +--------+ | nsf_h1 |===== IPsec_ESP_Transport_mode =====| nsf_h2 | +--------+ +--------+ :100 (2001:db8:123:/64) :200
<ipsec-ikeless xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> <spd> <spd-entry> <name> in/trans/2001:db8:123::200/2001:db8:123::100 </name> <direction>inbound</direction> <reqid>1</reqid> <ipsec-policy-config> <traffic-selector> <local-prefix>2001:db8:123::200/128</local-prefix> <remote-prefix>2001:db8:123::100/128</remote-prefix> <inner-protocol>any</inner-protocol> </traffic-selector> <processing-info> <action>protect</action> <ipsec-sa-cfg> <ext-seq-num>true</ext-seq-num> <seq-overflow>false</seq-overflow> <mode>transport</mode> <protocol-parameters>esp</protocol-parameters> <esp-algorithms> <!--AUTH_HMAC_SHA1_96--> <integrity>2</integrity> <!--ENCR_AES_CBC --> <encryption> <id>1</id> <algorithm-type>12</algorithm-type> <key-length>128</key-length> </encryption> <encryption> <id>2</id> <algorithm-type>3</algorithm-type> </encryption> </esp-algorithms> </ipsec-sa-cfg> </processing-info> </ipsec-policy-config> </spd-entry> <spd-entry> <name>out/trans/2001:db8:123::100/2001:db8:123::200</name> <direction>outbound</direction> <reqid>1</reqid> <ipsec-policy-config> <traffic-selector> <local-prefix>2001:db8:123::100/128</local-prefix> <remote-prefix>2001:db8:123::200/128</remote-prefix> <inner-protocol>any</inner-protocol> </traffic-selector> <processing-info> <action>protect</action> <ipsec-sa-cfg> <ext-seq-num>true</ext-seq-num> <seq-overflow>false</seq-overflow> <mode>transport</mode> <protocol-parameters>esp</protocol-parameters> <esp-algorithms> <!-- AUTH_HMAC_SHA1_96 --> <integrity>2</integrity> <!-- ENCR_AES_CBC --> <encryption> <id>1</id> <algorithm-type>12</algorithm-type> <key-length>128</key-length> </encryption> <encryption> <id>2</id> <algorithm-type>3</algorithm-type> </encryption> </esp-algorithms> </ipsec-sa-cfg> </processing-info> </ipsec-policy-config> </spd-entry> </spd> <sad> <sad-entry> <name>out/trans/2001:db8:123::100/2001:db8:123::200</name> <reqid>1</reqid> <ipsec-sa-config> <spi>34501</spi> <ext-seq-num>true</ext-seq-num> <seq-overflow>false</seq-overflow> <anti-replay-window-size>64</anti-replay-window-size> <traffic-selector> <local-prefix>2001:db8:123::100/128</local-prefix> <remote-prefix>2001:db8:123::200/128</remote-prefix> <inner-protocol>any</inner-protocol> </traffic-selector> <protocol-parameters>esp</protocol-parameters> <mode>transport</mode> <esp-sa> <encryption> <!-- //ENCR_AES_CBC --> <encryption-algorithm>12</encryption-algorithm> <key>01:23:45:67:89:AB:CE:DF</key> <iv>01:23:45:67:89:AB:CE:DF</iv> </encryption> <integrity> <!-- //AUTH_HMAC_SHA1_96 --> <integrity-algorithm>2</integrity-algorithm> <key>01:23:45:67:89:AB:CE:DF</key> </integrity> </esp-sa> </ipsec-sa-config> </sad-entry> <sad-entry> <name>in/trans/2001:db8:123::200/2001:db8:123::100</name> <reqid>1</reqid> <ipsec-sa-config> <spi>34502</spi> <ext-seq-num>true</ext-seq-num> <seq-overflow>false</seq-overflow> <anti-replay-window-size>64</anti-replay-window-size> <traffic-selector> <local-prefix>2001:db8:123::200/128</local-prefix> <remote-prefix>2001:db8:123::100/128</remote-prefix> <inner-protocol>any</inner-protocol> </traffic-selector> <protocol-parameters>esp</protocol-parameters> <mode>transport</mode> <esp-sa> <encryption> <!-- //ENCR_AES_CBC --> <encryption-algorithm>12</encryption-algorithm> <key>01:23:45:67:89:AB:CE:DF</key> <iv>01:23:45:67:89:AB:CE:DF</iv> </encryption> <integrity> <!-- //AUTH_HMAC_SHA1_96 --> <integrity-algorithm>2</integrity-algorithm> <key>01:23:45:67:89:AB:CE:DF</key> </integrity> </esp-sa> <sa-lifetime-hard> <bytes>2000000</bytes> <packets>2000</packets> <time>60</time> <idle>120</idle> </sa-lifetime-hard> <sa-lifetime-soft> <bytes>1000000</bytes> <packets>1000</packets> <time>30</time> <idle>60</idle> <action>replace</action> </sa-lifetime-soft> </ipsec-sa-config> </sad-entry> </sad> </ipsec-ikeless>
<sadb-expire xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"> <ipsec-sa-name>in/trans/2001:db8:123::200/2001:db8:123::100 </ipsec-sa-name> <soft-lifetime-expire>true</soft-lifetime-expire> <lifetime-current> <bytes>1000000</bytes> <packets>1000</packets> <time>30</time> <idle>60</idle> </lifetime-current> </sadb-expire>
<sadb-acquire xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"> <ipsec-policy-name>in/trans/2001:db8:123::200/2001:db8:123::100 </ipsec-policy-name> <traffic-selector> <local-prefix>2001:db8:123::200/128</local-prefix> <remote-prefix>2001:db8:123::100/128</remote-prefix> <inner-protocol>any</inner-protocol> <local-ports> <start>0</start> <end>0</end> </local-ports> <remote-ports> <start>0</start> <end>0</end> </remote-ports> </traffic-selector> </sadb-acquire>
<sadb-seq-overflow xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"> <ipsec-sa-name>in/trans/2001:db8:123::200/2001:db8:123::100 </ipsec-sa-name> </sadb-seq-overflow>
<sadb-bad-spi xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-ikeless"> <spi>666</spi> </sadb-bad-spi>
+----------------------------------------+ | I2NSF User (IPsec Management System) | +----------------------------------------+ | (1) Flow-based I2NSF Consumer-Facing Protection Policy Interface | +---------|------------------------------+ | | | | | I2NSF Controller | | V | | +--------------+ (2)+--------------+ | | |Translate into|--->| NETCONF/ | | | |IPsec Policies| | RESTCONF | | | +--------------+ +--------------+ | | | | | | | | | +--------------------------|-----|-------+ | | I2NSF NSF-Facing Interface | | | (3) | |-------------------------+ +---| V V +----------------------+ +----------------------+ | NSF A | | NSF B | | IKEv2/IPsec(SPD/PAD) | | IKEv2/IPsec(SPD/PAD) | +----------------------+ +----------------------+
+----------------------------------------+ | I2NSF User (IPsec Management System) | +----------------------------------------+ | (1) Flow-based I2NSF Consumer-Facing Protection Policy Interface | +---------|------------------------------+ | | | | | I2NSF Controller | | V | | +--------------+ (2) +--------------+ | | |Translate into|---->| NETCONF/ | | | |IPsec Policies| | RESTCONF | | | +--------------+ +--------------+ | | | | | +-------------------------|-----|--------+ | | I2NSF NSF-Facing Interface | | | (3) | |----------------------+ +--| V V +----------------+ +----------------+ | NSF A | | NSF B | | IPsec(SPD/SAD) | | IPsec(SPD/SAD) | +----------------+ +----------------+