Documentation ¶
Index ¶
- Variables
- func RegisterAuditLogsServer(s *grpc.Server, srv AuditLogsServer)
- type AuditLog
- func (*AuditLog) Descriptor() ([]byte, []int)
- func (m *AuditLog) GetCallerIp() string
- func (m *AuditLog) GetCartId() string
- func (m *AuditLog) GetConfigRevision() string
- func (m *AuditLog) GetDecision() Decision
- func (m *AuditLog) GetErrorType() string
- func (m *AuditLog) GetHttpRequest() *_struct.Struct
- func (m *AuditLog) GetHttpResponseCode() int64
- func (m *AuditLog) GetMethodName() string
- func (m *AuditLog) GetName() string
- func (m *AuditLog) GetReason() string
- func (m *AuditLog) GetResourceName() string
- func (m *AuditLog) GetServiceName() string
- func (m *AuditLog) GetServiceType() string
- func (m *AuditLog) GetTime() *timestamp.Timestamp
- func (m *AuditLog) GetTokenId() string
- func (m *AuditLog) GetTokenIssuer() string
- func (m *AuditLog) GetTokenSubject() string
- func (m *AuditLog) GetTracingId() string
- func (m *AuditLog) GetTtl() *duration.Duration
- func (m *AuditLog) GetType() LogType
- func (*AuditLog) ProtoMessage()
- func (m *AuditLog) Reset()
- func (m *AuditLog) String() string
- func (m *AuditLog) XXX_DiscardUnknown()
- func (m *AuditLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuditLog) XXX_Merge(src proto.Message)
- func (m *AuditLog) XXX_Size() int
- func (m *AuditLog) XXX_Unmarshal(b []byte) error
- type AuditLogsClient
- type AuditLogsServer
- type Decision
- type ListAuditLogsRequest
- func (*ListAuditLogsRequest) Descriptor() ([]byte, []int)
- func (m *ListAuditLogsRequest) GetFilter() string
- func (m *ListAuditLogsRequest) GetPageSize() int32
- func (m *ListAuditLogsRequest) GetPageToken() string
- func (m *ListAuditLogsRequest) GetUserId() string
- func (*ListAuditLogsRequest) ProtoMessage()
- func (m *ListAuditLogsRequest) Reset()
- func (m *ListAuditLogsRequest) String() string
- func (m *ListAuditLogsRequest) XXX_DiscardUnknown()
- func (m *ListAuditLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListAuditLogsRequest) XXX_Merge(src proto.Message)
- func (m *ListAuditLogsRequest) XXX_Size() int
- func (m *ListAuditLogsRequest) XXX_Unmarshal(b []byte) error
- type ListAuditLogsResponse
- func (*ListAuditLogsResponse) Descriptor() ([]byte, []int)
- func (m *ListAuditLogsResponse) GetAuditLogs() []*AuditLog
- func (m *ListAuditLogsResponse) GetNextPageToken() string
- func (*ListAuditLogsResponse) ProtoMessage()
- func (m *ListAuditLogsResponse) Reset()
- func (m *ListAuditLogsResponse) String() string
- func (m *ListAuditLogsResponse) XXX_DiscardUnknown()
- func (m *ListAuditLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListAuditLogsResponse) XXX_Merge(src proto.Message)
- func (m *ListAuditLogsResponse) XXX_Size() int
- func (m *ListAuditLogsResponse) XXX_Unmarshal(b []byte) error
- type LogType
- type UnimplementedAuditLogsServer
Constants ¶
This section is empty.
Variables ¶
View Source
var Decision_name = map[int32]string{
0: "UNSPECIFIED",
1: "PASS",
2: "FAIL",
}
View Source
var Decision_value = map[string]int32{
"UNSPECIFIED": 0,
"PASS": 1,
"FAIL": 2,
}
View Source
var LogType_name = map[int32]string{
0: "NONE",
1: "REQUEST",
2: "POLICY",
}
View Source
var LogType_value = map[string]int32{
"NONE": 0,
"REQUEST": 1,
"POLICY": 2,
}
Functions ¶
func RegisterAuditLogsServer ¶
func RegisterAuditLogsServer(s *grpc.Server, srv AuditLogsServer)
Types ¶
type AuditLog ¶
type AuditLog struct { // Name of the audit log. // Format: `users/{user_id}/logs/{log_id}`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Type of log entry. could be "access" or "policy". Type LogType `protobuf:"varint,2,opt,name=type,proto3,enum=AuditLogs.v1.LogType" json:"type,omitempty"` // ServiceName is the name of the service which made the decision. ServiceName string `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // ServiceType is the type of the service which made the decision. ServiceType string `protobuf:"bytes,4,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` // TokenID is the id of the token, maybe "jti". TokenId string `protobuf:"bytes,5,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` // TokenSubject is the "sub" of the token. TokenSubject string `protobuf:"bytes,6,opt,name=token_subject,json=tokenSubject,proto3" json:"token_subject,omitempty"` // TokenIssuer is the iss of the token. TokenIssuer string `protobuf:"bytes,7,opt,name=token_issuer,json=tokenIssuer,proto3" json:"token_issuer,omitempty"` // Decision is the PassAuthCheck if the request passes the auth check. Decision Decision `protobuf:"varint,8,opt,name=decision,proto3,enum=AuditLogs.v1.Decision" json:"decision,omitempty"` // ErrorType of deny. // TODO: consider making this an enum. ErrorType string `protobuf:"bytes,9,opt,name=error_type,json=errorType,proto3" json:"error_type,omitempty"` // The reason for the deny decision. Reason string `protobuf:"bytes,10,opt,name=reason,proto3" json:"reason,omitempty"` // Time at which the decision was made. Time *timestamp.Timestamp `protobuf:"bytes,11,opt,name=time,proto3" json:"time,omitempty"` // ResourceName is the name of the resource that was target of the operation. ResourceName string `protobuf:"bytes,12,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` // MethodName is the name of the service method or operation. MethodName string `protobuf:"bytes,13,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // TracingID is the id of request from proxies. TracingId string `protobuf:"bytes,14,opt,name=tracing_id,json=tracingId,proto3" json:"tracing_id,omitempty"` // Requester's IP. CallerIp string `protobuf:"bytes,15,opt,name=caller_ip,json=callerIp,proto3" json:"caller_ip,omitempty"` // HTTP Response Code. HttpResponseCode int64 `protobuf:"varint,16,opt,name=http_response_code,json=httpResponseCode,proto3" json:"http_response_code,omitempty"` // HTTP Request. HttpRequest *_struct.Struct `protobuf:"bytes,17,opt,name=http_request,json=httpRequest,proto3" json:"http_request,omitempty"` // TTL that user requested for the access. Ttl *duration.Duration `protobuf:"bytes,19,opt,name=ttl,proto3" json:"ttl,omitempty"` // CartId of the request. CartId string `protobuf:"bytes,20,opt,name=cart_id,json=cartId,proto3" json:"cart_id,omitempty"` // ConfigRevision that the request using. ConfigRevision string `protobuf:"bytes,21,opt,name=config_revision,json=configRevision,proto3" json:"config_revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
An AuditLog records request for access. They contain the following information:
- Where: the name of the service that made the decision.
- What: the requested Action (e.g. read/write/...) and the Resource (e.g. GCS bucket, a resource at an endpoint).
- When: the time the decision was made.
- Who: the identity and authentication information for the requester.
- Decision: the authorization decision, and the reason for it.
- Metadata: the request, response, status code, tracing id, etc.
func (*AuditLog) Descriptor ¶
func (*AuditLog) GetCallerIp ¶ added in v0.9.4
func (*AuditLog) GetConfigRevision ¶ added in v0.9.4
func (*AuditLog) GetDecision ¶ added in v0.9.4
func (*AuditLog) GetErrorType ¶ added in v0.9.4
func (*AuditLog) GetHttpRequest ¶ added in v0.9.4
func (*AuditLog) GetHttpResponseCode ¶ added in v0.9.4
func (*AuditLog) GetMethodName ¶ added in v0.9.4
func (*AuditLog) GetResourceName ¶ added in v0.9.4
func (*AuditLog) GetServiceName ¶ added in v0.9.4
func (*AuditLog) GetServiceType ¶ added in v0.9.4
func (*AuditLog) GetTokenId ¶ added in v0.9.4
func (*AuditLog) GetTokenIssuer ¶ added in v0.9.4
func (*AuditLog) GetTokenSubject ¶ added in v0.9.4
func (*AuditLog) GetTracingId ¶ added in v0.9.4
func (*AuditLog) ProtoMessage ¶
func (*AuditLog) ProtoMessage()
func (*AuditLog) XXX_DiscardUnknown ¶
func (m *AuditLog) XXX_DiscardUnknown()
func (*AuditLog) XXX_Marshal ¶
func (*AuditLog) XXX_Unmarshal ¶
type AuditLogsClient ¶
type AuditLogsClient interface { // Lists the AuditLogs Logs. ListAuditLogs(ctx context.Context, in *ListAuditLogsRequest, opts ...grpc.CallOption) (*ListAuditLogsResponse, error) }
AuditLogsClient is the client API for AuditLogs service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAuditLogsClient ¶
func NewAuditLogsClient(cc grpc.ClientConnInterface) AuditLogsClient
type AuditLogsServer ¶
type AuditLogsServer interface { // Lists the AuditLogs Logs. ListAuditLogs(context.Context, *ListAuditLogsRequest) (*ListAuditLogsResponse, error) }
AuditLogsServer is the server API for AuditLogs service.
type Decision ¶
type Decision int32
Decision is the result of an auth check.
func (Decision) EnumDescriptor ¶
type ListAuditLogsRequest ¶
type ListAuditLogsRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListAuditLogsRequest) Descriptor ¶
func (*ListAuditLogsRequest) Descriptor() ([]byte, []int)
func (*ListAuditLogsRequest) GetFilter ¶
func (m *ListAuditLogsRequest) GetFilter() string
func (*ListAuditLogsRequest) GetPageSize ¶
func (m *ListAuditLogsRequest) GetPageSize() int32
func (*ListAuditLogsRequest) GetPageToken ¶
func (m *ListAuditLogsRequest) GetPageToken() string
func (*ListAuditLogsRequest) GetUserId ¶ added in v0.9.3
func (m *ListAuditLogsRequest) GetUserId() string
func (*ListAuditLogsRequest) ProtoMessage ¶
func (*ListAuditLogsRequest) ProtoMessage()
func (*ListAuditLogsRequest) Reset ¶
func (m *ListAuditLogsRequest) Reset()
func (*ListAuditLogsRequest) String ¶
func (m *ListAuditLogsRequest) String() string
func (*ListAuditLogsRequest) XXX_DiscardUnknown ¶
func (m *ListAuditLogsRequest) XXX_DiscardUnknown()
func (*ListAuditLogsRequest) XXX_Marshal ¶
func (m *ListAuditLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListAuditLogsRequest) XXX_Merge ¶
func (m *ListAuditLogsRequest) XXX_Merge(src proto.Message)
func (*ListAuditLogsRequest) XXX_Size ¶
func (m *ListAuditLogsRequest) XXX_Size() int
func (*ListAuditLogsRequest) XXX_Unmarshal ¶
func (m *ListAuditLogsRequest) XXX_Unmarshal(b []byte) error
type ListAuditLogsResponse ¶
type ListAuditLogsResponse struct { AuditLogs []*AuditLog `protobuf:"bytes,1,rep,name=audit_logs,json=auditLogs,proto3" json:"audit_logs,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListAuditLogsResponse) Descriptor ¶
func (*ListAuditLogsResponse) Descriptor() ([]byte, []int)
func (*ListAuditLogsResponse) GetAuditLogs ¶
func (m *ListAuditLogsResponse) GetAuditLogs() []*AuditLog
func (*ListAuditLogsResponse) GetNextPageToken ¶
func (m *ListAuditLogsResponse) GetNextPageToken() string
func (*ListAuditLogsResponse) ProtoMessage ¶
func (*ListAuditLogsResponse) ProtoMessage()
func (*ListAuditLogsResponse) Reset ¶
func (m *ListAuditLogsResponse) Reset()
func (*ListAuditLogsResponse) String ¶
func (m *ListAuditLogsResponse) String() string
func (*ListAuditLogsResponse) XXX_DiscardUnknown ¶
func (m *ListAuditLogsResponse) XXX_DiscardUnknown()
func (*ListAuditLogsResponse) XXX_Marshal ¶
func (m *ListAuditLogsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListAuditLogsResponse) XXX_Merge ¶
func (m *ListAuditLogsResponse) XXX_Merge(src proto.Message)
func (*ListAuditLogsResponse) XXX_Size ¶
func (m *ListAuditLogsResponse) XXX_Size() int
func (*ListAuditLogsResponse) XXX_Unmarshal ¶
func (m *ListAuditLogsResponse) XXX_Unmarshal(b []byte) error
type LogType ¶ added in v0.9.4
type LogType int32
LogType is the type of log.
func (LogType) EnumDescriptor ¶ added in v0.9.4
type UnimplementedAuditLogsServer ¶
type UnimplementedAuditLogsServer struct { }
UnimplementedAuditLogsServer can be embedded to have forward compatible implementations.
func (*UnimplementedAuditLogsServer) ListAuditLogs ¶
func (*UnimplementedAuditLogsServer) ListAuditLogs(ctx context.Context, req *ListAuditLogsRequest) (*ListAuditLogsResponse, error)
Click to show internal directories.
Click to hide internal directories.