49
Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Embed Size (px)

DESCRIPTION

Starting Point n Assume that you already know details of u TCP/IP and underlying technology u Basics of cryptography and cryptographic protocols u Java, C++, and OO programming u Basic client/server programming n Adding to these u Distributed objects and distributed security u XML and Web services u Architectural overview and understanding u New directions in research and standardization

Citation preview

Page 1: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

T-110.5140 Network Application Frameworks and XML

Introduction and overview

5.2.2008

Sasu Tarkoma

Based on slides by Pekka Nikander

Page 2: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Contents

Introduction Starting point, topics, goals

Overview Networking: naming, addressing, routing Multi-addressing:Mobility, multi-homing Security: Trust, risks, protocols, keys Objects: Encapsulation, XML, frameworks Performance: bandwidth, delay, bottlenecks

Connections between aspects Examples

Page 3: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Starting Point

Assume that you already know details of TCP/IP and underlying technology Basics of cryptography and cryptographic

protocols Java, C++, and OO programming Basic client/server programming

Adding to these Distributed objects and distributed security XML and Web services Architectural overview and understanding New directions in research and standardization

Page 4: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Topics Covered

Distributed systems security Multi-addressing: Mobility and multi-

homing Building applications with XML

Distributed objects Role of directory services Mobile and wireless applications XML-based presentation and RPC

Scalability and performance issues

Page 5: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Course focus and goals

General overview of all aspects involved Ability to implement distributed systems

Hands-on experience with CORBA, SOAP (web services), XML, network-level security

Understanding of Distributed object-oriented systems Crypto based security in distributed systems XML and how it is used in practise Performance issues Architecture and why does it matter

Page 6: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Course Info

Page 7: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Course Info

Course structure Lectures on Tuesdays 14-16 in T5 Two assignments as pair-work Final exam on Thursday 9.5. 9-12 in T1

Study materials for the course Lecture slides and handouts, scientific papers, and

relevant standards Background

Eric Newcomer Understanding Web Services

Eric Greenberg’s book “Network Application Frameworks” Chapter 1-9 and 12

Sanjiva Weerawarana et al. Web Services Platform Architecture. Prentice Hall.

Page 8: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Contact information

Lectures Sasu Tarkoma (@tml.hut.fi)

Assignments Jani Heikkinen (@tml.hut.fi)

Common questions to the newsgroup: opinnot.tik.naf

Personal questions by email [email protected]

Page 9: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Lecture Outline

Please check the news section on the web page for updates!

Page 10: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Overview

Page 11: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Networking

Communication between distributed entities

What are network entities? How are they named? How are they connected?

Where is state? How it is created? How it is removed? How it is maintained?

How are resources allocated?

Page 12: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Naming, Addressing, Routing I/II

NAMING

ADDRESSING ROUTING

Page 13: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Naming, Addressing, Routing II

Naming, addressing, and routing may be applied on many levels and for different purposes

Naming Simply the name of an entity For example: a domain name

Addressing The address of an entity For example: geographical location, IP-

address

Page 14: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Routing

Routing How information is routed to the entity in

distributed environment Examples: IP-routing, overlay-routing

For the remainder: we assume that addresses are assigned topologically Prefix-routing (network part, host part)

More flexibility: CIDR Keeps routing tables manageable

Addresses depend on location

Page 15: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Mobility and Multi-addressing

Multi-addressing Entities may have multiple addresses

Mobility requires support for address change In mobility the topological location (access point)

changes --> the address changes Mobility

Mobile nodes Handover terminology

make-before-break break-before-make

Moving networks

Page 16: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Mobility Example:Mobile IP Triangular Routing

Home agent

Correspondenthost

Foreign agent

Mobile hostHome link

Triangular routing

Foreign link

Page 17: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Multi-addressing

Multi-homing Server has multiple addresses on different

networks for increased reliability Client has multiple addresses

Multi-homing requires support for address change

Topology change can cause renumbering From old prefix to new prefix Changing the IP host addresses of each device

