Skip to content

Commit a21346a

Browse files
authored
Merge pull request #159 from SSHcom/v1.36.0
Support PrivX 36.0
2 parents 4d186aa + d2bbbc5 commit a21346a

File tree

3 files changed

+75
-65
lines changed

3 files changed

+75
-65
lines changed

.github/workflows/go.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: golang
20+
- name: Setup Go
2121
uses: actions/setup-go@v2
2222
with:
23-
go-version: '1.20'
23+
go-version: '1.21'
2424

25-
- name: checkout
25+
- name: Checkout code
2626
uses: actions/checkout@v2
2727
with:
2828
path: src/github.com/SSHcom/privx-sdk-go
@@ -31,30 +31,28 @@ jobs:
3131
run: |
3232
go mod download -json
3333
34-
- name: go get CI tools
34+
- name: Install CI tools
3535
run: |
36-
go get github.com/mattn/goveralls
37-
go get github.com/lawrencewoodman/roveralls
38-
env:
39-
GO111MODULE: off
36+
go install github.com/mattn/goveralls@latest
37+
go install github.com/lawrencewoodman/roveralls@latest
4038
41-
- name: go install staticcheck
39+
- name: Install staticcheck
4240
run: |
4341
go install honnef.co/go/tools/cmd/staticcheck@latest
4442
45-
- name: go vet
43+
- name: Run go vet
4644
run: |
4745
go vet ./...
4846
49-
- name: staticcheck
47+
- name: Run staticcheck
5048
run: |
5149
staticcheck ./...
5250
53-
- name: go test
51+
- name: Run go test
5452
run: |
5553
go test ./...
5654
57-
- name: coverage
55+
- name: Run coverage
5856
env:
5957
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6058
run: |

