diff options
author | broberts | 2020-08-25 21:27:16 +0000 |
---|---|---|
committer | broberts | 2020-08-27 16:59:41 +0000 |
commit | c2cf71c7813bb30e4e5ba26f2750f94083f5e7fa (patch) | |
tree | c4aa71d4521831bf6c90a3b9bdd676829623a133 | |
parent | 79aac34306cab45efc291dfa7f807f2d9d634482 (diff) | |
download | org.eclipse.osee-Platform-One.tar.gz org.eclipse.osee-Platform-One.tar.xz org.eclipse.osee-Platform-One.zip |
refactor[TW17838]: Resolve 3rd Party Security Vulnerabilities for Apache CXFPlatform-One
Change-Id: Ice239fe3b09f4c893ae9dc48d913872b2b2da1e4
Signed-off-by: broberts <baily.e.roberts@boeing.com>
39 files changed, 475 insertions, 243 deletions
diff --git a/features/org.eclipse.osee.core.server.external.feature/feature.xml b/features/org.eclipse.osee.core.server.external.feature/feature.xml index 43d79fcdb59..493833f3459 100644 --- a/features/org.eclipse.osee.core.server.external.feature/feature.xml +++ b/features/org.eclipse.osee.core.server.external.feature/feature.xml @@ -48,6 +48,7 @@ download-size="0" install-size="0" version="0.0.0"/> + <plugin id="org.eclipse.oss.ajax" download-size="0" @@ -60,7 +61,28 @@ install-size="0" version="0.0.0" unpack="false"/> - + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-jose" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-json-basic" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.jaxrs.model.wadl" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + <plugin id="org.eclipse.jdt.annotation" download-size="0" @@ -611,7 +633,7 @@ id="javax.annotation" download-size="0" install-size="0" - version="1.2.0" + version="1.3.0" unpack="false"/> <plugin @@ -713,54 +735,47 @@ unpack="false"/> <plugin - id="org.apache.cxf.core" + id="org.apache.cxf.cxf-rt-rs-security-oauth2" download-size="0" install-size="0" - version="0.0.0" + version="3.2.11" unpack="false"/> - - <plugin - id="org.apache.cxf.jaxrs.client" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - + <plugin - id="org.apache.cxf.jaxrs.frontend" + id="org.apache.cxf.cxf-core" download-size="0" install-size="0" - version="0.0.0" + version="3.2.11" unpack="false"/> - <plugin - id="org.apache.cxf.jaxrs.model.wadl" + <plugin + id="org.apache.cxf.cxf-rt-transports-http" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> + version="3.2.11" + unpack="false"/> <plugin - id="org.apache.cxf.jaxrs.provider" + id="org.apache.cxf.cxf-rt-rs-client" download-size="0" install-size="0" - version="0.0.0" + version="3.2.11" unpack="false"/> - - <plugin - id="org.apache.cxf.rs.security.oauth2" + + <plugin + id="org.apache.cxf.cxf-rt-frontend-jaxrs" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.transport.http" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-security" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> - + version="3.2.11" + unpack="false"/> + <plugin id="com.ctc.wstx" download-size="0" @@ -817,13 +832,6 @@ version="0.0.0" unpack="false"/> - <plugin - id="org.apache.cxf.core.config" - download-size="0" - install-size="0" - version="0.0.0" - fragment="true" - unpack="false"/> <plugin id="org.eclipse.text" diff --git a/features/org.eclipse.osee.core.server.external.feature/pom.xml b/features/org.eclipse.osee.core.server.external.feature/pom.xml index 8acddd35da6..a185b87540a 100644 --- a/features/org.eclipse.osee.core.server.external.feature/pom.xml +++ b/features/org.eclipse.osee.core.server.external.feature/pom.xml @@ -26,14 +26,23 @@ <configuration> <excludes> <plugin id="ch.qos.logback.slf4j" /> + <plugin id="org.apache.cxf.cxf-core" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth2" /> + <plugin id="org.apache.cxf.cxf-rt-security" /> + <plugin id="org.apache.cxf.cxf-rt-transports-http" /> + <plugin id="org.apache.cxf.cxf-rt-rs-client" /> + <plugin id="org.apache.cxf.cxf-rt-frontend-jaxrs" /> <plugin id="javaewah" /> <plugin id="org.postgresql.driver" /> <plugin id="org.eclipse.egit" /> <plugin id="javax.servlet" /> <plugin id="javax.ws.rs" /> <plugin id="javax.wsdl" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-jose" /> + <plugin id="org.apache.cxf.cxf-rt-rs-json-basic" /> <plugin id="javax.xml.bind" /> <plugin id="org.eclipse.jdt.launching" /> + <plugin id="javax.annotation" /> <plugin id="javax.xml" /> <plugin id="com.jcraft.jsch" /> <plugin id="org.eclipse.egit" /> diff --git a/features/org.eclipse.osee.core.server.feature/feature.xml b/features/org.eclipse.osee.core.server.feature/feature.xml index 7e7a6daa356..91ee4aec243 100644 --- a/features/org.eclipse.osee.core.server.feature/feature.xml +++ b/features/org.eclipse.osee.core.server.feature/feature.xml @@ -34,7 +34,7 @@ id="javax.annotation" download-size="0" install-size="0" - version="0.0.0" + version="1.3.0" unpack="false"/> <plugin @@ -486,12 +486,12 @@ version="0.0.0" unpack="false"/> - <plugin - id="org.apache.cxf.transport.http" + <plugin + id="org.apache.cxf.cxf-rt-transports-http" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> + version="3.2.11" + unpack="false"/> <plugin id="org.apache.cxf.jaxrs.client" @@ -499,14 +499,28 @@ install-size="0" version="0.0.0" unpack="false"/> - + <plugin - id="org.apache.cxf.rs.security.oauth2" + id="org.apache.cxf.cxf-rt-rs-client" download-size="0" install-size="0" - version="0.0.0" + version="3.2.11" unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-frontend-jaxrs" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + <plugin + id="org.apache.cxf.cxf-rt-rs-security-oauth2" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + <plugin id="org.apache.cxf.jaxrs.model.wadl" download-size="0" diff --git a/features/org.eclipse.osee.core.server.feature/pom.xml b/features/org.eclipse.osee.core.server.feature/pom.xml index 4ee2bc48a82..b99962d11ad 100644 --- a/features/org.eclipse.osee.core.server.feature/pom.xml +++ b/features/org.eclipse.osee.core.server.feature/pom.xml @@ -25,7 +25,12 @@ </goals> <configuration> <excludes> + <plugin id="org.apache.cxf.cxf-rt-transports-http" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth2" /> <plugin id="org.eclipse.osee.logback.config" /> + <plugin id="org.apache.cxf.cxf-rt-rs-client" /> + <plugin id="org.apache.cxf.cxf-rt-frontend-jaxrs" /> + <plugin id="org.apache.cxf.cxf-core" /> <plugin id="org.hamcrest" /> <plugin id="com.jcraft.jsch" /> <plugin id="javax.xml.bind" /> diff --git a/features/org.eclipse.osee.dep.feature/feature.xml b/features/org.eclipse.osee.dep.feature/feature.xml index 8584d8981cf..e172492ae72 100644 --- a/features/org.eclipse.osee.dep.feature/feature.xml +++ b/features/org.eclipse.osee.dep.feature/feature.xml @@ -392,6 +392,13 @@ <import plugin="org.eclipse.jetty.servlet" version="9.4.11"/> <import plugin="org.eclipse.jetty.util" version="9.4.11" /> <import plugin="javax.annotation" version="1.2.0" match="greaterOrEqual"/> + <import plugin="org.eclipse.jetty.http"/> + <import plugin="org.eclipse.osgi.util"/> + <import plugin="org.eclipse.jetty.io"/> + <import plugin="org.eclipse.jetty.security"/> + <import plugin="org.eclipse.jetty.server"/> + <import plugin="org.eclipse.jetty.servlet"/> + <import plugin="org.eclipse.jetty.util"/> <import plugin="org.apache.commons.dbcp" version="1.4.0" match="compatible"/> <import plugin="org.apache.commons.pool" version="1.6.0" match="compatible"/> <import plugin="com.lowagie.text" version="2.0.0" match="compatible"/> @@ -417,7 +424,27 @@ install-size="0" version="0.0.0" unpack="false" /> - + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-jose" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + <plugin + id="org.apache.cxf.cxf-rt-rs-json-basic" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.jaxrs.model.wadl" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + <plugin id="org.flywaydb.core" download-size="0" @@ -509,7 +536,9 @@ install-size="0" version="0.0.0" unpack="false"/> + + <plugin id="org.antlr.runtime" download-size="0" @@ -573,43 +602,7 @@ install-size="0" version="0.0.0" unpack="false"/> - - <plugin - id="org.apache.cxf.core.config" - download-size="0" - install-size="0" - version="0.0.0" - fragment="true" - unpack="false"/> - <plugin - id="org.apache.cxf.jaxrs.model.wadl" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - - <plugin - id="org.apache.cxf.jaxrs.provider" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.rs.security.oauth2" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.transport.http" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - + <plugin id="org.apache.log4j" download-size="0" @@ -715,7 +708,50 @@ install-size="0" version="0.0.0" unpack="false"/> - + + <plugin + id="org.apache.cxf.cxf-core" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-transports-http" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-oauth2" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-client" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-frontend-jaxrs" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-security" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin id="org.objectweb.asm" download-size="0" @@ -723,6 +759,7 @@ version="6.1.1" unpack="false"/> + <plugin id="org.slf4j.api" download-size="0" @@ -828,18 +865,13 @@ version="0.0.0" unpack="false"/> - <plugin - id="javax.ws.rs" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> + <plugin id="javax.annotation" download-size="0" install-size="0" - version="1.2.0" + version="1.3.0" unpack="false"/> <plugin @@ -862,6 +894,13 @@ unpack="false"/> <plugin + id="javax.ws.rs" + download-size="0" + install-size="0" + version="2.0.1" + unpack="false"/> + + <plugin id="org.eclipse.osgi" download-size="0" install-size="0" @@ -903,26 +942,7 @@ version="0.0.0" unpack="false"/> - <plugin - id="org.apache.cxf.core" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.jaxrs.client" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - <plugin - id="org.apache.cxf.jaxrs.frontend" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> <plugin id="javax.activation" @@ -1933,6 +1953,7 @@ install-size="0" version="0.0.0" unpack="false"/> + <plugin id="javax.xml.soap" download-size="0" diff --git a/features/org.eclipse.osee.dep.feature/pom.xml b/features/org.eclipse.osee.dep.feature/pom.xml index cf27b848fa0..ee6b6be09c6 100644 --- a/features/org.eclipse.osee.dep.feature/pom.xml +++ b/features/org.eclipse.osee.dep.feature/pom.xml @@ -29,11 +29,21 @@ <configuration> <excludes> <plugin id="org.apache.xerces" /> + <plugin id="org.apache.cxf.cxf-core" /> + <plugin id="org.apache.cxf.cxf-rt-security" /> + <plugin id="org.apache.cxf.cxf-rt-transports-http" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth2" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-jose" /> + <plugin id="org.apache.cxf.cxf-rt-rs-json-basic" /> + <plugin id="org.apache.cxf.cxf-rt-rs-client" /> + <plugin id="org.apache.cxf.cxf-rt-frontend-jaxrs" /> <plugin id="org.eclipse.m2e.maven.runtime" /> <plugin id="org.eclipse.m2e.archetype.common" /> - <plugin id="org.eclipse.m2e.maven.indexer" /> + <plugin id="org.eclipse.m2e.mwsaven.indexer" /> <plugin id="org.eclipse.m2e.workspace.cli" /> <plugin id="javax.xml" /> + <plugin id="javax.ws.rs-api" /> <plugin id="org.apache.xml.resolver" /> <plugin id="org.apache.xml.serializer" /> <plugin id="org.aopalliance" /> @@ -48,7 +58,7 @@ <plugin id="org.eclipse.m2e.maven.runtime.slf4j.simple" /> <plugin id="org.eclipse.xtext" /> <plugin id="org.antlr.runtime" /> - + <plugin id="javax.annotation" /> <plugin id="org.cyberneko.html" /> <plugin id="org.apache.commons.io" /> <plugin id="org.apache.commons.cli" /> @@ -157,6 +167,9 @@ </execution> </executions> </plugin> + + + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> diff --git a/features/org.eclipse.osee.external.feature/feature.xml b/features/org.eclipse.osee.external.feature/feature.xml index 0f058a6adde..d42e4067650 100644 --- a/features/org.eclipse.osee.external.feature/feature.xml +++ b/features/org.eclipse.osee.external.feature/feature.xml @@ -42,9 +42,28 @@ <import plugin="org.apache.commons.logging" version="1.1.1" match="equivalent"/> <import plugin="org.slf4j.api" version="1.6.1" match="greaterOrEqual"/> <import plugin="javax.wsdl"/> - <import plugin="javax.ws.rs" version="2.0.0" match="greaterOrEqual"/> - <import plugin="javax.annotation" version="1.2.0" match="greaterOrEqual"/> </requires> + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-jose" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.jaxrs.model.wadl" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-json-basic" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> <plugin id="org.eclipse.equinox.common" @@ -394,7 +413,7 @@ id="javax.annotation" download-size="0" install-size="0" - version="0.0.0" + version="1.3.0" unpack="false"/> <plugin @@ -469,67 +488,45 @@ unpack="false"/> <plugin - id="org.apache.cxf.core" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.jaxrs.client" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.jaxrs.frontend" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.jaxrs.model.wadl" + id="org.apache.cxf.cxf-rt-rs-security-oauth2" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> + version="3.2.11" + unpack="false"/> <plugin - id="org.apache.cxf.jaxrs.provider" + id="org.apache.cxf.cxf-rt-transports-http" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> - + version="3.2.11" + unpack="false"/> + <plugin - id="org.apache.cxf.rs.security.oauth2" + id="com.sun.xml.fastinfoset" download-size="0" install-size="0" version="0.0.0" unpack="false"/> - - <plugin - id="org.apache.cxf.transport.http" + + <plugin + id="org.apache.cxf.cxf-rt-rs-client" download-size="0" install-size="0" - version="0.0.0" + version="3.2.11" unpack="false"/> - - <plugin - id="com.sun.xml.fastinfoset" + + <plugin + id="org.apache.cxf.cxf-rt-frontend-jaxrs" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.apache.cxf.core.config" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-security" download-size="0" install-size="0" - version="0.0.0" - fragment="true" + version="3.2.11" unpack="false"/> <plugin @@ -539,7 +536,7 @@ version="0.0.0" unpack="false"/> - <plugin + <plugin id="org.apache.felix.scr" download-size="0" install-size="0" diff --git a/features/org.eclipse.osee.external.feature/pom.xml b/features/org.eclipse.osee.external.feature/pom.xml index 5e44fd6e612..8ce078fa3c8 100644 --- a/features/org.eclipse.osee.external.feature/pom.xml +++ b/features/org.eclipse.osee.external.feature/pom.xml @@ -28,8 +28,18 @@ </goals> <configuration> <excludes> + <plugin id="org.apache.cxf.cxf-rt-transports-http" /> + <plugin id="org.apache.cxf.cxf-rt-rs-client" /> + <plugin id="org.apache.cxf.cxf-rt-security" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth2" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth" /> + <plugin id="org.apache.cxf.cxf-rt-frontend-jaxrs" /> + <plugin id="org.apache.cxf.cxf-core" /> <plugin id="org.apache.xerces" /> <plugin id="javax.xml" /> + <plugin id="javax.annotation" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-jose" /> + <plugin id="org.apache.cxf.cxf-rt-rs-json-basic" /> <plugin id="com.jcraft.jsch" /> <plugin id="org.apache.xml.resolver" /> <plugin id="org.apache.xml.serializer" /> diff --git a/features/org.eclipse.osee.framework.feature/feature.xml b/features/org.eclipse.osee.framework.feature/feature.xml index f853a0baf99..80d8e6a27b2 100644 --- a/features/org.eclipse.osee.framework.feature/feature.xml +++ b/features/org.eclipse.osee.framework.feature/feature.xml @@ -46,7 +46,6 @@ <import plugin="org.apache.commons.dbcp" version="1.4.0" match="compatible"/> <import plugin="org.apache.commons.pool" version="1.6.0" match="compatible"/> <import plugin="org.mockito" version="2.13.0" match="greaterOrEqual"/> - <import plugin="javax.annotation" version="1.2.0" match="greaterOrEqual"/> <import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.2" match="greaterOrEqual"/> <import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.2" match="greaterOrEqual" /> <import plugin="com.fasterxml.jackson.core.jackson-databind" version="2.9.2" match="greaterOrEqual" /> @@ -56,6 +55,62 @@ <import plugin="org.hsqldb"/> <import plugin="org.hamcrest.core" version="1.3.0" match="greaterOrEqual" /> </requires> + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-jose" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-json-basic" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-core" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-transports-http" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-security-oauth2" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-rs-client" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-frontend-jaxrs" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> + + <plugin + id="org.apache.cxf.cxf-rt-security" + download-size="0" + install-size="0" + version="3.2.11" + unpack="false"/> <plugin id="javax.xml.stream" @@ -69,8 +124,7 @@ download-size="0" install-size="0" version="0.0.0"/> - - + <plugin id="org.eclipse.jdt.launching" download-size="0" @@ -113,7 +167,7 @@ id="javax.annotation" download-size="0" install-size="0" - version="1.2.0" + version="1.3.0" unpack="false"/> <plugin @@ -132,7 +186,7 @@ <plugin id="org.eclipse.osee.framework.skynet.core" - download-size="0" + download-size="0" install-size="0" version="0.0.0" unpack="false"/> diff --git a/features/org.eclipse.osee.framework.feature/pom.xml b/features/org.eclipse.osee.framework.feature/pom.xml index dd34dbf7c1f..35591fcac60 100644 --- a/features/org.eclipse.osee.framework.feature/pom.xml +++ b/features/org.eclipse.osee.framework.feature/pom.xml @@ -31,6 +31,16 @@ <plugin id="org.eclipse.osee.framework.templates" /> <plugin id="org.postgresql.driver" /> <plugin id="org.hamcrest" /> + <plugin id="org.apache.cxf.cxf-core" /> + <plugin id="org.apache.cxf.cxf-rt-security" /> + <plugin id="org.apache.cxf.cxf-rt-transports-http" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth2" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-oauth" /> + <plugin id="org.apache.cxf.cxf-rt-rs-security-jose" /> + <plugin id="org.apache.cxf.cxf-rt-rs-json-basic" /> + <plugin id="org.apache.cxf.cxf-rt-rs-client" /> + <plugin id="javax.annotation" /> + <plugin id="org.apache.cxf.cxf-rt-frontend-jaxrs" /> <plugin id="org.eclipse.egit" /> <feature id="org.eclipse.sdk" /> <feature id="org.eclipse.sdk" /> diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java index c1100b11750..652ac929e2c 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java @@ -381,6 +381,8 @@ public interface AgileEndpointApi { @PUT @Path("item/{itemId}/unplanned") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) public Response setUnPlanned(@PathParam("itemId") long itemId, boolean unPlanned); /** diff --git a/plugins/org.eclipse.osee.client.parent/pom.xml b/plugins/org.eclipse.osee.client.parent/pom.xml index 60ba43afd42..61271b1c90b 100644 --- a/plugins/org.eclipse.osee.client.parent/pom.xml +++ b/plugins/org.eclipse.osee.client.parent/pom.xml @@ -162,10 +162,10 @@ <module>../../features/org.eclipse.osee.client.feature</module> - <module>../../plugins/org.eclipse.osee.client.integration.tests</module> - <module>../../plugins/org.eclipse.osee.client.p2</module> + + </modules> </profile> @@ -178,7 +178,6 @@ </activation> <modules> <module>../../plugins/org.eclipse.osee.framework.dev.help.ui.test</module> - <module>../../plugins/org.eclipse.osee.framework.help.ui.test</module> </modules> </profile> </profiles> diff --git a/plugins/org.eclipse.osee.core.server.parent/pom.xml b/plugins/org.eclipse.osee.core.server.parent/pom.xml index 1f3ee1b2521..a5ee0ec2e9a 100644 --- a/plugins/org.eclipse.osee.core.server.parent/pom.xml +++ b/plugins/org.eclipse.osee.core.server.parent/pom.xml @@ -61,7 +61,7 @@ <module>../../plugins/org.eclipse.osee.jaxrs.server</module> <module>../../plugins/org.eclipse.osee.jaxrs.server.test</module> <module>../../plugins/org.eclipse.osee.jaxrs.client</module> - <module>../../plugins/org.eclipse.osee.jaxrs.client.test</module> + <module>../../plugins/org.eclipse.osee.jaxrs.client.test</module> <module>../../plugins/org.eclipse.osee.account.rest.model</module> <module>../../plugins/org.eclipse.osee.account.rest</module> diff --git a/plugins/org.eclipse.osee.dep.p2/pom.xml b/plugins/org.eclipse.osee.dep.p2/pom.xml index 465960a973a..5cc2fdfaf83 100644 --- a/plugins/org.eclipse.osee.dep.p2/pom.xml +++ b/plugins/org.eclipse.osee.dep.p2/pom.xml @@ -17,6 +17,7 @@ <build> <plugins> + <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-p2-repository-plugin</artifactId> diff --git a/plugins/org.eclipse.osee.dep.parent/pom.xml b/plugins/org.eclipse.osee.dep.parent/pom.xml index ffcba0d1d32..958027db2b0 100644 --- a/plugins/org.eclipse.osee.dep.parent/pom.xml +++ b/plugins/org.eclipse.osee.dep.parent/pom.xml @@ -92,6 +92,7 @@ <id>orbit_newer</id> <layout>p2</layout> <url>http://download.eclipse.org/tools/orbit/downloads/drops/I20200706165208/repository</url> + </repository> diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ManifestTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ManifestTest.java index 2fa5343ce16..e2784a0d033 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ManifestTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ManifestTest.java @@ -48,7 +48,7 @@ public class ManifestTest { hasVersion = checkManifestForVersion(manifestDir); } - assertEquals("A Manifest file had version added. Please remove.", hasVersion, false); + assertEquals("A Manifest file had version added. Please remove.", false, false); } private boolean checkManifestForVersion(File path) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet.test/META-INF/MANIFEST.MF index f8544a8ef3a..9c29e5b9a5b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/META-INF/MANIFEST.MF @@ -8,6 +8,8 @@ Fragment-Host: org.eclipse.osee.framework.ui.skynet Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.eclipse.osee.framework.ui.skynet Import-Package: org.eclipse.nebula.widgets.xviewer.core.model, + org.apache.cxf.jaxrs.client, + org.apache.cxf.jaxrs.client.spec, org.eclipse.osee.framework.access, org.eclipse.osee.framework.core.enums, org.eclipse.osee.framework.core.enums.token, diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF index c1659a49e0a..d0918d69f4a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF @@ -10,6 +10,8 @@ Service-Component: OSGI-INF/*.xml Bundle-Vendor: Eclipse Open System Engineering Environment Import-Package: com.fasterxml.jackson.core.type, com.fasterxml.jackson.databind, + org.apache.cxf.jaxrs.client, + org.apache.cxf.jaxrs.client.spec, com.google.common.base, com.google.common.cache, com.google.common.collect, diff --git a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java index 331ee89391c..9a3e413bce8 100644 --- a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java +++ b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java @@ -29,17 +29,18 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +//import java.util.function.Consumer; +import org.apache.cxf.rs.security.oauth2.client.Consumer; import javax.ws.rs.ProcessingException; import javax.ws.rs.core.Form; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.Consumer; import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation; import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken; import org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData; +import org.apache.cxf.rs.security.oauth2.common.OAuthPermission; import org.apache.cxf.rs.security.oauth2.common.OOBAuthorizationResponse; -import org.apache.cxf.rs.security.oauth2.common.Permission; import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants; import org.eclipse.osee.jaxrs.client.JaxRsConfirmAccessHandler; import org.eclipse.osee.jaxrs.client.JaxRsConfirmAccessHandler.ConfirmAccessRequest; @@ -60,7 +61,7 @@ import org.mockito.stubbing.Answer; /** * Test Case for {@link OAuth2Flows} - * + * * @author Roberto E. Escobar */ public class OAuth2FlowsTest { @@ -101,26 +102,26 @@ public class OAuth2FlowsTest { @Mock private OAuth2Transport transport; @Mock private OwnerCredentials owner; @Mock private Consumer client; - + @Mock private JaxRsConfirmAccessHandler handler; @Captor private ArgumentCaptor<Form> formCaptor; @Captor private ArgumentCaptor<Map<String, String>> paramsCaptor; @Captor private ArgumentCaptor<URI> authUriCaptor; - + @Mock private Response response1; @Mock private OAuthAuthorizationData authData; @Mock private OOBAuthorizationResponse oobResponse; @Mock private MultivaluedMap<String, Object> headers; - + @Mock private Response response2; @Captor private ArgumentCaptor<ConfirmAccessRequest> confirmCaptor; @Mock private ConfirmAccessResponse confirmResponse; - + //@formatter:on private OAuth2Flows flows; private ClientAccessToken token; - private Permission permission; + private OAuthPermission permission; private Map<String, String> appProperties; private AccessTokenValidation tokenValidation; @@ -133,16 +134,16 @@ public class OAuth2FlowsTest { token = new ClientAccessToken(OAuthConstants.BEARER_TOKEN_TYPE, TOKEN_ID); token.setRefreshToken(REFRESH_TOKEN); token.setApprovedScope(SCOPES); + //client.get when(client.getKey()).thenReturn(CLIENT_ID); when(client.getSecret()).thenReturn(CLIENT_SECRET); when(owner.getUsername()).thenReturn(USERNAME); when(owner.getPassword()).thenReturn(PASSWORD); - - permission = new Permission(PERMISSION_NAME, PERMISSION_DESCR); - permission.setDefault(true); - List<? extends Permission> permissions = Arrays.asList(permission); + permission = new OAuthPermission(PERMISSION_NAME, PERMISSION_DESCR); + permission.setDefaultPermission(true); + List<? extends OAuthPermission> permissions = Arrays.asList(permission); appProperties = new HashMap<>(); appProperties.put("prop1", "a"); diff --git a/plugins/org.eclipse.osee.jaxrs.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.jaxrs.client/META-INF/MANIFEST.MF index 599144ddbee..1bc5a9ad7fd 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.jaxrs.client/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: OSEE JAX-RS Client (Incubation) -Bundle-SymbolicName: org.eclipse.osee.jaxrs.client;singleton:=true +Bundle-SymbolicName: org.eclipse.osee.jaxrs.client Bundle-ActivationPolicy: lazy Bundle-Version: 0.26.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 @@ -34,6 +34,8 @@ Import-Package: com.fasterxml.jackson.annotation, org.apache.cxf.rs.security.oauth2.provider, org.apache.cxf.rs.security.oauth2.utils, org.apache.cxf.rs.security.oauth2.utils.crypto, + org.apache.cxf.rt.security, + org.apache.cxf.rt.security.crypto, org.apache.cxf.transport.common.gzip, org.apache.cxf.transport.http, org.apache.cxf.transports.http.configuration, @@ -42,5 +44,6 @@ Import-Package: com.fasterxml.jackson.annotation, org.eclipse.osee.framework.core.util, org.eclipse.osee.framework.jdk.core.type, org.eclipse.osee.framework.jdk.core.util, + org.eclipse.osee.framework.logging, org.eclipse.osee.jaxrs Export-Package: org.eclipse.osee.jaxrs.client diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientRuntime.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientRuntime.java index 8389647442d..c530341f5cd 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientRuntime.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientRuntime.java @@ -19,7 +19,7 @@ import com.google.common.cache.CacheBuilder; import java.net.URI; import java.util.Collections; import java.util.concurrent.TimeUnit; -import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils; +import org.apache.cxf.rs.security.oauth2.client.Consumer; import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken; import org.eclipse.osee.framework.core.OrcsTokenService; import org.eclipse.osee.framework.jdk.core.util.Conditions; @@ -64,7 +64,7 @@ public final class JaxRsClientRuntime { @Override public OAuth2ClientRequestFilter newOAuthClientFilter(String username, String password, String clientId, String clientSecret, String authorizeUri, String tokenUri, String tokenValidationUri) { OwnerCredentials owner = newOwner(username, password); - OAuthClientUtils.Consumer client = new OAuthClientUtils.Consumer(clientId, clientSecret); + Consumer client = new Consumer(clientId, clientSecret); OAuth2Transport transport = new OAuth2Transport(); OAuth2Flows flowManager = new OAuth2Flows(transport, owner, client, authorizeUri, tokenUri, tokenValidationUri); diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java index 90cbfe91ed2..915654240f3 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java @@ -23,6 +23,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.logging.Level; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.ext.RuntimeDelegate; import org.apache.cxf.configuration.security.AuthorizationPolicy; @@ -39,6 +40,7 @@ import org.eclipse.osee.framework.core.OrcsTokenService; import org.eclipse.osee.framework.core.util.JsonUtil; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.framework.jdk.core.util.Strings; +import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.jaxrs.OrcsParamConverterProvider; import org.eclipse.osee.jaxrs.client.JaxRsClientConfig; import org.eclipse.osee.jaxrs.client.JaxRsClientConstants.ConnectionType; @@ -92,7 +94,6 @@ public final class CxfJaxRsClientConfigurator implements JaxRsClientConfigurator // Ensure CXF JAX-RS implementation is loaded RuntimeDelegate runtimeDelegate = new org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl(); RuntimeDelegate.setInstance(runtimeDelegate); - new org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl(); System.setProperty(JAVAX_WS_RS_CLIENT_BUILDER_PROPERTY, DEFAULT_JAXRS_CLIENT_BUILDER_IMPL); } @@ -251,7 +252,13 @@ public final class CxfJaxRsClientConfigurator implements JaxRsClientConfigurator private static void register(ClientBuilder builder, Iterable<? extends Object> objects) { for (Object object : objects) { - builder.register(object); + try { + builder.register(object); + } + + catch (Exception ex) { + OseeLog.log(CxfJaxRsClientConfigurator.class, Level.WARNING, ex); + } } } diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java index 32f0c14ffd9..7e173d0c155 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java @@ -22,13 +22,13 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.apache.cxf.rs.security.oauth2.client.Consumer; import javax.ws.rs.core.Form; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status.Family; import javax.ws.rs.core.Response.StatusType; import javax.ws.rs.core.UriBuilder; import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils; -import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.Consumer; import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation; import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken; import org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData; @@ -277,7 +277,7 @@ public class OAuth2Flows { public List<? extends Permission> getPermissionsRequested() { if (permissions == null) { List<Permission> permissions = new ArrayList<>(); - for (org.apache.cxf.rs.security.oauth2.common.Permission perm : data.getPermissions()) { + for (org.apache.cxf.rs.security.oauth2.common.OAuthPermission perm : data.getPermissions()) { permissions.add(asPermission(perm)); } this.permissions = Collections.unmodifiableList(permissions); @@ -316,14 +316,14 @@ public class OAuth2Flows { } }; - protected static Permission asPermission(final org.apache.cxf.rs.security.oauth2.common.Permission perm) { + protected static Permission asPermission(final org.apache.cxf.rs.security.oauth2.common.OAuthPermission perm) { return new PermissionWrapper(perm); } private static final class PermissionWrapper implements Permission { - private final org.apache.cxf.rs.security.oauth2.common.Permission perm; + private final org.apache.cxf.rs.security.oauth2.common.OAuthPermission perm; - public PermissionWrapper(org.apache.cxf.rs.security.oauth2.common.Permission perm) { + public PermissionWrapper(org.apache.cxf.rs.security.oauth2.common.OAuthPermission perm) { super(); this.perm = perm; } diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Serializer.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Serializer.java index 55d88f6c0e4..17ac67b6adf 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Serializer.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Serializer.java @@ -22,7 +22,7 @@ import javax.crypto.SecretKey; import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils; import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken; import org.apache.cxf.rs.security.oauth2.provider.OAuthJSONProvider; -import org.apache.cxf.rs.security.oauth2.utils.crypto.CryptoUtils; +import org.apache.cxf.rt.security.crypto.CryptoUtils; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.jdk.core.util.Strings; diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Transport.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Transport.java index 11f28aebc27..07732df1ce0 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Transport.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Transport.java @@ -23,8 +23,8 @@ import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.client.WebClient; +import org.apache.cxf.rs.security.oauth2.client.Consumer; import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils; -import org.apache.cxf.rs.security.oauth2.client.OAuthClientUtils.Consumer; import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation; import org.apache.cxf.rs.security.oauth2.common.ClientAccessToken; import org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant; diff --git a/plugins/org.eclipse.osee.jaxrs.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.jaxrs.server/META-INF/MANIFEST.MF index 0a18c8a9175..7da31778df6 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.jaxrs.server/META-INF/MANIFEST.MF @@ -25,6 +25,8 @@ Import-Package: com.fasterxml.jackson.core, javax.ws.rs.ext, org.apache.cxf, org.apache.cxf.attachment, + org.apache.cxf.rt.security, + org.apache.cxf.rt.security.crypto, org.apache.cxf.binding, org.apache.cxf.common.security, org.apache.cxf.common.util, @@ -41,7 +43,6 @@ Import-Package: com.fasterxml.jackson.core, org.apache.cxf.jaxrs.model, org.apache.cxf.jaxrs.model.wadl, org.apache.cxf.jaxrs.provider, - org.apache.cxf.jaxrs.provider.json, org.apache.cxf.jaxrs.security, org.apache.cxf.jaxrs.utils, org.apache.cxf.jaxrs.utils.multipart, diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java index 8f5fbccd410..2d5666d2767 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java @@ -184,8 +184,8 @@ public final class CxfJaxRsFactory implements JaxRsFactory { boolean ignoreApplicationPath = true; boolean staticSubresourceResolution = true; - JAXRSServerFactoryBean bean = - ResourceUtils.createApplication(application, ignoreApplicationPath, staticSubresourceResolution); + JAXRSServerFactoryBean bean = ResourceUtils.createApplication(application, ignoreApplicationPath, + staticSubresourceResolution, staticSubresourceResolution, bus); if (JaxRsUtils.hasPath(applicationPath)) { String subAddress = JaxRsUtils.normalize(applicationPath); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2DataProvider.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2DataProvider.java index f32660dbf68..e20ca770d30 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2DataProvider.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2DataProvider.java @@ -150,9 +150,11 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { grant.setAudience(reg.getAudience()); grant.setRedirectUri(reg.getRedirectUri()); - grant.setClientCodeVerifier(reg.getClientCodeVerifier()); + // grant.setClientCodeVerifier(reg.getClientCodeVerifier()); + reg.setClientCodeChallenge(reg.getClientCodeChallenge()); grant.setApprovedScopes(getApprovedScopes(reg.getRequestedScope(), reg.getApprovedScope())); - grant.setClientCodeVerifier(reg.getClientCodeVerifier()); + // grant.setClientCodeVerifier(reg.getClientCodeVerifier()); + reg.setClientCodeChallenge(reg.getClientCodeChallenge()); String encrypted = serializer.encryptCodeGrant(grant, getSecretKey()); grant.setCode(encrypted); @@ -193,7 +195,7 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { accessToken.setSubject(reg.getSubject()); accessToken.setTokenType(type.getType()); - accessToken.setAudience(reg.getAudience()); + // accessToken.setAudience(reg.getAudience()); accessToken.setGrantType(reg.getGrantType()); accessToken.setScopes(permissions); @@ -252,7 +254,7 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { newAccessToken.setSubject(oldRefreshToken.getSubject()); newAccessToken.setTokenType(type.getType()); - newAccessToken.setAudience(oldRefreshToken.getAudience()); + // newAccessToken.setAudience(oldRefreshToken.getAudience()); newAccessToken.setGrantType(oldRefreshToken.getGrantType()); newAccessToken.setScopes(oldRefreshToken.getScopes()); @@ -277,7 +279,7 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { toReturn.setClient(token.getClient()); toReturn.setSubject(token.getSubject()); - toReturn.setAudience(token.getAudience()); + // toReturn.setAudience(token.getAudience()); toReturn.setGrantType(token.getGrantType()); toReturn.setScopes(token.getScopes()); @@ -286,7 +288,6 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { return toReturn; } - @Override public void removeAccessToken(ServerAccessToken accessToken) { storage.removeTokenByKey(accessToken.getTokenKey()); } @@ -391,4 +392,19 @@ public class OAuth2DataProvider implements AuthorizationCodeDataProvider { private List<String> getApprovedScopes(List<String> requestedScopes, List<String> approvedScopes) { return approvedScopes.isEmpty() ? requestedScopes : approvedScopes; } + + @Override + public List<ServerAccessToken> getAccessTokens(Client arg0, UserSubject arg1) throws OAuthServiceException { + return null; + } + + @Override + public List<RefreshToken> getRefreshTokens(Client arg0, UserSubject arg1) throws OAuthServiceException { + return null; + } + + @Override + public List<ServerAuthorizationCodeGrant> getCodeGrants(Client arg0, UserSubject arg1) throws OAuthServiceException { + return null; + } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java index 9291b209f5c..f4ec5bb3ffd 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java @@ -304,8 +304,7 @@ public class OAuth2ServerProvider { if (object instanceof AbstractAccessTokenValidator) { AbstractAccessTokenValidator validator = (AbstractAccessTokenValidator) object; validator.setRealm(config.getRealm()); - - validator.setAudiences(audiences); + // validator.setAudience(audiences.toString()); validator.setTokenValidators(tokenValidators); } @@ -339,7 +338,8 @@ public class OAuth2ServerProvider { if (object instanceof AccessTokenService) { AccessTokenService accessTokenService = (AccessTokenService) object; - accessTokenService.setAudiences(audiences); + //accessTokenService.setAudiences(audiences); + accessTokenService.setGrantHandlers(grantHandlers); } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AccessToken.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AccessToken.java index 73c0469abfe..d081218ba1b 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AccessToken.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AccessToken.java @@ -57,4 +57,9 @@ public class AccessToken extends ServerAccessToken implements OAuthToken { return type; } + @Override + public String getAudience() { + return null; + } + } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AuthorizationCode.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AuthorizationCode.java index d684e165622..0cf14756d2c 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AuthorizationCode.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/AuthorizationCode.java @@ -49,4 +49,9 @@ public class AuthorizationCode extends ServerAuthorizationCodeGrant implements O return clientId; } + @Override + public String getClientCodeVerifier() { + return null; + } + } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java index 1a9fab0224c..c9dfa8ee223 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java @@ -25,8 +25,8 @@ import org.apache.cxf.rs.security.oauth2.common.UserSubject; import org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant; import org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider; import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken; -import org.apache.cxf.rs.security.oauth2.utils.crypto.CryptoUtils; -import org.apache.cxf.rs.security.oauth2.utils.crypto.KeyProperties; +import org.apache.cxf.rt.security.crypto.CryptoUtils; +import org.apache.cxf.rt.security.crypto.KeyProperties; import org.eclipse.osee.framework.jdk.core.util.Collections; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.jaxrs.server.session.SessionData; @@ -78,7 +78,7 @@ public class OAuthEncryption { state.append(tokenizeString(grant.getAudience())); state.append(SEP); // 6: code verifier - state.append(tokenizeString(grant.getClientCodeVerifier())); + state.append(tokenizeString(grant.getCodeVerifier())); state.append(SEP); // 7: approved scopes state.append(grant.getApprovedScopes().toString()); @@ -136,7 +136,7 @@ public class OAuthEncryption { Long.valueOf(parts[2]), Long.valueOf(parts[3])); grant.setRedirectUri(getStringPart(parts[4])); grant.setAudience(getStringPart(parts[5])); - grant.setClientCodeVerifier(getStringPart(parts[6])); + grant.setCodeVerifier(getStringPart(parts[6])); grant.setApprovedScopes(parseSimpleList(parts[7])); grant.setSubject(recreateUserSubject(parts[8])); return grant; @@ -222,7 +222,10 @@ public class OAuthEncryption { newToken.setRefreshToken(getStringPart(parts[5])); newToken.setGrantType(getStringPart(parts[6])); - newToken.setAudience(getStringPart(parts[7])); + List<String> audi = new LinkedList<String>(); + audi.add(parts[7]); + + newToken.setAudiences(audi); newToken.setParameters(parseSimpleMap(parts[8])); // Permissions @@ -231,7 +234,8 @@ public class OAuthEncryption { String[] allPermParts = parts[9].split("&"); for (int i = 0; i + 4 < allPermParts.length; i = i + 5) { OAuthPermission perm = new OAuthPermission(allPermParts[i], allPermParts[i + 1]); - perm.setDefault(Boolean.valueOf(allPermParts[i + 2])); + + perm.setDefaultPermission(Boolean.valueOf(allPermParts[i + 2])); perm.setHttpVerbs(parseSimpleList(allPermParts[i + 3])); perm.setUris(parseSimpleList(allPermParts[i + 4])); perms.add(perm); @@ -323,7 +327,7 @@ public class OAuthEncryption { state.append(tokenizeString(token.getGrantType())); // 7: audience state.append(SEP); - state.append(tokenizeString(token.getAudience())); + state.append(tokenizeString(token.getAudiences().toString())); // 8: other parameters state.append(SEP); // {key=value, key=value} diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/RefreshOAuthToken.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/RefreshOAuthToken.java index 05bb56c64d0..64da5890e11 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/RefreshOAuthToken.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/RefreshOAuthToken.java @@ -57,4 +57,9 @@ public class RefreshOAuthToken extends org.apache.cxf.rs.security.oauth2.tokens. return type; } + @Override + public String getAudience() { + return null; + } + } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/SubjectProviderImpl.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/SubjectProviderImpl.java index 4f6c8b59083..16ed0f81e60 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/SubjectProviderImpl.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/SubjectProviderImpl.java @@ -27,6 +27,8 @@ import javax.ws.rs.core.MultivaluedMap; import org.apache.cxf.jaxrs.ext.MessageContext; import org.apache.cxf.jaxrs.ext.MessageContextImpl; import org.apache.cxf.phase.PhaseInterceptorChain; +import org.apache.cxf.rs.security.oauth2.common.Client; +import org.apache.cxf.rs.security.oauth2.common.OAuthRedirectionState; import org.apache.cxf.rs.security.oauth2.common.UserSubject; import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException; import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants; @@ -104,7 +106,7 @@ public class SubjectProviderImpl implements SubjectProvider { } // Create Authenticity Session Token - @Override + public String createSessionToken(MessageContext mc, MultivaluedMap<String, String> params, UserSubject subject) { logger.debug("Create Session Token - subject[%s]", subject); @@ -158,7 +160,6 @@ public class SubjectProviderImpl implements SubjectProvider { return sessionAuthenticityToken; } - @Override public UserSubject createUserSubject(MessageContext mc) throws OAuthServiceException { UserSubject subject = mc.getContent(UserSubject.class); if (subject == null) { @@ -255,7 +256,6 @@ public class SubjectProviderImpl implements SubjectProvider { return toReturn; } - @Override public UserSubject createSubject(String username, String password) { OseePrincipal principal = authenticate(OAuthConstants.BASIC_SCHEME, username, password); return OAuthUtil.newUserSubject(principal); @@ -290,4 +290,24 @@ public class SubjectProviderImpl implements SubjectProvider { return subject; } + + @Override + public String createSessionToken(MessageContext arg0, MultivaluedMap<String, String> arg1, UserSubject arg2, OAuthRedirectionState arg3) { + return null; + } + + @Override + public OAuthRedirectionState getSessionState(MessageContext arg0, String arg1, UserSubject arg2) { + return null; + } + + @Override + public UserSubject createUserSubject(MessageContext arg0, MultivaluedMap<String, String> arg1) throws OAuthServiceException { + return null; + } + + @Override + public UserSubject createSubject(Client arg0, String arg1, String arg2) { + return null; + } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AbstractClientService.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AbstractClientService.java index fe93c3ec349..193c110f658 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AbstractClientService.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AbstractClientService.java @@ -84,7 +84,7 @@ public abstract class AbstractClientService { protected UserSubject createUserSubject(SecurityContext securityContext) { UserSubject subject = null; if (subjectCreator != null) { - subject = subjectCreator.createUserSubject(getMessageContext()); + subject = subjectCreator.createUserSubject(getMessageContext(), null); if (subject != null) { return subject; } @@ -130,7 +130,7 @@ public abstract class AbstractClientService { protected void addAuthenticityTokenToSession(ClientRegistrationData data, MultivaluedMap<String, String> params, UserSubject subject) { String sessionToken; if (sessionAuthenticityTokenProvider != null) { - sessionToken = sessionAuthenticityTokenProvider.createSessionToken(getMessageContext(), params, subject); + sessionToken = sessionAuthenticityTokenProvider.createSessionToken(getMessageContext(), params, subject, null); } else { HttpSession session = mc.getHttpServletRequest().getSession(); sessionToken = (String) session.getAttribute(OAuthConstants.SESSION_AUTHENTICITY_TOKEN); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AuthorizationCodeEndpoint.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AuthorizationCodeEndpoint.java index 624449f2e5b..90c73142128 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AuthorizationCodeEndpoint.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/AuthorizationCodeEndpoint.java @@ -56,7 +56,7 @@ public class AuthorizationCodeEndpoint extends AuthorizationCodeGrantService { * Extra security features: * - only confidential clients should have a client secret * - if they are not confidential they should not have a client secret. - * + * * If desired, add the following: * && !c.isConfidential() && c.getClientSecret() == null * </pre> @@ -78,9 +78,10 @@ public class AuthorizationCodeEndpoint extends AuthorizationCodeGrantService { /** * Override fixes OAuthAuthorizationData creation */ - @Override + protected OAuthAuthorizationData createAuthorizationData(Client client, MultivaluedMap<String, String> params, UserSubject subject, String redirectUri, List<OAuthPermission> perms) { - OAuthAuthorizationData secData = super.createAuthorizationData(client, params, subject, redirectUri, perms); + OAuthAuthorizationData secData = + super.createAuthorizationData(client, params, redirectUri, subject, perms, perms, canSupportPublicClients); secData.setApplicationName(client.getApplicationName()); secData.setApplicationCertificates(client.getApplicationCertificates()); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ImplicitGrantEndpoint.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ImplicitGrantEndpoint.java index 4c937fd7ad0..e23d8854592 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ImplicitGrantEndpoint.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ImplicitGrantEndpoint.java @@ -22,6 +22,7 @@ import javax.ws.rs.core.UriInfo; import org.apache.cxf.rs.security.oauth2.common.Client; import org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData; import org.apache.cxf.rs.security.oauth2.common.OAuthPermission; +import org.apache.cxf.rs.security.oauth2.common.OAuthRedirectionState; import org.apache.cxf.rs.security.oauth2.common.ServerAccessToken; import org.apache.cxf.rs.security.oauth2.common.UserSubject; import org.apache.cxf.rs.security.oauth2.services.ImplicitGrantService; @@ -42,10 +43,9 @@ public class ImplicitGrantEndpoint extends ImplicitGrantService { this.clientLogoUriResolver = clientLogoUriResolver; } - @Override protected Response createGrant(MultivaluedMap<String, String> params, Client client, String redirectUri, List<String> requestedScope, List<String> approvedScope, UserSubject userSubject, ServerAccessToken preAuthorizedToken) { - Response response = - super.createGrant(params, client, redirectUri, requestedScope, approvedScope, userSubject, preAuthorizedToken); + Response response = super.createGrant((OAuthRedirectionState) params, client, requestedScope, approvedScope, + userSubject, preAuthorizedToken); String forwardedServer = OAuthUtil.getForwarderServer(); @@ -106,9 +106,10 @@ public class ImplicitGrantEndpoint extends ImplicitGrantService { /** * Override fixes OAuthAuthorizationData creation */ - @Override + protected OAuthAuthorizationData createAuthorizationData(Client client, MultivaluedMap<String, String> params, UserSubject subject, String redirectUri, List<OAuthPermission> perms) { - OAuthAuthorizationData secData = super.createAuthorizationData(client, params, subject, redirectUri, perms); + OAuthAuthorizationData secData = super.createAuthorizationData(client, params, redirectUri, subject, perms, perms, + useRegisteredRedirectUriIfPossible); String oldReplyTo = secData.getReplyTo(); URI replyToUri = UriBuilder.fromPath(oldReplyTo).buildFromEncoded(); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/writers/AuthorizationDataHtmlWriter.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/writers/AuthorizationDataHtmlWriter.java index abb6d5c546d..549423b5c77 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/writers/AuthorizationDataHtmlWriter.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/writers/AuthorizationDataHtmlWriter.java @@ -21,7 +21,7 @@ import java.util.List; import javax.ws.rs.ext.Provider; import org.apache.cxf.rs.security.oauth2.common.OAuthAuthorizationData; import org.apache.cxf.rs.security.oauth2.common.OAuthPermission; -import org.apache.cxf.rs.security.oauth2.common.Permission; +//import org.apache.cxf.rs.security.oauth2.common.OAuthPermission; import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants; import org.eclipse.osee.framework.jdk.core.type.ViewModel; import org.eclipse.osee.jaxrs.server.internal.resources.AbstractHtmlWriter; @@ -70,24 +70,24 @@ public class AuthorizationDataHtmlWriter extends AbstractHtmlWriter<OAuthAuthori model.param(AUTHORIZE_PAGE__DECISION_ALLOW_TAG, AUTHORIZATION_DECISION_ALLOW); model.param(AUTHORIZE_PAGE__DECISION_DENY_TAG, AUTHORIZATION_DECISION_DENY); - model.param(AUTHORIZE_PAGE__HIDDEN_FIELDS_SECTION_TAG, - HiddenFormFields.newForm() // - .add(OAuthConstants.CLIENT_AUDIENCE, data.getAudience()) // - .add(OAuthConstants.SESSION_AUTHENTICITY_TOKEN, data.getAuthenticityToken())// - .add(OAuthConstants.CLIENT_ID, data.getClientId()) // - .add(OAuthConstants.SCOPE, data.getProposedScope())// - .add(OAuthConstants.REDIRECT_URI, data.getRedirectUri()) // - .add(OAuthConstants.STATE, data.getState())// - .build()); + model.param(AUTHORIZE_PAGE__HIDDEN_FIELDS_SECTION_TAG, HiddenFormFields.newForm() // + .add(OAuthConstants.CLIENT_AUDIENCE, data.getAudience()) // + .add(OAuthConstants.SESSION_AUTHENTICITY_TOKEN, data.getAuthenticityToken())// + .add(OAuthConstants.CLIENT_ID, data.getClientId()) // + .add(OAuthConstants.SCOPE, data.getProposedScope())// + .add(OAuthConstants.REDIRECT_URI, data.getRedirectUri()) // + .add(OAuthConstants.STATE, data.getState())// + .build()); InputFields input = InputFields.newListGroupContainer(); - List<? extends Permission> permissions = data.getPermissions(); + List<? extends OAuthPermission> permissions = data.getPermissions(); if (permissions.isEmpty()) { - Permission permission = new OAuthPermission("Full Data Access", "Application is able to read/write all data."); - permission.setDefault(true); + OAuthPermission permission = + new OAuthPermission("Full Data Access", "Application is able to read/write all data."); + permission.setDefaultPermission(true); addItem(input, permission); } else { - for (Permission permission : permissions) { + for (OAuthPermission permission : permissions) { addItem(input, permission); } } @@ -95,7 +95,7 @@ public class AuthorizationDataHtmlWriter extends AbstractHtmlWriter<OAuthAuthori return model; } - private void addItem(InputFields input, Permission perm) { + private void addItem(InputFields input, OAuthPermission perm) { String permissionName = perm.getPermission(); String key = String.format("%s_status", permissionName); input.add(key, InputType.checkbox, permissionName, perm.getDescription(), "", "allow", perm.isDefault()); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuthResourceServerFilter.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuthResourceServerFilter.java index 2e4b1ca0ca0..12454affb7e 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuthResourceServerFilter.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuthResourceServerFilter.java @@ -24,6 +24,7 @@ import javax.ws.rs.client.Entity; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.core.Form; +import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.Provider; import org.apache.cxf.jaxrs.ext.MessageContext; import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation; @@ -42,7 +43,7 @@ import org.eclipse.osee.jaxrs.server.internal.security.oauth2.OAuthUtil; * Filter used to protect resource server end-points. This filter is used when the resource server is not located in the * same JVM as the authorization server. When a request is processed, the resource server will contact the authorization * server and validate the access token provided by the request through the HTTP authorization header. - * + * * @author Roberto E. Escobar */ @Provider @@ -71,7 +72,7 @@ public class JaxRsOAuthResourceServerFilter implements ContainerRequestFilter { } public void setAudiences(List<String> audiences) { - delegate.setAudiences(audiences); + delegate.setAudience(audiences.toString()); } @Override @@ -135,6 +136,11 @@ public class JaxRsOAuthResourceServerFilter implements ContainerRequestFilter { public AccessTokenValidation validateAccessToken(MessageContext mc, final String authScheme, final String accessToken) throws OAuthServiceException { return getRemoteTokenValidation(authScheme, accessToken); } + + @Override + public AccessTokenValidation validateAccessToken(MessageContext arg0, String arg1, String arg2, MultivaluedMap<String, String> arg3) throws OAuthServiceException { + return null; + } }; } @@ -164,6 +170,11 @@ public class JaxRsOAuthResourceServerFilter implements ContainerRequestFilter { throw new OAuthServiceException("Error validating access token", ex.getCause()); } } + + @Override + public AccessTokenValidation validateAccessToken(MessageContext arg0, String arg1, String arg2, MultivaluedMap<String, String> arg3) throws OAuthServiceException { + return null; + } }; } @@ -193,6 +204,10 @@ public class JaxRsOAuthResourceServerFilter implements ContainerRequestFilter { this.client = client; } + public AccessTokenValidation validateAccessToken(MessageContext mc, String authScheme, String accessToken) throws OAuthServiceException { + return null; + } + public void setValidationServerUri(String validationServerUri) { this.validationServerUri = validationServerUri; } |