scion

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0

README

SCION

Documentation Build Status Go Report Card GitHub issues Release license

An implementation of SCION, a future Internet architecture.

Necessary steps in order to run SCION:

  1. Make sure that you are using a clean and recently updated Ubuntu 16.04. This environment assumes you're running as a non-root user with sudo access.

  2. Install Bazel version 0.26.1:

    sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3
    wget https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-installer-linux-x86_64.sh
    bash ./bazel-0.26.1-installer-linux-x86_64.sh --user
    rm ./bazel-0.26.1-installer-linux-x86_64.sh
    
  3. Install bzlcompat version v0.6:

    wget https://github.com/kormat/bzlcompat/releases/download/v0.6/bzlcompat-v0.6-linux-x86_64 -O ~/bin/bzlcompat
    chmod 755 ~/bin/bzlcompat
    
  4. Make sure that you have a Go workspace setup, and that ~/.local/bin, and $GOPATH/bin can be found in your $PATH variable. For example:

    echo 'export GOPATH="$HOME/go"' >> ~/.profile
    echo 'export PATH="$HOME/.local/bin:$GOPATH/bin:$PATH"' >> ~/.profile
    source ~/.profile
    mkdir -p "$GOPATH"
    
  5. Check out scion into the appropriate directory inside your go workspace (or put a symlink into the go workspace to point to your existing scion checkout):

    mkdir -p "$GOPATH/src/github.com/scionproto"
    cd "$GOPATH/src/github.com/scionproto"
    git clone https://github.com/scionproto/scion
    cd scion
    
  6. Install required packages with dependencies:

    ./env/deps
    
  7. Install docker and docker-compose. Please follow the instructions for docker-ce and docker-compose. Add your user to the docker group: sudo usermod -a -G docker $LOGNAME. Log out and log back in so that your group membership is re-evaluated.

  8. Create the topology and configuration files (according to topology/Default.topo):

    ./scion.sh topology

    The resulting directory structure will be created:

    ./gen/ISD{X}/AS{Y}/
        {elem}{X}-{Y}-{Z}/
            as.yml
            path_policy.yml
            supervisord.conf
            topology.yml
            certs/
                ISD{X}-AS{Y}-V0.crt
                ISD{X}-V0.trc
            keys/
                as-sig.key
    

    The default topology looks like this.

  9. Run the infrastructure:

    ./scion.sh run

  10. Stop the infrastructure:

    ./scion.sh stop

Notes about topology/Default.topo:

  • defaults.subnet (optional): override the default subnet of 127.0.0.0/8.

  • core (optional): specify if this is a core AS or not (defaults to 'false').

  • beacon_servers, certificate_servers, path_servers, (all optional): number of such servers in a specific AS (override the default value 1).

  • links: keys are ISD_ID-AS_ID (format also used for the keys of the JSON file itself) and values can either be PARENT, CHILD, PEER, or CORE.

Tests

In order to run the unit tests:

./scion.sh test

Directories

