grpc

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package grpc provides gRPC API types for AegisGate

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.AuthService",
		HandlerType: (*AuthServiceServer)(nil),
	}

	ProxyService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.ProxyService",
		HandlerType: (*ProxyServiceServer)(nil),
	}

	ComplianceService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.ComplianceService",
		HandlerType: (*ComplianceServiceServer)(nil),
	}

	SIEMService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.SIEMService",
		HandlerType: (*SIEMServiceServer)(nil),
	}

	WebhookService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.WebhookService",
		HandlerType: (*WebhookServiceServer)(nil),
	}

	CoreService_ServiceDesc = grpc.ServiceDesc{
		ServiceName: "grpc.CoreService",
		HandlerType: (*CoreServiceServer)(nil),
	}
)

Service descriptors (simplified)

Functions

func NewServer

func NewServer(port string, _ *slog.Logger) *grpc.Server

NewServer creates a new gRPC server

func RegisterAuthServiceServer

func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer)

RegisterAuthServiceServer registers the AuthService to the provided grpc.Server

func RegisterComplianceServiceServer

func RegisterComplianceServiceServer(s *grpc.Server, srv ComplianceServiceServer)

RegisterComplianceServiceServer registers the ComplianceService to the provided grpc.Server

func RegisterCoreServiceServer

func RegisterCoreServiceServer(s *grpc.Server, srv CoreServiceServer)

RegisterCoreServiceServer registers the CoreService to the provided grpc.Server

func RegisterProxyServiceServer

func RegisterProxyServiceServer(s *grpc.Server, srv ProxyServiceServer)

RegisterProxyServiceServer registers the ProxyService to the provided grpc.Server

func RegisterSIEMServiceServer

func RegisterSIEMServiceServer(s *grpc.Server, srv SIEMServiceServer)

RegisterSIEMServiceServer registers the SIEMService to the provided grpc.Server

func RegisterWebhookServiceServer

func RegisterWebhookServiceServer(s *grpc.Server, srv WebhookServiceServer)

RegisterWebhookServiceServer registers the WebhookService to the provided grpc.Server

func RunServer

func RunServer(port string, logger *slog.Logger) error

RunServer runs the gRPC server with proper lifecycle management

func Start

func Start(port string, logger *slog.Logger) (*grpc.Server, error)

Start starts the gRPC server on the given port

func Stop

func Stop(s *grpc.Server)

Stop gracefully stops the gRPC server

func StreamInterceptor

func StreamInterceptor(logger *slog.Logger) grpc.StreamServerInterceptor

StreamInterceptor returns a stream server interceptor for logging

func UnaryInterceptor

func UnaryInterceptor(logger *slog.Logger) grpc.UnaryServerInterceptor

UnaryInterceptor returns a unary server interceptor for logging

Types

type AuthService

type AuthService struct {
	UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

AuthService implements the Auth service

func NewAuthService

func NewAuthService(manager *auth.Manager, logger *slog.Logger) *AuthService

NewAuthService creates a new auth service

func (*AuthService) CreateUser

CreateUser creates a new user

func (*AuthService) DeleteUser

DeleteUser deletes a user - uses InvalidateUserSessions as proxy

func (*AuthService) GetAuthConfig

GetAuthConfig gets authentication configuration

func (*AuthService) GetSessions

GetSessions gets active sessions

func (*AuthService) GetUser

func (s *AuthService) GetUser(ctx context.Context, req *GetUserRequest) (*GetUserResponse, error)

GetUser retrieves a user by ID

func (*AuthService) ListUsers

func (s *AuthService) ListUsers(ctx context.Context, req *ListUsersRequest) (*ListUsersResponse, error)

ListUsers lists all users

func (*AuthService) Login

func (s *AuthService) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)

Login authenticates a user and returns a session token

func (*AuthService) Logout

func (s *AuthService) Logout(ctx context.Context, req *LogoutRequest) (*LogoutResponse, error)

Logout invalidates a session token

func (*AuthService) UpdateUser

UpdateUser updates an existing user

func (*AuthService) ValidateToken

ValidateToken validates a session token

type CertificateInfo

