server.proto RawHistoryFolder
1// SPDX-License-Identifier: MIT
2
3syntax = "proto3";
4
5package ermite;
6
7// ServerService describes the server itself.
8service ServerService {
9 // GetVersion returns the server version and the optional capabilities of the
10 // contract it implements. It needs no authentication, so a client can call
11 // it first to check compatibility.
12 rpc GetVersion(GetVersionRequest) returns (GetVersionResponse);
13 // GetSigningKey returns the public key with which the server signs the
14 // commits it creates (squash merges, see MergeMode). It needs no
15 // authentication: the key is public, and anyone verifying a commit needs it.
16 // Servers that implement it list "signing_key" in
17 // GetVersionResponse.features.
18 rpc GetSigningKey(GetSigningKeyRequest) returns (GetSigningKeyResponse);
19}
20
21// GetVersionRequest is empty.
22message GetVersionRequest {}
23
24// GetVersionResponse describes the running server.
25message GetVersionResponse {
26 // Version is the server release, for example "v0.4.0", or "devel" for an
27 // untagged build. Informational: clients must not compare it to decide what
28 // is supported, they use features instead.
29 string version = 1;
30 // Features lists identifiers of the optional capabilities of the contract
31 // that this server implements, for example "repo.update" or
32 // "events.resume". A client that needs a capability missing from this list
33 // should warn instead of failing on an unimplemented RPC or ignored field.
34 // Identifiers are lowercase, dot-separated and never reused. The CI
35 // identifiers are "ci.runs" (RunService runs, jobs, logs, checks, and the
36 // run_updated and job_updated events), "ci.runs.filters" (ListRuns honours
37 // its filters) and "ci.runners" (RunnerService, and RunService.ListRunners
38 // and RemoveRunner). The CI execution identifiers are "ci.actions"
39 // (RunnerService.ResolveActions and Job.github_token), "ci.annotations"
40 // (annotations in UpdateJob and CompleteJob, and RunService.ListAnnotations)
41 // and "ci.summaries" (RunnerService.UploadSummary and
42 // RunService.GetStepSummaries). The CI platform identifiers are "ci.secrets"
43 // (SecretService, VariableService and EnvironmentService, and in Job the
44 // secrets, vars, environment, permissions and trusted fields and Run.trusted),
45 // "ci.dispatch" (RunService.DispatchWorkflow), "ci.concurrency"
46 // (CI_STATUS_PENDING and RunJob.concurrency_group) and "ci.cache" (Job.cache).
47 repeated string features = 2;
48}
49
50// GetSigningKeyRequest is empty.
51message GetSigningKeyRequest {}
52
53// GetSigningKeyResponse describes the commit signing key of the server.
54message GetSigningKeyResponse {
55 // PublicKey is the public key as one OpenSSH authorized_keys line, for
56 // example "ssh-ed25519 AAAA...". Commits are signed in the SSH signature
57 // format (SSHSIG).
58 string public_key = 1;
59 // Fingerprint is the SHA-256 fingerprint of the key, in the form
60 // "SHA256:<base64>" that ssh-keygen prints.
61 string fingerprint = 2;
62 // CommitterName is the name the server records as the committer of the
63 // commits it creates.
64 string committer_name = 3;
65 // CommitterEmail is the email address the server records as the committer of
66 // the commits it creates. It is the principal of allowed_signers.
67 string committer_email = 4;
68 // AllowedSigners is a ready-to-use line for an allowed signers file
69 // ("<committer_email> <public_key>"), to verify these commits with
70 // "git config gpg.ssh.allowedSignersFile".
71 string allowed_signers = 5;
72}