IDEMPIERE-549 Upgrade Restlet to release 2.1.1
This commit is contained in:
parent
dd884d5297
commit
fb6be46cf4
|
@ -83,7 +83,7 @@
|
||||||
id="org.restlet"
|
id="org.restlet"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="2.0.15.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<cq:property key="target.arch" value="*"/>
|
<cq:property key="target.arch" value="*"/>
|
||||||
<cq:property key="target.os" value="*"/>
|
<cq:property key="target.os" value="*"/>
|
||||||
<cq:property key="target.ws" value="*"/>
|
<cq:property key="target.ws" value="*"/>
|
||||||
<cq:advisorNode namePattern="^org\.restlet(\..+)?" componentType="osgi.bundle" versionOverride="[2.0.7,2.1.0)"/>
|
<cq:advisorNode namePattern="^org\.restlet(\..+)?" componentType="osgi.bundle" versionOverride="[2.1.0,2.2.0)"/>
|
||||||
<cq:advisorNode namePattern="^com\.springsource\.slf4j\.jcl$" componentType="osgi.bundle" versionOverride="[1.6.1,1.7.0)"/>
|
<cq:advisorNode namePattern="^com\.springsource\.slf4j\.jcl$" componentType="osgi.bundle" versionOverride="[1.6.1,1.7.0)"/>
|
||||||
<cq:advisorNode namePattern="^org\.apache\.poi$" componentType="osgi.bundle" versionOverride="[3.7.0,4.0.0)"/>
|
<cq:advisorNode namePattern="^org\.apache\.poi$" componentType="osgi.bundle" versionOverride="[3.7.0,4.0.0)"/>
|
||||||
<cq:advisorNode namePattern="^com\.springsource\.javax\.mail$" componentType="osgi.bundle" versionOverride="[1.4.5,1.4.5]"/>
|
<cq:advisorNode namePattern="^com\.springsource\.javax\.mail$" componentType="osgi.bundle" versionOverride="[1.4.5,1.4.5]"/>
|
||||||
|
|
|
@ -72,9 +72,10 @@
|
||||||
<rm:property key="buckminster.mutable" value="false"/>
|
<rm:property key="buckminster.mutable" value="false"/>
|
||||||
<rm:uri format="http://maven.restlet.org"/>
|
<rm:uri format="http://maven.restlet.org"/>
|
||||||
<maven:mappings>
|
<maven:mappings>
|
||||||
<maven:entry artifactId="org.restlet" groupId="org.restlet.jee" name="org.restlet"/>
|
<maven:entry artifactId="org.restlet" groupId="org.restlet.osgi" name="org.restlet"/>
|
||||||
<maven:entry artifactId="org.restlet.ext.net" groupId="org.restlet.jee" name="org.restlet.ext.net"/>
|
<maven:entry artifactId="org.restlet.ext.net" groupId="org.restlet.osgi" name="org.restlet.ext.net"/>
|
||||||
<maven:entry artifactId="org.restlet.ext.servlet" groupId="org.restlet.jee" name="org.restlet.ext.servlet"/>
|
<maven:entry artifactId="org.restlet.ext.servlet" groupId="org.restlet.osgi" name="org.restlet.ext.servlet"/>
|
||||||
|
<maven:entry artifactId="org.restlet.ext.ssl" groupId="org.restlet.osgi" name="org.restlet.ext.ssl"/>
|
||||||
</maven:mappings>
|
</maven:mappings>
|
||||||
</rm:provider>
|
</rm:provider>
|
||||||
</rm:searchPath>
|
</rm:searchPath>
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class BasicVerifier extends SecretVerifier {
|
||||||
* @see org.restlet.security.SecretVerifier#verify(java.lang.String, char[])
|
* @see org.restlet.security.SecretVerifier#verify(java.lang.String, char[])
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean verify(String identity, char[] password)
|
public int verify(String identity, char[] password)
|
||||||
throws IllegalArgumentException {
|
throws IllegalArgumentException {
|
||||||
//authenticate with session token
|
//authenticate with session token
|
||||||
if (identity.startsWith("AD_Session_ID#"))
|
if (identity.startsWith("AD_Session_ID#"))
|
||||||
|
@ -49,35 +49,35 @@ public class BasicVerifier extends SecretVerifier {
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
log.log(Level.WARNING, "Invalid session token: " + identity);
|
log.log(Level.WARNING, "Invalid session token: " + identity);
|
||||||
return false;
|
return RESULT_INVALID;
|
||||||
}
|
}
|
||||||
MSession session = new MSession(Env.getCtx(), AD_Session_ID, null);
|
MSession session = new MSession(Env.getCtx(), AD_Session_ID, null);
|
||||||
if (session.getAD_Session_ID() != AD_Session_ID)
|
if (session.getAD_Session_ID() != AD_Session_ID)
|
||||||
{
|
{
|
||||||
log.log(Level.WARNING, "Session not exists in database: " + identity);
|
log.log(Level.WARNING, "Session not exists in database: " + identity);
|
||||||
return false;
|
return RESULT_INVALID;
|
||||||
}
|
}
|
||||||
if (session.isProcessed())
|
if (session.isProcessed())
|
||||||
{
|
{
|
||||||
log.log(Level.WARNING, "Session have logout: " + identity);
|
log.log(Level.WARNING, "Session have logout: " + identity);
|
||||||
return false;
|
return RESULT_INVALID;
|
||||||
}
|
}
|
||||||
if (!session.isActive())
|
if (!session.isActive())
|
||||||
{
|
{
|
||||||
log.log(Level.WARNING, "Session isActive=false: " + identity);
|
log.log(Level.WARNING, "Session isActive=false: " + identity);
|
||||||
return false;
|
return RESULT_INVALID;
|
||||||
}
|
}
|
||||||
if (!session.getWebSession().equals(new String(password)))
|
if (!session.getWebSession().equals(new String(password)))
|
||||||
{
|
{
|
||||||
log.log(Level.WARNING, "Session token doesn't match. identity=" + identity + ", token="+new String(password));
|
log.log(Level.WARNING, "Session token doesn't match. identity=" + identity + ", token="+new String(password));
|
||||||
}
|
}
|
||||||
return true;
|
return RESULT_VALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
//authenticate with userid+password
|
//authenticate with userid+password
|
||||||
Login login = new Login(new Properties());
|
Login login = new Login(new Properties());
|
||||||
KeyNamePair[] roles = login.getRoles(identity, new String(password));
|
KeyNamePair[] roles = login.getRoles(identity, new String(password));
|
||||||
return (roles != null && roles.length > 0);
|
return (roles != null && roles.length > 0) ? RESULT_VALID : RESULT_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,11 @@
|
||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.restlet.ext.ssl"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
</feature>
|
</feature>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<stringAttribute key="pde.version" value="3.3"/>
|
<stringAttribute key="pde.version" value="3.3"/>
|
||||||
<stringAttribute key="product" value="org.adempiere.ui.swing.client_product"/>
|
<stringAttribute key="product" value="org.adempiere.ui.swing.client_product"/>
|
||||||
<stringAttribute key="productFile" value="/org.adempiere.ui.swing-feature/swingclient.product"/>
|
<stringAttribute key="productFile" value="/org.adempiere.ui.swing-feature/swingclient.product"/>
|
||||||
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,com.springsource.org.apache.xmlcommons@default:default,com.springsource.slf4j.api@default:default,com.springsource.slf4j.jcl@default:false,com.springsource.slf4j.nop@default:false,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@3:true,org.eclipse.equinox.event@3:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@3:true,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:true,org.restlet@default:true,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/>
|
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.persistence@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,com.springsource.org.apache.xmlcommons@default:default,com.springsource.slf4j.api@default:default,com.springsource.slf4j.jcl@default:false,com.springsource.slf4j.nop@default:false,javax.el@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@3:true,org.eclipse.equinox.event@3:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.osgi.services@3:true,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet.ext.net@default:true,org.restlet.ext.ssl@default:default,org.restlet@default:true,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/>
|
||||||
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base.callout@default:default,org.adempiere.base.process@default:default,org.adempiere.base@4:true,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.payment.processor@default:default,org.adempiere.pipo.handlers@default:default,org.adempiere.pipo@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.replication@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper.swing@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.hazelcast.service.config@default:false,org.idempiere.hazelcast.service@default:true"/>
|
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base.callout@default:default,org.adempiere.base.process@default:default,org.adempiere.base@4:true,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.payment.processor@default:default,org.adempiere.pipo.handlers@default:default,org.adempiere.pipo@default:default,org.adempiere.plugin.utils@default:default,org.adempiere.replication@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper.swing@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing@default:default,org.adempiere.ui@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.idempiere.hazelcast.service.config@default:false,org.idempiere.hazelcast.service@default:true"/>
|
||||||
<booleanAttribute key="show_selected_only" value="false"/>
|
<booleanAttribute key="show_selected_only" value="false"/>
|
||||||
<booleanAttribute key="tracing" value="false"/>
|
<booleanAttribute key="tracing" value="false"/>
|
||||||
|
|
|
@ -81,6 +81,7 @@ Import-Package: javax.net.ssl,
|
||||||
org.restlet.engine,
|
org.restlet.engine,
|
||||||
org.restlet.engine.security,
|
org.restlet.engine.security,
|
||||||
org.restlet.ext.net,
|
org.restlet.ext.net,
|
||||||
|
org.restlet.ext.ssl,
|
||||||
org.restlet.representation,
|
org.restlet.representation,
|
||||||
org.restlet.resource,
|
org.restlet.resource,
|
||||||
org.restlet.security,
|
org.restlet.security,
|
||||||
|
|
|
@ -22,7 +22,7 @@ import javax.net.ssl.TrustManager;
|
||||||
import javax.net.ssl.TrustManagerFactory;
|
import javax.net.ssl.TrustManagerFactory;
|
||||||
import javax.net.ssl.X509TrustManager;
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
import org.restlet.engine.security.DefaultSslContextFactory;
|
import org.restlet.ext.ssl.DefaultSslContextFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporary workaround to support ssl connection to server with self signed certificate.
|
* Temporary workaround to support ssl connection to server with self signed certificate.
|
||||||
|
|
Loading…
Reference in New Issue