@Transactional(readOnly = true) @Override public void beforeProvision( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity) throws JobExecutionException { if (entity instanceof UserTO) { String password = ((UserTO) entity).getPassword(); parseEncodedPassword(password); } }
@Transactional(readOnly = true) @Override public void beforeProvision( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO any) throws JobExecutionException { if (any instanceof UserTO) { String password = ((UserTO) any).getPassword(); parseEncodedPassword(password, profile.getConnector()); } }
@Transactional(propagation = Propagation.REQUIRES_NEW) @Override public Pair<String, List<PropagationStatus>> create( final UserTO userTO, final boolean storePassword, final boolean disablePwdPolicyCheck, final Boolean enabled, final Set<String> excludedResources, final boolean nullPriorityAsync) { WorkflowResult<Pair<String, Boolean>> created = uwfAdapter.create(userTO, disablePwdPolicyCheck, enabled, storePassword); List<PropagationTaskInfo> taskInfos = propagationManager.getUserCreateTasks( created.getResult().getLeft(), userTO.getPassword(), created.getResult().getRight(), created.getPropByRes(), userTO.getVirAttrs(), excludedResources); PropagationReporter propagationReporter = taskExecutor.execute(taskInfos, nullPriorityAsync); return Pair.of(created.getResult().getLeft(), propagationReporter.getStatuses()); }
if (StringUtils.isNotBlank(template.getPassword()) && !JexlUtils.isExpressionValid(template.getPassword())) { sce.getElements().add("Invalid JEXL: " + template.getPassword());
&& StringUtils.isBlank(((UserTO) anyTO).getPassword()) && provision.getResource().isRandomPwdIfNotProvided()) {
if (StringUtils.isBlank(inner.getPassword()) || statusModel.getObject().isEmpty()) { SyncopeConsoleSession.get().error(getString(Constants.OPERATION_ERROR)); } else { value(inner.getPassword()).onSyncope(isOnSyncope).resources(resources).build()). build();
((UserTO) actual).getPassword(), created.getResult().getValue(), created.getPropByRes(),
password(userTO.getPassword()). mustChangePassword(userTO.isMustChangePassword()). securityQuestion(userTO.getSecurityQuestion()).
if (updated.getPassword() != null && (original.getPassword() == null || !original.getPassword().equals(updated.getPassword()))) { value(updated.getPassword()). resources(updated.getResources()).build());
if (updated.getPassword() != null && (original.getPassword() == null || !original.getPassword().equals(updated.getPassword()))) { value(updated.getPassword()). resources(updated.getResources()).build());
@Override protected Serializable onApplyInternal(final AnyWrapper<UserTO> modelObject) { UserTO inner = modelObject.getInnerObject(); ProvisioningResult<UserTO> result; if (inner.getKey() == null) { UserCR req = new UserCR(); EntityTOUtils.toAnyCR(inner, req); req.setStorePassword(modelObject instanceof UserWrapper ? UserWrapper.class.cast(modelObject).isStorePasswordInSyncope() : StringUtils.isNotBlank(inner.getPassword())); result = userRestClient.create(req); } else { fixPlainAndVirAttrs(inner, getOriginalItem().getInnerObject()); UserUR userUR = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); if (StringUtils.isNotBlank(inner.getPassword())) { PasswordPatch passwordPatch = new PasswordPatch.Builder(). value(inner.getPassword()).onSyncope(true).resources(inner.getResources()).build(); userUR.setPassword(passwordPatch); } // update just if it is changed if (userUR.isEmpty()) { result = new ProvisioningResult<>(); result.setEntity(inner); } else { result = userRestClient.update(getOriginalItem().getInnerObject().getETagValue(), userUR); } } return result; }
if (StringUtils.isNotBlank(((UserTO) template).getPassword())) { String evaluated = JexlUtils.evaluate(((UserTO) template).getPassword(), jexlContext); if (StringUtils.isNotBlank(evaluated)) { ((UserTO) anyTO).setPassword(evaluated);
@Override protected Serializable onApplyInternal(final AnyWrapper<UserTO> modelObject) { UserTO inner = modelObject.getInnerObject(); ProvisioningResult<UserTO> result; if (remediationTO.getAnyURPayload() == null) { UserCR req = new UserCR(); EntityTOUtils.toAnyCR(inner, req); result = restClient.remedy(remediationTO.getKey(), req); } else { UserUR req = AnyOperations.diff(inner, previousUserTO, false); if (StringUtils.isNotBlank(inner.getPassword())) { PasswordPatch passwordPatch = new PasswordPatch.Builder(). value(inner.getPassword()).onSyncope(true).resources(inner. getResources()). build(); req.setPassword(passwordPatch); } // update just if it is changed if (req.isEmpty()) { result = new ProvisioningResult<>(); result.setEntity(inner); } else { result = restClient.remedy(remediationTO.getKey(), req); } } return result; } }
userCR.setPassword(userTO.getPassword()); userCR.setSecurityQuestion(userTO.getSecurityQuestion()); userCR.setSecurityAnswer(userTO.getSecurityAnswer());
if (StringUtils.isBlank(updatedUser.getPassword()) || ENCRYPTOR.verify(updatedUser.getPassword(), user.getCipherAlgorithm(), user.getPassword())) {
if (StringUtils.isBlank(userTO.getPassword()) || !storePassword) { LOG.debug("Password was not provided or not required to be stored"); } else { setPassword(user, userTO.getPassword(), scce);