Documentation
¶
Overview ¶
Package admin is a generated protocol buffer package.
It is generated from these files:
github.com/luci/luci-go/tokenserver/api/admin/v1/admin.proto github.com/luci/luci-go/tokenserver/api/admin/v1/certificate_authorities.proto github.com/luci/luci-go/tokenserver/api/admin/v1/config.proto
It has these top-level messages:
ImportedConfigs InspectMachineTokenRequest InspectMachineTokenResponse InspectDelegationTokenRequest InspectDelegationTokenResponse InspectOAuthTokenGrantRequest InspectOAuthTokenGrantResponse FetchCRLRequest FetchCRLResponse ListCAsResponse GetCAStatusRequest GetCAStatusResponse IsRevokedCertRequest IsRevokedCertResponse CheckCertificateRequest CheckCertificateResponse CRLStatus TokenServerConfig CertificateAuthorityConfig DomainConfig DelegationPermissions DelegationRule ServiceAccountsPermissions ServiceAccountRule
Package admin contains The Token Server Administrative and Config API.
Services defined here are used by service administrators.
Index ¶
- func FileDescriptorSet() *descriptor.FileDescriptorSet
- func RegisterAdminServer(s prpc.Registrar, srv AdminServer)
- func RegisterCertificateAuthoritiesServer(s prpc.Registrar, srv CertificateAuthoritiesServer)
- type AdminClient
- type AdminServer
- type CRLStatus
- func (*CRLStatus) Descriptor() ([]byte, []int)
- func (m *CRLStatus) GetLastFetchEtag() string
- func (m *CRLStatus) GetLastFetchTime() *google_protobuf1.Timestamp
- func (m *CRLStatus) GetLastUpdateTime() *google_protobuf1.Timestamp
- func (m *CRLStatus) GetRevokedCertsCount() int64
- func (*CRLStatus) ProtoMessage()
- func (m *CRLStatus) Reset()
- func (m *CRLStatus) String() string
- type CertificateAuthoritiesClient
- type CertificateAuthoritiesServer
- type CertificateAuthorityConfig
- func (*CertificateAuthorityConfig) Descriptor() ([]byte, []int)
- func (m *CertificateAuthorityConfig) GetCertPath() string
- func (m *CertificateAuthorityConfig) GetCn() string
- func (m *CertificateAuthorityConfig) GetCrlUrl() string
- func (m *CertificateAuthorityConfig) GetKnownDomains() []*DomainConfig
- func (m *CertificateAuthorityConfig) GetOauthScopes() []string
- func (m *CertificateAuthorityConfig) GetUniqueId() int64
- func (m *CertificateAuthorityConfig) GetUseOauth() bool
- func (*CertificateAuthorityConfig) ProtoMessage()
- func (m *CertificateAuthorityConfig) Reset()
- func (m *CertificateAuthorityConfig) String() string
- type CheckCertificateRequest
- type CheckCertificateResponse
- func (*CheckCertificateResponse) Descriptor() ([]byte, []int)
- func (m *CheckCertificateResponse) GetInvalidReason() string
- func (m *CheckCertificateResponse) GetIsValid() bool
- func (*CheckCertificateResponse) ProtoMessage()
- func (m *CheckCertificateResponse) Reset()
- func (m *CheckCertificateResponse) String() string
- type DecoratedAdmin
- func (s *DecoratedAdmin) ImportCAConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
- func (s *DecoratedAdmin) ImportDelegationConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
- func (s *DecoratedAdmin) ImportServiceAccountsConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
- func (s *DecoratedAdmin) InspectDelegationToken(c context.Context, req *InspectDelegationTokenRequest) (rsp *InspectDelegationTokenResponse, err error)
- func (s *DecoratedAdmin) InspectMachineToken(c context.Context, req *InspectMachineTokenRequest) (rsp *InspectMachineTokenResponse, err error)
- func (s *DecoratedAdmin) InspectOAuthTokenGrant(c context.Context, req *InspectOAuthTokenGrantRequest) (rsp *InspectOAuthTokenGrantResponse, err error)
- type DecoratedCertificateAuthorities
- func (s *DecoratedCertificateAuthorities) CheckCertificate(c context.Context, req *CheckCertificateRequest) (rsp *CheckCertificateResponse, err error)
- func (s *DecoratedCertificateAuthorities) FetchCRL(c context.Context, req *FetchCRLRequest) (rsp *FetchCRLResponse, err error)
- func (s *DecoratedCertificateAuthorities) GetCAStatus(c context.Context, req *GetCAStatusRequest) (rsp *GetCAStatusResponse, err error)
- func (s *DecoratedCertificateAuthorities) IsRevokedCert(c context.Context, req *IsRevokedCertRequest) (rsp *IsRevokedCertResponse, err error)
- func (s *DecoratedCertificateAuthorities) ListCAs(c context.Context, req *google_protobuf.Empty) (rsp *ListCAsResponse, err error)
- type DelegationPermissions
- type DelegationRule
- func (*DelegationRule) Descriptor() ([]byte, []int)
- func (m *DelegationRule) GetAllowedAudience() []string
- func (m *DelegationRule) GetAllowedToImpersonate() []string
- func (m *DelegationRule) GetMaxValidityDuration() int64
- func (m *DelegationRule) GetName() string
- func (m *DelegationRule) GetOwner() []string
- func (m *DelegationRule) GetRequestor() []string
- func (m *DelegationRule) GetTargetService() []string
- func (*DelegationRule) ProtoMessage()
- func (m *DelegationRule) Reset()
- func (m *DelegationRule) String() string
- type DomainConfig
- type FetchCRLRequest
- type FetchCRLResponse
- type GetCAStatusRequest
- type GetCAStatusResponse
- func (*GetCAStatusResponse) Descriptor() ([]byte, []int)
- func (m *GetCAStatusResponse) GetAddedRev() string
- func (m *GetCAStatusResponse) GetCert() string
- func (m *GetCAStatusResponse) GetConfig() *CertificateAuthorityConfig
- func (m *GetCAStatusResponse) GetCrlStatus() *CRLStatus
- func (m *GetCAStatusResponse) GetReady() bool
- func (m *GetCAStatusResponse) GetRemoved() bool
- func (m *GetCAStatusResponse) GetRemovedRev() string
- func (m *GetCAStatusResponse) GetUpdatedRev() string
- func (*GetCAStatusResponse) ProtoMessage()
- func (m *GetCAStatusResponse) Reset()
- func (m *GetCAStatusResponse) String() string
- type ImportedConfigs
- type InspectDelegationTokenRequest
- type InspectDelegationTokenResponse
- func (*InspectDelegationTokenResponse) Descriptor() ([]byte, []int)
- func (m *InspectDelegationTokenResponse) GetEnvelope() *messages.DelegationToken
- func (m *InspectDelegationTokenResponse) GetInvalidityReason() string
- func (m *InspectDelegationTokenResponse) GetNonExpired() bool
- func (m *InspectDelegationTokenResponse) GetSigned() bool
- func (m *InspectDelegationTokenResponse) GetSubtoken() *messages.Subtoken
- func (m *InspectDelegationTokenResponse) GetValid() bool
- func (*InspectDelegationTokenResponse) ProtoMessage()
- func (m *InspectDelegationTokenResponse) Reset()
- func (m *InspectDelegationTokenResponse) String() string
- type InspectMachineTokenRequest
- func (*InspectMachineTokenRequest) Descriptor() ([]byte, []int)
- func (m *InspectMachineTokenRequest) GetToken() string
- func (m *InspectMachineTokenRequest) GetTokenType() tokenserver.MachineTokenType
- func (*InspectMachineTokenRequest) ProtoMessage()
- func (m *InspectMachineTokenRequest) Reset()
- func (m *InspectMachineTokenRequest) String() string
- type InspectMachineTokenResponse
- func (*InspectMachineTokenResponse) Descriptor() ([]byte, []int)
- func (m *InspectMachineTokenResponse) GetCertCaName() string
- func (m *InspectMachineTokenResponse) GetInvalidityReason() string
- func (m *InspectMachineTokenResponse) GetLuciMachineToken() *tokenserver.MachineTokenBody
- func (m *InspectMachineTokenResponse) GetNonExpired() bool
- func (m *InspectMachineTokenResponse) GetNonRevoked() bool
- func (m *InspectMachineTokenResponse) GetSigned() bool
- func (m *InspectMachineTokenResponse) GetSigningKeyId() string
- func (m *InspectMachineTokenResponse) GetTokenType() isInspectMachineTokenResponse_TokenType
- func (m *InspectMachineTokenResponse) GetValid() bool
- func (*InspectMachineTokenResponse) ProtoMessage()
- func (m *InspectMachineTokenResponse) Reset()
- func (m *InspectMachineTokenResponse) String() string
- func (*InspectMachineTokenResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type InspectMachineTokenResponse_LuciMachineToken
- type InspectOAuthTokenGrantRequest
- type InspectOAuthTokenGrantResponse
- func (*InspectOAuthTokenGrantResponse) Descriptor() ([]byte, []int)
- func (m *InspectOAuthTokenGrantResponse) GetAllowedByRules() bool
- func (m *InspectOAuthTokenGrantResponse) GetInvalidityReason() string
- func (m *InspectOAuthTokenGrantResponse) GetMatchingRule() *ServiceAccountRule
- func (m *InspectOAuthTokenGrantResponse) GetNonExpired() bool
- func (m *InspectOAuthTokenGrantResponse) GetSigned() bool
- func (m *InspectOAuthTokenGrantResponse) GetSigningKeyId() string
- func (m *InspectOAuthTokenGrantResponse) GetTokenBody() *tokenserver1.OAuthTokenGrantBody
- func (m *InspectOAuthTokenGrantResponse) GetValid() bool
- func (*InspectOAuthTokenGrantResponse) ProtoMessage()
- func (m *InspectOAuthTokenGrantResponse) Reset()
- func (m *InspectOAuthTokenGrantResponse) String() string
- type IsRevokedCertRequest
- type IsRevokedCertResponse
- type ListCAsResponse
- type ServiceAccountRule
- func (*ServiceAccountRule) Descriptor() ([]byte, []int)
- func (m *ServiceAccountRule) GetAllowedScope() []string
- func (m *ServiceAccountRule) GetEndUser() []string
- func (m *ServiceAccountRule) GetMaxGrantValidityDuration() int64
- func (m *ServiceAccountRule) GetName() string
- func (m *ServiceAccountRule) GetOwner() []string
- func (m *ServiceAccountRule) GetProxy() []string
- func (m *ServiceAccountRule) GetServiceAccount() []string
- func (*ServiceAccountRule) ProtoMessage()
- func (m *ServiceAccountRule) Reset()
- func (m *ServiceAccountRule) String() string
- type ServiceAccountsPermissions
- type TokenServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptor.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterAdminServer ¶
func RegisterAdminServer(s prpc.Registrar, srv AdminServer)
func RegisterCertificateAuthoritiesServer ¶
func RegisterCertificateAuthoritiesServer(s prpc.Registrar, srv CertificateAuthoritiesServer)
Types ¶
type AdminClient ¶
type AdminClient interface { // ImportCAConfigs makes the server read 'tokenserver.cfg'. ImportCAConfigs(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ImportedConfigs, error) // ImportDelegationConfigs makes the server read 'delegation.cfg'. ImportDelegationConfigs(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ImportedConfigs, error) // ImportServiceAccountsConfigs makes the server read 'service_accounts.cfg'. ImportServiceAccountsConfigs(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ImportedConfigs, error) // InspectMachineToken decodes a machine token and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time and revocation status. // // It tries to give as much information about the token and its status as // possible (e.g. it checks for revocation status even if token is already // expired). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectMachineTokenResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectMachineToken(ctx context.Context, in *InspectMachineTokenRequest, opts ...grpc.CallOption) (*InspectMachineTokenResponse, error) // InspectDelegationToken decodes a delegation token and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time. // // It tries to give as much information about the token and its status as // possible (e.g. attempts to decode the body even if the signing key has been // rotated already). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectDelegationTokenResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectDelegationToken(ctx context.Context, in *InspectDelegationTokenRequest, opts ...grpc.CallOption) (*InspectDelegationTokenResponse, error) // InspectOAuthTokenGrant decodes OAuth token grant and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time. // // It tries to give as much information about the token and its status as // possible (e.g. attempts to decode the body even if the signing key has been // rotated already). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectOAuthTokenGrantResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectOAuthTokenGrant(ctx context.Context, in *InspectOAuthTokenGrantRequest, opts ...grpc.CallOption) (*InspectOAuthTokenGrantResponse, error) }
func NewAdminClient ¶
func NewAdminClient(cc *grpc.ClientConn) AdminClient
func NewAdminPRPCClient ¶
func NewAdminPRPCClient(client *prpc.Client) AdminClient
type AdminServer ¶
type AdminServer interface { // ImportCAConfigs makes the server read 'tokenserver.cfg'. ImportCAConfigs(context.Context, *google_protobuf.Empty) (*ImportedConfigs, error) // ImportDelegationConfigs makes the server read 'delegation.cfg'. ImportDelegationConfigs(context.Context, *google_protobuf.Empty) (*ImportedConfigs, error) // ImportServiceAccountsConfigs makes the server read 'service_accounts.cfg'. ImportServiceAccountsConfigs(context.Context, *google_protobuf.Empty) (*ImportedConfigs, error) // InspectMachineToken decodes a machine token and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time and revocation status. // // It tries to give as much information about the token and its status as // possible (e.g. it checks for revocation status even if token is already // expired). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectMachineTokenResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectMachineToken(context.Context, *InspectMachineTokenRequest) (*InspectMachineTokenResponse, error) // InspectDelegationToken decodes a delegation token and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time. // // It tries to give as much information about the token and its status as // possible (e.g. attempts to decode the body even if the signing key has been // rotated already). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectDelegationTokenResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectDelegationToken(context.Context, *InspectDelegationTokenRequest) (*InspectDelegationTokenResponse, error) // InspectOAuthTokenGrant decodes OAuth token grant and verifies it is valid. // // It verifies the token was signed by a private key of the token server and // checks token's expiration time. // // It tries to give as much information about the token and its status as // possible (e.g. attempts to decode the body even if the signing key has been // rotated already). // // Administrators can use this call to debug issues with tokens. // // Returns: // InspectOAuthTokenGrantResponse for tokens of supported kind. // grpc.InvalidArgument error for unsupported token kind. // grpc.Internal error for transient errors. InspectOAuthTokenGrant(context.Context, *InspectOAuthTokenGrantRequest) (*InspectOAuthTokenGrantResponse, error) }
type CRLStatus ¶
type CRLStatus struct { LastUpdateTime *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=last_update_time,json=lastUpdateTime" json:"last_update_time,omitempty"` LastFetchTime *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=last_fetch_time,json=lastFetchTime" json:"last_fetch_time,omitempty"` LastFetchEtag string `protobuf:"bytes,3,opt,name=last_fetch_etag,json=lastFetchEtag" json:"last_fetch_etag,omitempty"` RevokedCertsCount int64 `protobuf:"varint,4,opt,name=revoked_certs_count,json=revokedCertsCount" json:"revoked_certs_count,omitempty"` }
CRLStatus describes the latest known state of imported CRL.
func (*CRLStatus) GetLastFetchTime ¶
func (m *CRLStatus) GetLastFetchTime() *google_protobuf1.Timestamp
func (*CRLStatus) GetLastUpdateTime ¶
func (m *CRLStatus) GetLastUpdateTime() *google_protobuf1.Timestamp
type CertificateAuthoritiesClient ¶
type CertificateAuthoritiesClient interface { // FetchCRL makes the server fetch a CRL for some CA. FetchCRL(ctx context.Context, in *FetchCRLRequest, opts ...grpc.CallOption) (*FetchCRLResponse, error) // ListCAs returns a list of Common Names of registered CAs. ListCAs(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ListCAsResponse, error) // GetCAStatus returns configuration of some CA defined in the config. GetCAStatus(ctx context.Context, in *GetCAStatusRequest, opts ...grpc.CallOption) (*GetCAStatusResponse, error) // IsRevokedCert says whether a certificate serial number is in the CRL. IsRevokedCert(ctx context.Context, in *IsRevokedCertRequest, opts ...grpc.CallOption) (*IsRevokedCertResponse, error) // CheckCertificate says whether a certificate is valid or not. CheckCertificate(ctx context.Context, in *CheckCertificateRequest, opts ...grpc.CallOption) (*CheckCertificateResponse, error) }
func NewCertificateAuthoritiesClient ¶
func NewCertificateAuthoritiesClient(cc *grpc.ClientConn) CertificateAuthoritiesClient
func NewCertificateAuthoritiesPRPCClient ¶
func NewCertificateAuthoritiesPRPCClient(client *prpc.Client) CertificateAuthoritiesClient
type CertificateAuthoritiesServer ¶
type CertificateAuthoritiesServer interface { // FetchCRL makes the server fetch a CRL for some CA. FetchCRL(context.Context, *FetchCRLRequest) (*FetchCRLResponse, error) // ListCAs returns a list of Common Names of registered CAs. ListCAs(context.Context, *google_protobuf.Empty) (*ListCAsResponse, error) // GetCAStatus returns configuration of some CA defined in the config. GetCAStatus(context.Context, *GetCAStatusRequest) (*GetCAStatusResponse, error) // IsRevokedCert says whether a certificate serial number is in the CRL. IsRevokedCert(context.Context, *IsRevokedCertRequest) (*IsRevokedCertResponse, error) // CheckCertificate says whether a certificate is valid or not. CheckCertificate(context.Context, *CheckCertificateRequest) (*CheckCertificateResponse, error) }
type CertificateAuthorityConfig ¶
type CertificateAuthorityConfig struct { UniqueId int64 `protobuf:"varint,6,opt,name=unique_id,json=uniqueId" json:"unique_id,omitempty"` Cn string `protobuf:"bytes,1,opt,name=cn" json:"cn,omitempty"` CertPath string `protobuf:"bytes,2,opt,name=cert_path,json=certPath" json:"cert_path,omitempty"` CrlUrl string `protobuf:"bytes,3,opt,name=crl_url,json=crlUrl" json:"crl_url,omitempty"` UseOauth bool `protobuf:"varint,4,opt,name=use_oauth,json=useOauth" json:"use_oauth,omitempty"` OauthScopes []string `protobuf:"bytes,7,rep,name=oauth_scopes,json=oauthScopes" json:"oauth_scopes,omitempty"` // KnownDomains describes parameters to use for each particular domain. KnownDomains []*DomainConfig `protobuf:"bytes,5,rep,name=known_domains,json=knownDomains" json:"known_domains,omitempty"` }
CertificateAuthorityConfig defines a single CA we trust.
Such CA issues certificates for nodes that use The Token Service. Each node has a private key and certificate with Common Name set to the FQDN of this node, e.g. "CN=slave43-c1.c.chromecompute.google.com.internal".
The Token Server uses this CN to derive an identity string for a machine. It splits FQDN into a hostname ("slave43-c1") and a domain name ("c.chromecompute.google.com.internal"), searches for a domain name in "known_domains" set, and, if it is present, uses parameters described there for generating a token that contains machine's FQDN and certificate serial number (among other things, see MachineTokenBody in machine_token.proto).
func (*CertificateAuthorityConfig) Descriptor ¶
func (*CertificateAuthorityConfig) Descriptor() ([]byte, []int)
func (*CertificateAuthorityConfig) GetCertPath ¶
func (m *CertificateAuthorityConfig) GetCertPath() string
func (*CertificateAuthorityConfig) GetCn ¶
func (m *CertificateAuthorityConfig) GetCn() string
func (*CertificateAuthorityConfig) GetCrlUrl ¶
func (m *CertificateAuthorityConfig) GetCrlUrl() string
func (*CertificateAuthorityConfig) GetKnownDomains ¶
func (m *CertificateAuthorityConfig) GetKnownDomains() []*DomainConfig
func (*CertificateAuthorityConfig) GetOauthScopes ¶
func (m *CertificateAuthorityConfig) GetOauthScopes() []string
func (*CertificateAuthorityConfig) GetUniqueId ¶
func (m *CertificateAuthorityConfig) GetUniqueId() int64
func (*CertificateAuthorityConfig) GetUseOauth ¶
func (m *CertificateAuthorityConfig) GetUseOauth() bool
func (*CertificateAuthorityConfig) ProtoMessage ¶
func (*CertificateAuthorityConfig) ProtoMessage()
func (*CertificateAuthorityConfig) Reset ¶
func (m *CertificateAuthorityConfig) Reset()
func (*CertificateAuthorityConfig) String ¶
func (m *CertificateAuthorityConfig) String() string
type CheckCertificateRequest ¶
type CheckCertificateRequest struct {
CertPem string `protobuf:"bytes,1,opt,name=cert_pem,json=certPem" json:"cert_pem,omitempty"`
}
CheckCertificateRequest contains a pem encoded certificate to check.
func (*CheckCertificateRequest) Descriptor ¶
func (*CheckCertificateRequest) Descriptor() ([]byte, []int)
func (*CheckCertificateRequest) GetCertPem ¶
func (m *CheckCertificateRequest) GetCertPem() string
func (*CheckCertificateRequest) ProtoMessage ¶
func (*CheckCertificateRequest) ProtoMessage()
func (*CheckCertificateRequest) Reset ¶
func (m *CheckCertificateRequest) Reset()
func (*CheckCertificateRequest) String ¶
func (m *CheckCertificateRequest) String() string
type CheckCertificateResponse ¶
type CheckCertificateResponse struct { IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid" json:"is_valid,omitempty"` InvalidReason string `protobuf:"bytes,2,opt,name=invalid_reason,json=invalidReason" json:"invalid_reason,omitempty"` }
CheckCertificateResponse is returned by CheckCertificate.
func (*CheckCertificateResponse) Descriptor ¶
func (*CheckCertificateResponse) Descriptor() ([]byte, []int)
func (*CheckCertificateResponse) GetInvalidReason ¶
func (m *CheckCertificateResponse) GetInvalidReason() string
func (*CheckCertificateResponse) GetIsValid ¶
func (m *CheckCertificateResponse) GetIsValid() bool
func (*CheckCertificateResponse) ProtoMessage ¶
func (*CheckCertificateResponse) ProtoMessage()
func (*CheckCertificateResponse) Reset ¶
func (m *CheckCertificateResponse) Reset()
func (*CheckCertificateResponse) String ¶
func (m *CheckCertificateResponse) String() string
type DecoratedAdmin ¶
type DecoratedAdmin struct { // Service is the service to decorate. Service AdminServer // Prelude is called for each method before forwarding the call to Service. // If Prelude returns an error, then the call is skipped and the error is // processed via the Postlude (if one is defined), or it is returned directly. Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error) // Postlude is called for each method after Service has processed the call, or // after the Prelude has returned an error. This takes the the Service's // response proto (which may be nil) and/or any error. The decorated // service will return the response (possibly mutated) and error that Postlude // returns. Postlude func(c context.Context, methodName string, rsp proto.Message, err error) error }
func (*DecoratedAdmin) ImportCAConfigs ¶
func (s *DecoratedAdmin) ImportCAConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
func (*DecoratedAdmin) ImportDelegationConfigs ¶
func (s *DecoratedAdmin) ImportDelegationConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
func (*DecoratedAdmin) ImportServiceAccountsConfigs ¶
func (s *DecoratedAdmin) ImportServiceAccountsConfigs(c context.Context, req *google_protobuf.Empty) (rsp *ImportedConfigs, err error)
func (*DecoratedAdmin) InspectDelegationToken ¶
func (s *DecoratedAdmin) InspectDelegationToken(c context.Context, req *InspectDelegationTokenRequest) (rsp *InspectDelegationTokenResponse, err error)
func (*DecoratedAdmin) InspectMachineToken ¶
func (s *DecoratedAdmin) InspectMachineToken(c context.Context, req *InspectMachineTokenRequest) (rsp *InspectMachineTokenResponse, err error)
func (*DecoratedAdmin) InspectOAuthTokenGrant ¶
func (s *DecoratedAdmin) InspectOAuthTokenGrant(c context.Context, req *InspectOAuthTokenGrantRequest) (rsp *InspectOAuthTokenGrantResponse, err error)
type DecoratedCertificateAuthorities ¶
type DecoratedCertificateAuthorities struct { // Service is the service to decorate. Service CertificateAuthoritiesServer // Prelude is called for each method before forwarding the call to Service. // If Prelude returns an error, then the call is skipped and the error is // processed via the Postlude (if one is defined), or it is returned directly. Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error) // Postlude is called for each method after Service has processed the call, or // after the Prelude has returned an error. This takes the the Service's // response proto (which may be nil) and/or any error. The decorated // service will return the response (possibly mutated) and error that Postlude // returns. Postlude func(c context.Context, methodName string, rsp proto.Message, err error) error }
func (*DecoratedCertificateAuthorities) CheckCertificate ¶
func (s *DecoratedCertificateAuthorities) CheckCertificate(c context.Context, req *CheckCertificateRequest) (rsp *CheckCertificateResponse, err error)
func (*DecoratedCertificateAuthorities) FetchCRL ¶
func (s *DecoratedCertificateAuthorities) FetchCRL(c context.Context, req *FetchCRLRequest) (rsp *FetchCRLResponse, err error)
func (*DecoratedCertificateAuthorities) GetCAStatus ¶
func (s *DecoratedCertificateAuthorities) GetCAStatus(c context.Context, req *GetCAStatusRequest) (rsp *GetCAStatusResponse, err error)
func (*DecoratedCertificateAuthorities) IsRevokedCert ¶
func (s *DecoratedCertificateAuthorities) IsRevokedCert(c context.Context, req *IsRevokedCertRequest) (rsp *IsRevokedCertResponse, err error)
func (*DecoratedCertificateAuthorities) ListCAs ¶
func (s *DecoratedCertificateAuthorities) ListCAs(c context.Context, req *google_protobuf.Empty) (rsp *ListCAsResponse, err error)
type DelegationPermissions ¶
type DelegationPermissions struct { // Rules specify what calls to MintDelegationToken are allowed. // // Rules are evaluated independently. One and only one rule should match the // request to allow the operation. If none rules or more than one rule match, // the request will be denied. // // See DelegationRule comments for more details. Rules []*DelegationRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"` }
DelegationPermissions is read from delegation.cfg in luci-config.
func (*DelegationPermissions) Descriptor ¶
func (*DelegationPermissions) Descriptor() ([]byte, []int)
func (*DelegationPermissions) GetRules ¶
func (m *DelegationPermissions) GetRules() []*DelegationRule
func (*DelegationPermissions) ProtoMessage ¶
func (*DelegationPermissions) ProtoMessage()
func (*DelegationPermissions) Reset ¶
func (m *DelegationPermissions) Reset()
func (*DelegationPermissions) String ¶
func (m *DelegationPermissions) String() string
type DelegationRule ¶
type DelegationRule struct { // A descriptive name of this rule, for the audit log. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Email of developers that own this rule, to know who to contact. Owner []string `protobuf:"bytes,2,rep,name=owner" json:"owner,omitempty"` // A set of callers to which this rule applies. // // Matched against verified credentials of a caller of MintDelegationToken. // // Each element is either: // * An identity string ("user:<email>"). // * A group reference ("group:<name>"). // // The groups specified here are expanded when MintDelegationTokenRequest is // evaluated. Requestor []string `protobuf:"bytes,3,rep,name=requestor" json:"requestor,omitempty"` // Identities that are allowed to be delegated/impersonated by the requestor. // // Matched against 'delegated_identity' field of MintDelegationTokenRequest. // // Each element is either: // * An identity string ("user:<email>"). // * A group reference ("group:<name>"). // * A special identifier "REQUESTOR" that is substituted by the requestor // identity when evaluating the rule. // // "REQUESTOR" allows one to generate tokens that delegate their own identity // to some target audience. // // The groups specified here are expanded when MintDelegationTokenRequest is // evaluated. AllowedToImpersonate []string `protobuf:"bytes,4,rep,name=allowed_to_impersonate,json=allowedToImpersonate" json:"allowed_to_impersonate,omitempty"` // A set of identities that should be able to use the new token. // // Matched against 'audience' field of MintDelegationTokenRequest. // // Each element is either: // * An identity string ("user:<email>"). // * A group reference ("group:<name>"). // * A special identifier "REQUESTOR" that is substituted by the requestor // identity when evaluating the rule. // * A special token "*" that means "any bearer can use the new token, // including anonymous". // // "REQUESTOR" is typically used here for rules that allow requestors to // impersonate someone else. The corresponding tokens have the requestor as // the only allowed audience. // // The groups specified here are NOT expanded when MintDelegationTokenRequest // is evaluated. To match the rule, MintDelegationTokenRequest must specify // subset of 'allowed_audience' groups explicitly in 'audience' field. AllowedAudience []string `protobuf:"bytes,5,rep,name=allowed_audience,json=allowedAudience" json:"allowed_audience,omitempty"` // A set of services that should be able to accept the new token. // // Matched against 'services' field of MintDelegationTokenRequest. // // Each element is either: // * A service identity string ("service:<id>"). // * A special token "*" that mean "any LUCI service should accept the // token". TargetService []string `protobuf:"bytes,6,rep,name=target_service,json=targetService" json:"target_service,omitempty"` // Maximum allowed validity duration (sec) of minted delegation tokens. // // Default is 12 hours. MaxValidityDuration int64 `protobuf:"varint,7,opt,name=max_validity_duration,json=maxValidityDuration" json:"max_validity_duration,omitempty"` }
DelegationRule describes a single allowed case of using delegation tokens.
An incoming MintDelegationTokenRequest is basically a tuple of:
- 'requestor_id' - an identity of whoever makes the request.
- 'delegated_identity' - an identity to delegate.
- 'audience' - a set of identities that will be able to use the token.
- 'services' - a set of services that should accept the token.
A request matches a rule iff:
- 'requestor_id' is in 'requestor' set.
- 'delegated_identity' is in 'allowed_to_impersonate' set.
- 'audience' is a subset of 'allowed_audience' set.
- 'services' is a subset of 'target_service' set.
The presence of a matching rule permits to mint the token. The rule also provides an upper bound on allowed validity_duration, and the rule's name is logged in the audit trail.
func (*DelegationRule) Descriptor ¶
func (*DelegationRule) Descriptor() ([]byte, []int)
func (*DelegationRule) GetAllowedAudience ¶
func (m *DelegationRule) GetAllowedAudience() []string
func (*DelegationRule) GetAllowedToImpersonate ¶
func (m *DelegationRule) GetAllowedToImpersonate() []string
func (*DelegationRule) GetMaxValidityDuration ¶
func (m *DelegationRule) GetMaxValidityDuration() int64
func (*DelegationRule) GetName ¶
func (m *DelegationRule) GetName() string
func (*DelegationRule) GetOwner ¶
func (m *DelegationRule) GetOwner() []string
func (*DelegationRule) GetRequestor ¶
func (m *DelegationRule) GetRequestor() []string
func (*DelegationRule) GetTargetService ¶
func (m *DelegationRule) GetTargetService() []string
func (*DelegationRule) ProtoMessage ¶
func (*DelegationRule) ProtoMessage()
func (*DelegationRule) Reset ¶
func (m *DelegationRule) Reset()
func (*DelegationRule) String ¶
func (m *DelegationRule) String() string
type DomainConfig ¶
type DomainConfig struct { // Domain is domain names of hosts this config applies to. // // Machines that reside in a subdomain of given domain are also considered // part of it, e.g. both FQDNs "host.example.com" and "host.abc.example.com" // match domain "example.com". Domain []string `protobuf:"bytes,1,rep,name=domain" json:"domain,omitempty"` // MachineTokenLifetime is how long generated machine tokens live, in seconds. // // If 0, machine tokens are not allowed. MachineTokenLifetime int64 `protobuf:"varint,5,opt,name=machine_token_lifetime,json=machineTokenLifetime" json:"machine_token_lifetime,omitempty"` }
DomainConfig is used inside CertificateAuthorityConfig.
func (*DomainConfig) Descriptor ¶
func (*DomainConfig) Descriptor() ([]byte, []int)
func (*DomainConfig) GetDomain ¶
func (m *DomainConfig) GetDomain() []string
func (*DomainConfig) GetMachineTokenLifetime ¶
func (m *DomainConfig) GetMachineTokenLifetime() int64
func (*DomainConfig) ProtoMessage ¶
func (*DomainConfig) ProtoMessage()
func (*DomainConfig) Reset ¶
func (m *DomainConfig) Reset()
func (*DomainConfig) String ¶
func (m *DomainConfig) String() string
type FetchCRLRequest ¶
type FetchCRLRequest struct { Cn string `protobuf:"bytes,1,opt,name=cn" json:"cn,omitempty"` Force bool `protobuf:"varint,2,opt,name=force" json:"force,omitempty"` }
FetchCRLRequest identifies a name of CA to fetch CRL for.
func (*FetchCRLRequest) Descriptor ¶
func (*FetchCRLRequest) Descriptor() ([]byte, []int)
func (*FetchCRLRequest) GetCn ¶
func (m *FetchCRLRequest) GetCn() string
func (*FetchCRLRequest) GetForce ¶
func (m *FetchCRLRequest) GetForce() bool
func (*FetchCRLRequest) ProtoMessage ¶
func (*FetchCRLRequest) ProtoMessage()
func (*FetchCRLRequest) Reset ¶
func (m *FetchCRLRequest) Reset()
func (*FetchCRLRequest) String ¶
func (m *FetchCRLRequest) String() string
type FetchCRLResponse ¶
type FetchCRLResponse struct {
CrlStatus *CRLStatus `protobuf:"bytes,1,opt,name=crl_status,json=crlStatus" json:"crl_status,omitempty"`
}
FetchCRLResponse is returned by FetchCRL.
func (*FetchCRLResponse) Descriptor ¶
func (*FetchCRLResponse) Descriptor() ([]byte, []int)
func (*FetchCRLResponse) GetCrlStatus ¶
func (m *FetchCRLResponse) GetCrlStatus() *CRLStatus
func (*FetchCRLResponse) ProtoMessage ¶
func (*FetchCRLResponse) ProtoMessage()
func (*FetchCRLResponse) Reset ¶
func (m *FetchCRLResponse) Reset()
func (*FetchCRLResponse) String ¶
func (m *FetchCRLResponse) String() string
type GetCAStatusRequest ¶
type GetCAStatusRequest struct {
Cn string `protobuf:"bytes,1,opt,name=cn" json:"cn,omitempty"`
}
GetCAStatusRequest identifies a name of CA to fetch.
func (*GetCAStatusRequest) Descriptor ¶
func (*GetCAStatusRequest) Descriptor() ([]byte, []int)
func (*GetCAStatusRequest) GetCn ¶
func (m *GetCAStatusRequest) GetCn() string
func (*GetCAStatusRequest) ProtoMessage ¶
func (*GetCAStatusRequest) ProtoMessage()
func (*GetCAStatusRequest) Reset ¶
func (m *GetCAStatusRequest) Reset()
func (*GetCAStatusRequest) String ¶
func (m *GetCAStatusRequest) String() string
type GetCAStatusResponse ¶
type GetCAStatusResponse struct { Config *CertificateAuthorityConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"` Cert string `protobuf:"bytes,2,opt,name=cert" json:"cert,omitempty"` Removed bool `protobuf:"varint,3,opt,name=removed" json:"removed,omitempty"` Ready bool `protobuf:"varint,4,opt,name=ready" json:"ready,omitempty"` AddedRev string `protobuf:"bytes,5,opt,name=added_rev,json=addedRev" json:"added_rev,omitempty"` UpdatedRev string `protobuf:"bytes,6,opt,name=updated_rev,json=updatedRev" json:"updated_rev,omitempty"` RemovedRev string `protobuf:"bytes,7,opt,name=removed_rev,json=removedRev" json:"removed_rev,omitempty"` CrlStatus *CRLStatus `protobuf:"bytes,8,opt,name=crl_status,json=crlStatus" json:"crl_status,omitempty"` }
GetCAStatusResponse is returned by GetCAStatus method.
If requested CA doesn't exist, all fields are empty.
func (*GetCAStatusResponse) Descriptor ¶
func (*GetCAStatusResponse) Descriptor() ([]byte, []int)
func (*GetCAStatusResponse) GetAddedRev ¶
func (m *GetCAStatusResponse) GetAddedRev() string
func (*GetCAStatusResponse) GetCert ¶
func (m *GetCAStatusResponse) GetCert() string
func (*GetCAStatusResponse) GetConfig ¶
func (m *GetCAStatusResponse) GetConfig() *CertificateAuthorityConfig
func (*GetCAStatusResponse) GetCrlStatus ¶
func (m *GetCAStatusResponse) GetCrlStatus() *CRLStatus
func (*GetCAStatusResponse) GetReady ¶
func (m *GetCAStatusResponse) GetReady() bool
func (*GetCAStatusResponse) GetRemoved ¶
func (m *GetCAStatusResponse) GetRemoved() bool
func (*GetCAStatusResponse) GetRemovedRev ¶
func (m *GetCAStatusResponse) GetRemovedRev() string
func (*GetCAStatusResponse) GetUpdatedRev ¶
func (m *GetCAStatusResponse) GetUpdatedRev() string
func (*GetCAStatusResponse) ProtoMessage ¶
func (*GetCAStatusResponse) ProtoMessage()
func (*GetCAStatusResponse) Reset ¶
func (m *GetCAStatusResponse) Reset()
func (*GetCAStatusResponse) String ¶
func (m *GetCAStatusResponse) String() string
type ImportedConfigs ¶
type ImportedConfigs struct { // The revision of the configs that are now in the datastore. // // It's either the imported revision, if configs change, or a previously known // revision, if configs at HEAD are same. Revision string `protobuf:"bytes,1,opt,name=revision" json:"revision,omitempty"` }
ImportedConfigs is returned by Import<something>Configs methods on success.
func (*ImportedConfigs) Descriptor ¶
func (*ImportedConfigs) Descriptor() ([]byte, []int)
func (*ImportedConfigs) GetRevision ¶
func (m *ImportedConfigs) GetRevision() string
func (*ImportedConfigs) ProtoMessage ¶
func (*ImportedConfigs) ProtoMessage()
func (*ImportedConfigs) Reset ¶
func (m *ImportedConfigs) Reset()
func (*ImportedConfigs) String ¶
func (m *ImportedConfigs) String() string
type InspectDelegationTokenRequest ¶
type InspectDelegationTokenRequest struct { // The token body. Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` }
InspectDelegationTokenRequest is body of InspectDelegationToken RPC call.
func (*InspectDelegationTokenRequest) Descriptor ¶
func (*InspectDelegationTokenRequest) Descriptor() ([]byte, []int)
func (*InspectDelegationTokenRequest) GetToken ¶
func (m *InspectDelegationTokenRequest) GetToken() string
func (*InspectDelegationTokenRequest) ProtoMessage ¶
func (*InspectDelegationTokenRequest) ProtoMessage()
func (*InspectDelegationTokenRequest) Reset ¶
func (m *InspectDelegationTokenRequest) Reset()
func (*InspectDelegationTokenRequest) String ¶
func (m *InspectDelegationTokenRequest) String() string
type InspectDelegationTokenResponse ¶
type InspectDelegationTokenResponse struct { // True if the token is valid. // // A token is valid if its signature is correct and it hasn't expired yet. Valid bool `protobuf:"varint,1,opt,name=valid" json:"valid,omitempty"` // Human readable summary of why token is invalid. // // Summarizes the rest of the fields of this struct. Set only if 'valid' is // false. InvalidityReason string `protobuf:"bytes,2,opt,name=invalidity_reason,json=invalidityReason" json:"invalidity_reason,omitempty"` // True if the token signature was verified. // // It means the token was generated by the token server and its body is not // a garbage. Note that a token can be correctly signed, but invalid (if it // has expired). // // If 'signed' is false, the fields below may (or may not) be a garbage. // // The token server uses private keys managed by Google Cloud Platform, they // are constantly being rotated and "old" signatures become invalid over time // (when corresponding keys are rotated out of existence). // // If 'signed' is false, use the rest of the response only as FYI, possibly // invalid or even maliciously constructed. Signed bool `protobuf:"varint,3,opt,name=signed" json:"signed,omitempty"` // True if the token signature was verified and token hasn't expired yet. // // We use "non_" prefix to make default 'false' value safer. NonExpired bool `protobuf:"varint,4,opt,name=non_expired,json=nonExpired" json:"non_expired,omitempty"` // The deserialized token envelope. // // May be empty if token was malformed and couldn't be deserialized. Envelope *messages.DelegationToken `protobuf:"bytes,5,opt,name=envelope" json:"envelope,omitempty"` // The deserialized token body (deserialized 'envelope.serialized_subtoken'). // // May be empty if token was malformed and couldn't be deserialized. Subtoken *messages.Subtoken `protobuf:"bytes,6,opt,name=subtoken" json:"subtoken,omitempty"` }
InspectDelegationTokenResponse is return value of InspectDelegationToken RPC.
func (*InspectDelegationTokenResponse) Descriptor ¶
func (*InspectDelegationTokenResponse) Descriptor() ([]byte, []int)
func (*InspectDelegationTokenResponse) GetEnvelope ¶
func (m *InspectDelegationTokenResponse) GetEnvelope() *messages.DelegationToken
func (*InspectDelegationTokenResponse) GetInvalidityReason ¶
func (m *InspectDelegationTokenResponse) GetInvalidityReason() string
func (*InspectDelegationTokenResponse) GetNonExpired ¶
func (m *InspectDelegationTokenResponse) GetNonExpired() bool
func (*InspectDelegationTokenResponse) GetSigned ¶
func (m *InspectDelegationTokenResponse) GetSigned() bool
func (*InspectDelegationTokenResponse) GetSubtoken ¶
func (m *InspectDelegationTokenResponse) GetSubtoken() *messages.Subtoken
func (*InspectDelegationTokenResponse) GetValid ¶
func (m *InspectDelegationTokenResponse) GetValid() bool
func (*InspectDelegationTokenResponse) ProtoMessage ¶
func (*InspectDelegationTokenResponse) ProtoMessage()
func (*InspectDelegationTokenResponse) Reset ¶
func (m *InspectDelegationTokenResponse) Reset()
func (*InspectDelegationTokenResponse) String ¶
func (m *InspectDelegationTokenResponse) String() string
type InspectMachineTokenRequest ¶
type InspectMachineTokenRequest struct { // The type of token being checked. // // Currently only LUCI_MACHINE_TOKEN is supported. This is also the default. TokenType tokenserver.MachineTokenType `protobuf:"varint,1,opt,name=token_type,json=tokenType,enum=tokenserver.MachineTokenType" json:"token_type,omitempty"` // The token body. Exact meaning depends on token_type. Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` }
InspectMachineTokenRequest is body of InspectMachineToken RPC call.
It contains machine token of some kind.
func (*InspectMachineTokenRequest) Descriptor ¶
func (*InspectMachineTokenRequest) Descriptor() ([]byte, []int)
func (*InspectMachineTokenRequest) GetToken ¶
func (m *InspectMachineTokenRequest) GetToken() string
func (*InspectMachineTokenRequest) GetTokenType ¶
func (m *InspectMachineTokenRequest) GetTokenType() tokenserver.MachineTokenType
func (*InspectMachineTokenRequest) ProtoMessage ¶
func (*InspectMachineTokenRequest) ProtoMessage()
func (*InspectMachineTokenRequest) Reset ¶
func (m *InspectMachineTokenRequest) Reset()
func (*InspectMachineTokenRequest) String ¶
func (m *InspectMachineTokenRequest) String() string
type InspectMachineTokenResponse ¶
type InspectMachineTokenResponse struct { // True if the token is valid. // // A token is valid if its signature is correct, it hasn't expired yet and // the credentials it was built from (e.g. a certificate) wasn't revoked. Valid bool `protobuf:"varint,1,opt,name=valid" json:"valid,omitempty"` // Human readable summary of why token is invalid. // // Summarizes the rest of the fields of this struct. Set only if 'valid' is // false. InvalidityReason string `protobuf:"bytes,2,opt,name=invalidity_reason,json=invalidityReason" json:"invalidity_reason,omitempty"` // True if the token signature was verified. // // It means the token was generated by the token server and its body is not // a garbage. Note that a token can be correctly signed, but invalid (if it // has expired or was revoked). // // If 'signed' is false, the fields below may (or may not) be a garbage. // // The token server uses private keys managed by Google Cloud Platform, they // are constantly being rotated and "old" signatures become invalid over time // (when corresponding keys are rotated out of existence). // // If 'signed' is false, use the rest of the response only as FYI, possibly // invalid or even maliciously constructed. Signed bool `protobuf:"varint,3,opt,name=signed" json:"signed,omitempty"` // True if the token signature was verified and token hasn't expired yet. // // We use "non_" prefix to make default 'false' value safer. NonExpired bool `protobuf:"varint,4,opt,name=non_expired,json=nonExpired" json:"non_expired,omitempty"` // True if the token signature was verified and the token wasn't revoked. // // It is possible for an expired token to be non revoked. They are independent // properties. // // We use "non_" prefix to make default 'false' value safer. NonRevoked bool `protobuf:"varint,5,opt,name=non_revoked,json=nonRevoked" json:"non_revoked,omitempty"` // Id of a private key used to sign this token, if applicable. SigningKeyId string `protobuf:"bytes,6,opt,name=signing_key_id,json=signingKeyId" json:"signing_key_id,omitempty"` // Name of a CA that issued the cert the token is based on, if applicable. // // Resolved from 'ca_id' field of the token body. CertCaName string `protobuf:"bytes,7,opt,name=cert_ca_name,json=certCaName" json:"cert_ca_name,omitempty"` // The decoded token body (depends on token_type request parameter). Empty if // token was malformed and couldn't be deserialized. // // Types that are valid to be assigned to TokenType: // *InspectMachineTokenResponse_LuciMachineToken TokenType isInspectMachineTokenResponse_TokenType `protobuf_oneof:"token_type"` }
InspectMachineTokenResponse is return value of InspectMachineToken RPC call.
func (*InspectMachineTokenResponse) Descriptor ¶
func (*InspectMachineTokenResponse) Descriptor() ([]byte, []int)
func (*InspectMachineTokenResponse) GetCertCaName ¶
func (m *InspectMachineTokenResponse) GetCertCaName() string
func (*InspectMachineTokenResponse) GetInvalidityReason ¶
func (m *InspectMachineTokenResponse) GetInvalidityReason() string
func (*InspectMachineTokenResponse) GetLuciMachineToken ¶
func (m *InspectMachineTokenResponse) GetLuciMachineToken() *tokenserver.MachineTokenBody
func (*InspectMachineTokenResponse) GetNonExpired ¶
func (m *InspectMachineTokenResponse) GetNonExpired() bool
func (*InspectMachineTokenResponse) GetNonRevoked ¶
func (m *InspectMachineTokenResponse) GetNonRevoked() bool
func (*InspectMachineTokenResponse) GetSigned ¶
func (m *InspectMachineTokenResponse) GetSigned() bool
func (*InspectMachineTokenResponse) GetSigningKeyId ¶
func (m *InspectMachineTokenResponse) GetSigningKeyId() string
func (*InspectMachineTokenResponse) GetTokenType ¶
func (m *InspectMachineTokenResponse) GetTokenType() isInspectMachineTokenResponse_TokenType
func (*InspectMachineTokenResponse) GetValid ¶
func (m *InspectMachineTokenResponse) GetValid() bool
func (*InspectMachineTokenResponse) ProtoMessage ¶
func (*InspectMachineTokenResponse) ProtoMessage()
func (*InspectMachineTokenResponse) Reset ¶
func (m *InspectMachineTokenResponse) Reset()
func (*InspectMachineTokenResponse) String ¶
func (m *InspectMachineTokenResponse) String() string
func (*InspectMachineTokenResponse) XXX_OneofFuncs ¶
func (*InspectMachineTokenResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type InspectMachineTokenResponse_LuciMachineToken ¶
type InspectMachineTokenResponse_LuciMachineToken struct {
LuciMachineToken *tokenserver.MachineTokenBody `protobuf:"bytes,20,opt,name=luci_machine_token,json=luciMachineToken,oneof"`
}
type InspectOAuthTokenGrantRequest ¶
type InspectOAuthTokenGrantRequest struct { // The token body. Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` }
InspectOAuthTokenGrantRequest is body of InspectOAuthTokenGrant RPC call.
func (*InspectOAuthTokenGrantRequest) Descriptor ¶
func (*InspectOAuthTokenGrantRequest) Descriptor() ([]byte, []int)
func (*InspectOAuthTokenGrantRequest) GetToken ¶
func (m *InspectOAuthTokenGrantRequest) GetToken() string
func (*InspectOAuthTokenGrantRequest) ProtoMessage ¶
func (*InspectOAuthTokenGrantRequest) ProtoMessage()
func (*InspectOAuthTokenGrantRequest) Reset ¶
func (m *InspectOAuthTokenGrantRequest) Reset()
func (*InspectOAuthTokenGrantRequest) String ¶
func (m *InspectOAuthTokenGrantRequest) String() string
type InspectOAuthTokenGrantResponse ¶
type InspectOAuthTokenGrantResponse struct { // True if the token is valid. // // A token is valid if its signature is correct, it hasn't expired yet and // token server rules still allow it. Valid bool `protobuf:"varint,1,opt,name=valid" json:"valid,omitempty"` // Human readable summary of why token is invalid. // // Summarizes the rest of the fields of this struct. Set only if 'valid' is // false. InvalidityReason string `protobuf:"bytes,2,opt,name=invalidity_reason,json=invalidityReason" json:"invalidity_reason,omitempty"` // True if the token signature was verified. // // It means the token was generated by the token server and its body is not // a garbage. Note that a token can be correctly signed, but invalid (if it // has expired). // // If 'signed' is false, the fields below may (or may not) be a garbage. // // The token server uses private keys managed by Google Cloud Platform, they // are constantly being rotated and "old" signatures become invalid over time // (when corresponding keys are rotated out of existence). // // If 'signed' is false, use the rest of the response only as FYI, possibly // invalid or even maliciously constructed. Signed bool `protobuf:"varint,3,opt,name=signed" json:"signed,omitempty"` // True if the token signature was verified and token hasn't expired yet. // // We use "non_" prefix to make default 'false' value safer. NonExpired bool `protobuf:"varint,4,opt,name=non_expired,json=nonExpired" json:"non_expired,omitempty"` // ID of a token server private key used to sign the token. SigningKeyId string `protobuf:"bytes,5,opt,name=signing_key_id,json=signingKeyId" json:"signing_key_id,omitempty"` // The deserialized token body. // // May be empty if token was malformed and couldn't be deserialized. TokenBody *tokenserver1.OAuthTokenGrantBody `protobuf:"bytes,6,opt,name=token_body,json=tokenBody" json:"token_body,omitempty"` // The service_accounts.cfg rule that governs the service account usage. // // May be present even if the token is not allowed by it. MatchingRule *ServiceAccountRule `protobuf:"bytes,7,opt,name=matching_rule,json=matchingRule" json:"matching_rule,omitempty"` // True if current service_accounts.cfg rules allow this token. AllowedByRules bool `protobuf:"varint,8,opt,name=allowed_by_rules,json=allowedByRules" json:"allowed_by_rules,omitempty"` }
InspectOAuthTokenGrantResponse is return value of InspectOAuthTokenGrant RPC.
func (*InspectOAuthTokenGrantResponse) Descriptor ¶
func (*InspectOAuthTokenGrantResponse) Descriptor() ([]byte, []int)
func (*InspectOAuthTokenGrantResponse) GetAllowedByRules ¶
func (m *InspectOAuthTokenGrantResponse) GetAllowedByRules() bool
func (*InspectOAuthTokenGrantResponse) GetInvalidityReason ¶
func (m *InspectOAuthTokenGrantResponse) GetInvalidityReason() string
func (*InspectOAuthTokenGrantResponse) GetMatchingRule ¶
func (m *InspectOAuthTokenGrantResponse) GetMatchingRule() *ServiceAccountRule
func (*InspectOAuthTokenGrantResponse) GetNonExpired ¶
func (m *InspectOAuthTokenGrantResponse) GetNonExpired() bool
func (*InspectOAuthTokenGrantResponse) GetSigned ¶
func (m *InspectOAuthTokenGrantResponse) GetSigned() bool
func (*InspectOAuthTokenGrantResponse) GetSigningKeyId ¶
func (m *InspectOAuthTokenGrantResponse) GetSigningKeyId() string
func (*InspectOAuthTokenGrantResponse) GetTokenBody ¶
func (m *InspectOAuthTokenGrantResponse) GetTokenBody() *tokenserver1.OAuthTokenGrantBody
func (*InspectOAuthTokenGrantResponse) GetValid ¶
func (m *InspectOAuthTokenGrantResponse) GetValid() bool
func (*InspectOAuthTokenGrantResponse) ProtoMessage ¶
func (*InspectOAuthTokenGrantResponse) ProtoMessage()
func (*InspectOAuthTokenGrantResponse) Reset ¶
func (m *InspectOAuthTokenGrantResponse) Reset()
func (*InspectOAuthTokenGrantResponse) String ¶
func (m *InspectOAuthTokenGrantResponse) String() string
type IsRevokedCertRequest ¶
type IsRevokedCertRequest struct { Ca string `protobuf:"bytes,1,opt,name=ca" json:"ca,omitempty"` Sn string `protobuf:"bytes,2,opt,name=sn" json:"sn,omitempty"` }
IsRevokedCertRequest contains a name of the CA and a cert serial number.
func (*IsRevokedCertRequest) Descriptor ¶
func (*IsRevokedCertRequest) Descriptor() ([]byte, []int)
func (*IsRevokedCertRequest) GetCa ¶
func (m *IsRevokedCertRequest) GetCa() string
func (*IsRevokedCertRequest) GetSn ¶
func (m *IsRevokedCertRequest) GetSn() string
func (*IsRevokedCertRequest) ProtoMessage ¶
func (*IsRevokedCertRequest) ProtoMessage()
func (*IsRevokedCertRequest) Reset ¶
func (m *IsRevokedCertRequest) Reset()
func (*IsRevokedCertRequest) String ¶
func (m *IsRevokedCertRequest) String() string
type IsRevokedCertResponse ¶
type IsRevokedCertResponse struct {
Revoked bool `protobuf:"varint,1,opt,name=revoked" json:"revoked,omitempty"`
}
IsRevokedCertResponse is returned by IsRevokedCert
func (*IsRevokedCertResponse) Descriptor ¶
func (*IsRevokedCertResponse) Descriptor() ([]byte, []int)
func (*IsRevokedCertResponse) GetRevoked ¶
func (m *IsRevokedCertResponse) GetRevoked() bool
func (*IsRevokedCertResponse) ProtoMessage ¶
func (*IsRevokedCertResponse) ProtoMessage()
func (*IsRevokedCertResponse) Reset ¶
func (m *IsRevokedCertResponse) Reset()
func (*IsRevokedCertResponse) String ¶
func (m *IsRevokedCertResponse) String() string
type ListCAsResponse ¶
type ListCAsResponse struct {
Cn []string `protobuf:"bytes,1,rep,name=cn" json:"cn,omitempty"`
}
ListCAsResponse is returned by ListCAs.
func (*ListCAsResponse) Descriptor ¶
func (*ListCAsResponse) Descriptor() ([]byte, []int)
func (*ListCAsResponse) GetCn ¶
func (m *ListCAsResponse) GetCn() []string
func (*ListCAsResponse) ProtoMessage ¶
func (*ListCAsResponse) ProtoMessage()
func (*ListCAsResponse) Reset ¶
func (m *ListCAsResponse) Reset()
func (*ListCAsResponse) String ¶
func (m *ListCAsResponse) String() string
type ServiceAccountRule ¶
type ServiceAccountRule struct { // A descriptive name of this rule, for the audit log. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Email of developers that own this rule, to know who to contact. Owner []string `protobuf:"bytes,2,rep,name=owner" json:"owner,omitempty"` // Email of service accounts that this rule applies to. // // This is the "primary key" in the rules table: there can be only one rule // that applies to a given service account. ServiceAccount []string `protobuf:"bytes,3,rep,name=service_account,json=serviceAccount" json:"service_account,omitempty"` // OAuth scopes we allow to be granted to the OAuth token. // // Any subset of given scopes is allowed. This field is evaluated in // MintOAuthTokenViaGrant RPC handler, right before generating the OAuth // token. AllowedScope []string `protobuf:"bytes,4,rep,name=allowed_scope,json=allowedScope" json:"allowed_scope,omitempty"` // A set of identities that are allowed to act as the service account (perhaps // indirectly through some other intermediary "proxy" service like Swarming). // // Users listed here are ultimately able to grab an OAuth token belonging to // the service account. // // Each element is either: // * An identity string ("user:<email>"). // * A group reference ("group:<name>"). EndUser []string `protobuf:"bytes,5,rep,name=end_user,json=endUser" json:"end_user,omitempty"` // A set of identities that are allowed to act on behalf of end users when // grabbing an OAuth token for the service account. // // These identities represent "proxy" services that do something with service // accounts on behalf of end users. Only identities in this set are allowed // to perform MintOAuthTokenGrant RPC. // // Each element is either: // * An identity string ("user:<email>"). // * A group reference ("group:<name>"). Proxy []string `protobuf:"bytes,6,rep,name=proxy" json:"proxy,omitempty"` // Maximum allowed validity duration (sec) of OAuth token grants. // // The grant is minted by MintOAuthTokenGrant RPC (called, for example, when // Swarming task is posted), and checked by MintOAuthTokenViaGrant RPC (called // when the task actually runs). So the allowed validity duration should // account for possible queuing delays. // // This duration has no relation to the OAuth token lifetime. The OAuth token // produced by MintOAuthTokenViaGrant can always live up to 1h regardless of // validity duration of the grant. // // Default is 24 hours. MaxGrantValidityDuration int64 `` /* 131-byte string literal not displayed */ }
ServiceAccountRule describes a single allowed case of using service accounts.
The usage of a service account is initiated by an end user, through some "proxy" service. For example, when a user posts a Swarming task that uses a service account, the end user is whoever posts the task, and the proxy is Swarming service itself.
This rule specifies which end users are allowed to act as an account, and through which proxies.
func (*ServiceAccountRule) Descriptor ¶
func (*ServiceAccountRule) Descriptor() ([]byte, []int)
func (*ServiceAccountRule) GetAllowedScope ¶
func (m *ServiceAccountRule) GetAllowedScope() []string
func (*ServiceAccountRule) GetEndUser ¶
func (m *ServiceAccountRule) GetEndUser() []string
func (*ServiceAccountRule) GetMaxGrantValidityDuration ¶
func (m *ServiceAccountRule) GetMaxGrantValidityDuration() int64
func (*ServiceAccountRule) GetName ¶
func (m *ServiceAccountRule) GetName() string
func (*ServiceAccountRule) GetOwner ¶
func (m *ServiceAccountRule) GetOwner() []string
func (*ServiceAccountRule) GetProxy ¶
func (m *ServiceAccountRule) GetProxy() []string
func (*ServiceAccountRule) GetServiceAccount ¶
func (m *ServiceAccountRule) GetServiceAccount() []string
func (*ServiceAccountRule) ProtoMessage ¶
func (*ServiceAccountRule) ProtoMessage()
func (*ServiceAccountRule) Reset ¶
func (m *ServiceAccountRule) Reset()
func (*ServiceAccountRule) String ¶
func (m *ServiceAccountRule) String() string
type ServiceAccountsPermissions ¶
type ServiceAccountsPermissions struct { // Rules specify how MintOAuthTokenViaGrant can be used. // // Rules define a mapping {service account email -> authorization config}, // where 'service account email' is matched to 'service_account' field of // ServiceAccountRule, and 'authorization config' is the rest of fields in // ServiceAccountRule that define how exactly the given service account is // allowed to be used. // // See ServiceAccountRule comments for more details. Rules []*ServiceAccountRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"` }
ServiceAccountsPermissions is read from service_accounts.cfg in luci-config.
func (*ServiceAccountsPermissions) Descriptor ¶
func (*ServiceAccountsPermissions) Descriptor() ([]byte, []int)
func (*ServiceAccountsPermissions) GetRules ¶
func (m *ServiceAccountsPermissions) GetRules() []*ServiceAccountRule
func (*ServiceAccountsPermissions) ProtoMessage ¶
func (*ServiceAccountsPermissions) ProtoMessage()
func (*ServiceAccountsPermissions) Reset ¶
func (m *ServiceAccountsPermissions) Reset()
func (*ServiceAccountsPermissions) String ¶
func (m *ServiceAccountsPermissions) String() string
type TokenServerConfig ¶
type TokenServerConfig struct { // List of CAs we trust. CertificateAuthority []*CertificateAuthorityConfig `protobuf:"bytes,1,rep,name=certificate_authority,json=certificateAuthority" json:"certificate_authority,omitempty"` }
TokenServerConfig is read from tokenserver.cfg in luci-config.
func (*TokenServerConfig) Descriptor ¶
func (*TokenServerConfig) Descriptor() ([]byte, []int)
func (*TokenServerConfig) GetCertificateAuthority ¶
func (m *TokenServerConfig) GetCertificateAuthority() []*CertificateAuthorityConfig
func (*TokenServerConfig) ProtoMessage ¶
func (*TokenServerConfig) ProtoMessage()
func (*TokenServerConfig) Reset ¶
func (m *TokenServerConfig) Reset()
func (*TokenServerConfig) String ¶
func (m *TokenServerConfig) String() string