From ff196906c1cd125fbe7346f52269c6519951d97a Mon Sep 17 00:00:00 2001 From: Adam Barreiro Date: Tue, 27 Aug 2024 12:59:29 +0200 Subject: [PATCH] Add Account lockout capabilities to Organizations (#702) Signed-off-by: abarreiro --- .changes/v2.26.0/702-improvements.md | 1 + types/v56/types.go | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 .changes/v2.26.0/702-improvements.md diff --git a/.changes/v2.26.0/702-improvements.md b/.changes/v2.26.0/702-improvements.md new file mode 100644 index 000000000..5b0fd7ea2 --- /dev/null +++ b/.changes/v2.26.0/702-improvements.md @@ -0,0 +1 @@ +* Add `OrgPasswordPolicySettings` type to be able to set account lockout properties for an Organization [GH-702] diff --git a/types/v56/types.go b/types/v56/types.go index 688502d45..3e716c0b7 100644 --- a/types/v56/types.go +++ b/types/v56/types.go @@ -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. @@ -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