Documentation ¶
Index ¶
- type Decision
- type Engine
- func (store *Engine) CreateRequest(request *Request) (string, error)
- func (store *Engine) CreateWorkflow(workflow *Workflow) (string, error)
- func (store *Engine) DeleteRequest(requestID string) error
- func (store *Engine) DeleteWorkflow(workflowID string) error
- func (store *Engine) MakeDecisionOnRequest(requestID string, request Decision) error
- func (store *Engine) Request(requestID string) (*Request, error)
- func (store *Engine) Requests(offset, limit int, filter string) ([]Request, error)
- func (store *Engine) RevokeTargetRole(requestID string) error
- func (store *Engine) SearchRequests(offset, limit int, sortdir, sortkey, filter string, searchObject *Search) ([]Request, error)
- func (store *Engine) Settings() (*Settings, error)
- func (store *Engine) TestEmailNotification(settings *Settings) (SMTPResponse, error)
- func (store *Engine) UpdateSettings(settings *Settings) error
- func (store *Engine) UpdateWorkflow(workflowID string, workflow *Workflow) error
- func (store *Engine) Workflow(workflowID string) (*Workflow, error)
- func (store *Engine) Workflows(offset, limit int) ([]Workflow, error)
- type Params
- type Request
- type RequestStep
- type RequestStepApprover
- type Role
- type SMTPResponse
- type Search
- type Settings
- type Step
- type StepApprover
- type User
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decision ¶
type Decision struct { Step int `json:"step"` Decision string `json:"decision"` Comment string `json:"comment,omitempty"` }
Decision request decision definition
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is a workflow client instance.
func (*Engine) CreateRequest ¶
CreateRequest add a workflow to the request queue.
func (*Engine) CreateWorkflow ¶
CreateWorkflow create a new workflow
func (*Engine) DeleteRequest ¶
DeleteRequest delete request item by ID.
func (*Engine) DeleteWorkflow ¶
DeleteWorkflow delete a workflow by ID
func (*Engine) MakeDecisionOnRequest ¶
MakeDecisionOnRequest update a request in queue
func (*Engine) RevokeTargetRole ¶ added in v0.21.0
RevokeTargetRole Revokes the target role in a request from target user
func (*Engine) SearchRequests ¶
func (store *Engine) SearchRequests( offset, limit int, sortdir, sortkey, filter string, searchObject *Search) ([]Request, error)
SearchRequests search access requests
func (*Engine) TestEmailNotification ¶
func (store *Engine) TestEmailNotification(settings *Settings) (SMTPResponse, error)
TestEmailNotification test the email settings
func (*Engine) UpdateSettings ¶
UpdateSettings store microservice settings
func (*Engine) UpdateWorkflow ¶
UpdateWorkflow update a workflow
type Params ¶
type Params struct { Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` Sortkey string `json:"sortkey,omitempty"` Sortdir string `json:"sortdir,omitempty"` Filter string `json:"filter,omitempty"` }
Params struct for pagination queries
type Request ¶
type Request struct { ID string `json:"id,omitempty"` Author string `json:"author,omitempty"` Created string `json:"created,omitempty"` Updated string `json:"updated,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` Name string `json:"name,omitempty"` Requester User `json:"requester,omitempty"` RequestedRole Role `json:"requested_role,omitempty"` RequestJustification string `json:"request_justification,omitempty"` GrantType string `json:"grant_type,omitempty"` GrantStart string `json:"grant_start,omitempty"` GrantEnd string `json:"grant_end,omitempty"` FloatingLength int64 `json:"floating_length,omitempty"` MaxTimeRestrictedDuration int64 `json:"max_time_restricted_duration,omitempty"` MaxFloatingDuration int64 `json:"max_floating_duration,omitempty"` TargetUser User `json:"target_user,omitempty"` TargetRoles []Role `json:"target_roles,omitempty"` RequestorRoles []Role `json:"requester_roles,omitempty"` Action string `json:"action,omitempty"` CanBypassRevokeWF bool `json:"can_bypass_revoke_workflow"` Status string `json:"status,omitempty"` Comment string `json:"comment,omitempty"` Steps []RequestStep `json:"steps,omitempty"` ApproverCanRevoke bool `json:"approver_can_revoke"` TargetRoleRevoked bool `json:"target_role_revoked"` TargetRoleRevokeTime *string `json:"target_role_revocation_time,omitempty"` TargetRoleRevokedBy User `json:"target_role_revoked_by,omitempty"` }
Request access request definition
type RequestStep ¶
type RequestStep struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Match string `json:"match,omitempty"` Approvers []RequestStepApprover `json:"approvers,omitempty"` }
RequestStep request step definition
type RequestStepApprover ¶
type RequestStepApprover struct { ID string `json:"id,omitempty"` Decision string `json:"decision,omitempty"` DecisionTime string `json:"decision_time,omitempty"` Comment string `json:"comment,omitempty"` User User `json:"user,omitempty"` Role Role `json:"role,omitempty"` }
RequestStepApprover request step approver definition
type Role ¶
type Role struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Deleted bool `json:"deleted,omitempty"` }
Role workflow frole definition
type SMTPResponse ¶
type SMTPResponse struct { Status string `json:"status,omitempty"` Details interface{} `json:"details,omitempty"` }
SMTPResponse smtp server test response definition
type Search ¶
type Search struct { Keywords string `json:"keywords,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` }
Search request search definition
type Settings ¶
type Settings struct { BackendAddress string `json:"privx_backend_address,omitempty"` Address string `json:"smtp_sender_address,omitempty"` Server string `json:"smtp_server,omitempty"` Password string `json:"smtp_server_password,omitempty"` Protocol string `json:"smtp_server_protocol,omitempty"` Username string `json:"smtp_server_username,omitempty"` Approvers int `json:"request_role_max_approvers,omitempty"` Attempts int `json:"smtp_retry_attempts,omitempty"` Port int `json:"smtp_server_port,omitempty"` Enabled bool `json:"smtp_server_enabled,omitempty"` InsecureVerify bool `json:"smtp_server_insecure_verify,omitempty"` }
Settings workflow settings definition
type Step ¶
type Step struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Match string `json:"match,omitempty"` Approvers []StepApprover `json:"approvers,omitempty"` }
Step workflow step definition
type StepApprover ¶
StepApprover workflow step approver defintion
type User ¶
type User struct { ID string `json:"id,omitempty"` DisplayName string `json:"display_name,omitempty"` }
User workflow user definition
type Workflow ¶
type Workflow struct { ID string `json:"id,omitempty"` Author string `json:"author,omitempty"` Created string `json:"created,omitempty"` Updated string `json:"updated,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` Name string `json:"name,omitempty"` Requester User `json:"requester"` RequestedRole Role `json:"requested_role"` RequestJustification string `json:"request_justification,omitempty"` GrantTypes []string `json:"grant_types,omitempty"` GrantStart string `json:"grant_start,omitempty"` GrantEnd string `json:"grant_end,omitempty"` FloatingLength int64 `json:"floating_length,omitempty"` MaxTimeRestrictedDuration int64 `json:"max_time_restricted_duration,omitempty"` MaxFloatingDuration int64 `json:"max_floating_duration,omitempty"` MaxActiveRequests *int64 `json:"max_active_requests,omitempty"` TargetUser User `json:"target_user,omitempty"` TargetRoles []Role `json:"target_roles,omitempty"` RequestorRoles []Role `json:"requester_roles,omitempty"` Action string `json:"action,omitempty"` CanBypassRevokeWF bool `json:"can_bypass_revoke_workflow"` Status string `json:"status,omitempty"` Comment string `json:"comment,omitempty"` Steps []Step `json:"steps,omitempty"` }
Workflow workflow definition