Skip to content

Commit

Permalink
Add Account lockout capabilities to Organizations (#702)
Browse files Browse the repository at this point in the history
Signed-off-by: abarreiro <[email protected]>
  • Loading branch information
adambarreiro authored Aug 27, 2024
1 parent be2d396 commit ff19690
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions .changes/v2.26.0/702-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Add `OrgPasswordPolicySettings` type to be able to set account lockout properties for an Organization [GH-702]
27 changes: 21 additions & 6 deletions types/v56/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,12 @@ type OrgSettings struct {
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
//elements
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
OrgGeneralSettings *OrgGeneralSettings `xml:"OrgGeneralSettings,omitempty"` // General Settings for the org, not-required
OrgVAppLeaseSettings *VAppLeaseSettings `xml:"VAppLeaseSettings,omitempty"`
OrgVAppTemplateSettings *VAppTemplateLeaseSettings `xml:"VAppTemplateLeaseSettings,omitempty"` // Vapp template lease settings, not required
OrgLdapSettings *OrgLdapSettingsType `xml:"OrgLdapSettings,omitempty"` //LDAP settings, not-requried, defaults to none

Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
OrgGeneralSettings *OrgGeneralSettings `xml:"OrgGeneralSettings,omitempty"` // General Settings for the org, not-required
OrgVAppLeaseSettings *VAppLeaseSettings `xml:"VAppLeaseSettings,omitempty"`
OrgVAppTemplateSettings *VAppTemplateLeaseSettings `xml:"VAppTemplateLeaseSettings,omitempty"` // Vapp template lease settings, not required
OrgLdapSettings *OrgLdapSettingsType `xml:"OrgLdapSettings,omitempty"` // LDAP settings, not-requried, defaults to none
OrgPasswordPolicySettings *OrgPasswordPolicySettings `xml:"OrgPasswordPolicySettings,omitempty"` // Password policy settings for this organization.
}

// OrgGeneralSettingsType represents the general settings for a VMware Cloud Director organization.
Expand Down Expand Up @@ -1184,6 +1184,21 @@ type OrgLdapUserAttributes struct {
GroupBackLinkIdentifier string `xml:"GroupBackLinkIdentifier,omitempty"`
}

// OrgPasswordPolicySettings represents password policy settings for this organization.
// Type: OrgPasswordPolicySettingsType
// Namespace: http://www.vmware.com/vcloud/v1.5
// Description: Represents password policy settings for this organization.
// Since: 1.5
type OrgPasswordPolicySettings struct {
Xmlns string `xml:"xmlns,attr,omitempty"`
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
Link *LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object
AccountLockoutEnabled bool `xml:"AccountLockoutEnabled"` // Set to true to enable account lockout for logins to this organization
InvalidLoginsBeforeLockout int `xml:"InvalidLoginsBeforeLockout"` // Number of invalid login attempts that will trigger account lockout
AccountLockoutIntervalMinutes int `xml:"AccountLockoutIntervalMinutes"` // Number of minutes an account that is locked out will remain locked
}

// VDCList contains a list of references to Org VDCs
// Type: VdcListType
// Namespace: http://www.vmware.com/vcloud/v1.5
Expand Down

0 comments on commit ff19690

Please sign in to comment.