File: config.proto

package info (click to toggle)
golang-github-smallstep-linkedca 0.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 580 kB
  • sloc: makefile: 61
file content (214 lines) | stat: -rw-r--r-- 6,280 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
syntax = "proto3";

package linkedca;

option go_package = "github.com/smallstep/linkedca";

import "google/protobuf/struct.proto";

import "linkedca/admin.proto";
import "linkedca/provisioners.proto";
import "linkedca/policy.proto";

// Configuration is the proto representation of a ca.json. Root keys and SSH
// public keys are not present in the ca.json but have been added here to be
// used in the initialization of a PKI.
message Configuration {
    string version = 1;
    repeated string root = 2;            // pem representation in files
    repeated string root_key = 3;        // pem representation in files
    repeated string federated_roots = 4; // pem representation in files
    string intermediate = 5;             // pem representation in files
    string intermediate_key = 6;         // pem representation in files
    string address = 7;
    string insecure_address = 8;
    repeated string dns_names = 9;
    SSH ssh = 10;
    KMS kms = 11;
    google.protobuf.Struct logger = 12;     // json representation
    google.protobuf.Struct db = 13;         // json representation
    google.protobuf.Struct monitoring = 14; // json representation
    Authority authority = 15;
    TLS tls = 16;
    ConfigTemplates templates = 17;
    bytes password = 18;
    map<string, bytes> files = 19;
}

// Defaults is the proto representation of the defaults.json, this file can be
// extended, so it will only contain the default fields.
message Defaults {
    string ca_url = 1;
    string ca_config = 2;
    string fingerprint = 3;
    string root = 4;
}

message Authority {
    enum Type {
        DEFAULT  = 0;
        SOFTCAS  = 1;
        CLOUDCAS = 2;
        STEPCAS  = 3;
    }

    // Authority id.
    string id = 1;
    
    // CAS specific properties.
    Type type = 2;
    string certificate_authority = 3;
    string certificate_authority_fingerprint = 4;
    CertificateIssuer certificate_issuer = 5;
    string credentials_file = 6;
    
    // Authority configuration.
    bool enable_admin = 7;
    repeated Provisioner provisioners = 8;
    repeated Admin admins = 9;
    DistinguishedName template = 10;
    Claims claims = 11;
    bool disable_issued_at_check = 12;
    string backdate = 13;
    string deployment_type = 14;
    Policy policy = 15;
}

message DistinguishedName {
    string country = 1;
    string organization = 2;
    string organizational_unit = 3;
    string locality = 4;
    string province = 5;
    string street_address = 6;
    string serial_number = 7;
    string common_name = 8;
}

message CertificateIssuer {
    enum Type {
        UNKNOWN = 0;
        JWK     = 1;
        X5C     = 2;
    }
    Type type = 1;
    string provisioner = 2;
    string certificate = 3;
    string key = 4;
    bytes password = 5;
}

message SSH {
    string host_key = 1;        // pem representation in files
    string user_key = 2;        // pem representation in files
    string host_public_key = 3; // ssh representation in files
    string user_public_key = 4; // ssh representation in files
    repeated SSHPublicKey keys = 5;
    string add_user_principal = 6;
    string add_user_command = 7;
    Bastion bastion = 8;
}

message SSHPublicKey {
    enum Type {
        UNKNOWN = 0;
        USER    = 1;
        HOST    = 2;
    }
    Type type = 1;
    bool federated = 2;
    google.protobuf.Struct key = 3;
}

message Bastion {
    string hostname = 1;
    string user = 2;
    string port = 3;
    string command = 4;
    string flags = 5;
}

message KMS {
    enum Type {
        DEFAULT     = 0;
        SOFTKMS     = 1;
        CLOUDKMS    = 2;
        AMAZONKMS   = 3;
        PKCS11      = 4;
        YUBIKEY     = 5;
        SSHAGENTKMS = 6;
        AZUREKMS    = 7;
    }
    Type type = 1;
    string credentialsFile = 2;
    string uri = 3;
    string pin = 4;
    string managementKey = 5;
    string region = 6;
    string profile = 7;
}

message TLS {
    enum CiperSuite {
        UNKNOWN                                       = 0;

        // TLS 1.0 - 1.2 cipher suites.
        TLS_RSA_WITH_RC4_128_SHA                      = 0x0005;
        TLS_RSA_WITH_3DES_EDE_CBC_SHA                 = 0x000a;
        TLS_RSA_WITH_AES_128_CBC_SHA                  = 0x002f;
        TLS_RSA_WITH_AES_256_CBC_SHA                  = 0x0035;
        TLS_RSA_WITH_AES_128_CBC_SHA256               = 0x003c;
        TLS_RSA_WITH_AES_128_GCM_SHA256               = 0x009c;
        TLS_RSA_WITH_AES_256_GCM_SHA384               = 0x009d;
        TLS_ECDHE_ECDSA_WITH_RC4_128_SHA              = 0xc007;
        TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA          = 0xc009;
        TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA          = 0xc00a;
        TLS_ECDHE_RSA_WITH_RC4_128_SHA                = 0xc011;
        TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA           = 0xc012;
        TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA            = 0xc013;
        TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA            = 0xc014;
        TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256       = 0xc023;
        TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256         = 0xc027;
        TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256         = 0xc02f;
        TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256       = 0xc02b;
        TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384         = 0xc030;
        TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384       = 0xc02c;
        TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256   = 0xcca8;
        TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xcca9;

        // TLS 1.3 cipher suites.
        TLS_AES_128_GCM_SHA256       = 0x1301;
        TLS_AES_256_GCM_SHA384       = 0x1302;
        TLS_CHACHA20_POLY1305_SHA256 = 0x1303;
    }
    repeated CiperSuite cipher_suites = 1;
    string min_version = 2;
    string max_version = 3;
    bool renegotiation = 4;
}

message ConfigTemplates {
    SSHConfigTemplate ssh = 1;
    google.protobuf.Struct data = 2;
}

message SSHConfigTemplate {
    repeated ConfigTemplate users = 1;
    repeated ConfigTemplate hosts = 2;
}

message ConfigTemplate {
    enum Type {
        UNKNOWN   = 0;
        SNIPPET   = 1;
        FILE      = 2;
        DIRECTORY = 3;
    }
    Type type = 1;
    string name = 2;
    string template = 3;
    string path = 4;
    string comment = 5;
    repeated string requires = 6;
    bytes content = 7;
}