Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSCredentials ¶ added in v0.2.0
type AWSCredentials struct {
AccessKeyID string `json:"aws_access_key"`
SecretAccessKey string `json:"aws_secret_access_key"`
SessionToken string `json:"aws_session_token"`
}
AWSCredentials contains temporary AWS credentials returned by SCA elevation.
func ParseAWSCredentials ¶ added in v0.2.0
func ParseAWSCredentials(s string) (*AWSCredentials, error)
ParseAWSCredentials parses an accessCredentials JSON string into AWSCredentials.
type ElevateAccessResult ¶
type ElevateAccessResult struct {
CSP CSP `json:"csp"`
OrganizationID string `json:"organizationId"`
Results []ElevateTargetResult `json:"results"`
}
ElevateAccessResult contains the overall elevation response.
type ElevateRequest ¶
type ElevateRequest struct {
CSP CSP `json:"csp"`
OrganizationID string `json:"organizationId"`
Targets []ElevateTarget `json:"targets"`
}
ElevateRequest is the request body for POST /api/access/elevate.
type ElevateResponse ¶
type ElevateResponse struct {
Response ElevateAccessResult `json:"response"`
}
ElevateResponse is the response from POST /api/access/elevate.
type ElevateTarget ¶
type ElevateTarget struct {
WorkspaceID string `json:"workspaceId"`
RoleID string `json:"roleId,omitempty"`
RoleName string `json:"roleName,omitempty"`
}
ElevateTarget represents a single target for elevation.
type ElevateTargetResult ¶
type ElevateTargetResult struct {
WorkspaceID string `json:"workspaceId"`
RoleID string `json:"roleId"`
SessionID string `json:"sessionId"`
AccessCredentials *string `json:"accessCredentials"`
ErrorInfo *ErrorInfo `json:"errorInfo"`
}
ElevateTargetResult is the per-target result of an elevation request.
type EligibilityResponse ¶
type EligibilityResponse struct {
Response []EligibleTarget `json:"response"`
NextToken *string `json:"nextToken"`
Total int `json:"total"`
}
EligibilityResponse is the response from GET /api/access/{CSP}/eligibility.
type EligibleTarget ¶ added in v0.2.0
type EligibleTarget struct {
CSP CSP `json:"-"` // Set programmatically after fetch, not from API
OrganizationID string `json:"organizationId"`
WorkspaceID string `json:"workspaceId"`
WorkspaceName string `json:"workspaceName"`
WorkspaceType WorkspaceType `json:"workspaceType"`
RoleInfo RoleInfo `json:"roleInfo"`
}
EligibleTarget represents a cloud workspace target the user is eligible to elevate to.
func (*EligibleTarget) UnmarshalJSON ¶ added in v0.2.0
func (t *EligibleTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom unmarshaling to handle both "roleInfo" (live API) and "role" (OpenAPI spec) field names.
type ErrorInfo ¶
type ErrorInfo struct {
Code string `json:"code"`
Message string `json:"message"`
Description string `json:"description"`
Link string `json:"link,omitempty"`
}
ErrorInfo describes the reason for an elevation failure.
type SessionInfo ¶
type SessionInfo struct {
SessionID string `json:"session_id"`
UserID string `json:"user_id"`
CSP CSP `json:"csp"`
WorkspaceID string `json:"workspace_id"`
RoleID string `json:"role_id"`
SessionDuration int `json:"session_duration"`
}
SessionInfo represents an active elevated session. Note: The live SCA API uses snake_case field names, which differs from the OpenAPI spec's camelCase. The role_id field contains the role display name (e.g., "User Access Administrator"), not an ARM resource path.
type SessionsResponse ¶
type SessionsResponse struct {
Response []SessionInfo `json:"response"`
NextToken *string `json:"nextToken"`
Total int `json:"total"`
}
SessionsResponse is the response from GET /api/access/sessions.
type WorkspaceType ¶
type WorkspaceType string
WorkspaceType represents the type of cloud workspace.
const ( WorkspaceTypeResource WorkspaceType = "RESOURCE" WorkspaceTypeResourceGroup WorkspaceType = "RESOURCE_GROUP" WorkspaceTypeSubscription WorkspaceType = "SUBSCRIPTION" WorkspaceTypeManagementGroup WorkspaceType = "MANAGEMENT_GROUP" WorkspaceTypeDirectory WorkspaceType = "DIRECTORY" WorkspaceTypeAccount WorkspaceType = "account" // Lowercase per AWS API spec )