• 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • The CredentialHandler Component

    Table of Contents

    Introduction

    七乐彩开奖结果 www.eleieg.com The CredentialHandler element represents the component used by a Realm to compare a provided credential such as a password with the version of the credential stored by the Realm. The CredentialHandler can also be used to generate a new stored version of a given credential that would be required, for example, when adding a new user to a Realm or when changing a user's password.

    A CredentialHandler element MUST be nested inside a Realm component. If it is not included, a default CredentialHandler will be created using the MessageDigestCredentialHandler.

    Attributes

    Common Attributes

    All implementations of CredentialHandler support the following attributes:

    Attribute Description
    className

    Java class name of the implementation to use. This class must implement the org.apache.catalina.CredentialHandler interface.

    Unlike most Catalina components, there are several standard CredentialHandler implementations available. As a result, if a CredentialHandler element is present then the className attribute MUST be used to select the implementation you wish to use.

    MessageDigestCredentialHandler

    The MessageDigestCredentialHandler is used when stored passwords are protected by a message digest. This credential handler supports the following forms of stored passwords:

    • plainText - the plain text credentials if no algorithm is specified
    • encodedCredential - a hex encoded digest of the password digested using the configured digest
    • {MD5}encodedCredential - a Base64 encoded MD5 digest of the password
    • {SHA}encodedCredential - a Base64 encoded SHA1 digest of the password
    • {SSHA}encodedCredential - 20 character salt followed by the salted SHA1 digest Base64 encoded
    • salt$iterationCount$encodedCredential - a hex encoded salt, iteration code and a hex encoded credential, each separated by $

    If the stored password form does not include an iteration count then an iteration count of 1 is used.

    If the stored password form does not include salt then no salt is used.

    Attribute Description
    algorithm

    The name of the java.security.MessageDigest algorithm used to encode user passwords stored in the database. If not specified, user passwords are assumed to be stored in clear-text.

    encoding

    Digesting the password requires that it is converted to bytes. This attribute determines the character encoding to use for conversions between characters and bytes. If not specified, UTF-8 will be used.

    iterations

    The number of iterations to use when creating a new stored credential from a clear text credential.

    saltLength

    The length of the randomly generated salt to use when creating a new stored credential from a clear text credential.

    NestedCredentialHandler

    The NestedCredentialHandler is an implementation of CredentialHandler that delegates to one or more sub-CredentialHandlers.

    Using the NestedCredentialHandler gives the developer the ability to combine multiple CredentialHandlers of the same or different types.

    Sub-CredentialHandlers are defined by nesting CredentialHandler elements inside the CredentialHandler element that defines the NestedCredentialHandler. Credentials will be matched against each CredentialHandler in the order they are listed. A match against any CredentialHandler will be sufficient for the credentials to be considered matched.

    SecretKeyCredentialHandler

    The SecretKeyCredentialHandler is used when stored passwords are built using javax.crypto.SecretKeyFactory. This credential handler supports the following forms of stored passwords:

    • salt$iterationCount$encodedCredential - a hex encoded salt, iteration code and a hex encoded credential, each separated by $

    If the stored password form does not include an iteration count then an iteration count of 1 is used.

    If the stored password form does not include salt then no salt is used.

    Attribute Description
    algorithm

    The name of the secret key algorithm used to encode user passwords stored in the database. If not specified, a default of PBKDF2WithHmacSHA1 is used.

    keyLength

    The length of key to generate for the stored credential. If not specified, a default of 160 is used.

    iterations

    The number of iterations to use when creating a new stored credential from a clear text credential.

    saltLength

    The length of the randomly generated salt to use when creating a new stored credential from a clear text credential.

    Nested Components

    If you are using the NestedCredentialHandler Implementation or a CredentialHandler that extends the NestedCredentialHandler one or more <CredentialHandler> elements may be nested inside it.

    Special Features

    No special features are associated with a CredentialHandler element.

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 七乐彩开奖结果. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • 江苏11选5稳赚技巧 正版平特一肖正版图 河南481开奖结果近30期 河南11选五5开奖结果走势图 今天足球比赛结果 排列五玩法说明 体育投注哪个安全 蝌蚪娱乐备用网址 网上老虎机 捕鱼达人2无限金币修改版 六台彩彩涂图厍 海南飞鱼彩票官网 江西新时时彩怎么玩的 京东彩票商品 江苏省快三开奖走势图