220 likes | 781 Views
Service Location Protocol . By Team Qwerty Aparna Atmaram Venkatesh Babu. Agenda. What is SLP? Protocol Overview SLP Message Format SLP Security SLP Implementation Conclusion Reference. SLP. What is Service Discovery? Examples of Service Discovery Protocols SLP v1 SLP v2 Jini
E N D
Service Location Protocol By Team Qwerty Aparna Atmaram Venkatesh Babu
Agenda • What is SLP? • Protocol Overview • SLP Message Format • SLP Security • SLP Implementation • Conclusion • Reference
SLP • What is Service Discovery? • Examples of Service Discovery Protocols • SLP v1 • SLP v2 • Jini • Universal Plug and Play (UPnP) • Bluetooth’s SDP
SLP: Actors • User Agent (UA) SLP Client communicates with SA or DA to access services • Service Agent (SA) Offers services directly or by registering with DA on behalf of application • Directory Agent (DA) optional actor to which all services register DA can be discovered either by active or passive discovery
SLP: Architecture • Centralized server architecture • Decentralized architecture
SLP: Service Discovery without DA Figure 1: Service Discovery without DA Source: http://www-128.ibm.com/developerworks/linux/library/l-slp/
SLP: Service Discovery with DA Figure 2: Service Discovery with DA Source: http://www-128.ibm.com/developerworks/linux/library/l-slp/
SLP: Message (1) General Message Format +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Function | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |O|M|U|A|F| rsvd| Dialect | Language Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Char Encoding | XID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 3: SLP General Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
SLP: Message (2) Message Type Abbreviation Service Registration SrvReg Service Deregister SrvDeReg Service Acknowledge SrvAck Service Request SrvRqst Service Reply SrvRply Service Type Request SrvTypeRqst Service Type Reply SrvTypeRply Attribute Request AttrRqst Attribute Reply AttrRply DA Advertisement DAAdvert SA Advertisement SAAdvert
Service Registration Message SrvReg Message sent by SA's to DA's containing information about a service that is available Message Format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Location header (function = SrvReg) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <URL-Entry> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length of Attr List String | <attr-list> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <attr-list>, Continued. \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (if present) Attribute Authentication Block ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 4: Service Registration Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
Service Deregister Message SrvDeReg Message sent by SA's to inform DA's that a service is no longer available. Message Format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Location header (function = SrvDereg) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of URL | URL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ URL of Service to Deregister, contd. \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (if present) authentication block ..... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of <tag spec> string | <tag spec> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <tag spec>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5: Service Deregister Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
Service Acknowledgement Message SrvAck A generic acknowledgment that is sent by DA's to SA's in response to SrvReg and SrvDeReg messages Message Format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Location header (function = SrvAck) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 6: Service Acknowledgment Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
Service Request Message SrvRqst Message sent by UA's to SA's and DA's to request the location of a service Message Format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Location header (function = SrvReq) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |length of prev resp list string|<Previous Responders Addr Spec> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Previous Responders Addr Spec> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of predicate string | Service Request <predicate> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ Service Request <predicate>, contd. \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 7: Service Request Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
Service Reply Message SrvRply Message sent by SA's and DA's in response to a SrvRqst message. The SrvRply contains the URL of the requested service Message Format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service Location header (function = SrvRply) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | URL Entry count | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | <URL Entry 1> ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | . | \ . \ | . | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | <URL Entry N> ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 8: Service Reply Message Format Source: http://www.ietf.org/rfc/rfc2165.txt?number=2165
SLP: Security Security Considerations Authentication using Digital Signatures Authentication Block Signature Generation Signature Verification Protocol Vulnerability Relay Attacks Denial of Service Attacks
SLP: Defining Service • A service in SLP is defined by a service URL. • The URL has the form: service:<service-type>://<addrspec> <service-type> is the type of service being advertised <addrspec> is the service's location (domain name or IP address and port number). • For example: service:mail://mail.com:25 • Above URL advertises a mail server at mail.com on port 25
OpenSLP APIs (1) • SLP implementation is available with source at http://www.openslp.org/ • OpenSLP API is just an implementation of a standardized specification described in RFC 2614. • The SLP API is a library interface that allows programmers to use SLP in their applications to locate services • Following are the list of major API’s provided : • SLPReg() • SLPDeReg() • SLPFindSrvs() • SLPFindAttrs() • SLPFindSrvTypes() • SLPParseSrvURL()
OpenSLP APIs (2) • SLPOpen() :Functions used to open SLPHandles • SLPReg() : Registers a service URL and service attributes with SLP. • SLPDeReg() : Deregisters a previously registered service. • SLPFindSrvs() : Finds services based on service type or attributes. • SLPFindAttrs() : Obtains a list of attributes for services registered with SLP. • SLPFindSrvTypes() : Obtains a list of the types of services that have been registered with SLP. • SLPParseSrvURL():Parses a Service URL passed in as a character string and returns the results in a pointer to a dynamically allocated SLPSrvURL structure.
Sample Application • Listing of SLP-enabled daytime server (Synchronous execution of SLP callback functions) • Listing of SLP-enabled daytime client
Conclusion • SLP enables automatic service discovery and configuration of services over a network. • Automatic service discovery is very advantageous given the mobility of today's computers.
References • [1] RFC 2165. http://www.ietf.org/rfc/rfc2165.txt?number=2165 • [2] Automate client management with the Service Location Protocol by M. Tim Jones. http://www-128.ibm.com/developerworks/linux/library/l-slp/ • [3] Service Location Protocol. http://www.redbooks.ibm.com/abstracts/TIPS0269.html?Open • [4] Some Notes on Security in the Service Location Protocol Version 2 by Marco Vettorello, Christian Bettstetter, and Christian Schwingenschl¨ogl. http://www.scs.carleton.ca/~barbeau/wadhc/Papers/vettorello.pdf • [5] OpenSLP API information from http://www.openslp.org/ • [6] OpenSLP API info from RFC 2614