Proto commits in scionproto/scion

These 28 commits are when the Protocol Buffers files have changed:

Commit:e34b088
Author:Katya Titkova
Committer:GitHub

chore: fix typos (#4756)

The documentation is generated from this commit.

Commit:15bdf63
Author:JordiSubira
Committer:GitHub

end host, router: dispatch UDP in router, remove dispatcher socket (#4344) Implement the dispatcher-less end host with the UDP port dispatch in the router, as discussed in https://github.com/scionproto/scion/pull/4280. Applications (using snet) now open underlay UDP ports directly, and use the same port number for the underlay UDP and SCION/UDP. This SCION_UDP.dst_port number is used by the router as underlay port when forwarding packets to destination hosts. The `dispatcher` has been completely refactored and pruned. It now serves only as a responder for SCMP echo/traceroute requests, and, as a transition mechanism, acts as a stateless "shim" that forwards UDP datagrams. The `reliable/sock` packages has been removed.

Commit:25e37a0
Author:Samuel Hitz
Committer:GitHub

cppki/segverifer: enforce AS certificate to cover AS entry (#4492) When verifying an AS entry the verifier will now only use an AS certificate that is valid until the expiration of the AS entry. Before, the verifier would use any certificate that was valid at the time of verification but not necessarily for the entire validity of the AS entry, i.e., the hop field expiration contained in the entry. The verifier now requests certificates that cover at least the entire validity period of the AS entry. To that end, the `ChainsRequest.date` field has been renamed to `ChainsRequest.at_least_valid_until` and a new `ChainsRequest.at_least_valid_since` field has been introduced. Legacy clients of the API will only set the `at_least_valid_until` field (for them it's still the `date` field, but the name of the field does not matter for protobuf wire enconding). New servers will simply set `at_least_valid_since` to be equal to `at_least_valid_until` to keep the same semantics. Legacy servers will ignore the `at_least_valid_since` field, since they don't know about it. This only enforces that the AS certificate is still valid at the AS entry expiration, but not that it was also valid at the start of the hop field validity. Once all trust material servers and clients have been upgraded we automatically have the desired behavior. Fixes #4286

Commit:2f4d3e9
Author:Martin Sustrik
Committer:GitHub

gateway: etags added to prefix discovery protobuf (#4461) Etags can be used so as not to transfer large prefix sets over and over again. Etags may or may not be supported by a particular gateway implementation. This change is fully forward and backward compatible. Implementations that do not support etags should just ignore the field.

Commit:c1e1abc
Author:Markus Legner
Committer:GitHub

daemon: fix docstring for latencies in protobuf file (#4443) Update the docstring to follow the semantics of negative means undefined.

Commit:ca9c453
Author:JordiSubira
Committer:GitHub

drkey: add RPC cs/daemon (#4226) This PR is the 6th in a series of PRs that add support for DRKey started with https://github.com/scionproto/scion/pull/4217. This PR contains: - The protobuf drkey RPC call definitions for the CS and the daemon

Commit:d0961ff
Author:JordiSubira
Committer:GitHub

drkey: Add SecretValue DB (#4220) This PR is the second PR of a series of PRs to add the DRKey implementation. This PR contains: Sqlite implementation of the SecretValueDB interface Metrics support UTs

Commit:6ed6b84
Author:JordiSubira
Committer:GitHub

drkey: public library and protobuf definitions (#4217) This PR is the first of a series of PRs which add the DRKey feature. This PR contains: pkg/drkey: public drkey library. private/drkey/protocoltest: common utils for UT. proto/drkey: pb messages.

Commit:15d455f
Author:Dominik Roos
Committer:Dominik Roos

repo: restructure the repository layout Restructure the whole repository layout to a more streamlined layout. This commit focuses on the go code. Other code will be considered eventually. The overall structure was discussed in scionproto/scion#4076. Each service and cli tools gets a top-level directory. Packages that are shared across multiple applications are grouped in the `private` directory. This should indicate that these packages are not intended to be used by external parties, and that semantic versioning will not apply to these packages. Developer tools are grouped in the `tools` directory. Code that is intended for use by third external parties is grouped in the `pkg` directory. Here we should strive for a stable package API that does not change too often. To smoothen transition, the following gist has all the metadata of the move: https://gist.github.com/oncilla/96bdabb00359fdb4436a7a50d57d3cf3 You can use [go-imports.sh](https://gist.github.com/oncilla/96bdabb00359fdb4436a7a50d57d3cf3#file-go-imports-sh) to fix the imports. [shuffle.yml](https://gist.github.com/oncilla/96bdabb00359fdb4436a7a50d57d3cf3#file-shuffle-yml) lists all the moved packages and their targets. GitOrigin-RevId: 1a49e3871a65a4bbeac515ada78f7208a85d7558

Commit:e9f9b49
Author:mawyss
Committer:Dominik Roos

epic: endhost logic This PR implements the EPIC endhost logic. Applications can now send packets using the EPIC path type header. Major changes: - The gRPC communication between the SCION daemon and the application is extended, so that the application gets the two authenticators necessary to calculate the PHVF and LHVF when fetching paths from the daemon. - `snet` contains the major logic behind the creation of EPIC packets, where `snet/path` keeps the necessary state and uses it to create the PHVF and LHVF when the packet is serialized. - There is an additional argument "--epic" for the ping, traceroute, showpaths, end2end_integration, and scion_integration tools. The argument enables those tools to send EPIC-HP path type packets (if paths with the necessary EPIC authenticators are available). Closes #4079 GitOrigin-RevId: f7436eb98840064fc905d56602ae8d65f7f44106

Commit:4f27eaf
Author:Dominik Roos
Committer:Dominik Roos

capnp: clean up further traces Remove more traces of capnp in our codebase. What remains is some mention of capnp in documentation. But that documentation is either a proposal, or already outdated. Thus, in the historical context it makes sense for capnp to be there. GitOrigin-RevId: 9b262e4c8d723682746c1e584f0d64d85a8e1083

Commit:968b508
Author:mawyss
Committer:Dominik Roos

epic-hp: controlplane This PR implements the EPIC control plane changes as described in [1]. It improves the structure of the previous PR [2] according to the suggestion from [3]. - Add an EPICDetachedExtension to the beacon. This extension does not get signed and can therefore be detached. - Add a DigestExtension to the PathSegmentExtensions, which holds the hash of EPICDetachedExtension. This hash is therefore signed. - Overhead: no new MAC needs to be calculated, only one additional hash per AS. [1] https://scion.docs.anapaya.net/en/latest/EPIC.html#control-plane [2] https://github.com/scionproto/scion/pull/3944 [3] https://github.com/scionproto/scion/commit/3a5ea8e8bce43ccb4407ce2e2056475c9320820c Closes #3954 GitOrigin-RevId: 44aea772d6021366b7dc8da5de8d7cc1a7b1ad61

Commit:af355f0
Author:Samuel Hitz
Committer:Dominik Roos

ca: add support for CMS enveloped chain renewal requests This PR adds support for CMS enveloped chain renewal requests. For the moment, both formats, i.e., chain renewal enveloped in a protobuf signed message and in a CMS message are supported, with precedence given to the CMS envelop. Also, reworked crypto generation for the new tests and regenerated the legacy crypto. GitOrigin-RevId: d59fc67299f8345d4937e50aba08d77c127b2f6b

Commit:09a7a00
Author:Lukas Vogel
Committer:Lukas Vogel

ci: add license checker

Commit:1109e17
Author:Lukas Vogel
Committer:Sergiu Costea

hp: sign/verify request/registration Sign/Verify hidden segment authoritative requests, for this we create a separate authoritative server. Sign/Verify hidden segment registrations.

Commit:977bc77
Author:Sergiu Costea
Committer:GitHub

Publish manuals for SCION apps (#3938) Also includes some Hidden Paths work and miscellaneous fixes. Co-authored-by: <hitz@anapaya.net> Co-authored-by: <karampogias@anapaya.net> Co-authored-by: <roos@anapaya.net> Co-authored-by: <vogel@anapaya.net>

Commit:573a657
Author:Dominik Roos
Committer:GitHub

posix-gateway: add new implementation (#3932) Add a completely overhauled SCION Internet gateway. The inner workings have completely changed. The posix-gateway now has dynamic IP prefix discovery. To manage the IP prefix discovery a routing policy file is used. (see: go/pkg/gateway/routing/doc.go) Gateway to Gateway probing is now running on fixed port 30856 instead of 30256. We will use 30256 for remote prefix discovery. The posix-gateway now supports prefix pinning. To manage the prefix pinning the `allow_interfaces` property in the gateway section of the topology file can be used. The TOML configs have to be changed in the following way: - The ip and ctrl_port fields are merged into a ctrl_addr field. - The encap_port field was replaced by data_addr field. This allows for different IP addresses between the control and data address. - The tunneling configuration is extracted in a separate [tunnel] section. - Renames: - [sig] is renamed to [gateway] - sig.sig_config is renamed to gateway.traffic_policy_file - sig.tun is renamed to tunnel.name - sig.tun_routing_table_id is renamed to tunnel.routing_table_id The posix-gateway has completely revamped metrics (see: go/pkg/gateway/metrics.go) Co-authored-by: Konstantinos Karampogias <karampok@anapaya.net> Co-authored-by: Lukas Vogel <vogel@anapaya.net> Co-authored-by: Sergiu Costea <costea@anapaya.net> Co-authored-by: Martin Sustrik <sustrik@anapaya.net> Co-authored-by: Samuel Hitz <hitz@anapaya.net>

Commit:3c7fb10
Author:Matthias Frei
Committer:GitHub

snet/sciond: add static info metadata fields to snet.PathMetadata (#3924) Add static info metadata fields, from their temporary location in the path combinator to `snet.PathMetadata`. Add these fields to the sciond protobuf protocol definitions to transport this information along with sciond path replies.

Commit:5a0966a
Author:Matthias Frei
Committer:GitHub

port StaticInfoExtension to grpc, reimplement StaticInfo in combinator (#3899) Add all the previously described metadata, latency, link type, geographical information, bandwidth, number of AS internal hops and generic notes. Simplify & streamline the representation of the data by using maps instead of lists, in both the protocol and the related higher-level go structs. Re-implement the extraction of the metadata in the path combinator. Instead doing the complicated walk over the `pathSolution` with explicitly handling cross over and peering etc, use the already created path to guide this. Converts the data directly into a form that will eventually be the representation used in `snet.PathMetadata`. Now explicitly handles conflicting information.

Commit:74cf9b9
Author:Matthias Frei
Committer:GitHub

combinator: remove legacy Combine (#3892) additionally remove deprecated ISD field from path segment.

Commit:f69ffb2
Author:Dominik Roos
Committer:GitHub

header: the one before dropping legacy header (#3890) The following pull request finalizes the new header format on the wire. Moving forward, the data and control plane should be backwards and forwards compatible. Following is changed in the wire format: - Paths are renumbered, empty path is now 0, SCION path 1... - BFD uses empty path for AS internal sessions and one-hop paths for inter-AS sessions. - Service resolution requests now use a protobuf in the request to ensure we can add additional data (if ever needed) in a backwards/forwards compatible way. This pull request inverts the feature flag for applications such as `scion`, `scion-pki`, and integration tests. Instead of specifying `--features=header_v2`, now, header v2 is used by default and `--features=header_legacy` needs to be specified to use legacy paths. The config files do not change.

Commit:6a8fd3a
Author:Dominik Roos
Committer:GitHub

seg: switch path segment representation from capnp to protobuf (#3874) Switch the path segment representation from capnp to protobuf. The protobuf representation makes a clean split between control plane and data plane representation of a hop field. We do no longer encode the data plane wire format in the control plane path segments. `go/lib/ctrl/seg` is now only the application representation of the path segments. The application representation can be encoded in the wire format using `seg.PathSegmentToPB`. The applications are responsible for serialization and deserialization themselves. This is no longer handled be the `seg` package. The functionality is moved to the `pathdb` and `beacon` packages. Signatures are now created more cleanly with the concept of associated data. Not all extensions are ported. Some are destined to disappear, and some are not yet ported. For example the static info extension will be ported at a later stage. Thus, a lot of code regarding static info was disabled. Even after this PR, code is still tainted by path_mgmt in a lot of places, but it is now mostly used as a container for segments and revocations. When we drop header v1 support, and we get rid of revocations, we can start removing path_mgmt everywhere

Commit:073e838
Author:Lukas Vogel
Committer:GitHub

signed: add associated data (#3870) In order to sign path segments, we need the concept of associated data, i.e., data that is covered by the signature, but is not included in the header and body. Co-authored-by: Dominik Roos <roos@anapaya.net>

Commit:9f7e853
Author:Dominik Roos
Committer:Lukas Vogel

proto: translate path segment Translate path segment to protobuf format. A lot of duplicate/redundant/obsolete information is dropped with the move from capnp to protobuf. The only extension that is currently planed to be ported is static info, but this will be done at a later stage, since this can be done in a backwards compatible change.

Commit:1211f4c
Author:Dominik Roos
Committer:Lukas Vogel

renewal: translate to protobuf Translate the certificate renewal protocol to use protobuf instead of capnp. Additionally, add `UnverifiedHeader` and `UnverifiedBody` types to `go/lib/scrypto/signed` to allow extracting unverified parts of a message. This enables the type system to aid with detecting unsafe use of unverified data.

Commit:5f98271
Author:Dominik Roos
Committer:Lukas Vogel

proto: define SignedMessage Define signed message in protobuf. This will be used for signing AS entries and certificate renewal requests. In addition to the protobuf definition, `go/lib/scrypto/signed` is introduced. The library provides a safe API to sign and verify signed messages. Future use of signed messages will always go through this library.

Commit:a712150
Author:Dominik Roos
Committer:Lukas Vogel

proto: translate svc resolution Translate service resolution to protobuf.

Commit:2009432
Author:Dominik Roos
Committer:GitHub

protocol: add gRPC messenger and header v2 (#3862) This PR introduces major breaking changes to both the control and data plane of SCION we have been working on for the last couple of months. Control plane: The messenger stack is switched from our homegrown messenger stack to gRPC over QUIC/SCION and TCP/IP. This gives us many advantages, i.a., decreased maintenance efforts, battle tested implementation, designed for extensibility, access to a large eco system of tools, proper session management. AS-Internal communication is switched from a mix of legacy messenger over UDP/SCION and TCP/IP to just gRPC over TCP/IP. This is an AS internal detail and is not discoverable by non-local ASes. Host local communication between applications and SCION Daemon are switched from custom capnp protocol to gRPC over TCP/IP. As a major benefit, the SCION daemon can now do proper error signaling. Communication between ASes is switched from mix of legacy messenger over UDP/SCION and QUIC/SCION to gRPC over QUIC/SCION, and until v2 header is rolled out, to a minimal legacy UDP/SCION stack that does the keepalives. Main benefit here will be that gRPC does session monitoring, and will be able to route around black holes out of the box. The messages are translated from capnp to protobuf. Some parts are not yet completely ported, e.g., segements or certificate renewal, or not yet ported at all. This will happen in follow up PRs. Segments will also be translated to protobuf. Legacy capnp definitions are still kept around, until everything is ported or discarded. Data plane: This PR also bundles the header v2 efforts on the client side. Via a feature flag, applications, such as `scion`, `cs`, and integration tests can be switched to use the new header design. The efforts for the router are currently not complete, and the code will be added in a follow up PR. Misc: Because this is a major change and we worked on this internally for quite some time, we have to bundle it together, and cannot provide a clean git history with individual commits. In this PR there are a lot of small changes that went in during this time. For example, various doc improvements, minor fixes to `scion` tool and testing pipeline. Co-authored-by: Konstantinos <karampogias@anapaya.net> Co-authored-by: Lukas Vogel <vogel@anapaya.net> Co-authored-by: Sergiu Costea <costea@anapaya.net>