sqldb

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package sqldb wraps the Azure SQL master password rotation. Azure SQL has no native "user" management via ARM (T-SQL is the only way to create login/users); the CSPM-detectable management-plane signal is `Servers - Update` rotating administratorLoginPassword.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Client          *azapi.Client
	SubscriptionIDs []string
}

func (*Driver) CreateAccount

func (d *Driver) CreateAccount(ctx context.Context, instanceID string) (schema.DatabaseActionResult, error)

CreateAccount rotates the SQL server administrator password to the value supplied by the `rds-account-check` config. instanceID is parsed as `<resourceGroup>/<serverName>`.

func (*Driver) DeleteAccount

func (d *Driver) DeleteAccount(ctx context.Context, instanceID string) (schema.DatabaseActionResult, error)

DeleteAccount rotates the SQL server administrator password to a random value, revoking access via the known credential.

func (*Driver) GetDatabases

func (d *Driver) GetDatabases(ctx context.Context) ([]schema.Database, error)

GetDatabases lists Azure SQL servers across the visible subscriptions and surfaces them as the cloudlist `database` asset. SQL Database resources are nested under each server; we surface one row per server with the fully-qualified domain name as Address — that matches CSPM signal value (one server = one externally-reachable endpoint).

Jump to

Keyboard shortcuts

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