The closest I see is the one for confirmPassword:

 password = new AjaxPasswordFieldPanel("password", "password",
                    new PropertyModel<String>(userTO, "password"));
            password.setRequired(userTO.getId() == 0);
            ((PasswordTextField) 
password.getField()).setResetPassword(resetPassword);

            confirmPassword = new AjaxPasswordFieldPanel("confirmPassword", 
"confirmPassword", new Model<String>());
            if (!resetPassword) {
                confirmPassword.getField().setModelObject(userTO.getPassword());
            }



But I don't see where I would put a defauklt entry in for just Password.

 password = new AjaxPasswordFieldPanel("password", "password",
                    new PropertyModel<String>(userTO, "password"));
            password.setRequired(userTO.getId() == 0);
            ((PasswordTextField) 
password.getField()).setResetPassword(resetPassword);

            confirmPassword = new AjaxPasswordFieldPanel("confirmPassword", 
"confirmPassword", new Model<String>());
            if (!resetPassword) {
                confirmPassword.getField().setModelObject("D3FaultP@sswurd!@#");
            }

Could you maybe tell me where to fill in the default password for "Password?"

Thanks!

----- Original Message -----
From: "Francesco Chicchiriccò" <[email protected]>
To: [email protected]
Sent: Tuesday, June 11, 2013 4:01:55 AM
Subject: Re: Create account with blank password not working

On 10/06/2013 19:38, Michael Monette wrote:
> I am trying to create a user with a blank password. I have checked the box 
> under my resource called "GENERATE PASSWORD WHEN PASSWORD IS MISSING". I try 
> to create a new user in Syncope without a password and it fails because it 
> requires "password" and "confirmPassword" to be filled in.
>
> We are going to be creating users in syncope, then using another tool (PWM 
> Password Manager) For users to activate, create secret questions & Answers, 
> and create their password. So we don't need to create passwords on account 
> creation. Any idea if this is possible?

Hi Michael,
currently Syncope requires a password associated to any user; the
password generation feature referenced above is only used during
synchronization from a specific resource (here is why you have found the
checkbox there).

Anyway, your suggestion makes completely sense, so I have opened
SYNCOPE-391 [1] that will be included in next major release 1.2.0,
currently planned for Q3 2013 [2].

A possible temporary workaround could be to customize the admin console
(you have to know a bit of Wicket for this) in order to provide a
default password value, when not specified.

Basically, you would need t:

1. download [3] and copy it under your project's
console/src/main/java/org/apache/syncope/console/pages/panels (create
intermediate directories if needed)

2. modify UserDetailsPanel around lines 89:103 by doing something similar:

password.setMoldeObject("YOUR_DEFAUT_PASSWORD_VALUE");
confirmPassword.setMoldeObject("YOUR_DEFAUT_PASSWORD_VALUE");

Finally, you need to remove any password policy, or at least configure
them for allowing reuse of old passwords and the default password value
specified above.

HTH
Regards.

[1] https://issues.apache.org/jira/browse/SYNCOPE-391
[2]
https://cwiki.apache.org/confluence/display/SYNCOPE/Roadmap#Roadmap-1.2.0%28Intermezzo%29
[3]
https://svn.apache.org/repos/asf/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserDetailsPanel.java

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to