type CertificateInfo struct {
	Subject     string `json:"subject"`
	Issuer      string `json:"issuer"`
	NotBefore   int64  `json:"not_before"`
	NotAfter    int64  `json:"not_after"`
	Fingerprint string `json:"fingerprint"`
}

type ClearViolationsRequest

type ClearViolationsRequest struct{}

type ClearViolationsResponse

type ClearViolationsResponse struct {
	Success bool `json:"success"`
}

type ComplianceFinding

type ComplianceFinding struct {
	Id          string          `json:"id"`
	Title       string          `json:"title"`
	Description string          `json:"description"`
	Severity    FindingSeverity `json:"severity"`
	Category    string          `json:"category"`
	Framework   string          `json:"framework"`
	Timestamp   int64           `json:"timestamp"`
}

type ComplianceService

type ComplianceService struct {
	UnimplementedComplianceServiceServer
	// contains filtered or unexported fields
}

ComplianceService implements the Compliance service

func NewComplianceService

func NewComplianceService(manager *compliance.Manager, logger *slog.Logger) *ComplianceService

NewComplianceService creates a new compliance service

func (*ComplianceService) GenerateReport

GenerateReport generates a compliance report

func (*ComplianceService) GetFindings

GetFindings returns compliance findings

func (*ComplianceService) GetFrameworks

GetFrameworks returns available compliance frameworks

func (*ComplianceService) GetStatus

GetStatus returns compliance status

func (*ComplianceService) RunCheck

RunCheck runs a compliance check

type ComplianceServiceServer

ComplianceServiceServer is the server API for ComplianceService

type ComplianceStatus

type ComplianceStatus int32
const (
	ComplianceStatus_UNKNOWN        ComplianceStatus = 0
	ComplianceStatus_PASS           ComplianceStatus = 1
	ComplianceStatus_FAIL           ComplianceStatus = 2
	ComplianceStatus_WARNING        ComplianceStatus = 3
	ComplianceStatus_PENDING        ComplianceStatus = 4
	ComplianceStatus_NOT_APPLICABLE ComplianceStatus = 5
)

ComplianceStatus values

const (
	ComplianceStatusUnknown ComplianceStatus = iota
	ComplianceStatusPass
	ComplianceStatusFail
	ComplianceStatusWarning
	ComplianceStatusPending
	ComplianceStatusNotApplicable
)

type ComplianceSummary

type ComplianceSummary struct {
	TotalChecks   int32   `json:"total_checks"`
	Passed        int32   `json:"passed"`
	Failed        int32   `json:"failed"`
	Warnings      int32   `json:"warnings"`
	NotApplicable int32   `json:"not_applicable"`
	Score         float64 `json:"score"`
}

type CoreService

type CoreService struct {
	UnimplementedCoreServiceServer
	// contains filtered or unexported fields
}

CoreService implements the Core service

func NewCoreService

func NewCoreService(metrics *metrics.Manager, logger *slog.Logger) *CoreService

NewCoreService creates a new core service

func (*CoreService) DisableModule

DisableModule disables a module

func (*CoreService) EnableModule

EnableModule enables a module

func (*CoreService) GetHealth

func (s *CoreService) GetHealth(ctx context.Context, req *GetHealthRequest) (*GetHealthResponse, error)

GetHealth returns health status

func (*CoreService) GetMetrics

GetMetrics returns system metrics

func (*CoreService) GetModule

func (s *CoreService) GetModule(ctx context.Context, req *GetModuleRequest) (*GetModuleResponse, error)

GetModule gets a module by ID

func (*CoreService) GetRegistryStatus

GetRegistryStatus returns registry status

func (*CoreService) GetUptime

func (s *CoreService) GetUptime(ctx context.Context, req *GetUptimeRequest) (*GetUptimeResponse, error)

GetUptime returns system uptime

func (*CoreService) GetVersion

GetVersion returns version info

func (*CoreService) ListModules

ListModules lists all registered modules

type CreateUserRequest

type CreateUserRequest struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Role     string `json:"role"`
}

type CreateUserResponse

type CreateUserResponse struct {
	User *User `json:"user"`
}

type CreateWebhookRequest

type CreateWebhookRequest struct {
	Name    string   `json:"name"`
	Url     string   `json:"url"`
	Events  []string `json:"events"`
	Enabled bool     `json:"enabled"`
}

type CreateWebhookResponse

type CreateWebhookResponse struct {
	Webhook *WebhookInfo `json:"webhook"`
}

type DeleteUserRequest

type DeleteUserRequest struct {
	UserId string `json:"user_id"`
}

type DeleteUserResponse

type DeleteUserResponse struct {
	Success bool `json:"success"`
}

type DeleteWebhookRequest

type DeleteWebhookRequest struct {
	WebhookId string `json:"webhook_id"`
}

type DeleteWebhookResponse

type DeleteWebhookResponse struct {
	Success bool `json:"success"`
}

type DisableModuleRequest

type DisableModuleRequest struct {
	ModuleId string `json:"module_id"`
}

type DisableModuleResponse

type DisableModuleResponse struct {
	Success bool `json:"success"`
}

type DisableProxyRequest

type DisableProxyRequest struct{}

type DisableProxyResponse

type DisableProxyResponse struct {
	Success bool `json:"success"`
}

type DisableWebhookRequest

type DisableWebhookRequest struct {
	WebhookId string `json:"webhook_id"`
}

type DisableWebhookResponse

type DisableWebhookResponse struct {
	Webhook *WebhookInfo `json:"webhook"`
}

type EnableModuleRequest

type EnableModuleRequest struct {
	ModuleId string `json:"module_id"`
}

type EnableModuleResponse

type EnableModuleResponse struct {
	Success bool `json:"success"`
}

type EnableProxyRequest

type EnableProxyRequest struct{}

type EnableProxyResponse

type EnableProxyResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type EnableWebhookRequest

type EnableWebhookRequest struct {
	WebhookId string `json:"webhook_id"`
}

type EnableWebhookResponse

type EnableWebhookResponse struct {
	Webhook *WebhookInfo `json:"webhook"`
}

type EventSeverity

type EventSeverity int32
const (
	EventSeverityInfo EventSeverity = iota
	EventSeverityLow
	EventSeverityMedium
	EventSeverityHigh
	EventSeverityCritical
)

type FindingSeverity

type FindingSeverity int32
const (
	FindingSeverity_UNKNOWN  FindingSeverity = 0
	FindingSeverity_INFO     FindingSeverity = 1
	FindingSeverity_LOW      FindingSeverity = 2
	FindingSeverity_MEDIUM   FindingSeverity = 3
	FindingSeverity_HIGH     FindingSeverity = 4
	FindingSeverity_CRITICAL FindingSeverity = 5
)

FindingSeverity values

const (
	FindingSeverityInfo FindingSeverity = iota
	FindingSeverityLow
	FindingSeverityMedium
	FindingSeverityHigh
	FindingSeverityCritical
)

type Framework

type Framework struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type FrameworkStatus

type FrameworkStatus struct {
	Framework ComplianceStatus `json:"framework"`
	Status    ComplianceStatus `json:"status"`
	Score     float64          `json:"score"`
}

type GenerateCertificateRequest

type GenerateCertificateRequest struct {
	CommonName   string `json:"common_name"`
	Organization string `json:"organization"`
	ValidityDays int32  `json:"validity_days"`
}

type GenerateCertificateResponse

type GenerateCertificateResponse struct {
	Success     bool             `json:"success"`
	Certificate *CertificateInfo `json:"certificate"`
	Error       string           `json:"error"`
}

type GenerateReportRequest

type GenerateReportRequest struct {
	Framework string `json:"framework"`
}

type GenerateReportResponse

type GenerateReportResponse struct {
	Id        string             `json:"id"`
	Framework string             `json:"framework"`
	Timestamp int64              `json:"timestamp"`
	Status    ComplianceStatus   `json:"status"`
	Summary   *ComplianceSummary `json:"summary"`
}

type GetAuthConfigRequest

type GetAuthConfigRequest struct{}

type GetAuthConfigResponse

type GetAuthConfigResponse struct {
	SessionTimeout     int32 `json:"session_timeout"`
	MaxSessionsPerUser int32 `json:"max_sessions_per_user"`
	RequireMfa         bool  `json:"require_mfa"`
	LoginAttempts      int32 `json:"login_attempts"`
	LockoutDuration    int32 `json:"lockout_duration"`
	PasswordMinLength  int32 `json:"password_min_length"`
}

type GetCertificatesRequest

type GetCertificatesRequest struct{}

type GetCertificatesResponse

type GetCertificatesResponse struct {
	Certificates []*CertificateInfo `json:"certificates"`
}

type GetComplianceStatusRequest

type GetComplianceStatusRequest struct{}

type GetComplianceStatusResponse

type GetComplianceStatusResponse struct {
	Overall    ComplianceStatus   `json:"overall"`
	Frameworks []*FrameworkStatus `json:"frameworks"`
}

type GetFindingsRequest

type GetFindingsRequest struct{}

type GetFindingsResponse

type GetFindingsResponse struct {
	Findings []*ComplianceFinding `json:"findings"`
}

type GetFrameworksRequest

type GetFrameworksRequest struct{}

Compliance Types

type GetFrameworksResponse

type GetFrameworksResponse struct {
	Frameworks []*Framework `json:"frameworks"`
}

type GetHealthRequest

type GetHealthRequest struct{}

type GetHealthResponse

type GetHealthResponse struct {
	Status string         `json:"status"`
	Checks []*HealthCheck `json:"checks"`
}

type GetMTLSConfigRequest

type GetMTLSConfigRequest struct{}

type GetMTLSConfigResponse

type GetMTLSConfigResponse struct {
	Enabled        bool   `json:"enabled"`
	CaCertFile     string `json:"ca_cert_file"`
	ClientCertFile string `json:"client_cert_file"`
	ClientKeyFile  string `json:"client_key_file"`
}

type GetMetricsRequest

type GetMetricsRequest struct{}

type GetMetricsResponse

type GetMetricsResponse struct {
	TotalRequests     int64   `json:"total_requests"`
	BlockedRequests   int64   `json:"blocked_requests"`
	ActiveUsers       int32   `json:"active_users"`
	ActiveConnections int32   `json:"active_connections"`
	Uptime            float64 `json:"uptime"`
}

type GetModuleRequest

type GetModuleRequest struct {
	ModuleId string `json:"module_id"`
}

type GetModuleResponse

type GetModuleResponse struct {
	Module *ModuleInfo `json:"module"`
}

type GetProxyConfigRequest

type GetProxyConfigRequest struct{}

type GetProxyConfigResponse

type GetProxyConfigResponse struct {
	Enabled        bool     `json:"enabled"`
	Host           string   `json:"host"`
	Port           int32    `json:"port"`
	TlsEnabled     bool     `json:"tls_enabled"`
	RateLimit      int32    `json:"rate_limit"`
	RateLimitBurst int32    `json:"rate_limit_burst"`
	CorsEnabled    bool     `json:"cors_enabled"`
	CorsOrigins    []string `json:"cors_origins"`
}

type GetProxyHealthRequest

type GetProxyHealthRequest struct{}

type GetProxyHealthResponse

type GetProxyHealthResponse struct {
	Status      string  `json:"status"`
	Uptime      float64 `json:"uptime"`
	MemoryUsage int64   `json:"memory_usage"`
	Goroutines  int32   `json:"goroutines"`
}

type GetProxyStatsRequest

type GetProxyStatsRequest struct{}

Proxy Types

type GetProxyStatsResponse

type GetProxyStatsResponse struct {
	RequestsTotal     int64   `json:"requests_total"`
	RequestsBlocked   int64   `json:"requests_blocked"`
	RequestsAllowed   int64   `json:"requests_allowed"`
	BytesIn           int64   `json:"bytes_in"`
	BytesOut          int64   `json:"bytes_out"`
	ActiveConnections int32   `json:"active_connections"`
	AvgLatencyMs      float64 `json:"avg_latency_ms"`
	P99LatencyMs      float64 `json:"p99_latency_ms"`
	Errors            int64   `json:"errors"`
}

type GetRegistryStatusRequest

type GetRegistryStatusRequest struct{}

type GetRegistryStatusResponse

type GetRegistryStatusResponse struct {
	TotalModules     int32 `json:"total_modules"`
	ActiveModules    int32 `json:"active_modules"`
	HealthyModules   int32 `json:"healthy_modules"`
	UnhealthyModules int32 `json:"unhealthy_modules"`
}

type GetSIEMConfigRequest

type GetSIEMConfigRequest struct{}

SIEM Types