within the network Related with multi-homing and must be supported

by mobility protocols

Page 18: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

ISP1

ISP2

Multi-homedsite

NAT1

NAT2

Site multi-homing

Multi-homing Examples

Wireless Host

Internet

WLAN

GPRS

End-host multi-homing

Page 19: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Multi-layer Operation

Mobility and multi-homing can be realized on different layers Network (Mobile IP) Between network and transport (HIP) Transport (SCTP) Application (SIP, Wireless CORBA, overlays)

Page 20: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

View points to Distributed Systems User view point

Services that work 24/7, anywhere Usability, security

Developer view point Easy to develop and debug Fast time-to-market

Administrator view point Easy to deploy and maintain Scale well Secure

Page 21: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Security Requirements

Requirements Confidentiality Authentication Authorization

Rules, policies, ACLs ticket-based schemes

Non-repudiation Auditing and logging Availability

Page 22: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Security

Physical network operated by many parties

Not all operators can be trusted Protecting subnets

Firewalls, NATs, middleboxes Connectivity problems

Need for cryptographic protection Integrity and confidentiality of data Identification, access control, and authorization Key distribution and trust creation/evaluation

Page 23: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Objects

Information hiding for programmers Extend a familiar paradigm to a

distributed environment Psychological drawbacks

Huge difference in latency Completely different fault semantics Synchronization problems

How to name and find objects? Using services provided by third parties?

Page 24: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Performance

Network Quality of Service (QoS) characteristics End-to-end latency Bandwidth Sometimes also jitter matters

A dynamic phenomenon if packet switched Congestion leads to drops or delays

Different paths have different QoS properties

Two worlds: wireless and wired

Page 25: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Delay and failure model

A uni-processor machine works or fails A method call takes a few nanoseconds In a network,

round trip latency may be ~ 100ms a single end-node may fail a path between two end-nodes may fail performance may fall to unacceptably poor

level

Page 26: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Interconnections

Layered model Object centric view Network centric view Directories vs. security

Network Security

Objects Directories

Page 27: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Layered Model

Internetworking

Transport

Session

Presentation Object API, serializ.

“Transaction”, RPC

End-to-end

Routing

Congestion control

Presentation

Page 28: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Object centric view

Objects

Network Security

Directories

Object API to network

Object-level security

Naming and finding objects

Page 29: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Naming and finding objects

Each object needs to have a name Each type (class) needs to have a name Each method (action) needs to have a

name Objects may be mobile, replicated,

ephemeral, or permanent

How to find an object? How to maintain a consistent view of

types?

Page 30: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Providing an object API

Mostly a naming related issue How to find the object? How to find type and method meta-data?

How to refer to remote objects? How to move objects over the network? How to synchronize replicated objects? Abstraction of delay and faults

Page 31: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

OO security

Objects represent reactive data storage May implement access control logic

Threads of execution act upon them <Thread ID, Call History> --> {permissions}

How to trust a remote node? How to represent threads, call history,

and permissions over the network?

Page 32: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Network centric view

Objects

Network Security

Directories

Delay and failure mode

Naming, addressing, and directories

Network security

Secure network mgmt

Page 33: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Network security

Large networks are physically vulnerable Cryptography for integrity and

confidentiality Need to solve the key distribution problem

Not everybody is equally trusted Need to have identities and credentials

Availability depends on protocol design Privacy depends on protocol design Balance: security vs. ease of

administration vs. performance

Page 34: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Naming, addressing, and directories

Network entities are named DNS names: www.example.org

Names need to be translated to addresses

Network knows how to forward to an address A directory provides translation information

Avoid circular design! Make sure that basic networking works even without directories.

Page 35: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Chicken and egg with security and directories

Security mechanisms require access to long term public keys

Directory access must be protected

Security

Directories

Access control

Long term keys

Page 36: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Examples

Networking: IPv4 and IPv6 Directories: DNS Security: IPsec and IKE Objects: Java RMI

