[关闭]
@wuzhimang 2016-06-29T02:34:27.000000Z 字数 7775 阅读 2384

SDN controller

SDN


Ideas

性能 (主要是技术方面的问题)

  1. 语言的选择-->C/C++
  2. 多线程的设计及线程之间的有效通信(如2013年新版的Beacon针对openflow消息Read/Write的机制的优化,其性能得到了一定的提升)
  3. CPU核心绑定
  4. in-memory running,配置信息,或各类资源直接全部在内存中进行读写,以减少OS用户态/核心态之间切换的代价, Internal Storage的形式也可以有一定的改进

安全

  1. controller基础服务细分,对网络资源、本机资源访问权限的细分,“最小权限原则”原则(可参考SELINUX,提供多种模式选择disable、enable),在安装一个第三方应用时会有权限申请提示。构上就实现隔离机制,如sandbox,appzone, thread container,这些其实概念上都是一样的,重点在于针对SDN App之间的划分,以及SDN基础服务和APP之间的通信机制
  2. 在安全审计和错误恢复这块除了通过log方式,可以生成一个core文件,能恢复错误并进行适当的分析。gj

Conceptions

  1. 网络级别的安全, 系统级别的安全(前者多,后者较少)
  2. SDN kernel application && user application 的区分 --> 是否涉及northbound 接口(Kernel: topology manager, statistic manager, flow programmer && Internel-Apps)
  3. ACM Sigcomm Symposium on SDN Research (SOSR)

Problems

  1. 单个应用的操作/运行错误可能会导致其他应用甚至整个controller的崩溃
  2. flaws && malicious logic 第三方应用

Thoughts

  1. 能否像在手机上安装应用一样,安装前有权限设置;
  2. 参考一个 a common north-bound API
  3. lightweight --> 只提供最基本的功能
  4. security --> 安全设计模式, SELINUX的思想是否能利用进去
  5. performance --> 处理速度, runtime latency && throughput
  6. Permission Set的划分,隔离机制,thread container
  7. 应用异常退出或因其他原因能自动生成log文件或者类似core文件,用于后期分期
  8. 直接在内存中运行controller

Others

  1. OSGi(Open Service Gateway Initiative)框架是Java动态化模块化系统的一系列规范,提供一个权限管理服务,一个包管理服务和一个开始级别服务,是一个框架,定义了应用程序的生命周期模式和服务注册,基于这个框架定义了大量的OSGi服务:日志、配置管理、偏好,HTTP(运行servlet)、XML分析、设备访问、软件包管理、许可管理、星级、用户管理、IO连接、连线管理、Jini和 UPnP。(http://www.iteye.com/topic/1124145
  2. 控制反转(Inversion of Control,英文缩写为IoC)是一个重要的面向对象编程的法则来削减计算机程序的耦合问题,也是轻量级的Spring框架的核心。 控制反转一般分为两种类型,依赖注入(Dependency Injection,简称DI)和依赖查找。(http://blog.csdn.net/Kettas2008/article/details/2447809
  3. Floodlight 简单说明(http://book.2cto.com/201411/48062.html
  4. FUSE文件系统,即Filesystem in Userspace,用户空间文件系统是操作系统中的概念,指完全在用户态实现的文件系统。Linux通过内核模块对此进行支持。一些文件系统如ZFS,glusterfs和luster使用FUSE实现。(http://www.cnblogs.com/codestub/archive/2011/08/18/2144190.html)
  5. Karaf是Apache旗下的一个开源项目.Karaf同时也是一个基于OSGi的运行环境,Karaf提供了一个轻量级的OSGi容器,可以用于部署各种组件,应用程序.Karaf提供了很多特性用于帮助开发者和用户更加灵活的部署应用,例如:热部署,动态配置,几种日志处理系统,本地系统集 成,可编程扩展控制台,ssh远程访问,内置安装认证机制等等.同时Karaf作为一款成熟而且优秀的OSGi运行环境以及容器已经被诸多Apache项目作为基础容器,例如:Apache Geronimo, ApacheServiceMix, Fuse ESB,由此可见Karaf在性能,功能和稳定性上都是个不错的选择。
  6. Apache Felix is a community effort to implement the OSGi Framework and Service platform and other interesting OSGi-related technologies under the Apache license.

Papers

  1. On Network Operating System Security

    • INTERNATIONAL JOURNAL OF NETWORK MANAGEMENT (Int. J. Network Mgmt 2017; 26:6–24)
    • 针对问题1提出了一个sandbox system,并在ODL和HP controller做了概念验证的实现。主要贡献,1)提供了系统层的保护;2)易于配置的sandbox系统;3)代码验证机制;java sandbox; 同Rosemary不同,其对NOX组件也进行严格的控制;主要实现: 1)sandbox机制通过java security manager && OSGi conditional permission admin service 来实现的 --> 对操作进行跟踪监控,根据安全策略进行配置,针对每个sandbox有一个专门的configuration.;2)Easy configuration --> OSGi中的local permissions,修改原始的应用安装更新流程,解析permission, operator根据这些进行判断(granting ,denying, skipping,针对skipping就不能的服务有默认的处理);**提高:**Rosemary将时延敏感的应用运行在内核进程,而这个还包括NOS componets.
    • 不足,性能有适当的下降,因为增加了detection && protection;JAVA的限制,一个JAVA虚拟机仅支持一个sercurtiy manager,不能在sandboxes只能怪同时安装Detection和Protection模块
  2. The Beacon OpenFlow Controller

    • David Erickson,daviderickson@cs.stanford.edu, HotSDN’13, August 16, 2013, Hong Kong, China
    • 针对controller做了较详细的罗列
    • 2010年提出来,Java进行开发的,使用了Spring框架(两个主要的组件the Inversion of Control (IoC) container && the Web framework);使用OSGi实现 runtime modularity; 高性能:fully multithreaded 1)Event Handling 2) Reading OpenFlow Messages( Shared Queue --> 第一类线程是I/O线程,每个switch分配一个独立线程,多个switch也可分配到同一个线程,在读取到了OpenFlow消息,将消息写入到一个共享的线程,第二类线程是pipeline线程,从共享队列上读取对应类型的消息并进行处理, Run-to-completion 简化了的,即读到了信息就直接进行处理,但busy switch 优先了) 3) Writing OpenFlow Messages(如何将消息写入switches, batch写入, 减少用户/内核转换开销);
    • 启发: 多线程的使用
  3. Access Control for SDN Controllers

    • Access Control for SDN Controllers HotSDN’14, August 22, 2014, Chicago, Illinois, USA.
    • 提出了一个访问控制架构,解决Separation, Enforcement , Conflicts, Delegation问题,subject(the network users) && objects(the network components), Permissions 细化
  4. Applying operating system principles to SDN controller design

    • M. Monaco, O. Micher, and E. Keller. Applying operating system principles to SDN controller design. In HotNets 2013.
    • yanc, 一个控制器平台,将网络配置和状态表现为一个文件系统,建立在FUSE file system 之上。使用操作系统的工具可以直接进行操作。一些资源均以文件系统的形式展现。操作系统的ACL,Permissions,Monitoring等可直接作用于yanc
    • 性能:通过内存共享系统来提高。
  5. Towards a Secure Controller Platform for OpenFlow Applications

    • HotSDN’13, August 16, 2013, Hong Kong, China.
    • 针对权限做了细致的划分(18个),权限集合,最小化app的权限,同时引入了thread container 以便进行现成隔离。
  6. The Smaller, the Shrewder: A Simple Malicious Application Can Kill an Entire SDN Environment

    • 恶意SDN软件攻击的可能性,提出了Permission Checking && Static/Dynamic Analysis
  7. Ravel: A Database-Defined Network

    • SOSR’16, March 14–15, 2016, Santa Clara, CA.
    • 通过标准的SQL数据库,来实现一个SDN网络控制架构
  8. A Compressive Method for Maintaining Forwarding States in SDN Controller

    • 通过作者提出了一种基于模型的的压缩方法,能有效的在controller内存储全网的转发规则——减少98%;缺陷:内存压缩方式,解压速度以及查询速度。
    • 启发:in-memory compression methodsi
  9. Isolating and Tolerating SDN Application Failures with LegoSDN

    • SOSR ’16, March 14-15, 2016, Santa Clara, CA, USA A Balakrishnan Chandrasekaran Duke University
    • 解决可靠性和容错性,针对SDN-Apps,提高其可恢复性,引入Sandbox,Transaction概念,让不同的App运行在独立的sandbox中,controller同是,提供了很好的隔离性,提供了较好的Roallback和Replay功能
    • 改进:专注于APP的可恢复性,容错性,且是针对Floodlight做修改的,性能方面未考虑。
  10. Rosemary: A robust, secure, and highperformance network operating system

    • Shin S, Song Y, Lee T, Lee S, Chung J, Porras P, Yegneswaran V, Noh J, Kang BB. Rosemary: A robust, secure, and highperformance network operating system. In: Proc. of the 2014 ACM SIGSAC Conf. on Computer and Communications Security.
      Scottsdale: ACM, 2014. 78−89. [doi: 10.1145/2660267.2660353]
    • 解决control健壮性(robustness & resilience),安全性的缺陷,设计实现了Rosemary控制器,控制器主要由data abstraction layer, rosemary kernel (resource manager, security manager, systemlog manager, 内核程序区), system libries, resource monitor构成。其将所有应用程序运行在一个封闭的应用程序内,实时监控各个应用程序的行为(防止某一应用程序影响SDN Stack或造成crash),应用程序的合法性通过签名来判定,micro-NOS --> 实现了control 的Robutness && Resilience。改进:基于角色的签名机制,应用程序是作为一个整体的,不能更好的对应用程序各个模块的访问权限进行细粒度的控制;一个应用可能有不同的用户使用,这是否应考虑进去?
    • From linux: ulimits, pipeline, cpu core bounding
    • http://nss.kaist.ac.kr/