Path Synopsis
go
beacon_srv
The beacon server implementation.
The beacon server implementation.
beacon_srv/internal/beacon/mock_beacon
Package mock_beacon is a generated GoMock package.
Package mock_beacon is a generated GoMock package.
beacon_srv/internal/beaconing
Package beaconing implements tasks and handlers related to beacon propagation and registration.
Package beaconing implements tasks and handlers related to beacon propagation and registration.
beacon_srv/internal/beaconing/mock_beaconing
Package mock_beaconing is a generated GoMock package.
Package mock_beaconing is a generated GoMock package.
beacon_srv/internal/beaconstorage
Package beaconstorage provides a "factory" for beacon stores.
Package beaconstorage provides a "factory" for beacon stores.
beacon_srv/internal/config
Package config describes the configuration of the beacon server.
Package config describes the configuration of the beacon server.
beacon_srv/internal/ifstate
Package ifstate implements the interface state in memory structure as well as related tasks and handlers.
Package ifstate implements the interface state in memory structure as well as related tasks and handlers.
beacon_srv/internal/ifstate/mock_ifstate
Package mock_ifstate is a generated GoMock package.
Package mock_ifstate is a generated GoMock package.
beacon_srv/internal/keepalive
Package keepalive implements tasks and handlers related IFID keepalives.
Package keepalive implements tasks and handlers related IFID keepalives.
beacon_srv/internal/keepalive/mock_keepalive
Package mock_keepalive is a generated GoMock package.
Package mock_keepalive is a generated GoMock package.
beacon_srv/internal/onehop
Package onehop provides a sender for messages sent on a one-hop path.
Package onehop provides a sender for messages sent on a one-hop path.
beacon_srv/internal/revocation
Package revocation implements a revocation handler for the beacon server.
Package revocation implements a revocation handler for the beacon server.
beacon_srv/internal/revocation/mock_revocation
Package mock_revocation is a generated GoMock package.
Package mock_revocation is a generated GoMock package.
border
Border is a Go implementation of the SCION border router.
Border is a Go implementation of the SCION border router.
border/braccept/parser
This package is responsible for parsing a packet description, more specifically, an ordered list of layers definitions.
This package is responsible for parsing a packet description, more specifically, an ordered list of layers definitions.
border/brconf
Package brconf holds all of the global router state, for access by the router's various packages.
Package brconf holds all of the global router state, for access by the router's various packages.
border/internal/metrics
Package metrics defines and exports router metrics to be scraped by prometheus.
Package metrics defines and exports router metrics to be scraped by prometheus.
border/rcmn
Package rcmn contains small common types used by the border router, to eliminate circular dependencies.
Package rcmn contains small common types used by the border router, to eliminate circular dependencies.
border/rpkt
Package rpkt contains the router representation of a SCION packet.
Package rpkt contains the router representation of a SCION packet.
examples/pingpong
Simple application for SCION connectivity using the snet library.
Simple application for SCION connectivity using the snet library.
godispatcher/internal/config
Package config contains the configuration of the SCION dispatcher.
Package config contains the configuration of the SCION dispatcher.
godispatcher/internal/respool
Package respool contains the Dispatcher's pool of free buffers/packets.
Package respool contains the Dispatcher's pool of free buffers/packets.
hidden_path_srv/internal/hpsegreq/mock_hpsegreq
Package mock_hpsegreq is a generated GoMock package.
Package mock_hpsegreq is a generated GoMock package.
hidden_path_srv/internal/registration/mock_registration
Package mock_registration is a generated GoMock package.
Package mock_registration is a generated GoMock package.
lib/addr
Package addr contains types for SCION addressing.
Package addr contains types for SCION addressing.
lib/config
Package config provides an unified pattern for configuration structs.
Package config provides an unified pattern for configuration structs.
lib/ctrl
Package ctrl handles SCION control-plane payloads, which are encoded as capnp proto messages.
Package ctrl handles SCION control-plane payloads, which are encoded as capnp proto messages.
lib/ctrl/ctrl_msg
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads.
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads.
lib/ctrl/ifid
Package ifid contains the Go representation of an IFID keepalive packet.
Package ifid contains the Go representation of an IFID keepalive packet.
lib/ctrl/seg/mock_seg
Package mock_seg is a generated GoMock package.
Package mock_seg is a generated GoMock package.
lib/discovery
Package discovery provides library support to query the discovery service for topology files.
Package discovery provides library support to query the discovery service for topology files.
lib/env
Package env contains common command line and initialization code for SCION services.
Package env contains common command line and initialization code for SCION services.
lib/fatal
Package fatal provides a way to handle fatal errors.
Package fatal provides a way to handle fatal errors.
lib/healthpool
Package healthpool provides a generic way to keep track of the health infos for a set of keys.
Package healthpool provides a generic way to keep track of the health infos for a set of keys.
lib/healthpool/svcinstance
Package svcinstance provides a pool to keep track of the health status of service instances.
Package svcinstance provides a pool to keep track of the health status of service instances.
lib/hpkt
Package hpkt (Host Packet) contains low level primitives for parsing and creating end-host SCION messages.
Package hpkt (Host Packet) contains low level primitives for parsing and creating end-host SCION messages.
lib/infra
Package infra contains common definitions for the SCION infrastructure messaging layer.
Package infra contains common definitions for the SCION infrastructure messaging layer.
lib/infra/dedupe
Package dedupe implements a generic request/response proxy that issues a single request instead of multiple redundant requests.
Package dedupe implements a generic request/response proxy that issues a single request instead of multiple redundant requests.
lib/infra/disp
Package disp implements a generic message dispatcher for request/reply protocols.
Package disp implements a generic message dispatcher for request/reply protocols.
lib/infra/infraenv
Package infraenv contains convenience function common to SCION infra services.
Package infraenv contains convenience function common to SCION infra services.
lib/infra/messenger
Package messenger contains the default implementation for interface infra.Messenger.
Package messenger contains the default implementation for interface infra.Messenger.
lib/infra/messenger/mock_messenger
Package mock_messenger is a generated GoMock package.
Package mock_messenger is a generated GoMock package.
lib/infra/mock_infra
Package mock_infra is a generated GoMock package.
Package mock_infra is a generated GoMock package.
lib/infra/modules/combinator
Package combinator contains methods for constructing SCION forwarding paths.
Package combinator contains methods for constructing SCION forwarding paths.
lib/infra/modules/db
Package db contains common database abstractions for our infra.
Package db contains common database abstractions for our infra.
lib/infra/modules/idiscovery
Package idiscovery fetches the topology from the discovery service.
Package idiscovery fetches the topology from the discovery service.
lib/infra/modules/itopo
Package itopo stores the static and dynamic topology.
Package itopo stores the static and dynamic topology.
lib/infra/modules/segfetcher
Package segfetcher contains all the logic that is needed to fetch segments, verify and store segments in an efficient manner.
Package segfetcher contains all the logic that is needed to fetch segments, verify and store segments in an efficient manner.
lib/infra/modules/segfetcher/mock_segfetcher
Package mock_segfetcher is a generated GoMock package.
Package mock_segfetcher is a generated GoMock package.
lib/infra/modules/seghandler/mock_seghandler
Package mock_seghandler is a generated GoMock package.
Package mock_seghandler is a generated GoMock package.
lib/infra/modules/segverifier
Package segverifier implements primitives for verifying path segments.
Package segverifier implements primitives for verifying path segments.
lib/infra/modules/trust
Package trust defines type Store, a unified interface for TRC and Certificate retrieval.
Package trust defines type Store, a unified interface for TRC and Certificate retrieval.
lib/infra/modules/trust/trustdb
Package trustdb provides wrappers for SQL calls for managing a database containing TRCs and Certificate Chains.
Package trustdb provides wrappers for SQL calls for managing a database containing TRCs and Certificate Chains.
lib/infra/modules/trust/trustdb/mock_trustdb
Package mock_trustdb is a generated GoMock package.
Package mock_trustdb is a generated GoMock package.
lib/infra/modules/trust/trustdb/trustdbsqlite
Package trustdbsqlite implements the trustdb interface with a sqlite backed DB.
Package trustdbsqlite implements the trustdb interface with a sqlite backed DB.
lib/infra/modules/trust/v2/mock_v2
Package mock_v2 is a generated GoMock package.
Package mock_v2 is a generated GoMock package.
lib/infra/rpc
Package rpc implements SCION Infra RPC calls over QUIC.
Package rpc implements SCION Infra RPC calls over QUIC.
lib/integration
Package integration simplifies the creation of integration tests.
Package integration simplifies the creation of integration tests.
lib/keyconf
Package keyconf defines basic primitives for key configuration.
Package keyconf defines basic primitives for key configuration.
lib/l4/mock_l4
Package mock_l4 is a generated GoMock package.
Package mock_l4 is a generated GoMock package.
lib/log/mock_log
Package mock_log is a generated GoMock package.
Package mock_log is a generated GoMock package.
lib/mocks/net/mock_net
Package mock_net is a generated GoMock package.
Package mock_net is a generated GoMock package.
lib/overlay/conn
Package conn implements overlay sockets with additional metadata on reads.
Package conn implements overlay sockets with additional metadata on reads.
lib/overlay/conn/mock_conn
Package mock_conn is a generated GoMock package.
Package mock_conn is a generated GoMock package.
lib/pathdb/mock_pathdb
Package mock_pathdb is a generated GoMock package.
Package mock_pathdb is a generated GoMock package.
lib/pathmgr
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
lib/pathmgr/mock_pathmgr
Package mock_pathmgr is a generated GoMock package.
Package mock_pathmgr is a generated GoMock package.
lib/pathpol
Package pathpol implements path policies, documentation in doc/PathPolicy.md Currently implemented: ACL, Sequence, Extends and Options.
Package pathpol implements path policies, documentation in doc/PathPolicy.md Currently implemented: ACL, Sequence, Extends and Options.
lib/periodic/internal/metrics/mock_metrics
Package mock_metrics is a generated GoMock package.
Package mock_metrics is a generated GoMock package.
lib/pktcls
Package pktcls implements tools for classifying and acting on network packets.
Package pktcls implements tools for classifying and acting on network packets.
lib/profile
Package profile handles CPU and memory profiling.
Package profile handles CPU and memory profiling.
lib/prom
Package prom contains some utility functions for dealing with prometheus metrics.
Package prom contains some utility functions for dealing with prometheus metrics.
lib/prom/promtest
Package promtest contains helpers to test metrics structs.
Package promtest contains helpers to test metrics structs.
lib/revcache/mock_revcache
Package mock_revcache is a generated GoMock package.
Package mock_revcache is a generated GoMock package.
lib/sciond
Package sciond queries local SCIOND servers for information.
Package sciond queries local SCIOND servers for information.
lib/sciond/mock_sciond
Package mock_sciond is a generated GoMock package.
Package mock_sciond is a generated GoMock package.
lib/scrypto/trc/v2
Package trc contains the TRC implementation according to the new control-plane PKI design.
Package trc contains the TRC implementation according to the new control-plane PKI design.
lib/serrors
Package serrors provides enhanced errors.
Package serrors provides enhanced errors.
lib/snet
Package snet implements interfaces net.Conn and net.PacketConn for SCION connections.
Package snet implements interfaces net.Conn and net.PacketConn for SCION connections.
lib/snet/internal/ctxmonitor/mock_ctxmonitor
Package mock_ctxmonitor is a generated GoMock package.
Package mock_ctxmonitor is a generated GoMock package.
lib/snet/internal/pathsource/mock_pathsource
Package mock_pathsource is a generated GoMock package.
Package mock_pathsource is a generated GoMock package.
lib/snet/mock_snet
Package mock_snet is a generated GoMock package.
Package mock_snet is a generated GoMock package.
lib/snet/squic
QUIC/SCION implementation.
QUIC/SCION implementation.
lib/sock/reliable
Package reliable implements the SCION ReliableSocket protocol Servers should first call Listen on a UNIX socket address, and then call Accept on the received Listener.
Package reliable implements the SCION ReliableSocket protocol Servers should first call Listen on a UNIX socket address, and then call Accept on the received Listener.
lib/sock/reliable/mock_reliable
Package mock_reliable is a generated GoMock package.
Package mock_reliable is a generated GoMock package.
lib/sock/reliable/reconnect
Package reconnect implements transparent logic for reconnecting to the dispatcher.
Package reconnect implements transparent logic for reconnecting to the dispatcher.
lib/sock/reliable/reconnect/mock_reconnect
Package mock_reconnect is a generated GoMock package.
Package mock_reconnect is a generated GoMock package.
lib/sockctrl
This version of sockctrl is for Go versions >= 1.9, where the socket FDs are accessible via RawConn.Control().
This version of sockctrl is for Go versions >= 1.9, where the socket FDs are accessible via RawConn.Control().
lib/spath/spathmeta
Package spathmeta implements basic types for working with SCIOND paths.
Package spathmeta implements basic types for working with SCIOND paths.
lib/svc
Package svc implements support for SVC Resolution.
Package svc implements support for SVC Resolution.
lib/svc/internal/ctxconn
Package ctxconn provides a helper function to track context cancellation when working with connections.
Package ctxconn provides a helper function to track context cancellation when working with connections.
lib/svc/internal/ctxconn/mock_ctxconn
Package mock_ctxconn is a generated GoMock package.
Package mock_ctxconn is a generated GoMock package.
lib/svc/internal/proto
Package proto implements helpers for capnp SVC address resolution messages.
Package proto implements helpers for capnp SVC address resolution messages.
lib/svc/mock_svc
Package mock_svc is a generated GoMock package.
Package mock_svc is a generated GoMock package.
lib/topology
Package topology wraps two versions of the topology.
Package topology wraps two versions of the topology.
lib/truststorage
Package truststorage provides a "factory" for trust database.
Package truststorage provides a "factory" for trust database.
lib/util/bufpool
Package bufpool initializes an elastic pool of free buffers.
Package bufpool initializes an elastic pool of free buffers.
lib/xtest
Package xtest implements common functionality for unit tests.
Package xtest implements common functionality for unit tests.
lib/xtest/graph
Code generated by graphupdater tool, DO NOT EDIT.
Code generated by graphupdater tool, DO NOT EDIT.
lib/xtest/loopback
Package loopback defines a net.PacketConn implementation where sent messages are echoed back on the same connection.
Package loopback defines a net.PacketConn implementation where sent messages are echoed back on the same connection.
lib/xtest/mock_xtest
Package mock_xtest is a generated GoMock package.
Package mock_xtest is a generated GoMock package.
lib/xtest/p2p
Package p2p (point to point) provides a net.PacketConn wrapper around net.Pipe().
Package p2p (point to point) provides a net.PacketConn wrapper around net.Pipe().
path_srv/internal/config
Package config contains the configuration of the path server.
Package config contains the configuration of the path server.
path_srv/internal/segreq
Package segreq contains everything that is needed to handle segment requests in the path server.
Package segreq contains everything that is needed to handle segment requests in the path server.
path_srv/internal/segreq/mock_segreq
Package mock_segreq is a generated GoMock package.
Package mock_segreq is a generated GoMock package.
path_srv/internal/segutil/mock_segutil
Package mock_segutil is a generated GoMock package.
Package mock_segutil is a generated GoMock package.
proto
Package proto contains mostly auto-generated code for parsing/packing SCION capnp messages, as well as some helper functions to working with capnp in Go simpler.
Package proto contains mostly auto-generated code for parsing/packing SCION capnp messages, as well as some helper functions to working with capnp in Go simpler.
sciond/internal/config
Package config contains the configuration of sciond.
Package config contains the configuration of sciond.
sciond/internal/fetcher
Package fetcher implements path segment fetching, verification and combination logic for SCIOND.
Package fetcher implements path segment fetching, verification and combination logic for SCIOND.
sciond/internal/fetcher/mock_fetcher
Package mock_fetcher is a generated GoMock package.
Package mock_fetcher is a generated GoMock package.
sciond/internal/servers
Package servers contains the logic for creating and managing SCIOND API servers.
Package servers contains the logic for creating and managing SCIOND API servers.
sig
sig/config
Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.
Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.
sig/egress/asmap
Package asmap contains the tables for remote SIGs, ASes and their prefixes.
Package asmap contains the tables for remote SIGs, ASes and their prefixes.
sig/egress/dispatcher
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session.
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session.
sig/egress/iface
iface contains interfaces that different components within egress use to communicate.
iface contains interfaces that different components within egress use to communicate.
sig/egress/iface/mock_iface
Package mock_iface is a generated GoMock package.
Package mock_iface is a generated GoMock package.
sig/egress/reader
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher.
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher.
sig/egress/router
Package router implements an IPv4/IPv6 router.
Package router implements an IPv4/IPv6 router.
sig/egress/selector
selector package implements selection of a session to use for an outgoing packet.
selector package implements selection of a session to use for an outgoing packet.
sig/egress/session
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session.
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session.
sig/egress/worker
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames.
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames.
sig/egress/worker/mock_worker
Package mock_worker is a generated GoMock package.
Package mock_worker is a generated GoMock package.
sig/internal/metrics
Package metrics publishes information about SIG operation NOTE(all): Work in progress, do not recommend reviewing this code yet
Package metrics publishes information about SIG operation NOTE(all): Work in progress, do not recommend reviewing this code yet
sig/internal/xnet
Package xnet contains low level Linux networking calls (generally related to netlink and tunneling)
Package xnet contains low level Linux networking calls (generally related to netlink and tunneling)
tools/scion-pki/internal/pkicmn
Package pkicmn contains some commonly used functionality and definitions.
Package pkicmn contains some commonly used functionality and definitions.
tools/scmp
Simple echo application for SCION connectivity tests.
Simple echo application for SCION connectivity tests.
tools/showpaths
Simple show paths application for SCION.
Simple show paths application for SCION.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL