discovery

package
v2.0.0-ccit-pre2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

README ΒΆ

Discovery Status

βœ…: Discovered
❌: Not Discovered
🚫: Not available

Compute
Expand
Function
Evidence Azure AWS
Compute βœ… βœ…
RuntimeLanguage βœ… ❌
RuntimeVersion βœ… ❌
VirtualMachine
Evidence Azure AWS
Compute βœ… βœ…
BlockStorage βœ… βœ…
MalwareProtection βœ… ❌
BootLogging βœ… βœ…
OSLogging βœ… βœ…
AutomaticUpdates βœ… ❌
Compute
Evidence Azure AWS
Resource βœ… βœ…
NetworkInterfaces βœ… βœ…
ResourceLogging βœ…
Backups ❌
Resource
Evidence Azure AWS
ID βœ… βœ…
Name βœ… βœ…
Type βœ… βœ…
GeoLocation βœ… βœ…
Labels βœ… βœ…
OSLogging
Evidence Azure AWS
Auditing βœ… 🚫
SecurityFeature βœ… 🚫
Enabled βœ… ❌
LoggingService βœ… 🚫
RetentionPeriod βœ… 🚫
BootLogging
Evidence Azure AWS
Auditing βœ… 🚫
SecurityFeature βœ… 🚫
Enabled βœ… ❌
LoggingService βœ… 🚫
RetentionPeriod βœ… 🚫
ResourceLogging
Evidence Azure AWS
MonitoringLogDataEnabled βœ…
SecurityAlertsEnabled βœ…
BlockStorage
Evidence Azure AWS
Resource βœ… βœ…
AtRestEncryption βœ… βœ…
Immutability βœ… ❌
Backups βœ… ❌
ManagedKeyEncryption
Evidence Azure AWS
Enabled βœ… ❌
Algorithm βœ… ❌
CustomerKeyEncryption
Evidence Azure AWS
Enabled βœ… ❌
Algorithm ❌ ❌
KeyUrl βœ… ❌
Network
Expand
LoadBalancer
Evidence Azure AWS
Networkservice βœ… ❌
AccessRestriction βœ… ❌
HttpEndpoints βœ… ❌
Networkservices βœ… ❌
Urls βœ… ❌
Networkservice
Evidence Azure AWS
Networking βœ… ❌
Authenticity βœ… ❌
Compute βœ… ❌
TransportEncryption βœ… ❌
Ips βœ… ❌
Ports βœ… ❌
Networkinterfaces
Evidence Azure AWS
Networking βœ… βœ…
Networkservice ❌ ❌
AccessRestriction partly ❌
Storage
Expand
ObjectStorage
Evidence Azure AWS
Storage βœ… βœ…
PublicAccess βœ… ❌
Backups βœ…
Storage
Evidence Azure AWS
Resource βœ… βœ…
AtRestEncryption βœ… βœ…
Immutability βœ… ❌
ResourceLogging βœ…
Backups βœ…
ObjectStorageService
Evidence Azure AWS
NetworkService βœ… βœ…
HttpEndpoint βœ… βœ…
Networkservice
Evidence Azure AWS
Networking βœ… βœ…
Authenticity ❌ ❌
Compute ❌ ❌
TransportEncryption βœ… βœ…
Ips ❌ ❌
Ports ❌ ❌
HttpEndpoint
Evidence Azure AWS
Url βœ… βœ…
TransportEncryption βœ… βœ…
FileStorage
Evidence Azure AWS
Storage βœ… ❌
Backups ❌
ManagedKeyEncryption
Evidence Azure AWS
Enabled βœ… βœ…
Algorithm βœ… βœ…
CustomerKeyEncryption
Evidence Azure AWS
Enabled βœ… βœ…
Algorithm ❌ ❌
KeyUrl βœ… βœ…
Database Storage
Evidence Azure AWS
Storage βœ… ❌
Parent βœ… ❌
Database Service
Evidence Azure AWS
NetworkService βœ… ❌
AnomalyDetection βœ… ❌
Networkservice
Evidence Azure AWS
Networking βœ… βœ…
Authenticity ❌ ❌
Compute ❌ ❌
TransportEncryption ❌ βœ…
Ips ❌ ❌
Ports ❌ ❌

Azure Backup

Expand

There are 2 different backup solutions for different resources

  • Backup Vaults and
  • Recovery Services Vault.
Resource Backup Vaults Recovery Services Vault
Azure Virtual Machine x
Azure Storage (Files) x
Azure Backup Agent x
Azure Backup Server x
DPM x
SQL in Azure VM x
SAP HANA in Azure VM x
Azure Storage (Blobs) x
Azure disks x
Azure Database for PostgreSQL servers x
Kubernetes Services x

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

View Source
const (
	ProviderAWS   = "aws"
	ProviderK8S   = "k8s"
	ProviderAzure = "azure"
	ProviderCSAF  = "csaf"
	ProviderCMC   = "cmc"
)
View Source
const (
	// DefaultAssessmentAddress specifies the default gRPC address of the assessment service.
	DefaultAssessmentAddress = "localhost:9090"
)

