Documentation
¶
Overview ¶
Package identity provides data structures and types for ARK Identity directory services. This package contains models for directory service metadata, query requests and responses, and data structures for users, groups, and roles within the ARK Identity system. It supports various directory types including Active Directory, Identity (CDS), and FDS.
Package identity provides data structures and types for ARK Identity API operations. This package contains models for authentication, authorization, and identity management operations including authentication challenges, tokens, tenant information, and various response structures used in ARK Identity service interactions.
Index ¶
- Constants
- Variables
- type AdvanceAuthMidResponse
- type AdvanceAuthMidResult
- type AdvanceAuthResponse
- type AdvanceAuthResult
- type BaseIdentityAPIResponse
- type Challenge
- type DirectorySearchArgs
- type DirectoryServiceMetadata
- type DirectoryServiceQueryRequest
- type DirectoryServiceQueryResponse
- type DirectoryServiceQuerySpecificRoleRequest
- type DirectoryServiceRow
- type GetDirectoryServicesResponse
- type GetDirectoryServicesResult
- type GetTenantSuffixResult
- type GroupResult
- type GroupRow
- type GroupsResult
- type IdpAuthStatusResponse
- type IdpAuthStatusResult
- type Mechanism
- type PodFqdnResult
- type QueryResult
- type RoleAdminRight
- type RoleResult
- type RoleRow
- type RolesResult
- type StartAuthResponse
- type StartAuthResult
- type TenantEndpointResponse
- type TenantFqdnResponse
- type UserResult
- type UserRow
- type UsersResult
Constants ¶
const ( // AD represents Active Directory Proxy directory type. AD = "AdProxy" // Identity represents CDS (Centrify Directory Service) directory type. Identity = "CDS" // FDS represents FDS (Federated Directory Service) directory type. FDS = "FDS" )
Directory type constants represent the supported directory service types.
Variables ¶
var ( AllDirectoryTypes = []string{ AD, Identity, FDS, } )
AllDirectoryTypes contains all supported directory service types. This slice includes AD, Identity, and FDS directory types for validation and enumeration purposes.
Functions ¶
This section is empty.
Types ¶
type AdvanceAuthMidResponse ¶
type AdvanceAuthMidResponse struct { BaseIdentityAPIResponse Result AdvanceAuthMidResult `json:"Result"` }
AdvanceAuthMidResponse represents the complete response for in-progress authentication requests. This structure combines the base API response with intermediate authentication state information for polling-based authentication flows.
type AdvanceAuthMidResult ¶
type AdvanceAuthMidResult struct { Summary string `json:"Summary" validate:"required,min=2"` GeneratedAuthValue string `json:"GeneratedAuthValue"` }
AdvanceAuthMidResult represents the result of an in-progress advanced authentication request. This structure contains intermediate state information when authentication is still being processed and polling is required to check for completion.
type AdvanceAuthResponse ¶
type AdvanceAuthResponse struct { BaseIdentityAPIResponse Result AdvanceAuthResult `json:"Result"` }
AdvanceAuthResponse represents the complete response for successful authentication requests. This structure combines the base API response with authentication tokens and user information when authentication has been completed successfully.
type AdvanceAuthResult ¶
type AdvanceAuthResult struct { DisplayName string `json:"DisplayName" validate:"omitempty,min=2"` Auth string `json:"Auth" validate:"required,min=2"` Summary string `json:"Summary" validate:"required,min=2"` Token string `json:"Token" validate:"omitempty,min=2"` RefreshToken string `json:"RefreshToken" validate:"omitempty,min=2"` TokenLifetime int `json:"TokenLifetime"` CustomerID string `json:"CustomerID"` UserID string `json:"UserId"` PodFqdn string `json:"PodFqdn"` }
AdvanceAuthResult represents the result of a successful advanced authentication request. This structure contains authentication tokens, user information, and session details returned when authentication is completed successfully through the ARK Identity system.
type BaseIdentityAPIResponse ¶
type BaseIdentityAPIResponse struct { Success bool `json:"Success" validate:"required"` Exception string `json:"Exception"` ErrorCode string `json:"ErrorCode"` Message string `json:"Message"` ErrorID string `json:"ErrorID"` }
BaseIdentityAPIResponse represents the common response structure from the ARK Identity API. This structure contains standard fields that are present in most Identity API responses including success status, error information, and diagnostic details for troubleshooting API interactions.
type Challenge ¶
type Challenge struct {
Mechanisms []Mechanism `json:"Mechanisms" validate:"required,dive,required"`
}
Challenge represents an authentication challenge containing available mechanisms. This structure groups one or more authentication mechanisms that can be used to satisfy an authentication requirement in the multi-factor authentication flow.
type DirectorySearchArgs ¶
type DirectorySearchArgs struct { PageNumber int `json:"PageNumber,omitempty" mapstructure:"PageNumber,omitempty"` PageSize int `json:"PageSize,omitempty" mapstructure:"PageSize,omitempty"` Limit int `json:"Limit,omitempty" mapstructure:"Limit,omitempty"` SortBy string `json:"SortBy,omitempty" mapstructure:"SortBy,omitempty"` Caching int `json:"Caching,omitempty" mapstructure:"Caching,omitempty"` Dir string `json:"Direction,omitempty" mapstructure:"Direction,omitempty"` Ascending bool `json:"Ascending,omitempty" mapstructure:"Ascending,omitempty"` }
DirectorySearchArgs represents search and pagination arguments for directory queries. This structure contains parameters for controlling query behavior including pagination, sorting, caching, and result ordering options.
type DirectoryServiceMetadata ¶
type DirectoryServiceMetadata struct { Service string `json:"Service" mapstructure:"Service"` DirectoryServiceUUID string `json:"directoryServiceUuid" mapstructure:"directoryServiceUuid"` }
DirectoryServiceMetadata represents metadata information for a directory service. This structure contains essential identification information for directory services including the service type and unique identifier used for directory operations.
type DirectoryServiceQueryRequest ¶
type DirectoryServiceQueryRequest struct { DirectoryServices []string `json:"directoryServices" mapstructure:"directoryServices"` Group string `json:"group,omitempty" mapstructure:"group,omitempty"` Roles string `json:"roles,omitempty" mapstructure:"roles,omitempty"` User string `json:"user,omitempty" mapstructure:"user,omitempty"` Args DirectorySearchArgs `json:"Args" mapstructure:"Args"` }
DirectoryServiceQueryRequest represents a comprehensive query request for directory services. This structure contains filter criteria for groups, roles, and users along with directory service specifications and search arguments for controlling query behavior.
func NewDirectoryServiceQueryRequest ¶
func NewDirectoryServiceQueryRequest(searchString string) *DirectoryServiceQueryRequest
NewDirectoryServiceQueryRequest creates a new DirectoryServiceQueryRequest with optional search filtering. It initializes the request with default empty JSON objects for user, roles, and group filters. If a search string is provided, it creates appropriate filter criteria for searching across display names and system names for groups, role names, and user display names.
Parameters:
- searchString: Optional search term to filter results across groups, roles, and users
Returns:
- *DirectoryServiceQueryRequest: Initialized request with search filters applied if searchString provided
Example:
// Create request without search filtering request := NewDirectoryServiceQueryRequest("") // Create request with search filtering request := NewDirectoryServiceQueryRequest("admin")
type DirectoryServiceQueryResponse ¶
type DirectoryServiceQueryResponse struct {
Result QueryResult `json:"Result" mapstructure:"Result"`
}
DirectoryServiceQueryResponse represents the complete response for directory service queries. This structure wraps the query results in the expected API response format for directory service operations involving groups, roles, and users.
type DirectoryServiceQuerySpecificRoleRequest ¶
type DirectoryServiceQuerySpecificRoleRequest struct { DirectoryServices []string `json:"directoryServices" mapstructure:"directoryServices"` Group string `json:"group,omitempty" mapstructure:"group,omitempty"` Roles string `json:"roles,omitempty" mapstructure:"roles,omitempty"` User string `json:"user,omitempty" mapstructure:"user,omitempty"` Args DirectorySearchArgs `json:"Args" mapstructure:"Args"` }
DirectoryServiceQuerySpecificRoleRequest represents a query request targeting a specific role. This structure is similar to DirectoryServiceQueryRequest but is specialized for querying specific roles by exact name match rather than general search filtering.
func NewDirectoryServiceQuerySpecificRoleRequest ¶
func NewDirectoryServiceQuerySpecificRoleRequest(roleName string) *DirectoryServiceQuerySpecificRoleRequest
NewDirectoryServiceQuerySpecificRoleRequest creates a new DirectoryServiceQuerySpecificRoleRequest for a specific role. It initializes the request with default empty JSON objects and sets up an exact match filter for the specified role name if provided.
Parameters:
- roleName: The exact name of the role to query for
Returns:
- *DirectoryServiceQuerySpecificRoleRequest: Initialized request with role name filter applied if roleName provided
Example:
// Create request for specific role request := NewDirectoryServiceQuerySpecificRoleRequest("System Administrator") // Create request without role filtering request := NewDirectoryServiceQuerySpecificRoleRequest("")
type DirectoryServiceRow ¶
type DirectoryServiceRow struct {
Row DirectoryServiceMetadata `json:"Row" mapstructure:"Row"`
}
DirectoryServiceRow represents a single row of directory service metadata. This structure wraps DirectoryServiceMetadata to match the expected JSON structure returned by directory service queries.
type GetDirectoryServicesResponse ¶
type GetDirectoryServicesResponse struct {
Result GetDirectoryServicesResult `json:"Result" mapstructure:"Result"`
}
GetDirectoryServicesResponse represents the complete response for directory services queries. This structure wraps the directory services results in the expected API response format.
type GetDirectoryServicesResult ¶
type GetDirectoryServicesResult struct {
Results []DirectoryServiceRow `json:"Results" mapstructure:"Results" validate:"min=1"`
}
GetDirectoryServicesResult represents the collection of directory services results. This structure contains an array of directory service rows returned from directory service enumeration queries with validation requiring at least one result.
type GetTenantSuffixResult ¶
type GetTenantSuffixResult struct { BaseIdentityAPIResponse Result map[string]interface{} `json:"Result"` }
GetTenantSuffixResult represents the complete response for tenant suffix requests. This structure combines the base API response with a flexible result map containing tenant-specific configuration and suffix information.
type GroupResult ¶
type GroupResult struct {
Row GroupRow `json:"Row" mapstructure:"Row"`
}
GroupResult represents a single group result from directory queries. This structure wraps GroupRow to match the expected JSON structure returned by directory service group queries.
type GroupRow ¶
type GroupRow struct { DisplayName string `json:"DisplayName,omitempty" mapstructure:"DisplayName"` ServiceInstanceLocalized string `json:"ServiceInstanceLocalized" mapstructure:"ServiceInstanceLocalized"` DirectoryServiceType string `json:"ServiceType" mapstructure:"ServiceType"` SystemName string `json:"SystemName,omitempty" mapstructure:"SystemName"` InternalID string `json:"InternalName,omitempty" mapstructure:"InternalName"` }
GroupRow represents detailed information about a directory group. This structure contains group metadata including display names, service information, directory service type, system identifiers, and internal references.
type GroupsResult ¶
type GroupsResult struct { Results []GroupResult `json:"Results" mapstructure:"Results"` FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"` }
GroupsResult represents the complete collection of group query results. This structure contains an array of group results along with the total count of matching groups for pagination purposes.
type IdpAuthStatusResponse ¶
type IdpAuthStatusResponse struct { BaseIdentityAPIResponse Result IdpAuthStatusResult `json:"Result"` }
IdpAuthStatusResponse represents the complete response for IdP authentication status requests. This structure combines the base API response with Identity Provider authentication status and token information for federated authentication flows.
type IdpAuthStatusResult ¶
type IdpAuthStatusResult struct { AuthLevel string `json:"AuthLevel"` DisplayName string `json:"DisplayName"` Auth string `json:"Auth"` UserID string `json:"UserId"` State string `json:"State"` TokenLifetime int `json:"TokenLifetime"` Token string `json:"Token"` RefreshToken string `json:"RefreshToken"` EmailAddress string `json:"EmailAddress"` UserDirectory string `json:"UserDirectory"` PodFqdn string `json:"PodFqdn"` User string `json:"User"` CustomerID string `json:"CustomerID"` Forest string `json:"Forest"` SystemID string `json:"SystemID"` SourceDsType string `json:"SourceDsType"` Summary string `json:"Summary"` }
IdpAuthStatusResult represents the result of an Identity Provider authentication status check. This structure contains the current state of an IdP authentication session along with token information when authentication is completed.
type Mechanism ¶
type Mechanism struct { AnswerType string `json:"AnswerType" validate:"required,min=2"` Name string `json:"Name" validate:"required,min=2"` PromptMechChosen string `json:"PromptMechChosen" validate:"required,min=2"` PromptSelectMech string `json:"PromptSelectMech" validate:"omitempty,min=2"` MechanismID string `json:"MechanismId" validate:"required,min=2"` }
Mechanism represents an authentication mechanism within an authentication challenge. This structure defines the properties and prompts for a specific authentication method that can be used to complete an authentication challenge in the ARK Identity system.
type PodFqdnResult ¶
type PodFqdnResult struct {
PodFqdn string `json:"PodFqdn" validate:"required,min=2"`
}
PodFqdnResult represents the result containing Pod Fully Qualified Domain Name information. This structure contains the Pod FQDN which is used to identify the specific Identity service instance and extract tenant information for multi-tenant operations.
func (*PodFqdnResult) GetTenantID ¶
func (p *PodFqdnResult) GetTenantID() string
GetTenantID extracts the tenant identifier from the Pod FQDN. It parses the PodFqdn field by splitting on the first dot character and returns the leftmost component, which represents the tenant ID in the ARK Identity service naming convention.
Returns:
- string: The tenant ID extracted from the Pod FQDN, or empty string if PodFqdn is empty
Example:
podResult := &PodFqdnResult{PodFqdn: "tenant123.example.com"} tenantID := podResult.GetTenantID() // Returns "tenant123"
type QueryResult ¶
type QueryResult struct { Groups *GroupsResult `json:"Group,omitempty" mapstructure:"Group"` Roles *RolesResult `json:"Roles,omitempty" mapstructure:"Roles"` Users *UsersResult `json:"User,omitempty" mapstructure:"User"` }
QueryResult represents the comprehensive results from directory service queries. This structure aggregates results for groups, roles, and users into a single response object, allowing for combined query operations across all entity types.
type RoleAdminRight ¶
type RoleAdminRight struct { Path string `json:"Path" mapstructure:"Path"` ServiceName string `json:"ServiceName,omitempty" mapstructure:"ServiceName"` }
RoleAdminRight represents administrative rights and permissions for a role. This structure defines the scope and service context for role-based administrative privileges within the directory system.
type RoleResult ¶
type RoleResult struct {
Row RoleRow `json:"Row" mapstructure:"Row"`
}
RoleResult represents a single role result from directory queries. This structure wraps RoleRow to match the expected JSON structure returned by directory service role queries.
type RoleRow ¶
type RoleRow struct { Name string `json:"Name,omitempty" mapstructure:"Name"` ID string `json:"_ID" mapstructure:"_ID"` AdminRights []RoleAdminRight `json:"AdministrativeRights,omitempty" mapstructure:"AdministrativeRights"` IsHidden bool `json:"IsHidden,omitempty" mapstructure:"IsHidden"` Description string `json:"Description,omitempty" mapstructure:"Description"` }
RoleRow represents detailed information about a directory role. This structure contains role metadata including name, unique identifier, administrative rights, visibility status, and descriptive information.
type RolesResult ¶
type RolesResult struct { Results []RoleResult `json:"Results" mapstructure:"Results"` FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"` }
RolesResult represents the complete collection of role query results. This structure contains an array of role results along with the total count of matching roles for pagination purposes.
type StartAuthResponse ¶
type StartAuthResponse struct { BaseIdentityAPIResponse Result StartAuthResult `json:"Result"` }
StartAuthResponse represents the complete response for authentication initiation requests. This structure combines the base API response with authentication challenges and session information for starting the authentication process.
type StartAuthResult ¶
type StartAuthResult struct { Challenges []Challenge `json:"Challenges" validate:"omitempty,dive,required"` SessionID string `json:"SessionId" validate:"omitempty,min=2"` IdpRedirectURL string `json:"IdpRedirectUrl"` IdpLoginSessionID string `json:"IdpLoginSessionId"` IdpRedirectShortURL string `json:"IdpRedirectShortUrl"` IdpShortURLID string `json:"IdpShortUrlId"` IdpOobAuthPinRequired bool `json:"IdpOobAuthPinRequired"` TenantID string `json:"TenantId"` }
StartAuthResult represents the result of initiating an authentication request. This structure contains authentication challenges, session information, and Identity Provider (IdP) redirect details for starting the authentication process.
type TenantEndpointResponse ¶
type TenantEndpointResponse struct {
Endpoint string `json:"endpoint"`
}
TenantEndpointResponse represents the response containing tenant endpoint information. This structure provides the endpoint URL for accessing tenant-specific services in the ARK Identity system.
type TenantFqdnResponse ¶
type TenantFqdnResponse struct { BaseIdentityAPIResponse Result PodFqdnResult `json:"Result"` }
TenantFqdnResponse represents the complete response for tenant FQDN requests. This structure combines the base API response with Pod FQDN result data for tenant identification and service endpoint discovery operations.
type UserResult ¶
type UserResult struct {
Row UserRow `json:"Row" mapstructure:"Row"`
}
UserResult represents a single user result from directory queries. This structure wraps UserRow to match the expected JSON structure returned by directory service user queries.
type UserRow ¶
type UserRow struct { DisplayName string `json:"DisplayName,omitempty" mapstructure:"DisplayName"` ServiceInstanceLocalized string `json:"ServiceInstanceLocalized" mapstructure:"ServiceInstanceLocalized"` DistinguishedName string `json:"DistinguishedName" mapstructure:"DistinguishedName"` SystemName string `json:"SystemName,omitempty" mapstructure:"SystemName"` DirectoryServiceType string `json:"ServiceType" mapstructure:"ServiceType"` Email string `json:"EMail,omitempty" mapstructure:"EMail"` InternalID string `json:"InternalName,omitempty" mapstructure:"InternalName"` Description string `json:"Description,omitempty" mapstructure:"Description"` }
UserRow represents detailed information about a directory user. This structure contains comprehensive user metadata including display information, service details, distinguished name, system identifiers, contact information, and descriptive data.
type UsersResult ¶
type UsersResult struct { Results []UserResult `json:"Results" mapstructure:"Results"` FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"` }
UsersResult represents the complete collection of user query results. This structure contains an array of user results along with the total count of matching users for pagination purposes.