type GetSIEMConfigResponse

type GetSIEMConfigResponse struct {
	Enabled       bool  `json:"enabled"`
	BatchSize     int32 `json:"batch_size"`
	BatchInterval int32 `json:"batch_interval"`
	RetryAttempts int32 `json:"retry_attempts"`
	RetryInterval int32 `json:"retry_interval"`
}

type GetSIEMEventsRequest

type GetSIEMEventsRequest struct {
	Limit int32 `json:"limit"`
}

type GetSIEMEventsResponse

type GetSIEMEventsResponse struct {
	Events []*SIEMEvent `json:"events"`
}

type GetSIEMStatsRequest

type GetSIEMStatsRequest struct{}

type GetSIEMStatsResponse

type GetSIEMStatsResponse struct {
	EventsSent    int64  `json:"events_sent"`
	EventsDropped int64  `json:"events_dropped"`
	EventsQueued  int64  `json:"events_queued"`
	LastSendTime  int64  `json:"last_send_time"`
	LastError     string `json:"last_error"`
}

type GetSessionsRequest

type GetSessionsRequest struct{}

type GetSessionsResponse

type GetSessionsResponse struct {
	Sessions []*Session `json:"sessions"`
}

type GetTLSConfigRequest

type GetTLSConfigRequest struct{}

TLS Types

type GetTLSConfigResponse

type GetTLSConfigResponse struct {
	Enabled      bool   `json:"enabled"`
	CertFile     string `json:"cert_file"`
	KeyFile      string `json:"key_file"`
	AutoGenerate bool   `json:"auto_generate"`
	MinVersion   string `json:"min_version"`
}

type GetUptimeRequest

type GetUptimeRequest struct{}

type GetUptimeResponse

type GetUptimeResponse struct {
	Uptime float64 `json:"uptime"`
}

type GetUserRequest

type GetUserRequest struct {
	UserId string `json:"user_id"`
}

type GetUserResponse

type GetUserResponse struct {
	User *User `json:"user"`
}

type GetVersionRequest

type GetVersionRequest struct{}

type GetVersionResponse

type GetVersionResponse struct {
	Version   string `json:"version"`
	BuildTime string `json:"build_time"`
	GitCommit string `json:"git_commit"`
}

type GetViolationsRequest

type GetViolationsRequest struct {
	Severities []ViolationSeverity `json:"severities"`
	Limit      int32               `json:"limit"`
}

type GetViolationsResponse

type GetViolationsResponse struct {
	Violations []*Violation `json:"violations"`
}

type GetWebhookRequest

type GetWebhookRequest struct {
	WebhookId string `json:"webhook_id"`
}

type GetWebhookResponse

type GetWebhookResponse struct {
	Webhook *WebhookInfo `json:"webhook"`
}

type GetWebhookStatsRequest

type GetWebhookStatsRequest struct{}

type GetWebhookStatsResponse

type GetWebhookStatsResponse struct {
	TotalWebhooks     int64 `json:"total_webhooks"`
	ActiveWebhooks    int64 `json:"active_webhooks"`
	DeliveriesTotal   int64 `json:"deliveries_total"`
	DeliveriesSuccess int64 `json:"deliveries_success"`
	DeliveriesFailed  int64 `json:"deliveries_failed"`
}

type HealthCheck

type HealthCheck struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type IsProxyEnabledRequest

type IsProxyEnabledRequest struct{}

type IsProxyEnabledResponse

type IsProxyEnabledResponse struct {
	Enabled bool `json:"enabled"`
}

type ListModulesRequest

type ListModulesRequest struct{}

Core Types

type ListModulesResponse

type ListModulesResponse struct {
	Modules []*ModuleInfo `json:"modules"`
}

type ListUsersRequest

type ListUsersRequest struct{}

type ListUsersResponse

type ListUsersResponse struct {
	Users []*User `json:"users"`
}

type ListWebhooksRequest

type ListWebhooksRequest struct{}

Webhook Types

type ListWebhooksResponse

