Skip to content

Commit

Permalink
Merge pull request #156 from SSHcom/topic/work_with_privx_36_windows_…
Browse files Browse the repository at this point in the history
…sid_feature

PrivX 36: models changes as a result of windows SID feature
  • Loading branch information
iljaSL authored Aug 7, 2024
2 parents 4d186aa + 9137eb2 commit 4adabdf
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 51 deletions.
71 changes: 37 additions & 34 deletions api/secretsmanager/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,30 @@ type ScannedAccountEditBatch struct {
}

type ManagedAccount struct {
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email,omitempty"`
FullName string `json:"full_name,omitempty"`
SourceID string `json:"source_id,omitempty"`
SecurityID string `json:"security_id,omitempty"`
AdditionalData map[string]string `json:"additional_data,omitempty"`
TargetDomain TargetDomainHandle `json:"target_domain"`
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
Enabled bool `json:"enabled"`
RotationEnabled bool `json:"rotation_enabled"`
ExplicitCheckout bool `json:"explicit_checkout"`
State string `json:"state"`
Comment string `json:"comment,omitempty"`
SecretName string `json:"secret_name,omitempty"`
Locked bool `json:"locked"`
LockedTimestamp *time.Time `json:"locked_timestamp,omitempty"`
RotationHistory []SecretRotationEvent `json:"rotation_history,omitempty"`
SecretCheckouts []SecretCheckout `json:"checkouts,omitempty"`
Created time.Time `json:"created,omitempty"`
Author string `json:"author,omitempty"`
Updated *time.Time `json:"updated,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
ID string `json:"id"`
Username string `json:"username"`
Email string `json:"email,omitempty"`
FullName string `json:"full_name,omitempty"`
SourceID string `json:"source_id,omitempty"`
SecurityID string `json:"security_id,omitempty"`
AdditionalData map[string]string `json:"additional_data,omitempty"`
TargetDomain TargetDomainHandle `json:"target_domain"`
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
Enabled bool `json:"enabled"`
RotationEnabled bool `json:"rotation_enabled"`
ExplicitCheckout bool `json:"explicit_checkout"`
State string `json:"state"`
Comment string `json:"comment,omitempty"`
SecretName string `json:"secret_name,omitempty"`
Locked bool `json:"locked"`
LockedTimestamp *time.Time `json:"locked_timestamp,omitempty"`
RotationHistory []SecretRotationEvent `json:"rotation_history,omitempty"`
SecretCheckouts []SecretCheckout `json:"checkouts,omitempty"`
Created time.Time `json:"created,omitempty"`
Author string `json:"author,omitempty"`
Updated *time.Time `json:"updated,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
DisableRdpCertAuth bool `json:"disable_rdp_cert_auth"`
}

type SecretRotationEvent struct {
Expand Down Expand Up @@ -226,12 +227,13 @@ type ManagedAccountCreateBatch struct {
}

type ManagedAccountCreateData struct {
Enabled bool `json:"enabled"`
RotationEnabled bool `json:"rotation_enabled"`
Rotate bool `json:"rotate"`
ExplicitCheckout bool `json:"explicit_checkout"`
PasswordPolicy PasswordPolicyHandle `json:"password_policy,omitempty"`
Comment string `json:"comment,omitempty"`
Enabled bool `json:"enabled"`
RotationEnabled bool `json:"rotation_enabled"`
Rotate bool `json:"rotate"`
ExplicitCheckout bool `json:"explicit_checkout"`
DisableRdpCertAuth bool `json:"disable_rdp_cert_auth"`
PasswordPolicy PasswordPolicyHandle `json:"password_policy,omitempty"`
Comment string `json:"comment,omitempty"`
}

type ManagedAccountEditBatch struct {
Expand All @@ -240,11 +242,12 @@ type ManagedAccountEditBatch struct {
}

type ManagedAccountChangeSet struct {
Enabled *bool `json:"enabled"`
RotationEnabled *bool `json:"rotation_enabled"`
ExplicitCheckout *bool `json:"explicit_checkout"`
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
Comment *string `json:"comment,omitempty"`
Enabled *bool `json:"enabled"`
RotationEnabled *bool `json:"rotation_enabled"`
ExplicitCheckout *bool `json:"explicit_checkout"`
DisableRdpCertAuth *bool `json:"disable_rdp_cert_auth"`
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
Comment *string `json:"comment,omitempty"`
}

type ManagedAccountBatch struct {
Expand Down
41 changes: 24 additions & 17 deletions api/userstore/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,30 @@ type APIClient struct {

// LocalUser definition
type LocalUser struct {
ID string `json:"id,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
Author string `json:"author,omitempty"`
Comment string `json:"comment,omitempty"`
Tags []string `json:"tags,omitempty"`
Username string `json:"username,omitempty"`
GivenName string `json:"given_name,omitempty"`
FullName string `json:"full_name,omitempty"`
JobTitle string `json:"job_title,omitempty"`
Company string `json:"company,omitempty"`
Department string `json:"department,omitempty"`
Email string `json:"email,omitempty"`
Telephone string `json:"telephone,omitempty"`
Locale string `json:"locale,omitempty"`
Password Password `json:"password,omitempty"`
ID string `json:"id,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
UpdatedBy string `json:"updated_by,omitempty"`
Author string `json:"author,omitempty"`
Comment string `json:"comment,omitempty"`
Tags []string `json:"tags,omitempty"`
Username string `json:"username,omitempty"`
GivenName string `json:"given_name,omitempty"`
FullName string `json:"full_name,omitempty"`
JobTitle string `json:"job_title,omitempty"`
Company string `json:"company,omitempty"`
Department string `json:"department,omitempty"`
Email string `json:"email,omitempty"`
Telephone string `json:"telephone,omitempty"`
Locale string `json:"locale,omitempty"`
Password Password `json:"password,omitempty"`
Attributes []Attribute `json:"attributes,omitempty"`
}

// User attribute
type Attribute struct {
Key string `json:"key"`
Value string `json:"value"`
}

// Password definition
Expand Down

0 comments on commit 4adabdf

Please sign in to comment.