diff --git a/infra/ws-util/src/main/java/com/evolveum/midpoint/infra/wsutil/AbstractWebServiceClient.java b/infra/ws-util/src/main/java/com/evolveum/midpoint/infra/wsutil/AbstractWebServiceClient.java
index 1cb8f5ca4db..a1a31d87198 100644
--- a/infra/ws-util/src/main/java/com/evolveum/midpoint/infra/wsutil/AbstractWebServiceClient.java
+++ b/infra/ws-util/src/main/java/com/evolveum/midpoint/infra/wsutil/AbstractWebServiceClient.java
@@ -30,6 +30,8 @@
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.handler.WSHandlerConstants;
@@ -59,7 +61,18 @@ public void setVerbose(boolean verbose) {
protected abstract String getDefaultUsername();
protected String getPasswordType() {
- return WSConstants.PW_DIGEST;
+ if (commandLine.hasOption('P')) {
+ String optionValue = commandLine.getOptionValue('P');
+ if ("text".equals(optionValue)) {
+ return WSConstants.PW_TEXT;
+ } else if ("digest".equals(optionValue)) {
+ return WSConstants.PW_DIGEST;
+ } else {
+ throw new IllegalArgumentException("Unknown password type "+optionValue);
+ }
+ } else {
+ return WSConstants.PW_TEXT;
+ }
}
protected abstract String getDefaultPassword();
@@ -83,8 +96,10 @@ public void main(String[] args) {
protected void init(String[] args) throws ParseException {
options.addOption("u", "user", true, "Username");
options.addOption("p", "password", true, "Password");
+ options.addOption("P", "password-type", true, "Password type (text or digest)");
options.addOption("e", "endpoint", true, "Endpoint URL");
options.addOption("v", "verbose", false, "Verbose mode");
+ options.addOption("m", "messages", false, "Log SOAP messages");
options.addOption("h", "help", false, "Usage help");
extendOptions(options);
parseCommandLine(args);
@@ -157,9 +172,11 @@ protected P createPort() throws Exception {
WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(wssProps);
cxfEndpoint.getOutInterceptors().add(wssOut);
- // enable the following to get client-side logging of outgoing requests and incoming responses
- //cxfEndpoint.getOutInterceptors().add(new LoggingOutInterceptor());
- //cxfEndpoint.getInInterceptors().add(new LoggingInInterceptor());
+
+ if (commandLine.hasOption('m')) {
+ cxfEndpoint.getInInterceptors().add(new LoggingInInterceptor());
+ cxfEndpoint.getOutInterceptors().add(new LoggingOutInterceptor());
+ }
return modelPort;
}
diff --git a/infra/ws-util/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/infra/ws-util/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 00000000000..27dd788b315
--- /dev/null
+++ b/infra/ws-util/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Slf4jLogger
\ No newline at end of file
diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/PasswordCallback.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/PasswordCallback.java
index e98a75be024..395577b3d6e 100644
--- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/PasswordCallback.java
+++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/security/PasswordCallback.java
@@ -26,6 +26,8 @@
import com.evolveum.midpoint.security.api.MidPointPrincipal;
import com.evolveum.midpoint.security.api.UserProfileService;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
+import com.evolveum.midpoint.util.logging.Trace;
+import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType;
@@ -36,6 +38,8 @@
* @author Igor Farinic
*/
public class PasswordCallback implements CallbackHandler {
+
+ private static final Trace LOGGER = TraceManager.getTrace(PasswordCallback.class);
private UserProfileService userDetailsService;
private Protector protector;
@@ -46,8 +50,12 @@ public PasswordCallback(UserProfileService userDetailsService, Protector protect
}
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ LOGGER.trace("Invoked PasswordCallback with {} callbacks: {}", callbacks.length, callbacks);
WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
+ String wssPasswordType = pc.getType();
+ LOGGER.trace("Password type: {}", wssPasswordType);
+
MidPointPrincipal user;
try {
user = userDetailsService.getPrincipal(pc.getIdentifier());
diff --git a/model/model-impl/src/main/resources/ctx-model.xml b/model/model-impl/src/main/resources/ctx-model.xml
index 19312077f9d..ff41c6ac009 100644
--- a/model/model-impl/src/main/resources/ctx-model.xml
+++ b/model/model-impl/src/main/resources/ctx-model.xml
@@ -407,14 +407,13 @@
-
+
diff --git a/model/model-intest/src/test/resources/sync/task-reconcile-dummy-azure.xml b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-azure.xml
index 8284f0c9e43..3070fd7451e 100644
--- a/model/model-intest/src/test/resources/sync/task-reconcile-dummy-azure.xml
+++ b/model/model-intest/src/test/resources/sync/task-reconcile-dummy-azure.xml
@@ -35,10 +35,6 @@
http://midpoint.evolveum.com/xml/ns/public/model/synchronization/task/reconciliation/handler-3
- recurring
- tight
-
- 5
-
+ single
diff --git a/repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskCategory.java b/repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskCategory.java
index 544e26c1108..028fe776fd9 100644
--- a/repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskCategory.java
+++ b/repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskCategory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 Evolveum
+ * Copyright (c) 2010-2014 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +17,7 @@
package com.evolveum.midpoint.task.api;
/**
- * Created with IntelliJ IDEA.
- * User: mederly
- * Date: 3.5.2012
- * Time: 21:50
- * To change this template use File | Settings | File Templates.
+ * @author mederly
*/
public class TaskCategory {
@@ -36,4 +32,5 @@ public class TaskCategory {
public static final String WORKFLOW = "Workflow";
public static final String SYSTEM = "System";
public static final String REPORT = "Report";
+ public static final String CUSTOM = "Custom";
}