Variables ΒΆ

This section is empty.

Functions ΒΆ

func DefaultServiceSpec ΒΆ

func DefaultServiceSpec() launcher.ServiceSpec

DefaultServiceSpec returns a launcher.ServiceSpec for this Service with all necessary options retrieved from the config system.

func WithAdditionalDiscoverers ΒΆ

func WithAdditionalDiscoverers(discoverers []discovery.Discoverer) service.Option[*Service]

WithAdditionalDiscoverers is an option to add additional discoverers for discovering. Note: These are added in addition to the ones created by WithProviders.

func WithAssessmentAddress ΒΆ

func WithAssessmentAddress(target string, opts ...grpc.DialOption) service.Option[*Service]

WithAssessmentAddress is an option to configure the assessment service gRPC address.

func WithAuthorizationStrategy ΒΆ

func WithAuthorizationStrategy(authz service.AuthorizationStrategy) service.Option[*Service]

WithAuthorizationStrategy is an option that configures an authorization strategy to be used with this service.

func WithCertificationTargetID ΒΆ

func WithCertificationTargetID(ID string) service.Option[*Service]

WithCertificationTargetID is an option to configure the certification target ID for which resources will be discovered.

func WithDiscoveryInterval ΒΆ

func WithDiscoveryInterval(interval time.Duration) service.Option[*Service]

WithDiscoveryInterval is an option to set the discovery interval. If not set, the discovery is set to 5 minutes.

func WithEvidenceCollectorToolID ΒΆ

func WithEvidenceCollectorToolID(ID string) service.Option[*Service]

WithEvidenceCollectorToolID is an option to configure the collector tool ID that is used to discover resources.

func WithOAuth2Authorizer ΒΆ

func WithOAuth2Authorizer(config *clientcredentials.Config) service.Option[*Service]

WithOAuth2Authorizer is an option to use an OAuth 2.0 authorizer

func WithProviders ΒΆ

func WithProviders(providersList []string) service.Option[*Service]

WithProviders is an option to set providers for discovering

func WithStorage ΒΆ

func WithStorage(storage persistence.Storage) service.Option[*Service]

WithStorage is an option to set the storage. If not set, NewService will use inmemory storage.

Types ΒΆ

type DiscoveryEvent ΒΆ

type DiscoveryEvent struct {
	Type            DiscoveryEventType
	DiscovererName  string
	DiscoveredItems int
	Time            time.Time
}

DiscoveryEvent represents an event that is emitted if certain situations happen in the discoverer (defined by DiscoveryEventType). Examples would be the start or the end of the discovery. We will potentially expand this in the future.

type DiscoveryEventType ΒΆ

type DiscoveryEventType int

DiscoveryEventType defines the event types for DiscoveryEvent.

const (
	// DiscovererStart is emitted at the start of a discovery run.
	DiscovererStart DiscoveryEventType = iota
	// DiscovererFinished is emitted at the end of a discovery run.
	DiscovererFinished
)

type Service ΒΆ

type Service struct {
	discovery.UnimplementedDiscoveryServer
	discovery.UnimplementedExperimentalDiscoveryServer

	Events chan *DiscoveryEvent
	// contains filtered or unexported fields
}

Service is an implementation of the Clouditor Discovery service (plus its experimental extensions). It should not be used directly, but rather the NewService constructor should be used.

func NewService ΒΆ

func NewService(opts ...service.Option[*Service]) *Service

func (*Service) GetCertificationTargetId ΒΆ

func (svc *Service) GetCertificationTargetId() string

GetCertificationTargetId implements CertificationTargetRequest for this service. This is a little trick, so that we can call CheckAccess directly on the service. This is necessary because the discovery service itself is tied to a specific certification target ID, instead of the individual requests that are made against the service.

func (*Service) Init ΒΆ

func (svc *Service) Init()

func (*Service) ListGraphEdges ΒΆ

func (svc *Service) ListGraphEdges(ctx context.Context, req *discovery.ListGraphEdgesRequest) (res *discovery.ListGraphEdgesResponse, err error)

func (*Service) ListResources ΒΆ

func (svc *Service) ListResources(ctx context.Context, req *discovery.ListResourcesRequest) (res *discovery.ListResourcesResponse, err error)

func (*Service) Shutdown ΒΆ

func (svc *Service) Shutdown()

func (*Service) Start ΒΆ

Start starts discovery

func (*Service) StartDiscovery ΒΆ

func (svc *Service) StartDiscovery(discoverer discovery.Discoverer)

func (*Service) UpdateResource ΒΆ

func (svc *Service) UpdateResource(ctx context.Context, req *discovery.UpdateResourceRequest) (res *discovery.Resource, err error)

Directories ΒΆ

Path Synopsis
extra
cmc

Jump to

Keyboard shortcuts

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