type ListWebhooksResponse struct {
	Webhooks []*WebhookInfo `json:"webhooks"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Auth Types

type LoginResponse

type LoginResponse struct {
	Success   bool   `json:"success"`
	Token     string `json:"token"`
	ExpiresAt int64  `json:"expires_at"`
	User      *User  `json:"user"`
	Error     string `json:"error"`
}

type LogoutRequest

type LogoutRequest struct {
	Token string `json:"token"`
}

type LogoutResponse

type LogoutResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type ModuleInfo

type ModuleInfo struct {
	Id          string       `json:"id"`
	Name        string       `json:"name"`
	Version     string       `json:"version"`
	Description string       `json:"description"`
	Category    string       `json:"category"`
	Status      ModuleStatus `json:"status"`
}

type ModuleStatus

type ModuleStatus int32
const (
	ModuleStatusUnknown ModuleStatus = iota
	ModuleStatusInitializing
	ModuleStatusRunning
	ModuleStatusStopped
	ModuleStatusError
)

type ProxyService

type ProxyService struct {
	UnimplementedProxyServiceServer
	// contains filtered or unexported fields
}

ProxyService implements the Proxy service

func NewProxyService

func NewProxyService(server *proxy.Proxy, logger *slog.Logger) *ProxyService

NewProxyService creates a new proxy service

func (*ProxyService) ClearViolations

ClearViolations clears proxy violations (placeholder)

func (*ProxyService) Disable

Disable disables the proxy

func (*ProxyService) Enable

Enable enables the proxy

func (*ProxyService) GetConfig

GetConfig returns proxy configuration

func (*ProxyService) GetHealth

GetHealth returns proxy health status

func (*ProxyService) GetStats

GetStats returns proxy statistics

func (*ProxyService) GetViolations

GetViolations returns proxy violations (placeholder)

func (*ProxyService) IsEnabled

IsEnabled checks if proxy is enabled

type RunComplianceCheckRequest

type RunComplianceCheckRequest struct {
	Framework string `json:"framework"`
}

type RunComplianceCheckResponse

type RunComplianceCheckResponse struct {
	Id        string             `json:"id"`
	Framework string             `json:"framework"`
	Status    ComplianceStatus   `json:"status"`
	Summary   *ComplianceSummary `json:"summary"`
}

type SIEMEvent

type SIEMEvent struct {
	Id        string        `json:"id"`
	Timestamp int64         `json:"timestamp"`
	Source    string        `json:"source"`
	Category  string        `json:"category"`
	Type      string        `json:"type"`
	Severity  EventSeverity `json:"severity"`
	Message   string        `json:"message"`
	Entity    string        `json:"entity"`
}

type SIEMService

type SIEMService struct {
	UnimplementedSIEMServiceServer
	// contains filtered or unexported fields
}

SIEMService implements the SIEM service

func NewSIEMService

func NewSIEMService(logger *slog.Logger) *SIEMService

NewSIEMService creates a new SIEM service

func (*SIEMService) GetConfig

GetConfig returns SIEM configuration

func (*SIEMService) GetEvents

GetEvents returns SIEM events

func (*SIEMService) GetStats

GetStats returns SIEM statistics

func (*SIEMService) SendEvent

SendEvent sends an event to SIEM

func (*SIEMService) TestConnection

TestConnection tests SIEM connection

type SendSIEMEventRequest

type SendSIEMEventRequest struct {
	Source   string        `json:"source"`
	Category string        `json:"category"`
	Type     string        `json:"type"`
	Severity EventSeverity `json:"severity"`
	Message  string        `json:"message"`
	Entity   string        `json:"entity"`
}

type SendSIEMEventResponse

type SendSIEMEventResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type Session

type Session struct {
	Id           string `json:"id"`
	UserId       string `json:"user_id"`
	Token        string `json:"token"`
	ExpiresAt    int64  `json:"expires_at"`
	CreatedAt    int64  `json:"created_at"`
	LastActivity int64  `json:"last_activity"`
	IpAddress    string `json:"ip_address"`
}

type TLSSvc

type TLSSvc struct {
	UnimplementedTLSSvcServer
	// contains filtered or unexported fields
}

TLSSvc implements the TLS service

func NewTLSSvc

func NewTLSSvc(manager *tls.Manager, logger *slog.Logger) *TLSSvc

NewTLSSvc creates a new TLS service

func (*TLSSvc) GenerateCertificate

func (s *TLSSvc) GenerateCertificate(ctx context.Context, req *GenerateCertificateRequest) (*GenerateCertificateResponse, error)

GenerateCertificate generates a new certificate

func (*TLSSvc) GetCertificates

func (s *TLSSvc) GetCertificates(ctx context.Context, req *GetCertificatesRequest) (*GetCertificatesResponse, error)

GetCertificates returns all certificates

func (*TLSSvc) GetConfig

GetConfig returns TLS configuration

func (*TLSSvc) GetMTLSConfig

func (s *TLSSvc) GetMTLSConfig(ctx context.Context, req *GetMTLSConfigRequest) (*GetMTLSConfigResponse, error)

GetMTLSConfig returns mTLS configuration

type TLSSvcServer

TLSSvcServer is the server API for TLSSvc

type TestSIEMConnectionRequest

type TestSIEMConnectionRequest struct {
	Platform string `json:"platform"`
}

type TestSIEMConnectionResponse

type TestSIEMConnectionResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type TestWebhookRequest

type TestWebhookRequest struct {
	WebhookId string `json:"webhook_id"`
}

type TestWebhookResponse

type TestWebhookResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type UnimplementedAuthServiceServer

type UnimplementedAuthServiceServer struct{}

func (*UnimplementedAuthServiceServer) CreateUser

func (*UnimplementedAuthServiceServer) DeleteUser

func (*UnimplementedAuthServiceServer) GetAuthConfig

func (*UnimplementedAuthServiceServer) GetSessions

func (*UnimplementedAuthServiceServer) GetUser

func (*UnimplementedAuthServiceServer) ListUsers

func (*UnimplementedAuthServiceServer) Login

func (*UnimplementedAuthServiceServer) Logout

func (*UnimplementedAuthServiceServer) UpdateUser

func (*UnimplementedAuthServiceServer) ValidateToken

type UnimplementedComplianceServiceServer

type UnimplementedComplianceServiceServer struct{}

func (*UnimplementedComplianceServiceServer) GenerateReport

func (*UnimplementedComplianceServiceServer) GetFindings

func (*UnimplementedComplianceServiceServer) GetFrameworks

func (*UnimplementedComplianceServiceServer) GetStatus

func (*UnimplementedComplianceServiceServer) RunCheck

type UnimplementedCoreServiceServer

type UnimplementedCoreServiceServer struct{}

func (*UnimplementedCoreServiceServer) DisableModule

func (*UnimplementedCoreServiceServer) EnableModule

func (*UnimplementedCoreServiceServer) GetHealth

func (*UnimplementedCoreServiceServer) GetMetrics

func (*UnimplementedCoreServiceServer) GetModule

func (*UnimplementedCoreServiceServer) GetRegistryStatus

func (*UnimplementedCoreServiceServer) GetUptime

func (*UnimplementedCoreServiceServer) GetVersion

func (*UnimplementedCoreServiceServer) ListModules

type UnimplementedProxyServiceServer

type UnimplementedProxyServiceServer struct{}

func (*UnimplementedProxyServiceServer) ClearViolations

func (*UnimplementedProxyServiceServer) Disable

func (*UnimplementedProxyServiceServer) Enable

func (*UnimplementedProxyServiceServer) GetConfig

func (*UnimplementedProxyServiceServer) GetHealth

func (*UnimplementedProxyServiceServer) GetStats

func (*UnimplementedProxyServiceServer) GetViolations

func (*UnimplementedProxyServiceServer) IsEnabled

type UnimplementedSIEMServiceServer

type UnimplementedSIEMServiceServer struct{}

func (*UnimplementedSIEMServiceServer) GetConfig

func (*UnimplementedSIEMServiceServer) GetEvents

func (*UnimplementedSIEMServiceServer) GetStats

func (*UnimplementedSIEMServiceServer) SendEvent

func (*UnimplementedSIEMServiceServer) TestConnection

type UnimplementedTLSSvcServer

type UnimplementedTLSSvcServer struct{}

func (*UnimplementedTLSSvcServer) GenerateCertificate

func (*UnimplementedTLSSvcServer) GetCertificates

func (*UnimplementedTLSSvcServer) GetConfig

func (*UnimplementedTLSSvcServer) GetMTLSConfig

type UnimplementedWebhookServiceServer

type UnimplementedWebhookServiceServer struct{}

func (*UnimplementedWebhookServiceServer) CreateWebhook

func (*UnimplementedWebhookServiceServer) DeleteWebhook

func (*UnimplementedWebhookServiceServer) DisableWebhook

func (*UnimplementedWebhookServiceServer) EnableWebhook

func (*UnimplementedWebhookServiceServer) GetStats

func (*UnimplementedWebhookServiceServer) GetWebhook

func (*UnimplementedWebhookServiceServer) ListWebhooks

func (*UnimplementedWebhookServiceServer) TestWebhook

func (*UnimplementedWebhookServiceServer) UpdateWebhook

type UpdateUserRequest

type UpdateUserRequest struct {
	UserId   string `json:"user_id"`
	Username string `json:"username"`
	Email    string `json:"email"`
	Role     string `json:"role"`
	Enabled  bool   `json:"enabled"`
}

type UpdateUserResponse

type UpdateUserResponse struct {
	User *User `json:"user"`
}

type UpdateWebhookRequest

type UpdateWebhookRequest struct {
	WebhookId string   `json:"webhook_id"`
	Name      string   `json:"name"`
	Url       string   `json:"url"`
	Events    []string `json:"events"`
	Enabled   bool     `json:"enabled"`
}

type UpdateWebhookResponse

type UpdateWebhookResponse struct {
	Webhook *WebhookInfo `json:"webhook"`
}

type User

type User struct {
	Id        string `json:"id"`
	Username  string `json:"username"`
	Email     string `json:"email"`
	Role      string `json:"role"`
	Enabled   bool   `json:"enabled"`
	CreatedAt int64  `json:"created_at"`
}

type ValidateTokenRequest

type ValidateTokenRequest struct {
	Token string `json:"token"`
}

type ValidateTokenResponse

type ValidateTokenResponse struct {
	Valid     bool   `json:"valid"`
	UserId    string `json:"user_id"`
	ExpiresAt int64  `json:"expires_at"`
}

type Violation

type Violation struct {
	Id        string            `json:"id"`
	Type      ViolationType     `json:"type"`
	Severity  ViolationSeverity `json:"severity"`
	Message   string            `json:"message"`
	ClientIp  string            `json:"client_ip"`
	Method    string            `json:"method"`
	Path      string            `json:"path"`
	Blocked   bool              `json:"blocked"`
	Timestamp int64             `json:"timestamp"`
}

type ViolationSeverity

type ViolationSeverity int32
const (
	ViolationSeverityInfo ViolationSeverity = iota
	ViolationSeverityLow
	ViolationSeverityMedium
	ViolationSeverityHigh
	ViolationSeverityCritical
)

type ViolationType

type ViolationType int32
const (
	ViolationTypeUnknown ViolationType = iota
	ViolationTypeMaliciousRequest
	ViolationTypeSQLInjection
	ViolationTypeXSS
	ViolationTypeCSRF
	ViolationTypePathTraversal
	ViolationTypeCommandInjection
	ViolationTypeAtlasTechnique
	ViolationTypeCustomPattern
)

type WebhookInfo

type WebhookInfo struct {
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Url     string   `json:"url"`
	Events  []string `json:"events"`
	Enabled bool     `json:"enabled"`
}

type WebhookService

type WebhookService struct {
	UnimplementedWebhookServiceServer
	// contains filtered or unexported fields
}

WebhookService implements the Webhook service

func NewWebhookService

func NewWebhookService(logger *slog.Logger) *WebhookService

NewWebhookService creates a new webhook service

func (*WebhookService) CreateWebhook

CreateWebhook creates a new webhook

func (*WebhookService) DeleteWebhook

DeleteWebhook deletes a webhook

func (*WebhookService) DisableWebhook

DisableWebhook disables a webhook

func (*WebhookService) EnableWebhook

EnableWebhook enables a webhook

func (*WebhookService) GetStats

GetStats returns webhook statistics

func (*WebhookService) GetWebhook

GetWebhook gets a webhook by ID

func (*WebhookService) ListWebhooks

ListWebhooks lists all webhooks

func (*WebhookService) TestWebhook

TestWebhook tests a webhook

func (*WebhookService) UpdateWebhook

UpdateWebhook updates a webhook

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL