From d529ea070e5b39d6d41eb589f4e7d2e7ed4323de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Gro=C3=9Fmann?= Date: Sun, 6 Dec 2026 13:38:49 +0100 Subject: [PATCH] feat(plugin): add trusted certificate operations to Authorize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AuthorizeRequest gains two operations, add_trusted_certificate and delete_trusted_certificate, so that an access control plugin can decide a change to the engine's list of trusted certificates. Each mirrors the engine RPC it authorizes: the oneof certificate holds what to trust or to remove per host OS, with the arms darwin and darwin_ad_hoc_binary. Windows and Linux have no arm yet. The messages carry what a person needs to approve the change. A certificate is described by DarwinSigningCertificate: its SHA-256 fingerprint, the subject's common name, organization and organizational unit, and its expiry. An add lists the applications to trust, each with the patterns of the secrets it may get. A delete lists the identifiers of the applications to remove, or none to remove the certificate. A binary signed ad hoc is named by its code directory hash and its identifier. Hashes are hex strings, as in SigningIdentity. The handler does not decode the new operations yet and still rejects them as "missing or unsupported operation". Signed-off-by: Johannes Großmann --- plugin/api/accesscontrol/v1/api.pb.go | 2522 ++++++++++++++++++------- plugin/api/accesscontrol/v1/api.proto | 74 + 2 files changed, 1946 insertions(+), 650 deletions(-) diff --git a/plugin/api/accesscontrol/v1/api.pb.go b/plugin/api/accesscontrol/v1/api.pb.go index f2fd480c..cfa55117 100644 --- a/plugin/api/accesscontrol/v1/api.pb.go +++ b/plugin/api/accesscontrol/v1/api.pb.go @@ -227,6 +227,24 @@ func (x *AuthorizeRequest) GetGetSecrets() *GetSecretsOperation { return nil } +func (x *AuthorizeRequest) GetAddTrustedCertificate() *AddTrustedCertificateOperation { + if x != nil { + if x, ok := x.xxx_hidden_Operation.(*authorizeRequest_AddTrustedCertificate); ok { + return x.AddTrustedCertificate + } + } + return nil +} + +func (x *AuthorizeRequest) GetDeleteTrustedCertificate() *DeleteTrustedCertificateOperation { + if x != nil { + if x, ok := x.xxx_hidden_Operation.(*authorizeRequest_DeleteTrustedCertificate); ok { + return x.DeleteTrustedCertificate + } + } + return nil +} + func (x *AuthorizeRequest) SetRequester(v *Requester) { x.xxx_hidden_Requester = v } @@ -239,6 +257,22 @@ func (x *AuthorizeRequest) SetGetSecrets(v *GetSecretsOperation) { x.xxx_hidden_Operation = &authorizeRequest_GetSecrets{v} } +func (x *AuthorizeRequest) SetAddTrustedCertificate(v *AddTrustedCertificateOperation) { + if v == nil { + x.xxx_hidden_Operation = nil + return + } + x.xxx_hidden_Operation = &authorizeRequest_AddTrustedCertificate{v} +} + +func (x *AuthorizeRequest) SetDeleteTrustedCertificate(v *DeleteTrustedCertificateOperation) { + if v == nil { + x.xxx_hidden_Operation = nil + return + } + x.xxx_hidden_Operation = &authorizeRequest_DeleteTrustedCertificate{v} +} + func (x *AuthorizeRequest) HasRequester() bool { if x == nil { return false @@ -261,6 +295,22 @@ func (x *AuthorizeRequest) HasGetSecrets() bool { return ok } +func (x *AuthorizeRequest) HasAddTrustedCertificate() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_Operation.(*authorizeRequest_AddTrustedCertificate) + return ok +} + +func (x *AuthorizeRequest) HasDeleteTrustedCertificate() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_Operation.(*authorizeRequest_DeleteTrustedCertificate) + return ok +} + func (x *AuthorizeRequest) ClearRequester() { x.xxx_hidden_Requester = nil } @@ -275,8 +325,22 @@ func (x *AuthorizeRequest) ClearGetSecrets() { } } +func (x *AuthorizeRequest) ClearAddTrustedCertificate() { + if _, ok := x.xxx_hidden_Operation.(*authorizeRequest_AddTrustedCertificate); ok { + x.xxx_hidden_Operation = nil + } +} + +func (x *AuthorizeRequest) ClearDeleteTrustedCertificate() { + if _, ok := x.xxx_hidden_Operation.(*authorizeRequest_DeleteTrustedCertificate); ok { + x.xxx_hidden_Operation = nil + } +} + const AuthorizeRequest_Operation_not_set_case case_AuthorizeRequest_Operation = 0 const AuthorizeRequest_GetSecrets_case case_AuthorizeRequest_Operation = 2 +const AuthorizeRequest_AddTrustedCertificate_case case_AuthorizeRequest_Operation = 3 +const AuthorizeRequest_DeleteTrustedCertificate_case case_AuthorizeRequest_Operation = 4 func (x *AuthorizeRequest) WhichOperation() case_AuthorizeRequest_Operation { if x == nil { @@ -285,6 +349,10 @@ func (x *AuthorizeRequest) WhichOperation() case_AuthorizeRequest_Operation { switch x.xxx_hidden_Operation.(type) { case *authorizeRequest_GetSecrets: return AuthorizeRequest_GetSecrets_case + case *authorizeRequest_AddTrustedCertificate: + return AuthorizeRequest_AddTrustedCertificate_case + case *authorizeRequest_DeleteTrustedCertificate: + return AuthorizeRequest_DeleteTrustedCertificate_case default: return AuthorizeRequest_Operation_not_set_case } @@ -297,7 +365,9 @@ type AuthorizeRequest_builder struct { // The operation to authorize; required. // Fields of oneof xxx_hidden_Operation: - GetSecrets *GetSecretsOperation + GetSecrets *GetSecretsOperation + AddTrustedCertificate *AddTrustedCertificateOperation + DeleteTrustedCertificate *DeleteTrustedCertificateOperation // -- end of xxx_hidden_Operation } @@ -309,6 +379,12 @@ func (b0 AuthorizeRequest_builder) Build() *AuthorizeRequest { if b.GetSecrets != nil { x.xxx_hidden_Operation = &authorizeRequest_GetSecrets{b.GetSecrets} } + if b.AddTrustedCertificate != nil { + x.xxx_hidden_Operation = &authorizeRequest_AddTrustedCertificate{b.AddTrustedCertificate} + } + if b.DeleteTrustedCertificate != nil { + x.xxx_hidden_Operation = &authorizeRequest_DeleteTrustedCertificate{b.DeleteTrustedCertificate} + } return m0 } @@ -330,8 +406,20 @@ type authorizeRequest_GetSecrets struct { GetSecrets *GetSecretsOperation `protobuf:"bytes,2,opt,name=get_secrets,json=getSecrets,oneof"` } +type authorizeRequest_AddTrustedCertificate struct { + AddTrustedCertificate *AddTrustedCertificateOperation `protobuf:"bytes,3,opt,name=add_trusted_certificate,json=addTrustedCertificate,oneof"` +} + +type authorizeRequest_DeleteTrustedCertificate struct { + DeleteTrustedCertificate *DeleteTrustedCertificateOperation `protobuf:"bytes,4,opt,name=delete_trusted_certificate,json=deleteTrustedCertificate,oneof"` +} + func (*authorizeRequest_GetSecrets) isAuthorizeRequest_Operation() {} +func (*authorizeRequest_AddTrustedCertificate) isAuthorizeRequest_Operation() {} + +func (*authorizeRequest_DeleteTrustedCertificate) isAuthorizeRequest_Operation() {} + type GetSecretsOperation struct { state protoimpl.MessageState `protogen:"opaque.v1"` xxx_hidden_Patterns []string `protobuf:"bytes,1,rep,name=patterns"` @@ -390,30 +478,29 @@ func (b0 GetSecretsOperation_builder) Build() *GetSecretsOperation { return m0 } -type AuthorizeResponse struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Decision Decision `protobuf:"varint,1,opt,name=decision,enum=accesscontrol.v1.Decision"` - xxx_hidden_ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt"` - XXX_raceDetectHookData protoimpl.RaceDetectHookData - XXX_presence [1]uint32 +// Trusts a code-signing certificate for applications it signed, or one +// binary signed ad hoc. +type AddTrustedCertificateOperation struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Certificate isAddTrustedCertificateOperation_Certificate `protobuf_oneof:"certificate"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AuthorizeResponse) Reset() { - *x = AuthorizeResponse{} +func (x *AddTrustedCertificateOperation) Reset() { + *x = AddTrustedCertificateOperation{} mi := &file_accesscontrol_v1_api_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AuthorizeResponse) String() string { +func (x *AddTrustedCertificateOperation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AuthorizeResponse) ProtoMessage() {} +func (*AddTrustedCertificateOperation) ProtoMessage() {} -func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message { +func (x *AddTrustedCertificateOperation) ProtoReflect() protoreflect.Message { mi := &file_accesscontrol_v1_api_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -425,102 +512,170 @@ func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *AuthorizeResponse) GetDecision() Decision { +func (x *AddTrustedCertificateOperation) GetDarwin() *AddTrustedCertificateOperation_DarwinCertificate { if x != nil { - if protoimpl.X.Present(&(x.XXX_presence[0]), 0) { - return x.xxx_hidden_Decision + if x, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_Darwin); ok { + return x.Darwin } } - return Decision_DECISION_DENY + return nil } -func (x *AuthorizeResponse) GetExpiresAt() *timestamppb.Timestamp { +func (x *AddTrustedCertificateOperation) GetDarwinAdHocBinary() *AddTrustedCertificateOperation_DarwinAdHocBinary { if x != nil { - return x.xxx_hidden_ExpiresAt + if x, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_DarwinAdHocBinary_); ok { + return x.DarwinAdHocBinary + } } return nil } -func (x *AuthorizeResponse) SetDecision(v Decision) { - x.xxx_hidden_Decision = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2) +func (x *AddTrustedCertificateOperation) SetDarwin(v *AddTrustedCertificateOperation_DarwinCertificate) { + if v == nil { + x.xxx_hidden_Certificate = nil + return + } + x.xxx_hidden_Certificate = &addTrustedCertificateOperation_Darwin{v} } -func (x *AuthorizeResponse) SetExpiresAt(v *timestamppb.Timestamp) { - x.xxx_hidden_ExpiresAt = v +func (x *AddTrustedCertificateOperation) SetDarwinAdHocBinary(v *AddTrustedCertificateOperation_DarwinAdHocBinary) { + if v == nil { + x.xxx_hidden_Certificate = nil + return + } + x.xxx_hidden_Certificate = &addTrustedCertificateOperation_DarwinAdHocBinary_{v} } -func (x *AuthorizeResponse) HasDecision() bool { +func (x *AddTrustedCertificateOperation) HasCertificate() bool { if x == nil { return false } - return protoimpl.X.Present(&(x.XXX_presence[0]), 0) + return x.xxx_hidden_Certificate != nil } -func (x *AuthorizeResponse) HasExpiresAt() bool { +func (x *AddTrustedCertificateOperation) HasDarwin() bool { if x == nil { return false } - return x.xxx_hidden_ExpiresAt != nil + _, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_Darwin) + return ok } -func (x *AuthorizeResponse) ClearDecision() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) - x.xxx_hidden_Decision = Decision_DECISION_DENY +func (x *AddTrustedCertificateOperation) HasDarwinAdHocBinary() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_DarwinAdHocBinary_) + return ok } -func (x *AuthorizeResponse) ClearExpiresAt() { - x.xxx_hidden_ExpiresAt = nil +func (x *AddTrustedCertificateOperation) ClearCertificate() { + x.xxx_hidden_Certificate = nil } -type AuthorizeResponse_builder struct { +func (x *AddTrustedCertificateOperation) ClearDarwin() { + if _, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_Darwin); ok { + x.xxx_hidden_Certificate = nil + } +} + +func (x *AddTrustedCertificateOperation) ClearDarwinAdHocBinary() { + if _, ok := x.xxx_hidden_Certificate.(*addTrustedCertificateOperation_DarwinAdHocBinary_); ok { + x.xxx_hidden_Certificate = nil + } +} + +const AddTrustedCertificateOperation_Certificate_not_set_case case_AddTrustedCertificateOperation_Certificate = 0 +const AddTrustedCertificateOperation_Darwin_case case_AddTrustedCertificateOperation_Certificate = 1 +const AddTrustedCertificateOperation_DarwinAdHocBinary_case case_AddTrustedCertificateOperation_Certificate = 2 + +func (x *AddTrustedCertificateOperation) WhichCertificate() case_AddTrustedCertificateOperation_Certificate { + if x == nil { + return AddTrustedCertificateOperation_Certificate_not_set_case + } + switch x.xxx_hidden_Certificate.(type) { + case *addTrustedCertificateOperation_Darwin: + return AddTrustedCertificateOperation_Darwin_case + case *addTrustedCertificateOperation_DarwinAdHocBinary_: + return AddTrustedCertificateOperation_DarwinAdHocBinary_case + default: + return AddTrustedCertificateOperation_Certificate_not_set_case + } +} + +type AddTrustedCertificateOperation_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // The authorization decision. - Decision *Decision - // When the authorization decision expires. - ExpiresAt *timestamppb.Timestamp + // What to trust, per host OS; required. + + // Fields of oneof xxx_hidden_Certificate: + Darwin *AddTrustedCertificateOperation_DarwinCertificate + DarwinAdHocBinary *AddTrustedCertificateOperation_DarwinAdHocBinary + // -- end of xxx_hidden_Certificate } -func (b0 AuthorizeResponse_builder) Build() *AuthorizeResponse { - m0 := &AuthorizeResponse{} +func (b0 AddTrustedCertificateOperation_builder) Build() *AddTrustedCertificateOperation { + m0 := &AddTrustedCertificateOperation{} b, x := &b0, m0 _, _ = b, x - if b.Decision != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2) - x.xxx_hidden_Decision = *b.Decision + if b.Darwin != nil { + x.xxx_hidden_Certificate = &addTrustedCertificateOperation_Darwin{b.Darwin} + } + if b.DarwinAdHocBinary != nil { + x.xxx_hidden_Certificate = &addTrustedCertificateOperation_DarwinAdHocBinary_{b.DarwinAdHocBinary} } - x.xxx_hidden_ExpiresAt = b.ExpiresAt return m0 } -type Requester struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Pid int32 `protobuf:"varint,1,opt,name=pid"` - xxx_hidden_Name *string `protobuf:"bytes,2,opt,name=name"` - xxx_hidden_AbsoluteBinaryPath *string `protobuf:"bytes,3,opt,name=absolute_binary_path,json=absoluteBinaryPath"` - xxx_hidden_SignedByDocker bool `protobuf:"varint,4,opt,name=signed_by_docker,json=signedByDocker"` - xxx_hidden_SigningInfo isRequester_SigningInfo `protobuf_oneof:"signing_info"` - XXX_raceDetectHookData protoimpl.RaceDetectHookData - XXX_presence [1]uint32 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type case_AddTrustedCertificateOperation_Certificate protoreflect.FieldNumber + +func (x case_AddTrustedCertificateOperation_Certificate) String() string { + md := file_accesscontrol_v1_api_proto_msgTypes[2].Descriptor() + if x == 0 { + return "not set" + } + return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) } -func (x *Requester) Reset() { - *x = Requester{} +type isAddTrustedCertificateOperation_Certificate interface { + isAddTrustedCertificateOperation_Certificate() +} + +type addTrustedCertificateOperation_Darwin struct { + Darwin *AddTrustedCertificateOperation_DarwinCertificate `protobuf:"bytes,1,opt,name=darwin,oneof"` +} + +type addTrustedCertificateOperation_DarwinAdHocBinary_ struct { + DarwinAdHocBinary *AddTrustedCertificateOperation_DarwinAdHocBinary `protobuf:"bytes,2,opt,name=darwin_ad_hoc_binary,json=darwinAdHocBinary,oneof"` +} + +func (*addTrustedCertificateOperation_Darwin) isAddTrustedCertificateOperation_Certificate() {} + +func (*addTrustedCertificateOperation_DarwinAdHocBinary_) isAddTrustedCertificateOperation_Certificate() { +} + +// Removes a trusted certificate, applications of one, or a trusted binary. +type DeleteTrustedCertificateOperation struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Certificate isDeleteTrustedCertificateOperation_Certificate `protobuf_oneof:"certificate"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteTrustedCertificateOperation) Reset() { + *x = DeleteTrustedCertificateOperation{} mi := &file_accesscontrol_v1_api_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Requester) String() string { +func (x *DeleteTrustedCertificateOperation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Requester) ProtoMessage() {} +func (*DeleteTrustedCertificateOperation) ProtoMessage() {} -func (x *Requester) ProtoReflect() protoreflect.Message { +func (x *DeleteTrustedCertificateOperation) ProtoReflect() protoreflect.Message { mi := &file_accesscontrol_v1_api_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -532,340 +687,1383 @@ func (x *Requester) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *Requester) GetPid() int32 { - if x != nil { - return x.xxx_hidden_Pid - } - return 0 -} - -func (x *Requester) GetName() string { - if x != nil { - if x.xxx_hidden_Name != nil { - return *x.xxx_hidden_Name - } - return "" - } - return "" -} - -func (x *Requester) GetAbsoluteBinaryPath() string { - if x != nil { - if x.xxx_hidden_AbsoluteBinaryPath != nil { - return *x.xxx_hidden_AbsoluteBinaryPath - } - return "" - } - return "" -} - -func (x *Requester) GetSignedByDocker() bool { - if x != nil { - return x.xxx_hidden_SignedByDocker - } - return false -} - -func (x *Requester) GetDarwin() *DarwinSigningInfo { +func (x *DeleteTrustedCertificateOperation) GetDarwin() *DeleteTrustedCertificateOperation_DarwinCertificate { if x != nil { - if x, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin); ok { + if x, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_Darwin); ok { return x.Darwin } } return nil } -func (x *Requester) GetWindows() *WindowsSigningInfo { - if x != nil { - if x, ok := x.xxx_hidden_SigningInfo.(*requester_Windows); ok { - return x.Windows - } - } - return nil -} - -func (x *Requester) GetLinux() *LinuxSigningInfo { +func (x *DeleteTrustedCertificateOperation) GetDarwinAdHocBinary() *DeleteTrustedCertificateOperation_DarwinAdHocBinary { if x != nil { - if x, ok := x.xxx_hidden_SigningInfo.(*requester_Linux); ok { - return x.Linux + if x, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_DarwinAdHocBinary_); ok { + return x.DarwinAdHocBinary } } return nil } -func (x *Requester) SetPid(v int32) { - x.xxx_hidden_Pid = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 5) -} - -func (x *Requester) SetName(v string) { - x.xxx_hidden_Name = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 5) -} - -func (x *Requester) SetAbsoluteBinaryPath(v string) { - x.xxx_hidden_AbsoluteBinaryPath = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 5) -} - -func (x *Requester) SetSignedByDocker(v bool) { - x.xxx_hidden_SignedByDocker = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 5) -} - -func (x *Requester) SetDarwin(v *DarwinSigningInfo) { +func (x *DeleteTrustedCertificateOperation) SetDarwin(v *DeleteTrustedCertificateOperation_DarwinCertificate) { if v == nil { - x.xxx_hidden_SigningInfo = nil + x.xxx_hidden_Certificate = nil return } - x.xxx_hidden_SigningInfo = &requester_Darwin{v} + x.xxx_hidden_Certificate = &deleteTrustedCertificateOperation_Darwin{v} } -func (x *Requester) SetWindows(v *WindowsSigningInfo) { +func (x *DeleteTrustedCertificateOperation) SetDarwinAdHocBinary(v *DeleteTrustedCertificateOperation_DarwinAdHocBinary) { if v == nil { - x.xxx_hidden_SigningInfo = nil + x.xxx_hidden_Certificate = nil return } - x.xxx_hidden_SigningInfo = &requester_Windows{v} + x.xxx_hidden_Certificate = &deleteTrustedCertificateOperation_DarwinAdHocBinary_{v} } -func (x *Requester) SetLinux(v *LinuxSigningInfo) { - if v == nil { - x.xxx_hidden_SigningInfo = nil - return +func (x *DeleteTrustedCertificateOperation) HasCertificate() bool { + if x == nil { + return false } - x.xxx_hidden_SigningInfo = &requester_Linux{v} + return x.xxx_hidden_Certificate != nil } -func (x *Requester) HasPid() bool { +func (x *DeleteTrustedCertificateOperation) HasDarwin() bool { if x == nil { return false } - return protoimpl.X.Present(&(x.XXX_presence[0]), 0) + _, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_Darwin) + return ok } -func (x *Requester) HasName() bool { +func (x *DeleteTrustedCertificateOperation) HasDarwinAdHocBinary() bool { if x == nil { return false } - return protoimpl.X.Present(&(x.XXX_presence[0]), 1) + _, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_DarwinAdHocBinary_) + return ok } -func (x *Requester) HasAbsoluteBinaryPath() bool { - if x == nil { - return false +func (x *DeleteTrustedCertificateOperation) ClearCertificate() { + x.xxx_hidden_Certificate = nil +} + +func (x *DeleteTrustedCertificateOperation) ClearDarwin() { + if _, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_Darwin); ok { + x.xxx_hidden_Certificate = nil } - return protoimpl.X.Present(&(x.XXX_presence[0]), 2) } -func (x *Requester) HasSignedByDocker() bool { - if x == nil { - return false +func (x *DeleteTrustedCertificateOperation) ClearDarwinAdHocBinary() { + if _, ok := x.xxx_hidden_Certificate.(*deleteTrustedCertificateOperation_DarwinAdHocBinary_); ok { + x.xxx_hidden_Certificate = nil } - return protoimpl.X.Present(&(x.XXX_presence[0]), 3) } -func (x *Requester) HasSigningInfo() bool { +const DeleteTrustedCertificateOperation_Certificate_not_set_case case_DeleteTrustedCertificateOperation_Certificate = 0 +const DeleteTrustedCertificateOperation_Darwin_case case_DeleteTrustedCertificateOperation_Certificate = 1 +const DeleteTrustedCertificateOperation_DarwinAdHocBinary_case case_DeleteTrustedCertificateOperation_Certificate = 2 + +func (x *DeleteTrustedCertificateOperation) WhichCertificate() case_DeleteTrustedCertificateOperation_Certificate { + if x == nil { + return DeleteTrustedCertificateOperation_Certificate_not_set_case + } + switch x.xxx_hidden_Certificate.(type) { + case *deleteTrustedCertificateOperation_Darwin: + return DeleteTrustedCertificateOperation_Darwin_case + case *deleteTrustedCertificateOperation_DarwinAdHocBinary_: + return DeleteTrustedCertificateOperation_DarwinAdHocBinary_case + default: + return DeleteTrustedCertificateOperation_Certificate_not_set_case + } +} + +type DeleteTrustedCertificateOperation_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // What to remove, per host OS; required. + + // Fields of oneof xxx_hidden_Certificate: + Darwin *DeleteTrustedCertificateOperation_DarwinCertificate + DarwinAdHocBinary *DeleteTrustedCertificateOperation_DarwinAdHocBinary + // -- end of xxx_hidden_Certificate +} + +func (b0 DeleteTrustedCertificateOperation_builder) Build() *DeleteTrustedCertificateOperation { + m0 := &DeleteTrustedCertificateOperation{} + b, x := &b0, m0 + _, _ = b, x + if b.Darwin != nil { + x.xxx_hidden_Certificate = &deleteTrustedCertificateOperation_Darwin{b.Darwin} + } + if b.DarwinAdHocBinary != nil { + x.xxx_hidden_Certificate = &deleteTrustedCertificateOperation_DarwinAdHocBinary_{b.DarwinAdHocBinary} + } + return m0 +} + +type case_DeleteTrustedCertificateOperation_Certificate protoreflect.FieldNumber + +func (x case_DeleteTrustedCertificateOperation_Certificate) String() string { + md := file_accesscontrol_v1_api_proto_msgTypes[3].Descriptor() + if x == 0 { + return "not set" + } + return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) +} + +type isDeleteTrustedCertificateOperation_Certificate interface { + isDeleteTrustedCertificateOperation_Certificate() +} + +type deleteTrustedCertificateOperation_Darwin struct { + Darwin *DeleteTrustedCertificateOperation_DarwinCertificate `protobuf:"bytes,1,opt,name=darwin,oneof"` +} + +type deleteTrustedCertificateOperation_DarwinAdHocBinary_ struct { + DarwinAdHocBinary *DeleteTrustedCertificateOperation_DarwinAdHocBinary `protobuf:"bytes,2,opt,name=darwin_ad_hoc_binary,json=darwinAdHocBinary,oneof"` +} + +func (*deleteTrustedCertificateOperation_Darwin) isDeleteTrustedCertificateOperation_Certificate() {} + +func (*deleteTrustedCertificateOperation_DarwinAdHocBinary_) isDeleteTrustedCertificateOperation_Certificate() { +} + +// A code-signing certificate, described by the fields a person reads to +// recognize it. +type DarwinSigningCertificate struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_FingerprintSha256 *string `protobuf:"bytes,1,opt,name=fingerprint_sha256,json=fingerprintSha256"` + xxx_hidden_CommonName *string `protobuf:"bytes,2,opt,name=common_name,json=commonName"` + xxx_hidden_Organization *string `protobuf:"bytes,3,opt,name=organization"` + xxx_hidden_OrganizationalUnit *string `protobuf:"bytes,4,opt,name=organizational_unit,json=organizationalUnit"` + xxx_hidden_ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DarwinSigningCertificate) Reset() { + *x = DarwinSigningCertificate{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DarwinSigningCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DarwinSigningCertificate) ProtoMessage() {} + +func (x *DarwinSigningCertificate) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *DarwinSigningCertificate) GetFingerprintSha256() string { + if x != nil { + if x.xxx_hidden_FingerprintSha256 != nil { + return *x.xxx_hidden_FingerprintSha256 + } + return "" + } + return "" +} + +func (x *DarwinSigningCertificate) GetCommonName() string { + if x != nil { + if x.xxx_hidden_CommonName != nil { + return *x.xxx_hidden_CommonName + } + return "" + } + return "" +} + +func (x *DarwinSigningCertificate) GetOrganization() string { + if x != nil { + if x.xxx_hidden_Organization != nil { + return *x.xxx_hidden_Organization + } + return "" + } + return "" +} + +func (x *DarwinSigningCertificate) GetOrganizationalUnit() string { + if x != nil { + if x.xxx_hidden_OrganizationalUnit != nil { + return *x.xxx_hidden_OrganizationalUnit + } + return "" + } + return "" +} + +func (x *DarwinSigningCertificate) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.xxx_hidden_ExpiresAt + } + return nil +} + +func (x *DarwinSigningCertificate) SetFingerprintSha256(v string) { + x.xxx_hidden_FingerprintSha256 = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 5) +} + +func (x *DarwinSigningCertificate) SetCommonName(v string) { + x.xxx_hidden_CommonName = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 5) +} + +func (x *DarwinSigningCertificate) SetOrganization(v string) { + x.xxx_hidden_Organization = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 5) +} + +func (x *DarwinSigningCertificate) SetOrganizationalUnit(v string) { + x.xxx_hidden_OrganizationalUnit = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 5) +} + +func (x *DarwinSigningCertificate) SetExpiresAt(v *timestamppb.Timestamp) { + x.xxx_hidden_ExpiresAt = v +} + +func (x *DarwinSigningCertificate) HasFingerprintSha256() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *DarwinSigningCertificate) HasCommonName() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *DarwinSigningCertificate) HasOrganization() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 2) +} + +func (x *DarwinSigningCertificate) HasOrganizationalUnit() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 3) +} + +func (x *DarwinSigningCertificate) HasExpiresAt() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExpiresAt != nil +} + +func (x *DarwinSigningCertificate) ClearFingerprintSha256() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_FingerprintSha256 = nil +} + +func (x *DarwinSigningCertificate) ClearCommonName() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_CommonName = nil +} + +func (x *DarwinSigningCertificate) ClearOrganization() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2) + x.xxx_hidden_Organization = nil +} + +func (x *DarwinSigningCertificate) ClearOrganizationalUnit() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3) + x.xxx_hidden_OrganizationalUnit = nil +} + +func (x *DarwinSigningCertificate) ClearExpiresAt() { + x.xxx_hidden_ExpiresAt = nil +} + +type DarwinSigningCertificate_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The hex-encoded SHA-256 hash of the certificate's DER encoding. + FingerprintSha256 *string + // Subject common name; display only. + CommonName *string + // Subject organization; display only. + Organization *string + // Subject organizational unit: the Team ID on a certificate Apple issued. + OrganizationalUnit *string + // When the certificate expires. + ExpiresAt *timestamppb.Timestamp +} + +func (b0 DarwinSigningCertificate_builder) Build() *DarwinSigningCertificate { + m0 := &DarwinSigningCertificate{} + b, x := &b0, m0 + _, _ = b, x + if b.FingerprintSha256 != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 5) + x.xxx_hidden_FingerprintSha256 = b.FingerprintSha256 + } + if b.CommonName != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 5) + x.xxx_hidden_CommonName = b.CommonName + } + if b.Organization != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 5) + x.xxx_hidden_Organization = b.Organization + } + if b.OrganizationalUnit != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 5) + x.xxx_hidden_OrganizationalUnit = b.OrganizationalUnit + } + x.xxx_hidden_ExpiresAt = b.ExpiresAt + return m0 +} + +type AuthorizeResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Decision Decision `protobuf:"varint,1,opt,name=decision,enum=accesscontrol.v1.Decision"` + xxx_hidden_ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthorizeResponse) Reset() { + *x = AuthorizeResponse{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthorizeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthorizeResponse) ProtoMessage() {} + +func (x *AuthorizeResponse) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *AuthorizeResponse) GetDecision() Decision { + if x != nil { + if protoimpl.X.Present(&(x.XXX_presence[0]), 0) { + return x.xxx_hidden_Decision + } + } + return Decision_DECISION_DENY +} + +func (x *AuthorizeResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.xxx_hidden_ExpiresAt + } + return nil +} + +func (x *AuthorizeResponse) SetDecision(v Decision) { + x.xxx_hidden_Decision = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2) +} + +func (x *AuthorizeResponse) SetExpiresAt(v *timestamppb.Timestamp) { + x.xxx_hidden_ExpiresAt = v +} + +func (x *AuthorizeResponse) HasDecision() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *AuthorizeResponse) HasExpiresAt() bool { + if x == nil { + return false + } + return x.xxx_hidden_ExpiresAt != nil +} + +func (x *AuthorizeResponse) ClearDecision() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_Decision = Decision_DECISION_DENY +} + +func (x *AuthorizeResponse) ClearExpiresAt() { + x.xxx_hidden_ExpiresAt = nil +} + +type AuthorizeResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // The authorization decision. + Decision *Decision + // When the authorization decision expires. + ExpiresAt *timestamppb.Timestamp +} + +func (b0 AuthorizeResponse_builder) Build() *AuthorizeResponse { + m0 := &AuthorizeResponse{} + b, x := &b0, m0 + _, _ = b, x + if b.Decision != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2) + x.xxx_hidden_Decision = *b.Decision + } + x.xxx_hidden_ExpiresAt = b.ExpiresAt + return m0 +} + +type Requester struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Pid int32 `protobuf:"varint,1,opt,name=pid"` + xxx_hidden_Name *string `protobuf:"bytes,2,opt,name=name"` + xxx_hidden_AbsoluteBinaryPath *string `protobuf:"bytes,3,opt,name=absolute_binary_path,json=absoluteBinaryPath"` + xxx_hidden_SignedByDocker bool `protobuf:"varint,4,opt,name=signed_by_docker,json=signedByDocker"` + xxx_hidden_SigningInfo isRequester_SigningInfo `protobuf_oneof:"signing_info"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Requester) Reset() { + *x = Requester{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Requester) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Requester) ProtoMessage() {} + +func (x *Requester) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *Requester) GetPid() int32 { + if x != nil { + return x.xxx_hidden_Pid + } + return 0 +} + +func (x *Requester) GetName() string { + if x != nil { + if x.xxx_hidden_Name != nil { + return *x.xxx_hidden_Name + } + return "" + } + return "" +} + +func (x *Requester) GetAbsoluteBinaryPath() string { + if x != nil { + if x.xxx_hidden_AbsoluteBinaryPath != nil { + return *x.xxx_hidden_AbsoluteBinaryPath + } + return "" + } + return "" +} + +func (x *Requester) GetSignedByDocker() bool { + if x != nil { + return x.xxx_hidden_SignedByDocker + } + return false +} + +func (x *Requester) GetDarwin() *DarwinSigningInfo { + if x != nil { + if x, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin); ok { + return x.Darwin + } + } + return nil +} + +func (x *Requester) GetWindows() *WindowsSigningInfo { + if x != nil { + if x, ok := x.xxx_hidden_SigningInfo.(*requester_Windows); ok { + return x.Windows + } + } + return nil +} + +func (x *Requester) GetLinux() *LinuxSigningInfo { + if x != nil { + if x, ok := x.xxx_hidden_SigningInfo.(*requester_Linux); ok { + return x.Linux + } + } + return nil +} + +func (x *Requester) SetPid(v int32) { + x.xxx_hidden_Pid = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 5) +} + +func (x *Requester) SetName(v string) { + x.xxx_hidden_Name = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 5) +} + +func (x *Requester) SetAbsoluteBinaryPath(v string) { + x.xxx_hidden_AbsoluteBinaryPath = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 5) +} + +func (x *Requester) SetSignedByDocker(v bool) { + x.xxx_hidden_SignedByDocker = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 5) +} + +func (x *Requester) SetDarwin(v *DarwinSigningInfo) { + if v == nil { + x.xxx_hidden_SigningInfo = nil + return + } + x.xxx_hidden_SigningInfo = &requester_Darwin{v} +} + +func (x *Requester) SetWindows(v *WindowsSigningInfo) { + if v == nil { + x.xxx_hidden_SigningInfo = nil + return + } + x.xxx_hidden_SigningInfo = &requester_Windows{v} +} + +func (x *Requester) SetLinux(v *LinuxSigningInfo) { + if v == nil { + x.xxx_hidden_SigningInfo = nil + return + } + x.xxx_hidden_SigningInfo = &requester_Linux{v} +} + +func (x *Requester) HasPid() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *Requester) HasName() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *Requester) HasAbsoluteBinaryPath() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 2) +} + +func (x *Requester) HasSignedByDocker() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 3) +} + +func (x *Requester) HasSigningInfo() bool { + if x == nil { + return false + } + return x.xxx_hidden_SigningInfo != nil +} + +func (x *Requester) HasDarwin() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin) + return ok +} + +func (x *Requester) HasWindows() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_SigningInfo.(*requester_Windows) + return ok +} + +func (x *Requester) HasLinux() bool { + if x == nil { + return false + } + _, ok := x.xxx_hidden_SigningInfo.(*requester_Linux) + return ok +} + +func (x *Requester) ClearPid() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_Pid = 0 +} + +func (x *Requester) ClearName() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_Name = nil +} + +func (x *Requester) ClearAbsoluteBinaryPath() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2) + x.xxx_hidden_AbsoluteBinaryPath = nil +} + +func (x *Requester) ClearSignedByDocker() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3) + x.xxx_hidden_SignedByDocker = false +} + +func (x *Requester) ClearSigningInfo() { + x.xxx_hidden_SigningInfo = nil +} + +func (x *Requester) ClearDarwin() { + if _, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin); ok { + x.xxx_hidden_SigningInfo = nil + } +} + +func (x *Requester) ClearWindows() { + if _, ok := x.xxx_hidden_SigningInfo.(*requester_Windows); ok { + x.xxx_hidden_SigningInfo = nil + } +} + +func (x *Requester) ClearLinux() { + if _, ok := x.xxx_hidden_SigningInfo.(*requester_Linux); ok { + x.xxx_hidden_SigningInfo = nil + } +} + +const Requester_SigningInfo_not_set_case case_Requester_SigningInfo = 0 +const Requester_Darwin_case case_Requester_SigningInfo = 5 +const Requester_Windows_case case_Requester_SigningInfo = 6 +const Requester_Linux_case case_Requester_SigningInfo = 7 + +func (x *Requester) WhichSigningInfo() case_Requester_SigningInfo { + if x == nil { + return Requester_SigningInfo_not_set_case + } + switch x.xxx_hidden_SigningInfo.(type) { + case *requester_Darwin: + return Requester_Darwin_case + case *requester_Windows: + return Requester_Windows_case + case *requester_Linux: + return Requester_Linux_case + default: + return Requester_SigningInfo_not_set_case + } +} + +type Requester_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Pid *int32 + Name *string + AbsoluteBinaryPath *string + // Signature chains to Docker's signing identity. + SignedByDocker *bool + // Platform-specific signing context, per host OS. + + // Fields of oneof xxx_hidden_SigningInfo: + Darwin *DarwinSigningInfo + Windows *WindowsSigningInfo + Linux *LinuxSigningInfo + // -- end of xxx_hidden_SigningInfo +} + +func (b0 Requester_builder) Build() *Requester { + m0 := &Requester{} + b, x := &b0, m0 + _, _ = b, x + if b.Pid != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 5) + x.xxx_hidden_Pid = *b.Pid + } + if b.Name != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 5) + x.xxx_hidden_Name = b.Name + } + if b.AbsoluteBinaryPath != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 5) + x.xxx_hidden_AbsoluteBinaryPath = b.AbsoluteBinaryPath + } + if b.SignedByDocker != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 5) + x.xxx_hidden_SignedByDocker = *b.SignedByDocker + } + if b.Darwin != nil { + x.xxx_hidden_SigningInfo = &requester_Darwin{b.Darwin} + } + if b.Windows != nil { + x.xxx_hidden_SigningInfo = &requester_Windows{b.Windows} + } + if b.Linux != nil { + x.xxx_hidden_SigningInfo = &requester_Linux{b.Linux} + } + return m0 +} + +type case_Requester_SigningInfo protoreflect.FieldNumber + +func (x case_Requester_SigningInfo) String() string { + md := file_accesscontrol_v1_api_proto_msgTypes[6].Descriptor() + if x == 0 { + return "not set" + } + return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) +} + +type isRequester_SigningInfo interface { + isRequester_SigningInfo() +} + +type requester_Darwin struct { + Darwin *DarwinSigningInfo `protobuf:"bytes,5,opt,name=darwin,oneof"` +} + +type requester_Windows struct { + Windows *WindowsSigningInfo `protobuf:"bytes,6,opt,name=windows,oneof"` +} + +type requester_Linux struct { + Linux *LinuxSigningInfo `protobuf:"bytes,7,opt,name=linux,oneof"` +} + +func (*requester_Darwin) isRequester_SigningInfo() {} + +func (*requester_Windows) isRequester_SigningInfo() {} + +func (*requester_Linux) isRequester_SigningInfo() {} + +// macOS code-signing context (SecCode* APIs) for the requester and its +// process ancestry. +type DarwinSigningInfo struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Root *DarwinSigningInfo_SigningIdentity `protobuf:"bytes,1,opt,name=root"` + xxx_hidden_Leaf *DarwinSigningInfo_SigningIdentity `protobuf:"bytes,2,opt,name=leaf"` + xxx_hidden_Chain *[]*DarwinSigningInfo_ProcessNode `protobuf:"bytes,3,rep,name=chain"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DarwinSigningInfo) Reset() { + *x = DarwinSigningInfo{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DarwinSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DarwinSigningInfo) ProtoMessage() {} + +func (x *DarwinSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *DarwinSigningInfo) GetRoot() *DarwinSigningInfo_SigningIdentity { + if x != nil { + return x.xxx_hidden_Root + } + return nil +} + +func (x *DarwinSigningInfo) GetLeaf() *DarwinSigningInfo_SigningIdentity { + if x != nil { + return x.xxx_hidden_Leaf + } + return nil +} + +func (x *DarwinSigningInfo) GetChain() []*DarwinSigningInfo_ProcessNode { + if x != nil { + if x.xxx_hidden_Chain != nil { + return *x.xxx_hidden_Chain + } + } + return nil +} + +func (x *DarwinSigningInfo) SetRoot(v *DarwinSigningInfo_SigningIdentity) { + x.xxx_hidden_Root = v +} + +func (x *DarwinSigningInfo) SetLeaf(v *DarwinSigningInfo_SigningIdentity) { + x.xxx_hidden_Leaf = v +} + +func (x *DarwinSigningInfo) SetChain(v []*DarwinSigningInfo_ProcessNode) { + x.xxx_hidden_Chain = &v +} + +func (x *DarwinSigningInfo) HasRoot() bool { + if x == nil { + return false + } + return x.xxx_hidden_Root != nil +} + +func (x *DarwinSigningInfo) HasLeaf() bool { + if x == nil { + return false + } + return x.xxx_hidden_Leaf != nil +} + +func (x *DarwinSigningInfo) ClearRoot() { + x.xxx_hidden_Root = nil +} + +func (x *DarwinSigningInfo) ClearLeaf() { + x.xxx_hidden_Leaf = nil +} + +type DarwinSigningInfo_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Identity of the outermost recorded ancestor. + Root *DarwinSigningInfo_SigningIdentity + // Identity of the process that connected to the socket. + Leaf *DarwinSigningInfo_SigningIdentity + // Ancestry ordered root to leaf; may be a single node. + Chain []*DarwinSigningInfo_ProcessNode +} + +func (b0 DarwinSigningInfo_builder) Build() *DarwinSigningInfo { + m0 := &DarwinSigningInfo{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Root = b.Root + x.xxx_hidden_Leaf = b.Leaf + x.xxx_hidden_Chain = &b.Chain + return m0 +} + +// Windows Authenticode context for the requesting process. +type WindowsSigningInfo struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_TrustedChain bool `protobuf:"varint,1,opt,name=trusted_chain,json=trustedChain"` + xxx_hidden_SubjectOrg *string `protobuf:"bytes,2,opt,name=subject_org,json=subjectOrg"` + xxx_hidden_SubjectCommonName *string `protobuf:"bytes,3,opt,name=subject_common_name,json=subjectCommonName"` + xxx_hidden_Issuer *string `protobuf:"bytes,4,opt,name=issuer"` + xxx_hidden_ThumbprintSha256 *string `protobuf:"bytes,5,opt,name=thumbprint_sha256,json=thumbprintSha256"` + xxx_hidden_IsEv bool `protobuf:"varint,6,opt,name=is_ev,json=isEv"` + xxx_hidden_Integrity WindowsSigningInfo_IntegrityLevel `protobuf:"varint,7,opt,name=integrity,enum=accesscontrol.v1.WindowsSigningInfo_IntegrityLevel"` + xxx_hidden_CompanyName *string `protobuf:"bytes,8,opt,name=company_name,json=companyName"` + xxx_hidden_ProductName *string `protobuf:"bytes,9,opt,name=product_name,json=productName"` + xxx_hidden_FileVersion *string `protobuf:"bytes,10,opt,name=file_version,json=fileVersion"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WindowsSigningInfo) Reset() { + *x = WindowsSigningInfo{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WindowsSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WindowsSigningInfo) ProtoMessage() {} + +func (x *WindowsSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +func (x *WindowsSigningInfo) GetTrustedChain() bool { + if x != nil { + return x.xxx_hidden_TrustedChain + } + return false +} + +func (x *WindowsSigningInfo) GetSubjectOrg() string { + if x != nil { + if x.xxx_hidden_SubjectOrg != nil { + return *x.xxx_hidden_SubjectOrg + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetSubjectCommonName() string { + if x != nil { + if x.xxx_hidden_SubjectCommonName != nil { + return *x.xxx_hidden_SubjectCommonName + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetIssuer() string { + if x != nil { + if x.xxx_hidden_Issuer != nil { + return *x.xxx_hidden_Issuer + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetThumbprintSha256() string { + if x != nil { + if x.xxx_hidden_ThumbprintSha256 != nil { + return *x.xxx_hidden_ThumbprintSha256 + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetIsEv() bool { + if x != nil { + return x.xxx_hidden_IsEv + } + return false +} + +func (x *WindowsSigningInfo) GetIntegrity() WindowsSigningInfo_IntegrityLevel { + if x != nil { + if protoimpl.X.Present(&(x.XXX_presence[0]), 6) { + return x.xxx_hidden_Integrity + } + } + return WindowsSigningInfo_INTEGRITY_LEVEL_UNSPECIFIED +} + +func (x *WindowsSigningInfo) GetCompanyName() string { + if x != nil { + if x.xxx_hidden_CompanyName != nil { + return *x.xxx_hidden_CompanyName + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetProductName() string { + if x != nil { + if x.xxx_hidden_ProductName != nil { + return *x.xxx_hidden_ProductName + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) GetFileVersion() string { + if x != nil { + if x.xxx_hidden_FileVersion != nil { + return *x.xxx_hidden_FileVersion + } + return "" + } + return "" +} + +func (x *WindowsSigningInfo) SetTrustedChain(v bool) { + x.xxx_hidden_TrustedChain = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 10) +} + +func (x *WindowsSigningInfo) SetSubjectOrg(v string) { + x.xxx_hidden_SubjectOrg = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 10) +} + +func (x *WindowsSigningInfo) SetSubjectCommonName(v string) { + x.xxx_hidden_SubjectCommonName = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 10) +} + +func (x *WindowsSigningInfo) SetIssuer(v string) { + x.xxx_hidden_Issuer = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 10) +} + +func (x *WindowsSigningInfo) SetThumbprintSha256(v string) { + x.xxx_hidden_ThumbprintSha256 = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 4, 10) +} + +func (x *WindowsSigningInfo) SetIsEv(v bool) { + x.xxx_hidden_IsEv = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 5, 10) +} + +func (x *WindowsSigningInfo) SetIntegrity(v WindowsSigningInfo_IntegrityLevel) { + x.xxx_hidden_Integrity = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 6, 10) +} + +func (x *WindowsSigningInfo) SetCompanyName(v string) { + x.xxx_hidden_CompanyName = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 7, 10) +} + +func (x *WindowsSigningInfo) SetProductName(v string) { + x.xxx_hidden_ProductName = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 8, 10) +} + +func (x *WindowsSigningInfo) SetFileVersion(v string) { + x.xxx_hidden_FileVersion = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 9, 10) +} + +func (x *WindowsSigningInfo) HasTrustedChain() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *WindowsSigningInfo) HasSubjectOrg() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *WindowsSigningInfo) HasSubjectCommonName() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 2) +} + +func (x *WindowsSigningInfo) HasIssuer() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 3) +} + +func (x *WindowsSigningInfo) HasThumbprintSha256() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 4) +} + +func (x *WindowsSigningInfo) HasIsEv() bool { if x == nil { return false } - return x.xxx_hidden_SigningInfo != nil + return protoimpl.X.Present(&(x.XXX_presence[0]), 5) } -func (x *Requester) HasDarwin() bool { +func (x *WindowsSigningInfo) HasIntegrity() bool { if x == nil { return false } - _, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin) - return ok + return protoimpl.X.Present(&(x.XXX_presence[0]), 6) } -func (x *Requester) HasWindows() bool { +func (x *WindowsSigningInfo) HasCompanyName() bool { if x == nil { return false } - _, ok := x.xxx_hidden_SigningInfo.(*requester_Windows) - return ok + return protoimpl.X.Present(&(x.XXX_presence[0]), 7) } -func (x *Requester) HasLinux() bool { +func (x *WindowsSigningInfo) HasProductName() bool { if x == nil { return false } - _, ok := x.xxx_hidden_SigningInfo.(*requester_Linux) - return ok + return protoimpl.X.Present(&(x.XXX_presence[0]), 8) } -func (x *Requester) ClearPid() { +func (x *WindowsSigningInfo) HasFileVersion() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 9) +} + +func (x *WindowsSigningInfo) ClearTrustedChain() { protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) - x.xxx_hidden_Pid = 0 + x.xxx_hidden_TrustedChain = false } -func (x *Requester) ClearName() { +func (x *WindowsSigningInfo) ClearSubjectOrg() { protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) - x.xxx_hidden_Name = nil + x.xxx_hidden_SubjectOrg = nil } -func (x *Requester) ClearAbsoluteBinaryPath() { +func (x *WindowsSigningInfo) ClearSubjectCommonName() { protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2) - x.xxx_hidden_AbsoluteBinaryPath = nil + x.xxx_hidden_SubjectCommonName = nil } -func (x *Requester) ClearSignedByDocker() { +func (x *WindowsSigningInfo) ClearIssuer() { protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3) - x.xxx_hidden_SignedByDocker = false + x.xxx_hidden_Issuer = nil } -func (x *Requester) ClearSigningInfo() { - x.xxx_hidden_SigningInfo = nil +func (x *WindowsSigningInfo) ClearThumbprintSha256() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 4) + x.xxx_hidden_ThumbprintSha256 = nil } -func (x *Requester) ClearDarwin() { - if _, ok := x.xxx_hidden_SigningInfo.(*requester_Darwin); ok { - x.xxx_hidden_SigningInfo = nil - } +func (x *WindowsSigningInfo) ClearIsEv() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 5) + x.xxx_hidden_IsEv = false } -func (x *Requester) ClearWindows() { - if _, ok := x.xxx_hidden_SigningInfo.(*requester_Windows); ok { - x.xxx_hidden_SigningInfo = nil - } +func (x *WindowsSigningInfo) ClearIntegrity() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 6) + x.xxx_hidden_Integrity = WindowsSigningInfo_INTEGRITY_LEVEL_UNSPECIFIED } -func (x *Requester) ClearLinux() { - if _, ok := x.xxx_hidden_SigningInfo.(*requester_Linux); ok { - x.xxx_hidden_SigningInfo = nil - } +func (x *WindowsSigningInfo) ClearCompanyName() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 7) + x.xxx_hidden_CompanyName = nil } -const Requester_SigningInfo_not_set_case case_Requester_SigningInfo = 0 -const Requester_Darwin_case case_Requester_SigningInfo = 5 -const Requester_Windows_case case_Requester_SigningInfo = 6 -const Requester_Linux_case case_Requester_SigningInfo = 7 +func (x *WindowsSigningInfo) ClearProductName() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 8) + x.xxx_hidden_ProductName = nil +} -func (x *Requester) WhichSigningInfo() case_Requester_SigningInfo { - if x == nil { - return Requester_SigningInfo_not_set_case - } - switch x.xxx_hidden_SigningInfo.(type) { - case *requester_Darwin: - return Requester_Darwin_case - case *requester_Windows: - return Requester_Windows_case - case *requester_Linux: - return Requester_Linux_case - default: - return Requester_SigningInfo_not_set_case - } +func (x *WindowsSigningInfo) ClearFileVersion() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 9) + x.xxx_hidden_FileVersion = nil } -type Requester_builder struct { +type WindowsSigningInfo_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - Pid *int32 - Name *string - AbsoluteBinaryPath *string - // Signature chains to Docker's signing identity. - SignedByDocker *bool - // Platform-specific signing context, per host OS. - - // Fields of oneof xxx_hidden_SigningInfo: - Darwin *DarwinSigningInfo - Windows *WindowsSigningInfo - Linux *LinuxSigningInfo - // -- end of xxx_hidden_SigningInfo + // Chains to a trusted root and not revoked; remaining signature fields + // are meaningful only when true. + TrustedChain *bool + SubjectOrg *string + SubjectCommonName *string + // Issuing CA Common Name. + Issuer *string + // SHA-256 of the leaf certificate, hex; strongest pin, breaks on rotation. + ThumbprintSha256 *string + // Extended Validation certificate (CA/Browser Forum EV policy OID). + IsEv *bool + // Integrity level from the peer's access token; diagnostics only, + // never gated on. + Integrity *WindowsSigningInfo_IntegrityLevel + // PE VERSIONINFO (unsigned, attacker-controllable): display only, + // never gate trust. + CompanyName *string + ProductName *string + FileVersion *string } -func (b0 Requester_builder) Build() *Requester { - m0 := &Requester{} +func (b0 WindowsSigningInfo_builder) Build() *WindowsSigningInfo { + m0 := &WindowsSigningInfo{} b, x := &b0, m0 _, _ = b, x - if b.Pid != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 5) - x.xxx_hidden_Pid = *b.Pid + if b.TrustedChain != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 10) + x.xxx_hidden_TrustedChain = *b.TrustedChain } - if b.Name != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 5) - x.xxx_hidden_Name = b.Name + if b.SubjectOrg != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 10) + x.xxx_hidden_SubjectOrg = b.SubjectOrg } - if b.AbsoluteBinaryPath != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 5) - x.xxx_hidden_AbsoluteBinaryPath = b.AbsoluteBinaryPath + if b.SubjectCommonName != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 10) + x.xxx_hidden_SubjectCommonName = b.SubjectCommonName } - if b.SignedByDocker != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 5) - x.xxx_hidden_SignedByDocker = *b.SignedByDocker + if b.Issuer != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 10) + x.xxx_hidden_Issuer = b.Issuer } - if b.Darwin != nil { - x.xxx_hidden_SigningInfo = &requester_Darwin{b.Darwin} + if b.ThumbprintSha256 != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 4, 10) + x.xxx_hidden_ThumbprintSha256 = b.ThumbprintSha256 } - if b.Windows != nil { - x.xxx_hidden_SigningInfo = &requester_Windows{b.Windows} + if b.IsEv != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 5, 10) + x.xxx_hidden_IsEv = *b.IsEv } - if b.Linux != nil { - x.xxx_hidden_SigningInfo = &requester_Linux{b.Linux} + if b.Integrity != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 6, 10) + x.xxx_hidden_Integrity = *b.Integrity + } + if b.CompanyName != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 7, 10) + x.xxx_hidden_CompanyName = b.CompanyName + } + if b.ProductName != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 8, 10) + x.xxx_hidden_ProductName = b.ProductName + } + if b.FileVersion != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 9, 10) + x.xxx_hidden_FileVersion = b.FileVersion } return m0 } -type case_Requester_SigningInfo protoreflect.FieldNumber - -func (x case_Requester_SigningInfo) String() string { - md := file_accesscontrol_v1_api_proto_msgTypes[3].Descriptor() - if x == 0 { - return "not set" - } - return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) +// Sigstore (Fulcio/Rekor) context for the requesting process. A binary may +// have multiple signers. +type LinuxSigningInfo struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Signers *[]*LinuxSigningInfo_Signer `protobuf:"bytes,1,rep,name=signers"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -type isRequester_SigningInfo interface { - isRequester_SigningInfo() +func (x *LinuxSigningInfo) Reset() { + *x = LinuxSigningInfo{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -type requester_Darwin struct { - Darwin *DarwinSigningInfo `protobuf:"bytes,5,opt,name=darwin,oneof"` +func (x *LinuxSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -type requester_Windows struct { - Windows *WindowsSigningInfo `protobuf:"bytes,6,opt,name=windows,oneof"` +func (*LinuxSigningInfo) ProtoMessage() {} + +func (x *LinuxSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type requester_Linux struct { - Linux *LinuxSigningInfo `protobuf:"bytes,7,opt,name=linux,oneof"` +func (x *LinuxSigningInfo) GetSigners() []*LinuxSigningInfo_Signer { + if x != nil { + if x.xxx_hidden_Signers != nil { + return *x.xxx_hidden_Signers + } + } + return nil } -func (*requester_Darwin) isRequester_SigningInfo() {} +func (x *LinuxSigningInfo) SetSigners(v []*LinuxSigningInfo_Signer) { + x.xxx_hidden_Signers = &v +} -func (*requester_Windows) isRequester_SigningInfo() {} +type LinuxSigningInfo_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. -func (*requester_Linux) isRequester_SigningInfo() {} + Signers []*LinuxSigningInfo_Signer +} -// macOS code-signing context (SecCode* APIs) for the requester and its -// process ancestry. -type DarwinSigningInfo struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Root *DarwinSigningInfo_SigningIdentity `protobuf:"bytes,1,opt,name=root"` - xxx_hidden_Leaf *DarwinSigningInfo_SigningIdentity `protobuf:"bytes,2,opt,name=leaf"` - xxx_hidden_Chain *[]*DarwinSigningInfo_ProcessNode `protobuf:"bytes,3,rep,name=chain"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (b0 LinuxSigningInfo_builder) Build() *LinuxSigningInfo { + m0 := &LinuxSigningInfo{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Signers = &b.Signers + return m0 } -func (x *DarwinSigningInfo) Reset() { - *x = DarwinSigningInfo{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[4] +type AddTrustedCertificateOperation_DarwinCertificate struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Certificate *DarwinSigningCertificate `protobuf:"bytes,1,opt,name=certificate"` + xxx_hidden_Applications *[]*AddTrustedCertificateOperation_DarwinApplication `protobuf:"bytes,2,rep,name=applications"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddTrustedCertificateOperation_DarwinCertificate) Reset() { + *x = AddTrustedCertificateOperation_DarwinCertificate{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *DarwinSigningInfo) String() string { +func (x *AddTrustedCertificateOperation_DarwinCertificate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DarwinSigningInfo) ProtoMessage() {} +func (*AddTrustedCertificateOperation_DarwinCertificate) ProtoMessage() {} -func (x *DarwinSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[4] +func (x *AddTrustedCertificateOperation_DarwinCertificate) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -876,118 +2074,84 @@ func (x *DarwinSigningInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *DarwinSigningInfo) GetRoot() *DarwinSigningInfo_SigningIdentity { - if x != nil { - return x.xxx_hidden_Root - } - return nil -} - -func (x *DarwinSigningInfo) GetLeaf() *DarwinSigningInfo_SigningIdentity { +func (x *AddTrustedCertificateOperation_DarwinCertificate) GetCertificate() *DarwinSigningCertificate { if x != nil { - return x.xxx_hidden_Leaf + return x.xxx_hidden_Certificate } return nil } -func (x *DarwinSigningInfo) GetChain() []*DarwinSigningInfo_ProcessNode { +func (x *AddTrustedCertificateOperation_DarwinCertificate) GetApplications() []*AddTrustedCertificateOperation_DarwinApplication { if x != nil { - if x.xxx_hidden_Chain != nil { - return *x.xxx_hidden_Chain + if x.xxx_hidden_Applications != nil { + return *x.xxx_hidden_Applications } } return nil } -func (x *DarwinSigningInfo) SetRoot(v *DarwinSigningInfo_SigningIdentity) { - x.xxx_hidden_Root = v -} - -func (x *DarwinSigningInfo) SetLeaf(v *DarwinSigningInfo_SigningIdentity) { - x.xxx_hidden_Leaf = v -} - -func (x *DarwinSigningInfo) SetChain(v []*DarwinSigningInfo_ProcessNode) { - x.xxx_hidden_Chain = &v +func (x *AddTrustedCertificateOperation_DarwinCertificate) SetCertificate(v *DarwinSigningCertificate) { + x.xxx_hidden_Certificate = v } -func (x *DarwinSigningInfo) HasRoot() bool { - if x == nil { - return false - } - return x.xxx_hidden_Root != nil +func (x *AddTrustedCertificateOperation_DarwinCertificate) SetApplications(v []*AddTrustedCertificateOperation_DarwinApplication) { + x.xxx_hidden_Applications = &v } -func (x *DarwinSigningInfo) HasLeaf() bool { +func (x *AddTrustedCertificateOperation_DarwinCertificate) HasCertificate() bool { if x == nil { return false } - return x.xxx_hidden_Leaf != nil -} - -func (x *DarwinSigningInfo) ClearRoot() { - x.xxx_hidden_Root = nil + return x.xxx_hidden_Certificate != nil } -func (x *DarwinSigningInfo) ClearLeaf() { - x.xxx_hidden_Leaf = nil +func (x *AddTrustedCertificateOperation_DarwinCertificate) ClearCertificate() { + x.xxx_hidden_Certificate = nil } -type DarwinSigningInfo_builder struct { +type AddTrustedCertificateOperation_DarwinCertificate_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // Identity of the outermost recorded ancestor. - Root *DarwinSigningInfo_SigningIdentity - // Identity of the process that connected to the socket. - Leaf *DarwinSigningInfo_SigningIdentity - // Ancestry ordered root to leaf; may be a single node. - Chain []*DarwinSigningInfo_ProcessNode + Certificate *DarwinSigningCertificate + // Applications to trust. Without any, the operation lists the certificate + // and adds no trust. + Applications []*AddTrustedCertificateOperation_DarwinApplication } -func (b0 DarwinSigningInfo_builder) Build() *DarwinSigningInfo { - m0 := &DarwinSigningInfo{} +func (b0 AddTrustedCertificateOperation_DarwinCertificate_builder) Build() *AddTrustedCertificateOperation_DarwinCertificate { + m0 := &AddTrustedCertificateOperation_DarwinCertificate{} b, x := &b0, m0 _, _ = b, x - x.xxx_hidden_Root = b.Root - x.xxx_hidden_Leaf = b.Leaf - x.xxx_hidden_Chain = &b.Chain + x.xxx_hidden_Certificate = b.Certificate + x.xxx_hidden_Applications = &b.Applications return m0 } -// Windows Authenticode context for the requesting process. -type WindowsSigningInfo struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_TrustedChain bool `protobuf:"varint,1,opt,name=trusted_chain,json=trustedChain"` - xxx_hidden_SubjectOrg *string `protobuf:"bytes,2,opt,name=subject_org,json=subjectOrg"` - xxx_hidden_SubjectCommonName *string `protobuf:"bytes,3,opt,name=subject_common_name,json=subjectCommonName"` - xxx_hidden_Issuer *string `protobuf:"bytes,4,opt,name=issuer"` - xxx_hidden_ThumbprintSha256 *string `protobuf:"bytes,5,opt,name=thumbprint_sha256,json=thumbprintSha256"` - xxx_hidden_IsEv bool `protobuf:"varint,6,opt,name=is_ev,json=isEv"` - xxx_hidden_Integrity WindowsSigningInfo_IntegrityLevel `protobuf:"varint,7,opt,name=integrity,enum=accesscontrol.v1.WindowsSigningInfo_IntegrityLevel"` - xxx_hidden_CompanyName *string `protobuf:"bytes,8,opt,name=company_name,json=companyName"` - xxx_hidden_ProductName *string `protobuf:"bytes,9,opt,name=product_name,json=productName"` - xxx_hidden_FileVersion *string `protobuf:"bytes,10,opt,name=file_version,json=fileVersion"` - XXX_raceDetectHookData protoimpl.RaceDetectHookData - XXX_presence [1]uint32 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type AddTrustedCertificateOperation_DarwinApplication struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Identifier *string `protobuf:"bytes,1,opt,name=identifier"` + xxx_hidden_Patterns []string `protobuf:"bytes,2,rep,name=patterns"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *WindowsSigningInfo) Reset() { - *x = WindowsSigningInfo{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[5] +func (x *AddTrustedCertificateOperation_DarwinApplication) Reset() { + *x = AddTrustedCertificateOperation_DarwinApplication{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *WindowsSigningInfo) String() string { +func (x *AddTrustedCertificateOperation_DarwinApplication) String() string { return protoimpl.X.MessageStringOf(x) } -func (*WindowsSigningInfo) ProtoMessage() {} +func (*AddTrustedCertificateOperation_DarwinApplication) ProtoMessage() {} -func (x *WindowsSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[5] +func (x *AddTrustedCertificateOperation_DarwinApplication) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -998,364 +2162,303 @@ func (x *WindowsSigningInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *WindowsSigningInfo) GetTrustedChain() bool { - if x != nil { - return x.xxx_hidden_TrustedChain - } - return false -} - -func (x *WindowsSigningInfo) GetSubjectOrg() string { +func (x *AddTrustedCertificateOperation_DarwinApplication) GetIdentifier() string { if x != nil { - if x.xxx_hidden_SubjectOrg != nil { - return *x.xxx_hidden_SubjectOrg + if x.xxx_hidden_Identifier != nil { + return *x.xxx_hidden_Identifier } return "" } return "" } -func (x *WindowsSigningInfo) GetSubjectCommonName() string { +func (x *AddTrustedCertificateOperation_DarwinApplication) GetPatterns() []string { if x != nil { - if x.xxx_hidden_SubjectCommonName != nil { - return *x.xxx_hidden_SubjectCommonName - } - return "" + return x.xxx_hidden_Patterns } - return "" + return nil } -func (x *WindowsSigningInfo) GetIssuer() string { - if x != nil { - if x.xxx_hidden_Issuer != nil { - return *x.xxx_hidden_Issuer - } - return "" - } - return "" +func (x *AddTrustedCertificateOperation_DarwinApplication) SetIdentifier(v string) { + x.xxx_hidden_Identifier = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2) } -func (x *WindowsSigningInfo) GetThumbprintSha256() string { - if x != nil { - if x.xxx_hidden_ThumbprintSha256 != nil { - return *x.xxx_hidden_ThumbprintSha256 - } - return "" - } - return "" +func (x *AddTrustedCertificateOperation_DarwinApplication) SetPatterns(v []string) { + x.xxx_hidden_Patterns = v } -func (x *WindowsSigningInfo) GetIsEv() bool { - if x != nil { - return x.xxx_hidden_IsEv +func (x *AddTrustedCertificateOperation_DarwinApplication) HasIdentifier() bool { + if x == nil { + return false } - return false + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) } -func (x *WindowsSigningInfo) GetIntegrity() WindowsSigningInfo_IntegrityLevel { - if x != nil { - if protoimpl.X.Present(&(x.XXX_presence[0]), 6) { - return x.xxx_hidden_Integrity - } - } - return WindowsSigningInfo_INTEGRITY_LEVEL_UNSPECIFIED +func (x *AddTrustedCertificateOperation_DarwinApplication) ClearIdentifier() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_Identifier = nil } -func (x *WindowsSigningInfo) GetCompanyName() string { - if x != nil { - if x.xxx_hidden_CompanyName != nil { - return *x.xxx_hidden_CompanyName - } - return "" - } - return "" -} +type AddTrustedCertificateOperation_DarwinApplication_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. -func (x *WindowsSigningInfo) GetProductName() string { - if x != nil { - if x.xxx_hidden_ProductName != nil { - return *x.xxx_hidden_ProductName - } - return "" - } - return "" + // Code-signing identifier, typically the bundle ID. "*" stands for every + // application the certificate signed. + Identifier *string + // Patterns of the secrets the application may get; at least one required. + Patterns []string } -func (x *WindowsSigningInfo) GetFileVersion() string { - if x != nil { - if x.xxx_hidden_FileVersion != nil { - return *x.xxx_hidden_FileVersion - } - return "" +func (b0 AddTrustedCertificateOperation_DarwinApplication_builder) Build() *AddTrustedCertificateOperation_DarwinApplication { + m0 := &AddTrustedCertificateOperation_DarwinApplication{} + b, x := &b0, m0 + _, _ = b, x + if b.Identifier != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2) + x.xxx_hidden_Identifier = b.Identifier } - return "" -} - -func (x *WindowsSigningInfo) SetTrustedChain(v bool) { - x.xxx_hidden_TrustedChain = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 10) -} - -func (x *WindowsSigningInfo) SetSubjectOrg(v string) { - x.xxx_hidden_SubjectOrg = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 10) -} - -func (x *WindowsSigningInfo) SetSubjectCommonName(v string) { - x.xxx_hidden_SubjectCommonName = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 10) -} - -func (x *WindowsSigningInfo) SetIssuer(v string) { - x.xxx_hidden_Issuer = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 10) + x.xxx_hidden_Patterns = b.Patterns + return m0 } -func (x *WindowsSigningInfo) SetThumbprintSha256(v string) { - x.xxx_hidden_ThumbprintSha256 = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 4, 10) +type AddTrustedCertificateOperation_DarwinAdHocBinary struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_CdHash *string `protobuf:"bytes,1,opt,name=cd_hash,json=cdHash"` + xxx_hidden_Identifier *string `protobuf:"bytes,2,opt,name=identifier"` + xxx_hidden_Patterns []string `protobuf:"bytes,3,rep,name=patterns"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *WindowsSigningInfo) SetIsEv(v bool) { - x.xxx_hidden_IsEv = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 5, 10) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) Reset() { + *x = AddTrustedCertificateOperation_DarwinAdHocBinary{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *WindowsSigningInfo) SetIntegrity(v WindowsSigningInfo_IntegrityLevel) { - x.xxx_hidden_Integrity = v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 6, 10) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *WindowsSigningInfo) SetCompanyName(v string) { - x.xxx_hidden_CompanyName = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 7, 10) -} +func (*AddTrustedCertificateOperation_DarwinAdHocBinary) ProtoMessage() {} -func (x *WindowsSigningInfo) SetProductName(v string) { - x.xxx_hidden_ProductName = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 8, 10) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (x *WindowsSigningInfo) SetFileVersion(v string) { - x.xxx_hidden_FileVersion = &v - protoimpl.X.SetPresent(&(x.XXX_presence[0]), 9, 10) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) GetCdHash() string { + if x != nil { + if x.xxx_hidden_CdHash != nil { + return *x.xxx_hidden_CdHash + } + return "" + } + return "" } -func (x *WindowsSigningInfo) HasTrustedChain() bool { - if x == nil { - return false +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) GetIdentifier() string { + if x != nil { + if x.xxx_hidden_Identifier != nil { + return *x.xxx_hidden_Identifier + } + return "" } - return protoimpl.X.Present(&(x.XXX_presence[0]), 0) + return "" } -func (x *WindowsSigningInfo) HasSubjectOrg() bool { - if x == nil { - return false +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) GetPatterns() []string { + if x != nil { + return x.xxx_hidden_Patterns } - return protoimpl.X.Present(&(x.XXX_presence[0]), 1) + return nil } -func (x *WindowsSigningInfo) HasSubjectCommonName() bool { - if x == nil { - return false - } - return protoimpl.X.Present(&(x.XXX_presence[0]), 2) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) SetCdHash(v string) { + x.xxx_hidden_CdHash = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 3) } -func (x *WindowsSigningInfo) HasIssuer() bool { - if x == nil { - return false - } - return protoimpl.X.Present(&(x.XXX_presence[0]), 3) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) SetIdentifier(v string) { + x.xxx_hidden_Identifier = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 3) } -func (x *WindowsSigningInfo) HasThumbprintSha256() bool { - if x == nil { - return false - } - return protoimpl.X.Present(&(x.XXX_presence[0]), 4) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) SetPatterns(v []string) { + x.xxx_hidden_Patterns = v } -func (x *WindowsSigningInfo) HasIsEv() bool { +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) HasCdHash() bool { if x == nil { return false } - return protoimpl.X.Present(&(x.XXX_presence[0]), 5) + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) } -func (x *WindowsSigningInfo) HasIntegrity() bool { +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) HasIdentifier() bool { if x == nil { return false } - return protoimpl.X.Present(&(x.XXX_presence[0]), 6) + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) } -func (x *WindowsSigningInfo) HasCompanyName() bool { - if x == nil { - return false - } - return protoimpl.X.Present(&(x.XXX_presence[0]), 7) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) ClearCdHash() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_CdHash = nil } -func (x *WindowsSigningInfo) HasProductName() bool { - if x == nil { - return false - } - return protoimpl.X.Present(&(x.XXX_presence[0]), 8) +func (x *AddTrustedCertificateOperation_DarwinAdHocBinary) ClearIdentifier() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_Identifier = nil } -func (x *WindowsSigningInfo) HasFileVersion() bool { - if x == nil { - return false +type AddTrustedCertificateOperation_DarwinAdHocBinary_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Code directory hash, hex; pins an exact build. + CdHash *string + // Code-signing identifier. + Identifier *string + // Patterns of the secrets the binary may get; at least one required. + Patterns []string +} + +func (b0 AddTrustedCertificateOperation_DarwinAdHocBinary_builder) Build() *AddTrustedCertificateOperation_DarwinAdHocBinary { + m0 := &AddTrustedCertificateOperation_DarwinAdHocBinary{} + b, x := &b0, m0 + _, _ = b, x + if b.CdHash != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 3) + x.xxx_hidden_CdHash = b.CdHash } - return protoimpl.X.Present(&(x.XXX_presence[0]), 9) + if b.Identifier != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 3) + x.xxx_hidden_Identifier = b.Identifier + } + x.xxx_hidden_Patterns = b.Patterns + return m0 } -func (x *WindowsSigningInfo) ClearTrustedChain() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) - x.xxx_hidden_TrustedChain = false +type DeleteTrustedCertificateOperation_DarwinCertificate struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Certificate *DarwinSigningCertificate `protobuf:"bytes,1,opt,name=certificate"` + xxx_hidden_Applications []string `protobuf:"bytes,2,rep,name=applications"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *WindowsSigningInfo) ClearSubjectOrg() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) - x.xxx_hidden_SubjectOrg = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) Reset() { + *x = DeleteTrustedCertificateOperation_DarwinCertificate{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (x *WindowsSigningInfo) ClearSubjectCommonName() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2) - x.xxx_hidden_SubjectCommonName = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *WindowsSigningInfo) ClearIssuer() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3) - x.xxx_hidden_Issuer = nil +func (*DeleteTrustedCertificateOperation_DarwinCertificate) ProtoMessage() {} + +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (x *WindowsSigningInfo) ClearThumbprintSha256() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 4) - x.xxx_hidden_ThumbprintSha256 = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) GetCertificate() *DarwinSigningCertificate { + if x != nil { + return x.xxx_hidden_Certificate + } + return nil } -func (x *WindowsSigningInfo) ClearIsEv() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 5) - x.xxx_hidden_IsEv = false +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) GetApplications() []string { + if x != nil { + return x.xxx_hidden_Applications + } + return nil } -func (x *WindowsSigningInfo) ClearIntegrity() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 6) - x.xxx_hidden_Integrity = WindowsSigningInfo_INTEGRITY_LEVEL_UNSPECIFIED +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) SetCertificate(v *DarwinSigningCertificate) { + x.xxx_hidden_Certificate = v } -func (x *WindowsSigningInfo) ClearCompanyName() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 7) - x.xxx_hidden_CompanyName = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) SetApplications(v []string) { + x.xxx_hidden_Applications = v } -func (x *WindowsSigningInfo) ClearProductName() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 8) - x.xxx_hidden_ProductName = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) HasCertificate() bool { + if x == nil { + return false + } + return x.xxx_hidden_Certificate != nil } -func (x *WindowsSigningInfo) ClearFileVersion() { - protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 9) - x.xxx_hidden_FileVersion = nil +func (x *DeleteTrustedCertificateOperation_DarwinCertificate) ClearCertificate() { + x.xxx_hidden_Certificate = nil } -type WindowsSigningInfo_builder struct { +type DeleteTrustedCertificateOperation_DarwinCertificate_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // Chains to a trusted root and not revoked; remaining signature fields - // are meaningful only when true. - TrustedChain *bool - SubjectOrg *string - SubjectCommonName *string - // Issuing CA Common Name. - Issuer *string - // SHA-256 of the leaf certificate, hex; strongest pin, breaks on rotation. - ThumbprintSha256 *string - // Extended Validation certificate (CA/Browser Forum EV policy OID). - IsEv *bool - // Integrity level from the peer's access token; diagnostics only, - // never gated on. - Integrity *WindowsSigningInfo_IntegrityLevel - // PE VERSIONINFO (unsigned, attacker-controllable): display only, - // never gate trust. - CompanyName *string - ProductName *string - FileVersion *string + Certificate *DarwinSigningCertificate + // Identifiers of the applications to remove; "*" removes every one. + // Without any, the certificate itself is removed. + Applications []string } -func (b0 WindowsSigningInfo_builder) Build() *WindowsSigningInfo { - m0 := &WindowsSigningInfo{} +func (b0 DeleteTrustedCertificateOperation_DarwinCertificate_builder) Build() *DeleteTrustedCertificateOperation_DarwinCertificate { + m0 := &DeleteTrustedCertificateOperation_DarwinCertificate{} b, x := &b0, m0 _, _ = b, x - if b.TrustedChain != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 10) - x.xxx_hidden_TrustedChain = *b.TrustedChain - } - if b.SubjectOrg != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 10) - x.xxx_hidden_SubjectOrg = b.SubjectOrg - } - if b.SubjectCommonName != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 10) - x.xxx_hidden_SubjectCommonName = b.SubjectCommonName - } - if b.Issuer != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 10) - x.xxx_hidden_Issuer = b.Issuer - } - if b.ThumbprintSha256 != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 4, 10) - x.xxx_hidden_ThumbprintSha256 = b.ThumbprintSha256 - } - if b.IsEv != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 5, 10) - x.xxx_hidden_IsEv = *b.IsEv - } - if b.Integrity != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 6, 10) - x.xxx_hidden_Integrity = *b.Integrity - } - if b.CompanyName != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 7, 10) - x.xxx_hidden_CompanyName = b.CompanyName - } - if b.ProductName != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 8, 10) - x.xxx_hidden_ProductName = b.ProductName - } - if b.FileVersion != nil { - protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 9, 10) - x.xxx_hidden_FileVersion = b.FileVersion - } + x.xxx_hidden_Certificate = b.Certificate + x.xxx_hidden_Applications = b.Applications return m0 } -// Sigstore (Fulcio/Rekor) context for the requesting process. A binary may -// have multiple signers. -type LinuxSigningInfo struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Signers *[]*LinuxSigningInfo_Signer `protobuf:"bytes,1,rep,name=signers"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type DeleteTrustedCertificateOperation_DarwinAdHocBinary struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_CdHash *string `protobuf:"bytes,1,opt,name=cd_hash,json=cdHash"` + xxx_hidden_Identifier *string `protobuf:"bytes,2,opt,name=identifier"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *LinuxSigningInfo) Reset() { - *x = LinuxSigningInfo{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[6] +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) Reset() { + *x = DeleteTrustedCertificateOperation_DarwinAdHocBinary{} + mi := &file_accesscontrol_v1_api_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *LinuxSigningInfo) String() string { +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LinuxSigningInfo) ProtoMessage() {} +func (*DeleteTrustedCertificateOperation_DarwinAdHocBinary) ProtoMessage() {} -func (x *LinuxSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[6] +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) ProtoReflect() protoreflect.Message { + mi := &file_accesscontrol_v1_api_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1366,30 +2469,81 @@ func (x *LinuxSigningInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *LinuxSigningInfo) GetSigners() []*LinuxSigningInfo_Signer { +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) GetCdHash() string { if x != nil { - if x.xxx_hidden_Signers != nil { - return *x.xxx_hidden_Signers + if x.xxx_hidden_CdHash != nil { + return *x.xxx_hidden_CdHash } + return "" } - return nil + return "" } -func (x *LinuxSigningInfo) SetSigners(v []*LinuxSigningInfo_Signer) { - x.xxx_hidden_Signers = &v +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) GetIdentifier() string { + if x != nil { + if x.xxx_hidden_Identifier != nil { + return *x.xxx_hidden_Identifier + } + return "" + } + return "" } -type LinuxSigningInfo_builder struct { +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) SetCdHash(v string) { + x.xxx_hidden_CdHash = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2) +} + +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) SetIdentifier(v string) { + x.xxx_hidden_Identifier = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 2) +} + +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) HasCdHash() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) HasIdentifier() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) ClearCdHash() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_CdHash = nil +} + +func (x *DeleteTrustedCertificateOperation_DarwinAdHocBinary) ClearIdentifier() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_Identifier = nil +} + +type DeleteTrustedCertificateOperation_DarwinAdHocBinary_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - Signers []*LinuxSigningInfo_Signer + // Code directory hash, hex; pins an exact build. + CdHash *string + // Code-signing identifier. + Identifier *string } -func (b0 LinuxSigningInfo_builder) Build() *LinuxSigningInfo { - m0 := &LinuxSigningInfo{} +func (b0 DeleteTrustedCertificateOperation_DarwinAdHocBinary_builder) Build() *DeleteTrustedCertificateOperation_DarwinAdHocBinary { + m0 := &DeleteTrustedCertificateOperation_DarwinAdHocBinary{} b, x := &b0, m0 _, _ = b, x - x.xxx_hidden_Signers = &b.Signers + if b.CdHash != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2) + x.xxx_hidden_CdHash = b.CdHash + } + if b.Identifier != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 2) + x.xxx_hidden_Identifier = b.Identifier + } return m0 } @@ -1414,7 +2568,7 @@ type DarwinSigningInfo_SigningIdentity struct { func (x *DarwinSigningInfo_SigningIdentity) Reset() { *x = DarwinSigningInfo_SigningIdentity{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[7] + mi := &file_accesscontrol_v1_api_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1426,7 +2580,7 @@ func (x *DarwinSigningInfo_SigningIdentity) String() string { func (*DarwinSigningInfo_SigningIdentity) ProtoMessage() {} func (x *DarwinSigningInfo_SigningIdentity) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[7] + mi := &file_accesscontrol_v1_api_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1802,7 +2956,7 @@ type DarwinSigningInfo_ProcessNode struct { func (x *DarwinSigningInfo_ProcessNode) Reset() { *x = DarwinSigningInfo_ProcessNode{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[8] + mi := &file_accesscontrol_v1_api_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1814,7 +2968,7 @@ func (x *DarwinSigningInfo_ProcessNode) String() string { func (*DarwinSigningInfo_ProcessNode) ProtoMessage() {} func (x *DarwinSigningInfo_ProcessNode) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[8] + mi := &file_accesscontrol_v1_api_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2085,7 +3239,7 @@ type LinuxSigningInfo_Signer struct { func (x *LinuxSigningInfo_Signer) Reset() { *x = LinuxSigningInfo_Signer{} - mi := &file_accesscontrol_v1_api_proto_msgTypes[9] + mi := &file_accesscontrol_v1_api_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2097,7 +3251,7 @@ func (x *LinuxSigningInfo_Signer) String() string { func (*LinuxSigningInfo_Signer) ProtoMessage() {} func (x *LinuxSigningInfo_Signer) ProtoReflect() protoreflect.Message { - mi := &file_accesscontrol_v1_api_proto_msgTypes[9] + mi := &file_accesscontrol_v1_api_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2442,14 +3596,54 @@ var File_accesscontrol_v1_api_proto protoreflect.FileDescriptor const file_accesscontrol_v1_api_proto_rawDesc = "" + "\n" + - "\x1aaccesscontrol/v1/api.proto\x12\x10accesscontrol.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x01\n" + + "\x1aaccesscontrol/v1/api.proto\x12\x10accesscontrol.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x03\n" + "\x10AuthorizeRequest\x129\n" + "\trequester\x18\x01 \x01(\v2\x1b.accesscontrol.v1.RequesterR\trequester\x12H\n" + "\vget_secrets\x18\x02 \x01(\v2%.accesscontrol.v1.GetSecretsOperationH\x00R\n" + - "getSecretsB\v\n" + + "getSecrets\x12j\n" + + "\x17add_trusted_certificate\x18\x03 \x01(\v20.accesscontrol.v1.AddTrustedCertificateOperationH\x00R\x15addTrustedCertificate\x12s\n" + + "\x1adelete_trusted_certificate\x18\x04 \x01(\v23.accesscontrol.v1.DeleteTrustedCertificateOperationH\x00R\x18deleteTrustedCertificateB\v\n" + "\toperation\"1\n" + "\x13GetSecretsOperation\x12\x1a\n" + - "\bpatterns\x18\x01 \x03(\tR\bpatterns\"\x86\x01\n" + + "\bpatterns\x18\x01 \x03(\tR\bpatterns\"\x8b\x05\n" + + "\x1eAddTrustedCertificateOperation\x12\\\n" + + "\x06darwin\x18\x01 \x01(\v2B.accesscontrol.v1.AddTrustedCertificateOperation.DarwinCertificateH\x00R\x06darwin\x12u\n" + + "\x14darwin_ad_hoc_binary\x18\x02 \x01(\v2B.accesscontrol.v1.AddTrustedCertificateOperation.DarwinAdHocBinaryH\x00R\x11darwinAdHocBinary\x1a\xc9\x01\n" + + "\x11DarwinCertificate\x12L\n" + + "\vcertificate\x18\x01 \x01(\v2*.accesscontrol.v1.DarwinSigningCertificateR\vcertificate\x12f\n" + + "\fapplications\x18\x02 \x03(\v2B.accesscontrol.v1.AddTrustedCertificateOperation.DarwinApplicationR\fapplications\x1aO\n" + + "\x11DarwinApplication\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\tR\n" + + "identifier\x12\x1a\n" + + "\bpatterns\x18\x02 \x03(\tR\bpatterns\x1ah\n" + + "\x11DarwinAdHocBinary\x12\x17\n" + + "\acd_hash\x18\x01 \x01(\tR\x06cdHash\x12\x1e\n" + + "\n" + + "identifier\x18\x02 \x01(\tR\n" + + "identifier\x12\x1a\n" + + "\bpatterns\x18\x03 \x03(\tR\bpatternsB\r\n" + + "\vcertificate\"\xe3\x03\n" + + "!DeleteTrustedCertificateOperation\x12_\n" + + "\x06darwin\x18\x01 \x01(\v2E.accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinCertificateH\x00R\x06darwin\x12x\n" + + "\x14darwin_ad_hoc_binary\x18\x02 \x01(\v2E.accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinAdHocBinaryH\x00R\x11darwinAdHocBinary\x1a\x85\x01\n" + + "\x11DarwinCertificate\x12L\n" + + "\vcertificate\x18\x01 \x01(\v2*.accesscontrol.v1.DarwinSigningCertificateR\vcertificate\x12\"\n" + + "\fapplications\x18\x02 \x03(\tR\fapplications\x1aL\n" + + "\x11DarwinAdHocBinary\x12\x17\n" + + "\acd_hash\x18\x01 \x01(\tR\x06cdHash\x12\x1e\n" + + "\n" + + "identifier\x18\x02 \x01(\tR\n" + + "identifierB\r\n" + + "\vcertificate\"\xfa\x01\n" + + "\x18DarwinSigningCertificate\x12-\n" + + "\x12fingerprint_sha256\x18\x01 \x01(\tR\x11fingerprintSha256\x12\x1f\n" + + "\vcommon_name\x18\x02 \x01(\tR\n" + + "commonName\x12\"\n" + + "\forganization\x18\x03 \x01(\tR\forganization\x12/\n" + + "\x13organizational_unit\x18\x04 \x01(\tR\x12organizationalUnit\x129\n" + + "\n" + + "expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"\x86\x01\n" + "\x11AuthorizeResponse\x126\n" + "\bdecision\x18\x01 \x01(\x0e2\x1a.accesscontrol.v1.DecisionR\bdecision\x129\n" + "\n" + @@ -2542,46 +3736,64 @@ const file_accesscontrol_v1_api_proto_rawDesc = "" + "\x14com.accesscontrol.v1B\bApiProtoP\x01ZLgithub.com/docker/secrets-engine/plugin/api/accesscontrol/v1;accesscontrolv1\xa2\x02\x03AXX\xaa\x02\x10Accesscontrol.V1\xca\x02\x10Accesscontrol\\V1\xe2\x02\x1cAccesscontrol\\V1\\GPBMetadata\xea\x02\x11Accesscontrol::V1b\beditionsp\xe8\a" var file_accesscontrol_v1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_accesscontrol_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_accesscontrol_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_accesscontrol_v1_api_proto_goTypes = []any{ - (Decision)(0), // 0: accesscontrol.v1.Decision - (DarwinSigningInfo_Anchor)(0), // 1: accesscontrol.v1.DarwinSigningInfo.Anchor - (WindowsSigningInfo_IntegrityLevel)(0), // 2: accesscontrol.v1.WindowsSigningInfo.IntegrityLevel - (*AuthorizeRequest)(nil), // 3: accesscontrol.v1.AuthorizeRequest - (*GetSecretsOperation)(nil), // 4: accesscontrol.v1.GetSecretsOperation - (*AuthorizeResponse)(nil), // 5: accesscontrol.v1.AuthorizeResponse - (*Requester)(nil), // 6: accesscontrol.v1.Requester - (*DarwinSigningInfo)(nil), // 7: accesscontrol.v1.DarwinSigningInfo - (*WindowsSigningInfo)(nil), // 8: accesscontrol.v1.WindowsSigningInfo - (*LinuxSigningInfo)(nil), // 9: accesscontrol.v1.LinuxSigningInfo - (*DarwinSigningInfo_SigningIdentity)(nil), // 10: accesscontrol.v1.DarwinSigningInfo.SigningIdentity - (*DarwinSigningInfo_ProcessNode)(nil), // 11: accesscontrol.v1.DarwinSigningInfo.ProcessNode - (*LinuxSigningInfo_Signer)(nil), // 12: accesscontrol.v1.LinuxSigningInfo.Signer - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (Decision)(0), // 0: accesscontrol.v1.Decision + (DarwinSigningInfo_Anchor)(0), // 1: accesscontrol.v1.DarwinSigningInfo.Anchor + (WindowsSigningInfo_IntegrityLevel)(0), // 2: accesscontrol.v1.WindowsSigningInfo.IntegrityLevel + (*AuthorizeRequest)(nil), // 3: accesscontrol.v1.AuthorizeRequest + (*GetSecretsOperation)(nil), // 4: accesscontrol.v1.GetSecretsOperation + (*AddTrustedCertificateOperation)(nil), // 5: accesscontrol.v1.AddTrustedCertificateOperation + (*DeleteTrustedCertificateOperation)(nil), // 6: accesscontrol.v1.DeleteTrustedCertificateOperation + (*DarwinSigningCertificate)(nil), // 7: accesscontrol.v1.DarwinSigningCertificate + (*AuthorizeResponse)(nil), // 8: accesscontrol.v1.AuthorizeResponse + (*Requester)(nil), // 9: accesscontrol.v1.Requester + (*DarwinSigningInfo)(nil), // 10: accesscontrol.v1.DarwinSigningInfo + (*WindowsSigningInfo)(nil), // 11: accesscontrol.v1.WindowsSigningInfo + (*LinuxSigningInfo)(nil), // 12: accesscontrol.v1.LinuxSigningInfo + (*AddTrustedCertificateOperation_DarwinCertificate)(nil), // 13: accesscontrol.v1.AddTrustedCertificateOperation.DarwinCertificate + (*AddTrustedCertificateOperation_DarwinApplication)(nil), // 14: accesscontrol.v1.AddTrustedCertificateOperation.DarwinApplication + (*AddTrustedCertificateOperation_DarwinAdHocBinary)(nil), // 15: accesscontrol.v1.AddTrustedCertificateOperation.DarwinAdHocBinary + (*DeleteTrustedCertificateOperation_DarwinCertificate)(nil), // 16: accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinCertificate + (*DeleteTrustedCertificateOperation_DarwinAdHocBinary)(nil), // 17: accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinAdHocBinary + (*DarwinSigningInfo_SigningIdentity)(nil), // 18: accesscontrol.v1.DarwinSigningInfo.SigningIdentity + (*DarwinSigningInfo_ProcessNode)(nil), // 19: accesscontrol.v1.DarwinSigningInfo.ProcessNode + (*LinuxSigningInfo_Signer)(nil), // 20: accesscontrol.v1.LinuxSigningInfo.Signer + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp } var file_accesscontrol_v1_api_proto_depIdxs = []int32{ - 6, // 0: accesscontrol.v1.AuthorizeRequest.requester:type_name -> accesscontrol.v1.Requester + 9, // 0: accesscontrol.v1.AuthorizeRequest.requester:type_name -> accesscontrol.v1.Requester 4, // 1: accesscontrol.v1.AuthorizeRequest.get_secrets:type_name -> accesscontrol.v1.GetSecretsOperation - 0, // 2: accesscontrol.v1.AuthorizeResponse.decision:type_name -> accesscontrol.v1.Decision - 13, // 3: accesscontrol.v1.AuthorizeResponse.expires_at:type_name -> google.protobuf.Timestamp - 7, // 4: accesscontrol.v1.Requester.darwin:type_name -> accesscontrol.v1.DarwinSigningInfo - 8, // 5: accesscontrol.v1.Requester.windows:type_name -> accesscontrol.v1.WindowsSigningInfo - 9, // 6: accesscontrol.v1.Requester.linux:type_name -> accesscontrol.v1.LinuxSigningInfo - 10, // 7: accesscontrol.v1.DarwinSigningInfo.root:type_name -> accesscontrol.v1.DarwinSigningInfo.SigningIdentity - 10, // 8: accesscontrol.v1.DarwinSigningInfo.leaf:type_name -> accesscontrol.v1.DarwinSigningInfo.SigningIdentity - 11, // 9: accesscontrol.v1.DarwinSigningInfo.chain:type_name -> accesscontrol.v1.DarwinSigningInfo.ProcessNode - 2, // 10: accesscontrol.v1.WindowsSigningInfo.integrity:type_name -> accesscontrol.v1.WindowsSigningInfo.IntegrityLevel - 12, // 11: accesscontrol.v1.LinuxSigningInfo.signers:type_name -> accesscontrol.v1.LinuxSigningInfo.Signer - 1, // 12: accesscontrol.v1.DarwinSigningInfo.SigningIdentity.anchor:type_name -> accesscontrol.v1.DarwinSigningInfo.Anchor - 13, // 13: accesscontrol.v1.DarwinSigningInfo.ProcessNode.mtime:type_name -> google.protobuf.Timestamp - 13, // 14: accesscontrol.v1.LinuxSigningInfo.Signer.integrated_time:type_name -> google.protobuf.Timestamp - 3, // 15: accesscontrol.v1.AccessControlService.Authorize:input_type -> accesscontrol.v1.AuthorizeRequest - 5, // 16: accesscontrol.v1.AccessControlService.Authorize:output_type -> accesscontrol.v1.AuthorizeResponse - 16, // [16:17] is the sub-list for method output_type - 15, // [15:16] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 5, // 2: accesscontrol.v1.AuthorizeRequest.add_trusted_certificate:type_name -> accesscontrol.v1.AddTrustedCertificateOperation + 6, // 3: accesscontrol.v1.AuthorizeRequest.delete_trusted_certificate:type_name -> accesscontrol.v1.DeleteTrustedCertificateOperation + 13, // 4: accesscontrol.v1.AddTrustedCertificateOperation.darwin:type_name -> accesscontrol.v1.AddTrustedCertificateOperation.DarwinCertificate + 15, // 5: accesscontrol.v1.AddTrustedCertificateOperation.darwin_ad_hoc_binary:type_name -> accesscontrol.v1.AddTrustedCertificateOperation.DarwinAdHocBinary + 16, // 6: accesscontrol.v1.DeleteTrustedCertificateOperation.darwin:type_name -> accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinCertificate + 17, // 7: accesscontrol.v1.DeleteTrustedCertificateOperation.darwin_ad_hoc_binary:type_name -> accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinAdHocBinary + 21, // 8: accesscontrol.v1.DarwinSigningCertificate.expires_at:type_name -> google.protobuf.Timestamp + 0, // 9: accesscontrol.v1.AuthorizeResponse.decision:type_name -> accesscontrol.v1.Decision + 21, // 10: accesscontrol.v1.AuthorizeResponse.expires_at:type_name -> google.protobuf.Timestamp + 10, // 11: accesscontrol.v1.Requester.darwin:type_name -> accesscontrol.v1.DarwinSigningInfo + 11, // 12: accesscontrol.v1.Requester.windows:type_name -> accesscontrol.v1.WindowsSigningInfo + 12, // 13: accesscontrol.v1.Requester.linux:type_name -> accesscontrol.v1.LinuxSigningInfo + 18, // 14: accesscontrol.v1.DarwinSigningInfo.root:type_name -> accesscontrol.v1.DarwinSigningInfo.SigningIdentity + 18, // 15: accesscontrol.v1.DarwinSigningInfo.leaf:type_name -> accesscontrol.v1.DarwinSigningInfo.SigningIdentity + 19, // 16: accesscontrol.v1.DarwinSigningInfo.chain:type_name -> accesscontrol.v1.DarwinSigningInfo.ProcessNode + 2, // 17: accesscontrol.v1.WindowsSigningInfo.integrity:type_name -> accesscontrol.v1.WindowsSigningInfo.IntegrityLevel + 20, // 18: accesscontrol.v1.LinuxSigningInfo.signers:type_name -> accesscontrol.v1.LinuxSigningInfo.Signer + 7, // 19: accesscontrol.v1.AddTrustedCertificateOperation.DarwinCertificate.certificate:type_name -> accesscontrol.v1.DarwinSigningCertificate + 14, // 20: accesscontrol.v1.AddTrustedCertificateOperation.DarwinCertificate.applications:type_name -> accesscontrol.v1.AddTrustedCertificateOperation.DarwinApplication + 7, // 21: accesscontrol.v1.DeleteTrustedCertificateOperation.DarwinCertificate.certificate:type_name -> accesscontrol.v1.DarwinSigningCertificate + 1, // 22: accesscontrol.v1.DarwinSigningInfo.SigningIdentity.anchor:type_name -> accesscontrol.v1.DarwinSigningInfo.Anchor + 21, // 23: accesscontrol.v1.DarwinSigningInfo.ProcessNode.mtime:type_name -> google.protobuf.Timestamp + 21, // 24: accesscontrol.v1.LinuxSigningInfo.Signer.integrated_time:type_name -> google.protobuf.Timestamp + 3, // 25: accesscontrol.v1.AccessControlService.Authorize:input_type -> accesscontrol.v1.AuthorizeRequest + 8, // 26: accesscontrol.v1.AccessControlService.Authorize:output_type -> accesscontrol.v1.AuthorizeResponse + 26, // [26:27] is the sub-list for method output_type + 25, // [25:26] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_accesscontrol_v1_api_proto_init() } @@ -2591,8 +3803,18 @@ func file_accesscontrol_v1_api_proto_init() { } file_accesscontrol_v1_api_proto_msgTypes[0].OneofWrappers = []any{ (*authorizeRequest_GetSecrets)(nil), + (*authorizeRequest_AddTrustedCertificate)(nil), + (*authorizeRequest_DeleteTrustedCertificate)(nil), + } + file_accesscontrol_v1_api_proto_msgTypes[2].OneofWrappers = []any{ + (*addTrustedCertificateOperation_Darwin)(nil), + (*addTrustedCertificateOperation_DarwinAdHocBinary_)(nil), } file_accesscontrol_v1_api_proto_msgTypes[3].OneofWrappers = []any{ + (*deleteTrustedCertificateOperation_Darwin)(nil), + (*deleteTrustedCertificateOperation_DarwinAdHocBinary_)(nil), + } + file_accesscontrol_v1_api_proto_msgTypes[6].OneofWrappers = []any{ (*requester_Darwin)(nil), (*requester_Windows)(nil), (*requester_Linux)(nil), @@ -2603,7 +3825,7 @@ func file_accesscontrol_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_accesscontrol_v1_api_proto_rawDesc), len(file_accesscontrol_v1_api_proto_rawDesc)), NumEnums: 3, - NumMessages: 10, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/plugin/api/accesscontrol/v1/api.proto b/plugin/api/accesscontrol/v1/api.proto index f966a687..1edf3e74 100644 --- a/plugin/api/accesscontrol/v1/api.proto +++ b/plugin/api/accesscontrol/v1/api.proto @@ -32,6 +32,8 @@ message AuthorizeRequest { // The operation to authorize; required. oneof operation { GetSecretsOperation get_secrets = 2; + AddTrustedCertificateOperation add_trusted_certificate = 3; + DeleteTrustedCertificateOperation delete_trusted_certificate = 4; } } @@ -40,6 +42,78 @@ message GetSecretsOperation { repeated string patterns = 1; } +// Trusts a code-signing certificate for applications it signed, or one +// binary signed ad hoc. +message AddTrustedCertificateOperation { + message DarwinCertificate { + DarwinSigningCertificate certificate = 1; + // Applications to trust. Without any, the operation lists the certificate + // and adds no trust. + repeated DarwinApplication applications = 2; + } + + message DarwinApplication { + // Code-signing identifier, typically the bundle ID. "*" stands for every + // application the certificate signed. + string identifier = 1; + // Patterns of the secrets the application may get; at least one required. + repeated string patterns = 2; + } + + message DarwinAdHocBinary { + // Code directory hash, hex; pins an exact build. + string cd_hash = 1; + // Code-signing identifier. + string identifier = 2; + // Patterns of the secrets the binary may get; at least one required. + repeated string patterns = 3; + } + + // What to trust, per host OS; required. + oneof certificate { + DarwinCertificate darwin = 1; + DarwinAdHocBinary darwin_ad_hoc_binary = 2; + } +} + +// Removes a trusted certificate, applications of one, or a trusted binary. +message DeleteTrustedCertificateOperation { + message DarwinCertificate { + DarwinSigningCertificate certificate = 1; + // Identifiers of the applications to remove; "*" removes every one. + // Without any, the certificate itself is removed. + repeated string applications = 2; + } + + message DarwinAdHocBinary { + // Code directory hash, hex; pins an exact build. + string cd_hash = 1; + // Code-signing identifier. + string identifier = 2; + } + + // What to remove, per host OS; required. + oneof certificate { + DarwinCertificate darwin = 1; + DarwinAdHocBinary darwin_ad_hoc_binary = 2; + } +} + +// A code-signing certificate, described by the fields a person reads to +// recognize it. +message DarwinSigningCertificate { + // The hex-encoded SHA-256 hash of the certificate's DER encoding. + string fingerprint_sha256 = 1; + // Subject common name; display only. + string common_name = 2; + // Subject organization; display only. + string organization = 3; + // Subject organizational unit: the Team ID on a certificate Apple issued. + string organizational_unit = 4; + // When the certificate expires. + google.protobuf.Timestamp expires_at = 5; +} + message AuthorizeResponse { // The authorization decision. Decision decision = 1;