Page 37: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Networking: IPv4 and IPv6

Hosts named and addressed by IP address

Two broad classes of state: Routing and forwarding tables End-to-end state

IP addresses are assigned topologically Forwarding tables

Created by routing protocols Converge time: minutes

Page 38: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Concerns with networks

Non-forwarding,non end-to-end state: NAT Should always be soft state

Congestion control, reliability, packet drop / retransmission, flow control Traditionally handled at the transport layer

Routing hardware design and cost Complexity of next-hop lookup QoS facilities, queues, traffic shaping

Page 39: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Directories: DNS

Provides Domain Name to IP address mapping Hosts are no longer named with IP addresses

Replicated, hierarchical repository Data cached at end-hosts

Reduces traffic Make update distribution slow

Partitioned into administrative domains Relatively poor security

Mostly relies on manual configuration

Page 40: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Concerns with directories

Actual data storage and structure Logical structure: architecture Physical structure: performance

Partitioning, replication, caching Access control: reading, modification Representation of relationships Representation of objects

Page 41: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Security: IPsec IP Security (IPsec) End-to-end, below congestion control

Authentication Header (AH) Integrity and authenticity (immutable IP header+payload) Problems with NATs (dst mutable)

ESP (Encapsulating Security Payload) Transport-mode: higher level payload

• host-to-host Tunnel-mode: payload is IP packet

• network-to-network Mostly in tunnel mode, VPNs

Contains a complex policy control model Does not work for IP control traffic

Page 42: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

IKE IPSec separates key management into IKE / IKE

v2 Security Association (SA)

relationship between two or more entities that describes how the entities will use security services to communicate securely

Internet Key Exchange (IKE) negotiates the IPSec security associations (SAs) IKE creates an authenticated, secure tunnel

Five authentication options

negotiates the security association for IPSec authentication, establishment of shared keys

Page 43: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

IPsec and IKE

IPSecAlice

IKE Alice

IPSecBob

IKE BobIKE Tunnel

1.No IPSec SA for Bob

2. Alice’s IKE starts negotiations 3. Negotiation completes.

IPSec SAs in place

4. Protected packets are sent to Bob

Page 44: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Concerns with security

Right layer to implement? What about multi-layer security? Privacy? DoS protection? Trust management?

How to bootstrap trust? Authorization and credentials?

Page 45: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Objects: Java RMI I/II Java Remote Method Invocation

Objects in one VM invoke methods in objects in a remote VM Remote handle

From the registry name facility By receiving the reference as an argument or return value of

a method call Client needs stubs (generated from interfaces / downloaded,

rmic compiler) Type polymorphism adds interesting semantics

Run-time dispatch instead of compile time Dynamic binding

Parameters of method calls are passed as serialized objects (deep copy)

Page 46: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Objects: Java RMI II

Transport

Remote Reference Layer

Stubs Skeletons

Client ServerApplication

RMI system

1. Client Obtains Handle

2. Stub is called (rep. Remote object)3. Marshalling arguments

4. Skeleton unmarshals

5. Skeleton calls method

6. Skeleton marshals result7. Stub unmarshals result and

passes it to client (type checking)

Transport independence. Connection management.

Unicast/multicast object invocation.

Page 47: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Concerns with objects

Object Discovery Representation of Object Handle

Reliability and disaster recovery Fault tolerance: Replication, Consistency, etc. Version detection

Marshalling and unmarshalling Transparency vs. efficiency Performance

Easy to send more data than necessary! Distributed garbage collection

Semantics: defining objects beyond appearance Supporting heterogeneous environments

Page 48: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Summary

Networking: naming, addressing, routing Multi-addressing:Mobility, multi-homing Security: Trust, risks, protocols, keys Objects: Encapsulation, XML,

frameworks Performance: bandwidth, delay,

bottlenecks

Page 49: T-110.5140 Network Application Frameworks and XML Introduction and overview 5.2.2008 Sasu Tarkoma Based on slides by Pekka Nikander

Questions / discussion