Skip to content

Commit 95974bf

Browse files
author
radhikap
committed
CLOUDSTACK-1815
1 parent e37fc13 commit 95974bf

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version='1.0' encoding='utf-8' ?>
2+
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
3+
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
4+
%BOOK_ENTITIES;
5+
]>
6+
7+
<!-- Licensed to the Apache Software Foundation (ASF) under one
8+
or more contributor license agreements. See the NOTICE file
9+
distributed with this work for additional information
10+
regarding copyright ownership. The ASF licenses this file
11+
to you under the Apache License, Version 2.0 (the
12+
"License"); you may not use this file except in compliance
13+
with the License. You may obtain a copy of the License at
14+
http://www.apache.org/licenses/LICENSE-2.0
15+
Unless required by applicable law or agreed to in writing,
16+
software distributed under the License is distributed on an
17+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18+
KIND, either express or implied. See the License for the
19+
specific language governing permissions and limitations
20+
under the License.
21+
-->
22+
<section id="password-storage-engine">
23+
<title>Changing the Default Password Encryption</title>
24+
<para>Passwords are encoded when creating or updating users. &PRODUCT; allows you to determine the
25+
default encoding and authentication mechanism for admin and user logins. A new configurable list
26+
called <code>UserPasswordEncoders</code> to allow you to separately configure the order of
27+
preference for encoding and authentication schemes. </para>
28+
<para>Additionally, plain text user authenticator has been changed to use SHA256SALT as the
29+
default encoding algorithm because it is more secure compared to MD5 hashing. It does a simple
30+
string comparison between retrieved and supplied login passwords instead of comparing the
31+
retrieved md5 hash of the stored password against the supplied md5 hash of the password because
32+
clients no longer hash the password. The following method determines what encoding scheme is
33+
used to encode the password supplied during user creation or modification. </para>
34+
<para>When a new user is created, the user password is encoded by using the first valid encoder
35+
loaded as per the sequence specified in the <code>UserPasswordEncoders</code> property in the
36+
<filename>ComponentContext.xml</filename> or <filename>nonossComponentContext.xml</filename>
37+
files. The order of authentication schemes is determined by the <code>UserAuthenticators</code>
38+
property in the same files. When a new authenticator or encoder is added, you can add them to
39+
this list. While doing so, ensure that the new authenticator or encoder is specified as a bean
40+
in both these files. The administrator can change the ordering of both these properties as
41+
preferred to change the order of schemes. Modify the following list properties available in
42+
<filename>client/tomcatconf/nonossComponentContext.xml.in</filename> or
43+
<filename>client/tomcatconf/componentContext.xml.in</filename> as applicable, to the desired
44+
order:</para>
45+
<programlisting>&lt;property name="UserAuthenticators"&gt;
46+
&lt;list&gt;
47+
&lt;ref bean="SHA256SaltedUserAuthenticator"/&gt;
48+
&lt;ref bean="MD5UserAuthenticator"/&gt;
49+
&lt;ref bean="LDAPUserAuthenticator"/&gt;
50+
&lt;ref bean="PlainTextUserAuthenticator"/&gt;
51+
&lt;/list&gt;
52+
&lt;/property&gt;
53+
&lt;property name="UserPasswordEncoders"&gt;
54+
&lt;list&gt;
55+
&lt;ref bean="SHA256SaltedUserAuthenticator"/&gt;
56+
&lt;ref bean="MD5UserAuthenticator"/&gt;
57+
&lt;ref bean="LDAPUserAuthenticator"/&gt;
58+
&lt;ref bean="PlainTextUserAuthenticator"/&gt;
59+
&lt;/list&gt;</programlisting>
60+
<para>In the above default ordering, SHA256Salt is used first for
61+
<code>UserPasswordEncoders</code>. If the module is found and encoding returns a valid value,
62+
the encoded password is stored in the user table's password column. If it fails for any reason,
63+
the MD5UserAuthenticator will be tried next, and the order continues. For
64+
<code>UserAuthenticators</code>, SHA256Salt authentication is tried first. If it succeeds, the
65+
user is logged into the Management server. If it fails, MD5 is tried next, and attempts
66+
continues until any of them succeeds and the user logs in . If none of them works, the user is
67+
returned an invalid credential message. </para>
68+
</section>

0 commit comments

Comments
 (0)