api/secretsmanager/model.go

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ type CompileScriptRequest struct {
5151
type TargetDomain struct {
5252
ID string `json:"id"`
5353
Name string `json:"name"`
54+
DomainName string `json:"domain_name"`
5455
Enabled bool `json:"enabled"`
5556
PeriodicScan bool `json:"periodic_scan"`
56-
PeriodicScanInterval int `json:"periodic_scan_interval,omitempty"`
57+
PeriodicScanInterval int `json:"periodic_scan_interval"`
5758
ScanStatus string `json:"scan_status,omitempty"`
5859
ScanMessage string `json:"scan_message,omitempty"`
5960
LastScanned *time.Time `json:"last_scanned,omitempty"`
@@ -148,29 +149,31 @@ type ScannedAccountEditBatch struct {
148149
}
149150

150151
type ManagedAccount struct {
151-
ID string `json:"id"`
152-
Username string `json:"username"`
153-
Email string `json:"email,omitempty"`
154-
FullName string `json:"full_name,omitempty"`
155-
SourceID string `json:"source_id,omitempty"`
156-
SecurityID string `json:"security_id,omitempty"`
157-
AdditionalData map[string]string `json:"additional_data,omitempty"`
158-
TargetDomain TargetDomainHandle `json:"target_domain"`
159-
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
160-
Enabled bool `json:"enabled"`
161-
RotationEnabled bool `json:"rotation_enabled"`
162-
ExplicitCheckout bool `json:"explicit_checkout"`
163-
State string `json:"state"`
164-
Comment string `json:"comment,omitempty"`
165-
SecretName string `json:"secret_name,omitempty"`
166-
Locked bool `json:"locked"`
167-
LockedTimestamp *time.Time `json:"locked_timestamp,omitempty"`
168-
RotationHistory []SecretRotationEvent `json:"rotation_history,omitempty"`
169-
SecretCheckouts []SecretCheckout `json:"checkouts,omitempty"`
170-
Created time.Time `json:"created,omitempty"`
171-
Author string `json:"author,omitempty"`
172-
Updated *time.Time `json:"updated,omitempty"`
173-
UpdatedBy string `json:"updated_by,omitempty"`
152+
ID string `json:"id"`
153+
Username string `json:"username"`
154+
Email string `json:"email,omitempty"`
155+
FullName string `json:"full_name,omitempty"`
156+
SamAccountName string `json:"sam_account_name,omitempty"`
157+
SourceID string `json:"source_id,omitempty"`
158+
SecurityID string `json:"security_id,omitempty"`
159+
AdditionalData map[string]string `json:"additional_data,omitempty"`
160+
TargetDomain TargetDomainHandle `json:"target_domain"`
161+
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
162+
Enabled bool `json:"enabled"`
163+
RotationEnabled bool `json:"rotation_enabled"`
164+
ExplicitCheckout bool `json:"explicit_checkout"`
165+
State string `json:"state"`
166+
Comment string `json:"comment,omitempty"`
167+
SecretName string `json:"secret_name,omitempty"`
168+
Locked bool `json:"locked"`
169+
LockedTimestamp *time.Time `json:"locked_timestamp,omitempty"`
170+
RotationHistory []SecretRotationEvent `json:"rotation_history,omitempty"`
171+
SecretCheckouts []SecretCheckout `json:"checkouts,omitempty"`
172+
Created time.Time `json:"created,omitempty"`
173+
Author string `json:"author,omitempty"`
174+
Updated *time.Time `json:"updated,omitempty"`
175+
UpdatedBy string `json:"updated_by,omitempty"`
176+
DisableRdpCertAuth bool `json:"disable_rdp_cert_auth"`
174177
}
175178

176179
type SecretRotationEvent struct {
@@ -226,12 +229,13 @@ type ManagedAccountCreateBatch struct {
226229
}
227230

228231
type ManagedAccountCreateData struct {
229-
Enabled bool `json:"enabled"`
230-
RotationEnabled bool `json:"rotation_enabled"`
231-
Rotate bool `json:"rotate"`
232-
ExplicitCheckout bool `json:"explicit_checkout"`
233-
PasswordPolicy PasswordPolicyHandle `json:"password_policy,omitempty"`
234-
Comment string `json:"comment,omitempty"`
232+
Enabled bool `json:"enabled"`
233+
RotationEnabled bool `json:"rotation_enabled"`
234+
Rotate bool `json:"rotate"`
235+
ExplicitCheckout bool `json:"explicit_checkout"`
236+
DisableRdpCertAuth bool `json:"disable_rdp_cert_auth"`
237+
PasswordPolicy PasswordPolicyHandle `json:"password_policy,omitempty"`
238+
Comment string `json:"comment,omitempty"`
235239
}
236240

237241
type ManagedAccountEditBatch struct {
@@ -240,11 +244,12 @@ type ManagedAccountEditBatch struct {
240244
}
241245

242246
type ManagedAccountChangeSet struct {
243-
Enabled *bool `json:"enabled"`
244-
RotationEnabled *bool `json:"rotation_enabled"`
245-
ExplicitCheckout *bool `json:"explicit_checkout"`
246-
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
247-
Comment *string `json:"comment,omitempty"`
247+
Enabled *bool `json:"enabled"`
248+
RotationEnabled *bool `json:"rotation_enabled"`
249+
ExplicitCheckout *bool `json:"explicit_checkout"`
250+
DisableRdpCertAuth *bool `json:"disable_rdp_cert_auth"`
251+
PasswordPolicy *PasswordPolicyHandle `json:"password_policy,omitempty"`
252+
Comment *string `json:"comment,omitempty"`
248253
}
249254

250255
type ManagedAccountBatch struct {

api/userstore/model.go

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,30 @@ type APIClient struct {
9090

9191
// LocalUser definition
9292
type LocalUser struct {
93-
ID string `json:"id,omitempty"`
94-
Created string `json:"created,omitempty"`
95-
Updated string `json:"updated,omitempty"`
96-
UpdatedBy string `json:"updated_by,omitempty"`
97-
Author string `json:"author,omitempty"`
98-
Comment string `json:"comment,omitempty"`
99-
Tags []string `json:"tags,omitempty"`
100-
Username string `json:"username,omitempty"`
101-
GivenName string `json:"given_name,omitempty"`
102-
FullName string `json:"full_name,omitempty"`
103-
JobTitle string `json:"job_title,omitempty"`
104-
Company string `json:"company,omitempty"`
105-
Department string `json:"department,omitempty"`
106-
Email string `json:"email,omitempty"`
107-
Telephone string `json:"telephone,omitempty"`
108-
Locale string `json:"locale,omitempty"`
109-
Password Password `json:"password,omitempty"`
93+
ID string `json:"id,omitempty"`
94+
Created string `json:"created,omitempty"`
95+
Updated string `json:"updated,omitempty"`
96+
UpdatedBy string `json:"updated_by,omitempty"`
97+
Author string `json:"author,omitempty"`
98+
Comment string `json:"comment,omitempty"`
99+
Tags []string `json:"tags,omitempty"`
100+
Username string `json:"username,omitempty"`
101+
GivenName string `json:"given_name,omitempty"`
102+
FullName string `json:"full_name,omitempty"`
103+
JobTitle string `json:"job_title,omitempty"`
104+
Company string `json:"company,omitempty"`
105+
Department string `json:"department,omitempty"`
106+
Email string `json:"email,omitempty"`
107+
Telephone string `json:"telephone,omitempty"`
108+
Locale string `json:"locale,omitempty"`
109+
Password Password `json:"password,omitempty"`
110+
Attributes []Attribute `json:"attributes,omitempty"`
111+
}
112+
113+
// User attribute
114+
type Attribute struct {
115+
Key string `json:"key"`
116+
Value string `json:"value"`
110117
}
111118

112119
// Password definition

0 commit comments

Comments
 (0)