secure modes of ornals ONOS
Rosemary & xiancheng de yingsu
Securey models raise

ONOS

Security-mode ONOS (https://wiki.onosproject.org/display/ONOS/Security-Mode+ONOS
特征:
1. Application Authentication
2. Role-based/ Permission-based Access Control (Least privileged applications)

Bundle(Application) Authentication --> application bundle’s policy file

the application bundle's meta-information:通过policy file中的三种元数据信息可实现应用访问控制, 但既要保证应用的完整性也要保证policy file的完整性,建议通过JDK's 的 jarsiner policy file文件的修改 。

  1. <feature name="onos-app-sdnip" version="1.0.0"
  2. description="SDN-IP" peering application>
  3. <type> ONOS Application </type>
  4. <role> ono-admin </role>
  5. <uses-permission onos:name="onos.permission.INETNT_WRITE"/>
  6. <uses-permission onos:name="onos.permission.DEVICE_READ"/>
  7. <uses-permission onos:name="onos.permission.TOPOLOGY_EVENT"/>
  8. <uses-permission onos:name="onos.permisson.PACT_EVENT"/>
  9. <bundle>mvn:org.onosproject/onos-app-sdnip/1.0.0</bundle>
  10. </feature>

应用访问控制机制:
1. Bundle-level Role-based Access Control --> type
2. Application-level Role-based Access Control --> role
3. API-level Role-based Access Control--> permissions

安全组件都是基于开源的应用:Felix Framework Security Extension && Karaf

For each ONOS application, the developer must specify four different types of security policy.

  1. Application role --> USER or ADMIN
  2. Application permissions --> app permissions are named after "type of ONOS resource" + "action"
  3. OSGi-specific permissions --> "org.foo.ExampleService", which is not one of the Northbound services
  4. Java native permissions --> FilePermission
  1. <security>
  2. <role>USER</role>
  3. <permissions>
  4. <app-perm>APP_READ</app-perm>
  5. <app-perm>CONFIG_READ</app-perm>
  6. <app-perm>CONFIG_WRITE</app-perm>
  7. <java-perm>
  8. <classname>org.osgi.framework.ServicePermission</classname>
  9. <name>org.onosproject.demo.DemoApi</name>
  10. <actions>get,register</actions>
  11. </java-perm>
  12. <java-perm>
  13. <classname>org.osgi.framework.ServicePermission</classname>
  14. <name>org.onosproject.rest.ApiDocService</name>
  15. <actions>get</actions>
  16. </java-perm>
  17. </permissions>
  18. </security>
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注