Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: tokenserver/api/admin/v1/config.pb.go

Issue 2785973002: token-server: Add protos for new API for generating service account tokens. (Closed)
Patch Set: more nits Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tokenserver/api/admin/v1/config.pb.go
diff --git a/tokenserver/api/admin/v1/config.pb.go b/tokenserver/api/admin/v1/config.pb.go
index c2a74790f7b2feb391e2af4c691156368eb682b9..1e8ab4c64364ea17816a2d75b86091efaa32c6f8 100644
--- a/tokenserver/api/admin/v1/config.pb.go
+++ b/tokenserver/api/admin/v1/config.pb.go
@@ -294,12 +294,67 @@ func (m *DelegationRule) GetMaxValidityDuration() int64 {
return 0
}
+// ServiceAccountsPermissions is read from service_accounts.cfg in luci-config.
+type ServiceAccountsPermissions struct {
+ // Rules specify how MintOAuthTokenViaGrant can be used.
+ //
+ // Rules are evaluated independently. One and only one rule should match the
+ // request to allow the operation. If none rules or more than one rule match,
+ // the request will be denied.
+ //
+ // See ServiceAccountRule comments for more details.
+ Rules []*ServiceAccountRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
+}
+
+func (m *ServiceAccountsPermissions) Reset() { *m = ServiceAccountsPermissions{} }
+func (m *ServiceAccountsPermissions) String() string { return proto.CompactTextString(m) }
+func (*ServiceAccountsPermissions) ProtoMessage() {}
+func (*ServiceAccountsPermissions) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
+
+func (m *ServiceAccountsPermissions) GetRules() []*ServiceAccountRule {
+ if m != nil {
+ return m.Rules
+ }
+ return nil
+}
+
+// ServiceAccountRule describes a single allowed case of using service accounts.
+//
+// TODO(vadimsh): Implement.
+type ServiceAccountRule struct {
+ // A descriptive name of this rule, for the audit log.
+ Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ // Email of developers that owns this rule, to know who to contact.
+ Owner []string `protobuf:"bytes,2,rep,name=owner" json:"owner,omitempty"`
+}
+
+func (m *ServiceAccountRule) Reset() { *m = ServiceAccountRule{} }
+func (m *ServiceAccountRule) String() string { return proto.CompactTextString(m) }
+func (*ServiceAccountRule) ProtoMessage() {}
+func (*ServiceAccountRule) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
+
+func (m *ServiceAccountRule) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *ServiceAccountRule) GetOwner() []string {
+ if m != nil {
+ return m.Owner
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*TokenServerConfig)(nil), "tokenserver.admin.TokenServerConfig")
proto.RegisterType((*CertificateAuthorityConfig)(nil), "tokenserver.admin.CertificateAuthorityConfig")
proto.RegisterType((*DomainConfig)(nil), "tokenserver.admin.DomainConfig")
proto.RegisterType((*DelegationPermissions)(nil), "tokenserver.admin.DelegationPermissions")
proto.RegisterType((*DelegationRule)(nil), "tokenserver.admin.DelegationRule")
+ proto.RegisterType((*ServiceAccountsPermissions)(nil), "tokenserver.admin.ServiceAccountsPermissions")
+ proto.RegisterType((*ServiceAccountRule)(nil), "tokenserver.admin.ServiceAccountRule")
}
func init() {
@@ -307,39 +362,41 @@ func init() {
}
var fileDescriptor2 = []byte{
- // 539 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x5f, 0x6f, 0xd3, 0x3c,
- 0x18, 0xc5, 0x95, 0x3f, 0xcd, 0x52, 0xbf, 0xdb, 0xde, 0xce, 0x74, 0xc3, 0x02, 0x24, 0x4a, 0x25,
- 0xa4, 0x72, 0xb1, 0x46, 0x0c, 0x24, 0xae, 0xb8, 0x98, 0xd6, 0x9b, 0x55, 0x48, 0x4c, 0xd9, 0xe0,
- 0xd6, 0x72, 0x9d, 0xa7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e6, 0x80, 0x5f,
- 0xa1, 0xae, 0x81, 0x3b, 0x07, 0x95, 0xd5, 0x86, 0x44, 0x9e, 0x6c, 0x85, 0x3a, 0x3a, 0x93, 0x52,
- 0x6f, 0xa0, 0xa0, 0x56, 0x53, 0x51, 0xae, 0xc0, 0x54, 0x5a, 0x31, 0x0b, 0x24, 0xf6, 0xd6, 0x7e,
- 0x4b, 0x6f, 0xf4, 0xe5, 0x96, 0xe1, 0x77, 0xa8, 0xf7, 0x38, 0xc5, 0x5c, 0x21, 0x40, 0x71, 0xf0,
- 0x0d, 0x75, 0xf3, 0xff, 0x5b, 0xfd, 0xbc, 0x95, 0xf1, 0x5b, 0x74, 0x68, 0x99, 0x59, 0x80, 0xa5,
- 0x75, 0x50, 0xc1, 0x81, 0x24, 0xde, 0x78, 0xd0, 0xa8, 0xd7, 0x8d, 0x88, 0xcf, 0xd0, 0x71, 0xc9,
- 0xee, 0xe9, 0x9a, 0x49, 0x51, 0x08, 0xfb, 0x40, 0x0b, 0x67, 0x7c, 0x58, 0xb2, 0xe7, 0x1b, 0x78,
- 0x56, 0xb2, 0xfb, 0xef, 0x2d, 0x9b, 0xb4, 0x68, 0x96, 0xf8, 0xdf, 0xea, 0xc3, 0xaf, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0x68, 0x96, 0x3b, 0x9b, 0x97, 0x03, 0x00, 0x00,
+ // 574 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x5f, 0x4b, 0x1b, 0x4d,
+ 0x14, 0xc6, 0x49, 0xb2, 0x89, 0x9b, 0x79, 0xd5, 0x37, 0x4e, 0xa3, 0x1d, 0x6c, 0xa1, 0x69, 0x40,
+ 0x48, 0x2f, 0x4c, 0xa8, 0x2d, 0xf4, 0xa2, 0xb4, 0x20, 0xe6, 0xc6, 0x50, 0xa8, 0xac, 0xb6, 0xd0,
+ 0xab, 0x61, 0x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x53, 0x2f, 0x14, 0x18, 0x52, 0x0f,
+ 0xe9, 0xaa, 0x02, 0xbf, 0x44, 0x6d, 0x03, 0x37, 0x1e, 0xac, 0xd3, 0x86, 0x34, 0x02, 0x79, 0x14,
+ 0xca, 0xe8, 0x4c, 0x4a, 0xbd, 0x80, 0x9c, 0x3a, 0x4d, 0x45, 0x31, 0x07, 0x63, 0xb5, 0x62, 0x0e,
+ 0x48, 0x12, 0xac, 0xdd, 0x48, 0x2f, 0xf4, 0xe9, 0x23, 0xc3, 0x6f, 0x50, 0xe7, 0xa1, 0x8b, 0xf9,
+ 0x5c, 0x80, 0xe2, 0x10, 0x2e, 0xd4, 0xce, 0xfe, 0x8f, 0xfa, 0x71, 0x94, 0xf1, 0x01, 0xda, 0x76,
+ 0xcc, 0x4c, 0xc1, 0xd1, 0x32, 0xa8, 0xe0, 0x40, 0x5a, 0xc1, 0xb8, 0x55, 0xa9, 0xe7, 0x95, 0x88,
+ 0x8f, 0xd0, 0x6e, 0xc1, 0xee, 0xe8, 0x2d, 0x93, 0x22, 0x17, 0xee, 0x9e, 0xe6, 0xde, 0x84, 0xb0,
+ 0x64, 0x23, 0x5c, 0xe0, 0x59, 0xc1, 0xee, 0xbe, 0x47, 0x36, 0x8e, 0xa8, 0xff, 0x03, 0xed, 0xc7,
+ 0xf6, 0x63, 0xce, 0xb5, 0x57, 0xce, 0x2e, 0x6f, 0xfb, 0xe3, 0xea, 0xb6, 0x0f, 0xd6, 0x6c, 0x7b,
+ 0xb5, 0x7b, 0x79, 0xe3, 0x9f, 0x11, 0x7e, 0x0a, 0xff, 0x7d, 0xe9, 0x97, 0xad, 0xf0, 0xc5, 0xbf,
+ 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x79, 0xa6, 0xb9, 0x32, 0x04, 0x00, 0x00,
}

Powered by Google App Engine
This is Rietveld 408576698