Skip to content

Commit

Permalink
Merge pull request #159 from SSHcom/v1.36.0
Browse files Browse the repository at this point in the history
Support PrivX 36.0
  • Loading branch information
izareenssh authored Sep 3, 2024
2 parents 4d186aa + d2bbbc5 commit a21346a
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 65 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: golang
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.20'
go-version: '1.21'

- name: checkout
- name: Checkout code
uses: actions/checkout@v2
with:
path: src/github.com/SSHcom/privx-sdk-go
Expand All @@ -31,30 +31,28 @@ jobs:
run: |
go mod download -json
- name: go get CI tools
- name: Install CI tools
run: |
go get github.com/mattn/goveralls
go get github.com/lawrencewoodman/roveralls
env:
GO111MODULE: off
go install github.com/mattn/goveralls@latest
go install github.com/lawrencewoodman/roveralls@latest
- name: go install staticcheck
- name: Install staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
- name: go vet
- name: Run go vet
run: |
go vet ./...
- name: staticcheck
- name: Run staticcheck
run: |
staticcheck ./...
- name: go test
- name: Run go test
run: |
go test ./...
- name: coverage
- name: Run coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
75 changes: 40 additions & 35 deletions api/secretsmanager/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ type CompileScriptRequest struct {
type TargetDomain struct {
ID string `json:"id"`
Name string `json:"name"`
DomainName string `json:"domain_name"`
Enabled bool `json:"enabled"`
PeriodicScan bool `json:"periodic_scan"`
PeriodicScanInterval int `json:"periodic_scan_interval,omitempty"`
PeriodicScanInterval int `json:"periodic_scan_interval"`
ScanStatus string `json:"scan_status,omitempty"`
ScanMessage string `json:"scan_message,omitempty"`
LastScanned *time.Time `json:"last_scanned,omitempty"`
Expand Down Expand Up @@ -148,29 +149,31 @@ 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"`
SamAccountName string `json:"sam_account_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 +229,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 +244,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 a21346a

Please sign in to comment.