//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_Account.cs // // Contents: CIM_Account is the information held by a SecurityService to track identity and privileges managed by that service. Common examples of an Account are the entries in a UNIX /etc/passwd file. Several kinds of security services use various information from those entries - the /bin/login program uses the account name ('root') and hashed password to authenticate users, and the file service, for instance, uses the UserID field ('0') and GroupID field ('0') to record ownership and determine access control privileges on files in the file system. This class is defined so as to incorporate commonly-used LDAP attributes to permit implementations to easily derive this information from LDAP-accessible directories. // // The semantics of Account overlap with that of the class, CIM_Identity. However, aspects of Account - such as its specific tie to a System - are valuable and have been widely implemented. For this reason, the Account and Identity classes are associated using a subclass of LogicalIdentity (AccountIdentity), instead of deprecating the Account class in the CIM Schema. When an Account has been authenticated, the corresponding Identity's TrustEstablished Boolean would be set to TRUE. Then, the Identity class can be used as defined for authorization purposes. // This file was automatically generated from CIM_Account.mof // //---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; using System.Globalization; using System.Xml.Serialization; using System.IO; using Intel.Manageability.WSManagement; using Intel.Manageability.Cim.Untyped; namespace Intel.Manageability.Cim.Typed { /// ///CIM_Account is the information held by a SecurityService to track identity and privileges managed by that service. Common examples of an Account are the entries in a UNIX /etc/passwd file. Several kinds of security services use various information from those entries - the /bin/login program uses the account name ('root') and hashed password to authenticate users, and the file service, for instance, uses the UserID field ('0') and GroupID field ('0') to record ownership and determine access control privileges on files in the file system. This class is defined so as to incorporate commonly-used LDAP attributes to permit implementations to easily derive this information from LDAP-accessible directories. ///The semantics of Account overlap with that of the class, CIM_Identity. However, aspects of Account - such as its specific tie to a System - are valuable and have been widely implemented. For this reason, the Account and Identity classes are associated using a subclass of LogicalIdentity (AccountIdentity), instead of deprecating the Account class in the CIM Schema. When an Account has been authenticated, the corresponding Identity's TrustEstablished Boolean would be set to TRUE. Then, the Identity class can be used as defined for authorization purposes. /// [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Account")] [System.Xml.Serialization.XmlRootAttribute("CIM_Account", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Account", IsNullable=false)] public class CIM_Account : CIM_EnabledLogicalElement { /// /// Default constructor. /// public CIM_Account() :base() { } /// /// Constructor that recieves an xml string for deserialization. /// /// xml string to deserialize public CIM_Account(string xml): base((IWSManClient)null) { this.Deserialize(xml); } /// /// Constructor which recieves a Ws-Management client object. /// /// Ws-Management client public CIM_Account(IWSManClient client): base(client) { } /// /// Remove ComplexPasswordRulesEnforced field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveComplexPasswordRulesEnforced() { RemoveField("ComplexPasswordRulesEnforced"); } /// /// Is true if the field ComplexPasswordRulesEnforced exists in the current object, /// otherwise is false. /// public virtual bool ComplexPasswordRulesEnforcedExist { get { return ContainsField("ComplexPasswordRulesEnforced"); } } /// /// Optional, ComplexPasswordRulesEnforced indicates the rules for constructing a complex password enforced by the Account. /// Minimum Length a minimum length is enforced for passwords for the account. /// Preclude User ID inclusion precluding the password from including the user ID is supported. /// Maximum Repeating Characters a limit will be enforced on the number of times a character can occur consecutively. /// Lower Case Alpha at least one lower case alpha character is required. /// Upper Case Alpha at least one upper case alpha character is required. /// Numeric Character at least one numeric character is required. /// Special Character at least one special character is required. /// [CimField(false, false)] public virtual ushort[] ComplexPasswordRulesEnforced { get { return CimTypesUtils.StringArrayToArray(this["ComplexPasswordRulesEnforced"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("ComplexPasswordRulesEnforced", arr); } } /// /// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified. /// [CimField(true, true)] public virtual string CreationClassName { get { return this.GetField("CreationClassName")[0]; } set { this.SetOrAddField("CreationClassName",value); } } /// /// Remove Descriptions field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveDescriptions() { RemoveField("Descriptions"); } /// /// Is true if the field Descriptions exists in the current object, /// otherwise is false. /// public virtual bool DescriptionsExist { get { return ContainsField("Descriptions"); } } /// /// Optional, The Descriptions property values may contain human-readable descriptions of the object. In the case of an LDAP-derived instance, the description attribute may have multiple values that, therefore, cannot be placed in the inherited Description property. /// [CimField(false, false)] public virtual string[] Descriptions { get { return CimTypesUtils.StringArrayToArray(this["Descriptions"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("Descriptions", arr); } } /// /// Remove Host field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveHost() { RemoveField("Host"); } /// /// Is true if the field Host exists in the current object, /// otherwise is false. /// public virtual bool HostExist { get { return ContainsField("Host"); } } /// /// Optional, Based on RFC1274, the host name of the system(s) for which the account applies. The host name may be a fully-qualified DNS name or it may be an unqualified host name. /// [CimField(false, false)] public virtual string[] Host { get { return CimTypesUtils.StringArrayToArray(this["Host"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("Host", arr); } } /// /// Remove InactivityTimeout field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveInactivityTimeout() { RemoveField("InactivityTimeout"); } /// /// Is true if the field InactivityTimeout exists in the current object, /// otherwise is false. /// public virtual bool InactivityTimeoutExist { get { return ContainsField("InactivityTimeout"); } } /// /// Optional, InactivityTimeout specifies the interval after which if an account has been inactive, it shall be Disabled. The value may be expressed in interval format, as an absolute date-time, or be NULL. /// An absolute date-time shall indicate when the password will be disabled due to inactivity. /// An interval value shall indicate the time remaining before the password is disabled due to inactivity. /// A value of NULL shall indicate that the Account will not be disabled due to inactivity. /// [CimField(false, false)] public virtual CimDateTime InactivityTimeout { get { return CimDateTime.Parse(this["InactivityTimeout"][0]); } set { this.SetOrAddField("InactivityTimeout",value.ToString()); } } /// /// Remove LastLogin field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveLastLogin() { RemoveField("LastLogin"); } /// /// Is true if the field LastLogin exists in the current object, /// otherwise is false. /// public virtual bool LastLoginExist { get { return ContainsField("LastLogin"); } } /// /// Optional, LastLogin shall be an absolute date-time that specifies the last successful authentication that occurred for this Account.A value of 99990101000000.000000+000 shall indicate the Account has never been used. A value of NULL shall indicate the last successful login is unknown. /// [CimField(false, false)] public virtual CimDateTime LastLogin { get { return CimDateTime.Parse(this["LastLogin"][0]); } set { this.SetOrAddField("LastLogin",value.ToString()); } } /// /// Remove LocalityName field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveLocalityName() { RemoveField("LocalityName"); } /// /// Is true if the field LocalityName exists in the current object, /// otherwise is false. /// public virtual bool LocalityNameExist { get { return ContainsField("LocalityName"); } } /// /// Optional, This property contains the name of a locality, such as a city, county or other geographic region. /// [CimField(false, false)] public virtual string[] LocalityName { get { return CimTypesUtils.StringArrayToArray(this["LocalityName"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("LocalityName", arr); } } /// /// Remove MaximumSuccessiveLoginFailures field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveMaximumSuccessiveLoginFailures() { RemoveField("MaximumSuccessiveLoginFailures"); } /// /// Is true if the field MaximumSuccessiveLoginFailures exists in the current object, /// otherwise is false. /// public virtual bool MaximumSuccessiveLoginFailuresExist { get { return ContainsField("MaximumSuccessiveLoginFailures"); } } /// /// Optional, MaximumSuccessiveLoginFailures indicates the number of successive failed login attempts that shall result in the Account being disabled. A value of zero shall indicate that the Account will not be disabled due to successive failed login attempts. /// [CimField(false, false)] public virtual ushort MaximumSuccessiveLoginFailures { get { return ushort.Parse(this["MaximumSuccessiveLoginFailures"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("MaximumSuccessiveLoginFailures",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Key, Required, The Name property defines the label by which the object is known. The value of this property may be set to be the same as that of the UserID property or, in the case of an LDAP-derived instance, the Name property value may be set to the distinguishedName of the LDAP-accessed object instance. /// [CimField(true, true)] public override string Name { get { return this.GetField("Name")[0]; } set { this.SetOrAddField("Name",value); } } /// /// Remove OU field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveOU() { RemoveField("OU"); } /// /// Is true if the field OU exists in the current object, /// otherwise is false. /// public virtual bool OUExist { get { return ContainsField("OU"); } } /// /// Optional, The name of an organizational unit related to the account. /// [CimField(false, false)] public virtual string[] OU { get { return CimTypesUtils.StringArrayToArray(this["OU"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("OU", arr); } } /// /// Remove ObjectClass field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveObjectClass() { RemoveField("ObjectClass"); } /// /// Is true if the field ObjectClass exists in the current object, /// otherwise is false. /// public virtual bool ObjectClassExist { get { return ContainsField("ObjectClass"); } } /// /// Optional, In the case of an LDAP-derived instance, the ObjectClass property value(s) may be set to the objectClass attribute values. /// [CimField(false, false)] public virtual string[] ObjectClass { get { return CimTypesUtils.StringArrayToArray(this["ObjectClass"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("ObjectClass", arr); } } /// /// Required, The name of the organization related to the account. /// [CimField(false, true)] public virtual string[] OrganizationName { get { return CimTypesUtils.StringArrayToArray(this["OrganizationName"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("OrganizationName", arr); } } /// /// Remove OtherUserPasswordEncryptionAlgorithm field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveOtherUserPasswordEncryptionAlgorithm() { RemoveField("OtherUserPasswordEncryptionAlgorithm"); } /// /// Is true if the field OtherUserPasswordEncryptionAlgorithm exists in the current object, /// otherwise is false. /// public virtual bool OtherUserPasswordEncryptionAlgorithmExist { get { return ContainsField("OtherUserPasswordEncryptionAlgorithm"); } } /// /// Optional, If the UserPasswordEncryptionAlgorithm property is set to 1 ("Other") this property contains a free form string that provides more information about the encryption algorithm. If UserPasswordEncryptionAlgorithm is not set to 1 ("Other") this property has no meaning. /// [CimField(false, false)] public virtual string OtherUserPasswordEncryptionAlgorithm { get { return this.GetField("OtherUserPasswordEncryptionAlgorithm")[0]; } set { this.SetOrAddField("OtherUserPasswordEncryptionAlgorithm",value); } } /// /// Remove PasswordExpiration field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePasswordExpiration() { RemoveField("PasswordExpiration"); } /// /// Is true if the field PasswordExpiration exists in the current object, /// otherwise is false. /// public virtual bool PasswordExpirationExist { get { return ContainsField("PasswordExpiration"); } } /// /// Optional, PasswordExpiration indicates the maximum password age enforced for the Account. The value may be expressed as an absolute date-time as an interval, or may be NULL. /// An absolute date-time shall indicate the date and time when the password will expire. /// An interval value shall indicate the time remaining until the password expires. /// A value of NULL shall indicate the password never expires. /// [CimField(false, false)] public virtual CimDateTime PasswordExpiration { get { return CimDateTime.Parse(this["PasswordExpiration"][0]); } set { this.SetOrAddField("PasswordExpiration",value.ToString()); } } /// /// Remove PasswordHistoryDepth field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemovePasswordHistoryDepth() { RemoveField("PasswordHistoryDepth"); } /// /// Is true if the field PasswordHistoryDepth exists in the current object, /// otherwise is false. /// public virtual bool PasswordHistoryDepthExist { get { return ContainsField("PasswordHistoryDepth"); } } /// /// Optional, PasswordHistoryDepth indicates the number of previous passwords that shall be maintained for the Account. The Account shall preclude the selection of a password if it occurs in the password history. A value of zero shall indicate that a password history is not maintained. /// [CimField(false, false)] public virtual ushort PasswordHistoryDepth { get { return ushort.Parse(this["PasswordHistoryDepth"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("PasswordHistoryDepth",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove SeeAlso field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveSeeAlso() { RemoveField("SeeAlso"); } /// /// Is true if the field SeeAlso exists in the current object, /// otherwise is false. /// public virtual bool SeeAlsoExist { get { return ContainsField("SeeAlso"); } } /// /// Optional, In the case of an LDAP-derived instance, the SeeAlso property specifies distinguished name of other Directory objects which may be other aspects (in some sense) of the same real world object. /// [CimField(false, false)] public virtual string[] SeeAlso { get { return CimTypesUtils.StringArrayToArray(this["SeeAlso"]); } set { string[] arr = CimTypesUtils.ArrayToStringArray(value); this.SetOrAddField("SeeAlso", arr); } } /// /// Key, Required, The scoping System's CCN. /// [CimField(true, true)] public virtual string SystemCreationClassName { get { return this.GetField("SystemCreationClassName")[0]; } set { this.SetOrAddField("SystemCreationClassName",value); } } /// /// Key, Required, The scoping System's Name. /// [CimField(true, true)] public virtual string SystemName { get { return this.GetField("SystemName")[0]; } set { this.SetOrAddField("SystemName",value); } } /// /// Remove UserCertificate field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUserCertificate() { RemoveField("UserCertificate"); } /// /// Is true if the field UserCertificate exists in the current object, /// otherwise is false. /// public virtual bool UserCertificateExist { get { return ContainsField("UserCertificate"); } } /// /// Optional, Based on inetOrgPerson and for directory compatibility, the UserCertificate property may be used to specify a public key certificate for the person. /// [CimField(false, false)] public virtual string UserCertificate { get { return this.GetField("UserCertificate")[0]; } set { this.SetOrAddField("UserCertificate",value); } } /// /// Remove UserID field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUserID() { RemoveField("UserID"); } /// /// Is true if the field UserID exists in the current object, /// otherwise is false. /// public virtual bool UserIDExist { get { return ContainsField("UserID"); } } /// /// Optional, UserID is the value used by the SecurityService to represent identity. For an authentication service, the UserID may be the name of the user, or for an authorization service the value which serves as a handle to a mapping of the identity. /// [CimField(false, false)] public virtual string UserID { get { return this.GetField("UserID")[0]; } set { this.SetOrAddField("UserID",value); } } /// /// Remove UserPassword field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUserPassword() { RemoveField("UserPassword"); } /// /// Is true if the field UserPassword exists in the current object, /// otherwise is false. /// public virtual bool UserPasswordExist { get { return ContainsField("UserPassword"); } } /// /// Optional, In the case of an LDAP-derived instance, the UserPassword property may contain an encrypted password used to access the person's resources in a directory. /// [CimField(false, false)] public virtual string UserPassword { get { return this.GetField("UserPassword")[0]; } set { this.SetOrAddField("UserPassword",value); } } /// /// Remove UserPasswordEncoding field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUserPasswordEncoding() { RemoveField("UserPasswordEncoding"); } /// /// Is true if the field UserPasswordEncoding exists in the current object, /// otherwise is false. /// public virtual bool UserPasswordEncodingExist { get { return ContainsField("UserPasswordEncoding"); } } /// /// Optional, UserPasswordEncoding specifies encoding used for the UserPassword property. /// "kbd" denotes a string in hexadecimal format containing keyboard scan code input. An example of a UserPassword structured in this format would be "321539191E1F1F11181320", which is the representation of "my password" in US English keyboard scan codes. /// " ///ascii" denotes clear text that complies with the ASCII character set. An example would be "my password". /// "pin" denotes that only numeric input in ASCII text is allowed for the UserPassword. An example would be "1234". /// "UTF-8" denotes that the UserPassword is a Unicode string that is encoded using UTF-8 character set. /// "UTF-16" denotes that the UserPassword is a Unicode string that is encoded using UTF-16 character set. The byte order mark (BOM) shall be the first character of the string. /// "UTF-16LE" denotes that the UserPassword is a Unicode string that is encoded using UTF-16 character set in little-endian byte order. /// "UTF-16BE" denotes that the UserPassword is a Unicode string that is encoded using UTF-16 character set in big-endian byte order. /// "UCS-2" denotes that the UserPassword is a Unicode string that is encoded using UCS-2 character set. /// [CimField(false, false)] public virtual uint UserPasswordEncoding { get { return uint.Parse(this["UserPasswordEncoding"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("UserPasswordEncoding",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Remove UserPasswordEncryptionAlgorithm field. /// Note: This method will succeed only if this field is optional in the concrete object. /// public virtual void RemoveUserPasswordEncryptionAlgorithm() { RemoveField("UserPasswordEncryptionAlgorithm"); } /// /// Is true if the field UserPasswordEncryptionAlgorithm exists in the current object, /// otherwise is false. /// public virtual bool UserPasswordEncryptionAlgorithmExist { get { return ContainsField("UserPasswordEncryptionAlgorithm"); } } /// /// Optional, The encryption algorithm (if any) used by the client to produce the value in the UserPassword property when creating or modifying an instance of CIM_Account. The original password is encrypted using the algorithm specified in this property, and UserPassword contains the resulting encrypted value. In response to an operation request that would return the value of the UserPassword property to a client, an implementation shall instead return an array of length zero. /// The value of UserPasswordEncryptionAlgorithm in an instance of CIM_Account shall be 0 ("None") unless the SupportedUserPasswordEncryptionAlgorithms[] property in the CIM_AccountManagementCapabilities instance associated with the CIM_AccountManagementService instance associated with the CIM_Account instance contains a non-null entry other than 0 ("None"). /// This property does not prevent the use of encryption at the transport, network, or data-link layer to protect communications between a management client and the server, nor is it meant to encourage communications without such encryption. /// The supported values for this property are: /// - 0 ("None"): Indicates that the contents of UserPassword are not encrypted. /// - 1 ("Other"): Indicates that the contents of UserPassword are encrypted using an algorithm not specifically identified in the value map for this property, and that this algorithm is described in OtherUserPasswordEncryptionAlgorithm. /// - 2 ("HTTP Digest MD5(A1)"): The MD5 hash algorithm, applied to the string A1 defined in RFC2617 as the concatenation username-value ":" realm-value ":" passwd, where username-value is provided by the client as the value of the UserID property. passwd is the underlying user password. realm-value is the HTTP digest realm value, and is provided by the server. The semantics of the HTTP digest realm are specified in RFC 2617. The server may surface the realm-value in the UserPasswordEncryptionSalt property of CIM_AccountManagementCapabilities. /// [CimField(false, false)] public virtual ushort UserPasswordEncryptionAlgorithm { get { return ushort.Parse(this["UserPasswordEncryptionAlgorithm"][0], CultureInfo.InvariantCulture); } set { this.SetOrAddField("UserPasswordEncryptionAlgorithm",value.ToString(CultureInfo.InvariantCulture)); } } /// /// Enumerate instances of CIM_Account class at an endpoint. /// /// WS-Management client /// Keys for selecting the instances /// Collection of CIM_Account objects public static new Collection Enumerate(IWSManClient client, CimBase.CimKeys cimKeys) { List ret = CimBase.Enumerate(client, cimKeys); return new Collection(ret); } /// /// Enumerate instances of CIM_Account class at an endpoint. /// /// WS-Management client /// Collection of CIM_Account objects public static new Collection Enumerate(IWSManClient client) { List ret = CimBase.Enumerate(client); return new Collection(ret); } /// /// Delete the instance of CIM_Account if it is singular. /// Note: This method will succeed only if a single instance of the class exists. /// /// WS-Management client public static new void Delete(IWSManClient client) { CimBase.Delete(client); } /// /// Represents the keys of the CIM_Account class. /// public new class CimKeys : CIM_EnabledLogicalElement.CimKeys { /// /// Key, Required, CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified. /// public virtual string CreationClassName { get { return GetKey("CreationClassName"); } set { SetOrAddKey("CreationClassName", value); } } /// /// Key, Required, The Name property defines the label by which the object is known. The value of this property may be set to be the same as that of the UserID property or, in the case of an LDAP-derived instance, the Name property value may be set to the distinguishedName of the LDAP-accessed object instance. /// public virtual string Name { get { return GetKey("Name"); } set { SetOrAddKey("Name", value); } } /// /// Key, Required, The scoping System's CCN. /// public virtual string SystemCreationClassName { get { return GetKey("SystemCreationClassName"); } set { SetOrAddKey("SystemCreationClassName", value); } } /// /// Key, Required, The scoping System's Name. /// public virtual string SystemName { get { return GetKey("SystemName"); } set { SetOrAddKey("SystemName", value); } } } } }