From 2490a0523e6594e540c99b63c99044ebfe83c388 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 7 Jun 2016 16:39:12 -0700 Subject: [PATCH 01/14] This commit is what it currently takes to run the Soffit prototype in your local portal; work remains to be done on this prototype; DO NOT MERGE\! --- pom.xml | 8 ++++- uportal-war/pom.xml | 13 ++++++++- .../src/main/webapp/WEB-INF/portlet.xml | 29 ++++++++++++++++++- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a5f4f273298..0001d3468ad 100755 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ 1.4 1.3.1 3.1 - 4.3.2 + 4.4.4 2.4 2.6 3.3.2 @@ -215,6 +215,7 @@ 1.0.43 3.0.1 1.7.7 + 0.9.0-SNAPSHOT 3.2.9.RELEASE 1.3.1.RELEASE 3.1.3.RELEASE @@ -595,6 +596,11 @@ + + org.apereo.portal + soffit + ${soffit.version} + org.jvnet.jaxb2_commons jaxb2-basics-runtime diff --git a/uportal-war/pom.xml b/uportal-war/pom.xml index 4135d08b6a7..95a829bff7a 100644 --- a/uportal-war/pom.xml +++ b/uportal-war/pom.xml @@ -33,7 +33,7 @@ uPortal WAR The uPortal web application. - + @@ -234,6 +234,17 @@ oauth + + org.apereo.portal + soffit + + + commons-logging + commons-logging + + + + org.jvnet.jaxb2_commons jaxb2-basics-runtime diff --git a/uportal-war/src/main/webapp/WEB-INF/portlet.xml b/uportal-war/src/main/webapp/WEB-INF/portlet.xml index 0404f894848..01b5dd1a844 100644 --- a/uportal-war/src/main/webapp/WEB-INF/portlet.xml +++ b/uportal-war/src/main/webapp/WEB-INF/portlet.xml @@ -1105,10 +1105,37 @@ + + Soffit Connector + Soffit Connector + org.springframework.web.portlet.DispatcherPortlet + + contextConfigLocation + classpath:/org/apereo/portlet/soffit/mvc/soffit-connector.xml + + 0 + + text/html + VIEW + EDIT + HELP + + en + + Soffit Connector + + + + + org.apereo.portlet.soffit.connector.SoffitConnectorController.serviceUrl + + + + Allows the portlet to render a preferences edit UI during publishing config - + The P3P username attribute From 91d4e1485fb1a7f00b4c10ad48e8a4419e540cd3 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sat, 18 Jun 2016 18:37:06 -0700 Subject: [PATCH 02/14] Add a 'org.apereo.portlet.soffit.connector.SoffitConnectorController.payloadClass' portlet preference to the Soffit Connector portlet in portlet.xml for the purpose of backwards compatibility with remote soffit endpoints; provide a default equal to the current version (v1_0) so users can see what the default is in the Portlet Manager --- uportal-war/src/main/webapp/WEB-INF/portlet.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/uportal-war/src/main/webapp/WEB-INF/portlet.xml b/uportal-war/src/main/webapp/WEB-INF/portlet.xml index 01b5dd1a844..5ff4ce72561 100644 --- a/uportal-war/src/main/webapp/WEB-INF/portlet.xml +++ b/uportal-war/src/main/webapp/WEB-INF/portlet.xml @@ -1129,6 +1129,12 @@ org.apereo.portlet.soffit.connector.SoffitConnectorController.serviceUrl + + + org.apereo.portlet.soffit.connector.SoffitConnectorController.payloadClass + org.apereo.portlet.soffit.model.v1_0.Payload + From 5ba19000a31b16133c801cd7b3a295ba7bfe54a0 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sun, 10 Jul 2016 13:42:18 -0700 Subject: [PATCH 03/14] Define the org.apereo.portlet.soffit.connector.SoffitConnectorController.RESPONSE_CACHE in ehcache.xml to support caching in the SoffitConnectorController --- uportal-war/src/main/resources/properties/ehcache.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/uportal-war/src/main/resources/properties/ehcache.xml b/uportal-war/src/main/resources/properties/ehcache.xml index 406dddddbe6..cb79e866c16 100644 --- a/uportal-war/src/main/resources/properties/ehcache.xml +++ b/uportal-war/src/main/resources/properties/ehcache.xml @@ -1997,4 +1997,14 @@ eternal="false" maxElementsInMemory="2000" overflowToDisk="false" diskPersistent="false" timeToIdleSeconds="0" timeToLiveSeconds="300" memoryStoreEvictionPolicy="LRU" statistics="true" /> + + + From a870823c066f28b2022132564525ffcf5703ddb4 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 12 Jul 2016 10:17:31 -0700 Subject: [PATCH 04/14] Add UserAttributesSoffitLoader for loading the payload with user attributes from Person Directory --- .../soffit/UserAttributesSoffitLoader.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java new file mode 100644 index 00000000000..415d76190c3 --- /dev/null +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java @@ -0,0 +1,83 @@ +/** + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a + * copy of the License at the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.jasig.portal.soffit; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; +import org.apereo.portlet.soffit.connector.ISoffitLoader; +import org.apereo.portlet.soffit.model.v1_0.User; +import org.jasig.services.persondir.IPersonAttributeDao; +import org.jasig.services.persondir.IPersonAttributes; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * Concrete {@link ISoffitLoader} implementation responsible for loading the + * payload with user attributes from Person Directory. + * + * @author drewwills + */ +@Component +public class UserAttributesSoffitLoader extends AbstractSoffitLoader { + + @Autowired + private IPersonAttributeDao personAttributeDao; + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + public UserAttributesSoffitLoader() { + super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); + } + + @Override + public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, + RenderRequest renderRequest, RenderResponse renderResponse) { + + logger.debug("Loading user attributes for REMOTE_USER='{}'", renderRequest.getRemoteUser()); + + final String username = renderRequest.getRemoteUser(); + if (username != null) { + final IPersonAttributes person = personAttributeDao.getPerson(username); + if (person != null) { + final User user = soffit.getUser(); + for (Entry> y : person.getAttributes().entrySet()) { + final List values = new ArrayList<>(); + for (Object value : y.getValue()) { + if (value instanceof String) { + values.add((String) value); + } + } + user.setAttribute(y.getKey(), values); + } + logger.debug("Loaded the following user attributes for username='{}': {}", username, user.getAttributes()); + } + } + + } + +} From 358abe13a1c06ffe8467c95383cef453fe69ef1e Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 12 Jul 2016 10:49:26 -0700 Subject: [PATCH 05/14] Add UserGroupAffiliationsSoffitLoader for loading the payload with group affiliations from GaP --- .../UserGroupAffiliationsSoffitLoader.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java new file mode 100644 index 00000000000..2c65b1048fc --- /dev/null +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java @@ -0,0 +1,63 @@ +package org.jasig.portal.soffit; + +import java.util.Set; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; +import org.apereo.portlet.soffit.connector.ISoffitLoader; +import org.apereo.portlet.soffit.model.v1_0.Role; +import org.apereo.portlet.soffit.model.v1_0.User; +import org.jasig.portal.groups.IEntityGroup; +import org.jasig.portal.groups.IGroupMember; +import org.jasig.portal.security.IPerson; +import org.jasig.portal.services.GroupService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +/** + * Concrete {@link ISoffitLoader} implementation responsible for loading the + * payload with user group affiliations from GaP. + * + * @author drewwills + */ +@Component +public class UserGroupAffiliationsSoffitLoader extends AbstractSoffitLoader { + + @Value("${org.jasig.portal.security.PersonFactory.guest_user_name:guest}") + private String guestUserName; + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + public UserGroupAffiliationsSoffitLoader() { + super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); + } + + @Override + public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, + RenderRequest renderRequest, RenderResponse renderResponse) { + + logger.debug("Loading group affiliations for REMOTE_USER='{}'", renderRequest.getRemoteUser()); + + final String username = renderRequest.getRemoteUser() != null + ? renderRequest.getRemoteUser() + : guestUserName; + final IGroupMember groupMember = GroupService.getGroupMember(username, IPerson.class); + if (groupMember != null) { + Set ancestors = groupMember.getAncestorGroups(); + User user = soffit.getUser(); + for (IEntityGroup g : ancestors) { + final Role role = new Role(); + role.setId(g.getKey()); + role.setName(g.getName()); + user.addRole(role); + } + logger.debug("Loaded the following group affiliations for username='{}': {}", username, user.getRoles()); + } + + } + +} From e11679bb0191fe5d8cf9505b4a65b0f0328bacd8 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 12 Jul 2016 11:51:39 -0700 Subject: [PATCH 06/14] Add PortletDefinitionSoffitLoader for loading the payload with metadata from the MarketplacePortletDefinition --- .../soffit/PortletDefinitionSoffitLoader.java | 129 ++++++++++++++++++ .../UserGroupAffiliationsSoffitLoader.java | 19 +++ 2 files changed, 148 insertions(+) create mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java new file mode 100644 index 00000000000..aac8cc5c48c --- /dev/null +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java @@ -0,0 +1,129 @@ +/** + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a + * copy of the License at the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.jasig.portal.soffit; + +import java.util.Collections; +import java.util.Locale; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.servlet.http.HttpServletRequest; + +import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; +import org.apereo.portlet.soffit.connector.ISoffitLoader; +import org.apereo.portlet.soffit.model.v1_0.Definition; +import org.jasig.portal.i18n.ILocaleStore; +import org.jasig.portal.i18n.LocaleManager; +import org.jasig.portal.portlet.marketplace.IMarketplaceService; +import org.jasig.portal.portlet.marketplace.MarketplacePortletDefinition; +import org.jasig.portal.portlet.om.IPortletDefinition; +import org.jasig.portal.portlet.om.IPortletDefinitionParameter; +import org.jasig.portal.portlet.om.IPortletWindow; +import org.jasig.portal.portlet.om.IPortletWindowId; +import org.jasig.portal.portlet.om.PortletCategory; +import org.jasig.portal.portlet.registry.IPortletWindowRegistry; +import org.jasig.portal.security.IPerson; +import org.jasig.portal.security.IPersonManager; +import org.jasig.portal.url.IPortalRequestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * Concrete {@link ISoffitLoader} implementation responsible for loading the + * payload with metadata from the {@link IPortletDefinition}. + * + * @author drewwills + */ +@Component +public class PortletDefinitionSoffitLoader extends AbstractSoffitLoader { + + @Autowired + private IPortalRequestUtils portalRequestUtils; + + @Autowired + private IPortletWindowRegistry portletWindowRegistry; + + @Autowired + private IMarketplaceService marketplaceService; + + @Autowired + private IPersonManager personManager; + + @Autowired + private ILocaleStore localeStore; + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + public PortletDefinitionSoffitLoader() { + super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); + } + + @Override + public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, + RenderRequest renderRequest, RenderResponse renderResponse) { + + // Obtain the MarketplacePortletDefinition for this soffit + final HttpServletRequest httpr = portalRequestUtils.getCurrentPortalRequest(); + final IPortletWindowId portletWindowId = portletWindowRegistry.getPortletWindowId(httpr, renderRequest.getWindowID()); + final IPortletWindow portletWindow = portletWindowRegistry.getPortletWindow(httpr, portletWindowId); + final IPortletDefinition pdef = portletWindow.getPortletEntity().getPortletDefinition(); + final MarketplacePortletDefinition mpdef = this.marketplaceService.getOrCreateMarketplacePortletDefinition(pdef); + + final IPerson user = personManager.getPerson(httpr); + final Locale locale = getUserLocale(user); + + // Load metadata into the payload Definition + Definition definition = soffit.getDefinition(); + if (definition == null) { + // Create & set + definition = new Definition(); + soffit.setDefinition(definition); + } + definition.setDescription(mpdef.getDescription()) + .setFname(mpdef.getFName()) + .setName(mpdef.getName()) + .setTimeout(mpdef.getTimeout()) + .setTitle(mpdef.getTitle(locale.toString())); + for (IPortletDefinitionParameter param : mpdef.getParameters()) { + definition.setParameter(param.getName(), Collections.singletonList(param.getValue())); + } + for (PortletCategory category : mpdef.getCategories()) { + definition.addCategory(category.getName()); + } + + logger.debug("Loading the following soffit Definition for user='{}': ", renderRequest.getRemoteUser(), definition); + + } + + /* + * Implementation + */ + + private Locale getUserLocale(IPerson user) { + // get user locale + Locale[] locales = localeStore.getUserLocales(user); + LocaleManager localeManager = new LocaleManager(user, locales); + Locale rslt = localeManager.getLocales()[0]; + return rslt; + } + +} diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java index 2c65b1048fc..de8a27ca5dc 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java @@ -1,3 +1,22 @@ +/** + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a + * copy of the License at the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.jasig.portal.soffit; import java.util.Set; From 63a0c9c4139e9c7dc32ffa0fc113158e4c2c6225 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sun, 24 Jul 2016 15:30:39 -0700 Subject: [PATCH 07/14] Updates to stay in anlignment with the Soffit data model refactor --- .../portal/soffit/PortletDefinitionSoffitLoader.java | 2 -- .../soffit/UserGroupAffiliationsSoffitLoader.java | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java index aac8cc5c48c..4536d962538 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java @@ -100,8 +100,6 @@ public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, } definition.setDescription(mpdef.getDescription()) .setFname(mpdef.getFName()) - .setName(mpdef.getName()) - .setTimeout(mpdef.getTimeout()) .setTitle(mpdef.getTitle(locale.toString())); for (IPortletDefinitionParameter param : mpdef.getParameters()) { definition.setParameter(param.getName(), Collections.singletonList(param.getValue())); diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java index de8a27ca5dc..97072d8aaea 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java @@ -26,7 +26,7 @@ import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; import org.apereo.portlet.soffit.connector.ISoffitLoader; -import org.apereo.portlet.soffit.model.v1_0.Role; +import org.apereo.portlet.soffit.model.v1_0.Group; import org.apereo.portlet.soffit.model.v1_0.User; import org.jasig.portal.groups.IEntityGroup; import org.jasig.portal.groups.IGroupMember; @@ -69,12 +69,12 @@ public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, Set ancestors = groupMember.getAncestorGroups(); User user = soffit.getUser(); for (IEntityGroup g : ancestors) { - final Role role = new Role(); - role.setId(g.getKey()); - role.setName(g.getName()); - user.addRole(role); + final Group group = new Group(); + group.setId(g.getKey()); + group.setName(g.getName()); + user.addGroup(group); } - logger.debug("Loaded the following group affiliations for username='{}': {}", username, user.getRoles()); + logger.debug("Loaded the following group affiliations for username='{}': {}", username, user.getGroups()); } } From 82d3db250d5a68387e185806ad00a85a24f63445 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 9 Aug 2016 20:16:07 -0700 Subject: [PATCH 08/14] Slight adjustments to keep up with changes to Soffit RE: JWT --- .../soffit/AuthorizationHeaderProvider.java | 113 ++++++++++++++++++ .../resources/properties/portal.properties | 2 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java new file mode 100644 index 00000000000..acf7315c1de --- /dev/null +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java @@ -0,0 +1,113 @@ +/** + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a + * copy of the License at the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.jasig.portal.soffit; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Map.Entry; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.apache.http.Header; +import org.apache.http.message.BasicHeader; +import org.apereo.portlet.soffit.Headers; +import org.apereo.portlet.soffit.connector.IHeaderProvider; +import org.apereo.portlet.soffit.model.v1_0.Bearer; +import org.apereo.portlet.soffit.service.BearerService; +import org.jasig.portal.groups.IEntityGroup; +import org.jasig.portal.groups.IGroupMember; +import org.jasig.portal.security.IPerson; +import org.jasig.portal.services.GroupService; +import org.jasig.services.persondir.IPersonAttributeDao; +import org.jasig.services.persondir.IPersonAttributes; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; + +/** + * Prepares the standard HTTP Authorization header. This component is defined + * explicitly in the portlet context (not by annotation). + * + * @since 5.0 + * @author drewwills + */ +public class AuthorizationHeaderProvider implements IHeaderProvider { + + @Autowired + private IPersonAttributeDao personAttributeDao; + + @Autowired + private BearerService bearerService; + + @Value("${org.jasig.portal.security.PersonFactory.guest_user_name:guest}") + private String guestUserName; + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + @Override + public Header createHeader(RenderRequest renderRequest, RenderResponse renderResponse) { + + // Username + final String username = renderRequest.getRemoteUser() != null + ? renderRequest.getRemoteUser() + : guestUserName; + + // Attributes + final Map> attributes = new HashMap<>(); + final IPersonAttributes person = personAttributeDao.getPerson(username); + if (person != null) { + for (Entry> y : person.getAttributes().entrySet()) { + final List values = new ArrayList<>(); + for (Object value : y.getValue()) { + if (value instanceof String) { + values.add((String) value); + } + } + attributes.put(y.getKey(), values); + } + } + logger.debug("Found the following user attributes for username='{}': {}", username, attributes); + + // Groups + final List groups = new ArrayList<>(); + final IGroupMember groupMember = GroupService.getGroupMember(username, IPerson.class); + if (groupMember != null) { + Set ancestors = groupMember.getAncestorGroups(); + for (IEntityGroup g : ancestors) { + groups.add(g.getName()); + } + } + logger.debug("Found the following group affiliations for username='{}': {}", username, groups); + + // Authorization header + final Bearer bearer = bearerService.createBearer(username, attributes, groups); + final Header rslt = new BasicHeader(Headers.AUTHORIZATION.getName(), Headers.BEARER_TOKEN_PREFIX + bearer.getEncryptedToken()); + logger.debug("Produced the following Authorization header for username='{}': {}", username, rslt); + + return rslt; + + } + +} diff --git a/uportal-war/src/main/resources/properties/portal.properties b/uportal-war/src/main/resources/properties/portal.properties index 1bf5880012e..38b3bdb9992 100644 --- a/uportal-war/src/main/resources/properties/portal.properties +++ b/uportal-war/src/main/resources/properties/portal.properties @@ -768,4 +768,4 @@ org.jasig.portal.tincan-api.enabled=false # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.username=UsernameForProvider # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.password=PasswordForProvider - +org.apereo.portlet.soffit.model.v1_0.BearerService.signatureKey=CHANGEME From 64584b436803d4dfecc9c4a1dd11c803c7a11cc1 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Thu, 11 Aug 2016 21:33:04 -0700 Subject: [PATCH 09/14] Keep up with updates in Soffit (set the expires claim in the JWT) --- .../portal/soffit/AuthorizationHeaderProvider.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java index acf7315c1de..7d4fc34d12d 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java @@ -20,12 +20,14 @@ package org.jasig.portal.soffit; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Map.Entry; +import javax.portlet.PortletSession; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; @@ -101,9 +103,17 @@ public Header createHeader(RenderRequest renderRequest, RenderResponse renderRes } logger.debug("Found the following group affiliations for username='{}': {}", username, groups); + // Expiration of the Bearer token + final PortletSession portletSession = renderRequest.getPortletSession(); + final Date expires = new Date( + portletSession.getLastAccessedTime() + ((long) portletSession.getMaxInactiveInterval() * 1000L) + ); + // Authorization header - final Bearer bearer = bearerService.createBearer(username, attributes, groups); - final Header rslt = new BasicHeader(Headers.AUTHORIZATION.getName(), Headers.BEARER_TOKEN_PREFIX + bearer.getEncryptedToken()); + final Bearer bearer = bearerService.createBearer(username, attributes, groups, expires); + final Header rslt = new BasicHeader( + Headers.AUTHORIZATION.getName(), + Headers.BEARER_TOKEN_PREFIX + bearer.getEncryptedToken()); logger.debug("Produced the following Authorization header for username='{}': {}", username, rslt); return rslt; From 2a4bb7c6727cbc31c11984579a66bb8d2d441c78 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sat, 13 Aug 2016 19:15:21 -0700 Subject: [PATCH 10/14] Keep up with ongoing refactoring in the Soffit.jar dependency --- .../soffit/AuthorizationHeaderProvider.java | 16 +++------------- .../main/resources/properties/portal.properties | 6 +++++- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java index 7d4fc34d12d..e11a0ebe4f1 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java @@ -34,7 +34,7 @@ import org.apache.http.Header; import org.apache.http.message.BasicHeader; import org.apereo.portlet.soffit.Headers; -import org.apereo.portlet.soffit.connector.IHeaderProvider; +import org.apereo.portlet.soffit.connector.AbstractHeaderProvider; import org.apereo.portlet.soffit.model.v1_0.Bearer; import org.apereo.portlet.soffit.service.BearerService; import org.jasig.portal.groups.IEntityGroup; @@ -43,10 +43,7 @@ import org.jasig.portal.services.GroupService; import org.jasig.services.persondir.IPersonAttributeDao; import org.jasig.services.persondir.IPersonAttributes; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; /** * Prepares the standard HTTP Authorization header. This component is defined @@ -55,7 +52,7 @@ * @since 5.0 * @author drewwills */ -public class AuthorizationHeaderProvider implements IHeaderProvider { +public class AuthorizationHeaderProvider extends AbstractHeaderProvider { @Autowired private IPersonAttributeDao personAttributeDao; @@ -63,18 +60,11 @@ public class AuthorizationHeaderProvider implements IHeaderProvider { @Autowired private BearerService bearerService; - @Value("${org.jasig.portal.security.PersonFactory.guest_user_name:guest}") - private String guestUserName; - - private final Logger logger = LoggerFactory.getLogger(getClass()); - @Override public Header createHeader(RenderRequest renderRequest, RenderResponse renderResponse) { // Username - final String username = renderRequest.getRemoteUser() != null - ? renderRequest.getRemoteUser() - : guestUserName; + final String username = getUsername(renderRequest); // Attributes final Map> attributes = new HashMap<>(); diff --git a/uportal-war/src/main/resources/properties/portal.properties b/uportal-war/src/main/resources/properties/portal.properties index 38b3bdb9992..6076b2c6f11 100644 --- a/uportal-war/src/main/resources/properties/portal.properties +++ b/uportal-war/src/main/resources/properties/portal.properties @@ -768,4 +768,8 @@ org.jasig.portal.tincan-api.enabled=false # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.username=UsernameForProvider # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.password=PasswordForProvider -org.apereo.portlet.soffit.model.v1_0.BearerService.signatureKey=CHANGEME +# Uncomment and change the value of this setting. 'CHANGEME' is the default +# value; it may work (if both sides of the transaction have the default), but +# isn't secure and will produce a WARNING. +# +#org.apereo.portlet.soffit.jwt.signatureKey=CHANGEME From 9f2534bdfcbca0c15839f8293b7daa63b818fa6b Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sun, 14 Aug 2016 10:12:15 -0700 Subject: [PATCH 11/14] Removing some elements of the old data model (JSON POST) that have already been replaced by the new (encrypted JWT HTTP headers) --- .../soffit/UserAttributesSoffitLoader.java | 83 ------------------- .../UserGroupAffiliationsSoffitLoader.java | 82 ------------------ 2 files changed, 165 deletions(-) delete mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java delete mode 100644 uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java deleted file mode 100644 index 415d76190c3..00000000000 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/UserAttributesSoffitLoader.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a - * copy of the License at the following location: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.jasig.portal.soffit; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; - -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; -import org.apereo.portlet.soffit.connector.ISoffitLoader; -import org.apereo.portlet.soffit.model.v1_0.User; -import org.jasig.services.persondir.IPersonAttributeDao; -import org.jasig.services.persondir.IPersonAttributes; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -/** - * Concrete {@link ISoffitLoader} implementation responsible for loading the - * payload with user attributes from Person Directory. - * - * @author drewwills - */ -@Component -public class UserAttributesSoffitLoader extends AbstractSoffitLoader { - - @Autowired - private IPersonAttributeDao personAttributeDao; - - private final Logger logger = LoggerFactory.getLogger(getClass()); - - public UserAttributesSoffitLoader() { - super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); - } - - @Override - public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, - RenderRequest renderRequest, RenderResponse renderResponse) { - - logger.debug("Loading user attributes for REMOTE_USER='{}'", renderRequest.getRemoteUser()); - - final String username = renderRequest.getRemoteUser(); - if (username != null) { - final IPersonAttributes person = personAttributeDao.getPerson(username); - if (person != null) { - final User user = soffit.getUser(); - for (Entry> y : person.getAttributes().entrySet()) { - final List values = new ArrayList<>(); - for (Object value : y.getValue()) { - if (value instanceof String) { - values.add((String) value); - } - } - user.setAttribute(y.getKey(), values); - } - logger.debug("Loaded the following user attributes for username='{}': {}", username, user.getAttributes()); - } - } - - } - -} diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java deleted file mode 100644 index 97072d8aaea..00000000000 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/UserGroupAffiliationsSoffitLoader.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a - * copy of the License at the following location: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.jasig.portal.soffit; - -import java.util.Set; - -import javax.portlet.RenderRequest; -import javax.portlet.RenderResponse; - -import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; -import org.apereo.portlet.soffit.connector.ISoffitLoader; -import org.apereo.portlet.soffit.model.v1_0.Group; -import org.apereo.portlet.soffit.model.v1_0.User; -import org.jasig.portal.groups.IEntityGroup; -import org.jasig.portal.groups.IGroupMember; -import org.jasig.portal.security.IPerson; -import org.jasig.portal.services.GroupService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -/** - * Concrete {@link ISoffitLoader} implementation responsible for loading the - * payload with user group affiliations from GaP. - * - * @author drewwills - */ -@Component -public class UserGroupAffiliationsSoffitLoader extends AbstractSoffitLoader { - - @Value("${org.jasig.portal.security.PersonFactory.guest_user_name:guest}") - private String guestUserName; - - private final Logger logger = LoggerFactory.getLogger(getClass()); - - public UserGroupAffiliationsSoffitLoader() { - super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); - } - - @Override - public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, - RenderRequest renderRequest, RenderResponse renderResponse) { - - logger.debug("Loading group affiliations for REMOTE_USER='{}'", renderRequest.getRemoteUser()); - - final String username = renderRequest.getRemoteUser() != null - ? renderRequest.getRemoteUser() - : guestUserName; - final IGroupMember groupMember = GroupService.getGroupMember(username, IPerson.class); - if (groupMember != null) { - Set ancestors = groupMember.getAncestorGroups(); - User user = soffit.getUser(); - for (IEntityGroup g : ancestors) { - final Group group = new Group(); - group.setId(g.getKey()); - group.setName(g.getName()); - user.addGroup(group); - } - logger.debug("Loaded the following group affiliations for username='{}': {}", username, user.getGroups()); - } - - } - -} From 15a56cbd214e833f2a35df5b169e5c0eaf4bea0e Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Sun, 14 Aug 2016 20:50:19 -0700 Subject: [PATCH 12/14] Removing PortletDefinitionSoffitLoader and adding DefinitionHeaderProvider; moving the Definition out of the JSON Post into the JWT HTTP header data model --- ...der.java => DefinitionHeaderProvider.java} | 73 +++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) rename uportal-war/src/main/java/org/jasig/portal/soffit/{PortletDefinitionSoffitLoader.java => DefinitionHeaderProvider.java} (64%) diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java b/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java similarity index 64% rename from uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java rename to uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java index 4536d962538..a7477dd388d 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/PortletDefinitionSoffitLoader.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java @@ -19,16 +19,23 @@ package org.jasig.portal.soffit; +import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; +import java.util.List; import java.util.Locale; +import java.util.Map; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import javax.servlet.http.HttpServletRequest; -import org.apereo.portlet.soffit.connector.AbstractSoffitLoader; -import org.apereo.portlet.soffit.connector.ISoffitLoader; +import org.apache.http.Header; +import org.apache.http.message.BasicHeader; +import org.apereo.portlet.soffit.Headers; +import org.apereo.portlet.soffit.connector.AbstractHeaderProvider; import org.apereo.portlet.soffit.model.v1_0.Definition; +import org.apereo.portlet.soffit.service.DefinitionService; import org.jasig.portal.i18n.ILocaleStore; import org.jasig.portal.i18n.LocaleManager; import org.jasig.portal.portlet.marketplace.IMarketplaceService; @@ -42,19 +49,16 @@ import org.jasig.portal.security.IPerson; import org.jasig.portal.security.IPersonManager; import org.jasig.portal.url.IPortalRequestUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; /** - * Concrete {@link ISoffitLoader} implementation responsible for loading the - * payload with metadata from the {@link IPortletDefinition}. + * Prepares the custom HTTP X-Soffit-Definition header. This component is + * defined explicitly in the portlet context (not by annotation). * + * @since 5.0 * @author drewwills */ -@Component -public class PortletDefinitionSoffitLoader extends AbstractSoffitLoader { +public class DefinitionHeaderProvider extends AbstractHeaderProvider { @Autowired private IPortalRequestUtils portalRequestUtils; @@ -71,15 +75,14 @@ public class PortletDefinitionSoffitLoader extends AbstractSoffitLoader { @Autowired private ILocaleStore localeStore; - private final Logger logger = LoggerFactory.getLogger(getClass()); - - public PortletDefinitionSoffitLoader() { - super(ISoffitLoader.DEFAULT_LOADER_ORDER + 1); - } + @Autowired + private DefinitionService definitionService; @Override - public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, - RenderRequest renderRequest, RenderResponse renderResponse) { + public Header createHeader(RenderRequest renderRequest, RenderResponse renderResponse) { + + // Username + final String username = getUsername(renderRequest); // Obtain the MarketplacePortletDefinition for this soffit final HttpServletRequest httpr = portalRequestUtils.getCurrentPortalRequest(); @@ -91,25 +94,35 @@ public void load(org.apereo.portlet.soffit.model.v1_0.Payload soffit, final IPerson user = personManager.getPerson(httpr); final Locale locale = getUserLocale(user); - // Load metadata into the payload Definition - Definition definition = soffit.getDefinition(); - if (definition == null) { - // Create & set - definition = new Definition(); - soffit.setDefinition(definition); + // Title + final String title = mpdef.getTitle(locale.toString()); + + // FName + final String fname = mpdef.getFName(); + + // Description + final String description = mpdef.getDescription(locale.toString()); + + // Categories + List categories = new ArrayList<>(); + for (PortletCategory pc : mpdef.getCategories()) { + categories.add(pc.getName()); } - definition.setDescription(mpdef.getDescription()) - .setFname(mpdef.getFName()) - .setTitle(mpdef.getTitle(locale.toString())); + + // Parameters + Map> parameters = new HashMap<>(); for (IPortletDefinitionParameter param : mpdef.getParameters()) { - definition.setParameter(param.getName(), Collections.singletonList(param.getValue())); - } - for (PortletCategory category : mpdef.getCategories()) { - definition.addCategory(category.getName()); + parameters.put(param.getName(), Collections.singletonList(param.getValue())); } - logger.debug("Loading the following soffit Definition for user='{}': ", renderRequest.getRemoteUser(), definition); + final Definition definition = definitionService.createDefinition(title, fname, + description, categories, parameters, username, getExpiration(renderRequest)); + final Header rslt = new BasicHeader( + Headers.DEFINITION.getName(), + definition.getEncryptedToken()); + logger.debug("Produced the following {} header for username='{}': {}", Headers.DEFINITION.getName(), username, rslt); + return rslt; } /* From d5a3b6d2de45f05c37947c644cf3cea59356220f Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Tue, 16 Aug 2016 18:56:27 -0700 Subject: [PATCH 13/14] Keep up with changes to the data model in Soffit (JSON body payload removed in favor of JWTs as HTTP headers) --- .../src/main/resources/properties/portal.properties | 10 ++++++++++ uportal-war/src/main/webapp/WEB-INF/portlet.xml | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/uportal-war/src/main/resources/properties/portal.properties b/uportal-war/src/main/resources/properties/portal.properties index 6076b2c6f11..372cee3912f 100644 --- a/uportal-war/src/main/resources/properties/portal.properties +++ b/uportal-war/src/main/resources/properties/portal.properties @@ -768,8 +768,18 @@ org.jasig.portal.tincan-api.enabled=false # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.username=UsernameForProvider # org.jasig.rest.interceptor.basic-auth.scorm-cloud-lrs.password=PasswordForProvider +# Signature Key (Soffit) +# ---------------------- # Uncomment and change the value of this setting. 'CHANGEME' is the default # value; it may work (if both sides of the transaction have the default), but # isn't secure and will produce a WARNING. # #org.apereo.portlet.soffit.jwt.signatureKey=CHANGEME + +# Encryption Password (Soffit) +# ---------------------------- +# Uncomment and change the value of this setting. 'CHANGEME' is the default +# value; it may work (if both sides of the transaction have the default), but +# isn't secure and will produce a WARNING. +# +#org.apereo.portlet.soffit.jwt.encryptionPassword=CHANGEME diff --git a/uportal-war/src/main/webapp/WEB-INF/portlet.xml b/uportal-war/src/main/webapp/WEB-INF/portlet.xml index 5ff4ce72561..01b5dd1a844 100644 --- a/uportal-war/src/main/webapp/WEB-INF/portlet.xml +++ b/uportal-war/src/main/webapp/WEB-INF/portlet.xml @@ -1129,12 +1129,6 @@ org.apereo.portlet.soffit.connector.SoffitConnectorController.serviceUrl - - - org.apereo.portlet.soffit.connector.SoffitConnectorController.payloadClass - org.apereo.portlet.soffit.model.v1_0.Payload - From a6b9dbbac558a756cc9890bddab4ea9240336477 Mon Sep 17 00:00:00 2001 From: Drew Wills Date: Wed, 17 Aug 2016 08:37:13 -0700 Subject: [PATCH 14/14] Re-packaging from 'org.apereo.portlet.soffit' to 'org.apereo.portal.soffit'; removing several other mentions of the word 'portlet' from everything EXCEPT the Soffit Connector (which is a portlet) --- .../jasig/portal/soffit/AuthorizationHeaderProvider.java | 8 ++++---- .../org/jasig/portal/soffit/DefinitionHeaderProvider.java | 8 ++++---- .../src/main/resources/properties/portal.properties | 4 ++-- uportal-war/src/main/webapp/WEB-INF/portlet.xml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java index e11a0ebe4f1..28f21b3896b 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/AuthorizationHeaderProvider.java @@ -33,10 +33,10 @@ import org.apache.http.Header; import org.apache.http.message.BasicHeader; -import org.apereo.portlet.soffit.Headers; -import org.apereo.portlet.soffit.connector.AbstractHeaderProvider; -import org.apereo.portlet.soffit.model.v1_0.Bearer; -import org.apereo.portlet.soffit.service.BearerService; +import org.apereo.portal.soffit.Headers; +import org.apereo.portal.soffit.connector.AbstractHeaderProvider; +import org.apereo.portal.soffit.model.v1_0.Bearer; +import org.apereo.portal.soffit.service.BearerService; import org.jasig.portal.groups.IEntityGroup; import org.jasig.portal.groups.IGroupMember; import org.jasig.portal.security.IPerson; diff --git a/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java b/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java index a7477dd388d..a61cdde205c 100644 --- a/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java +++ b/uportal-war/src/main/java/org/jasig/portal/soffit/DefinitionHeaderProvider.java @@ -32,10 +32,10 @@ import org.apache.http.Header; import org.apache.http.message.BasicHeader; -import org.apereo.portlet.soffit.Headers; -import org.apereo.portlet.soffit.connector.AbstractHeaderProvider; -import org.apereo.portlet.soffit.model.v1_0.Definition; -import org.apereo.portlet.soffit.service.DefinitionService; +import org.apereo.portal.soffit.Headers; +import org.apereo.portal.soffit.connector.AbstractHeaderProvider; +import org.apereo.portal.soffit.model.v1_0.Definition; +import org.apereo.portal.soffit.service.DefinitionService; import org.jasig.portal.i18n.ILocaleStore; import org.jasig.portal.i18n.LocaleManager; import org.jasig.portal.portlet.marketplace.IMarketplaceService; diff --git a/uportal-war/src/main/resources/properties/portal.properties b/uportal-war/src/main/resources/properties/portal.properties index 372cee3912f..1cb4920e258 100644 --- a/uportal-war/src/main/resources/properties/portal.properties +++ b/uportal-war/src/main/resources/properties/portal.properties @@ -774,7 +774,7 @@ org.jasig.portal.tincan-api.enabled=false # value; it may work (if both sides of the transaction have the default), but # isn't secure and will produce a WARNING. # -#org.apereo.portlet.soffit.jwt.signatureKey=CHANGEME +#org.apereo.portal.soffit.jwt.signatureKey=CHANGEME # Encryption Password (Soffit) # ---------------------------- @@ -782,4 +782,4 @@ org.jasig.portal.tincan-api.enabled=false # value; it may work (if both sides of the transaction have the default), but # isn't secure and will produce a WARNING. # -#org.apereo.portlet.soffit.jwt.encryptionPassword=CHANGEME +#org.apereo.portal.soffit.jwt.encryptionPassword=CHANGEME diff --git a/uportal-war/src/main/webapp/WEB-INF/portlet.xml b/uportal-war/src/main/webapp/WEB-INF/portlet.xml index 01b5dd1a844..83bbf428682 100644 --- a/uportal-war/src/main/webapp/WEB-INF/portlet.xml +++ b/uportal-war/src/main/webapp/WEB-INF/portlet.xml @@ -1111,7 +1111,7 @@ org.springframework.web.portlet.DispatcherPortlet contextConfigLocation - classpath:/org/apereo/portlet/soffit/mvc/soffit-connector.xml + classpath:/org/apereo/portal/soffit/connector/connector-portlet.xml 0