diff --git a/README.md b/README.md index 94cf2af..4887c20 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ grant codeBase "file:${catalina.base}/ext/-" { } ``` +### Dependencies + +This extension requires the [`multiext-activiti-app-ext`](https://git.inteligr8.com/inteligr8/multiext-activiti-app-ext). Without it, APS will fail to startup. It is very small and requires no additional configuration. + ## Support Matrix | Auth Activiti App Extension | Activiti App | diff --git a/pom.xml b/pom.xml index 623fa8d..35f0156 100644 --- a/pom.xml +++ b/pom.xml @@ -1,295 +1,295 @@ - - 4.0.0 - - com.inteligr8.activiti - auth-activiti-app-ext - 2.0-SNAPSHOT - - Authentication & Authorization for APS - An Alfresco Process Service App extension providing improved authentication and authorization support. - https://git.inteligr8.com/inteligr8/auth-activiti-app-ext - - - - GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 - https://www.gnu.org/licenses/lgpl-3.0.txt - - - - - scm:git:https://git.inteligr8.com/inteligr8/auth-activiti-app-ext.git - scm:git:git@git.inteligr8.com:inteligr8/auth-activiti-app-ext.git - https://git.inteligr8.com/inteligr8/auth-activiti-app-ext - - - Inteligr8 - https://www.inteligr8.com - - - - brian.long - Brian Long - brian@inteligr8.com - https://twitter.com/brianmlong - - - - - 17 - 17 - 17 - - 25.1.1 - - - 10-2.2 - -Dspring.main.allow-circular-references=true \ - -Dhibernate.dialect=org.hibernate.dialect.PostgreSQLDialect \ - -Dauth-ext.oauth.enabled=true \ - -Dauth-ext.external.id=keycloak \ - -Dauth-ext.sync.group.translate.patterns=aps-admin \ - -Dauth-ext.sync.group.translate.replacements=Superusers \ - -Dauth-ext.group.admins.validate=true - 120000 - my-app - aps-app-public - - - - - - - - com.activiti - activiti-app - ${aps.version} - classes - provided - - - - com.activiti - aspose-transformation - - - org.alfresco.officeservices - aoservices - - - - com.ryantenney.metrics - metrics-spring - - - org.springframework.security.oauth - spring-security-oauth2 - - - org.springframework.security.oauth.boot - spring-security-oauth2-autoconfigure - - - - - - - - - io.repaint.maven - tiles-maven-plugin - 2.40 - true - - - - - com.inteligr8.ootbee:beedk-aps-ext-rad-tile:1.1-SNAPSHOT - - - - - - - - - activiti-oauth-confidential - - - secret - - - - aps-app-confidential - a-secret - - - - activiti-oauth-legacy - - - rad - !spring - - - - ${aps.tomcat.opts.base} \ - -Dactiviti.identity-service.enabled=true \ - -Dactiviti.identity-service.realm=${keycloak.realm} \ - -Dactiviti.identity-service.auth-server-url=http://host.docker.internal:${keycloak.server.port} \ - -Dactiviti.identity-service.resource=${oauth.client.id} \ - -Dactiviti.identity-service.credentials.secret=${oauth.client.secret} \ - -Dactiviti.use-browser-based-logout=true \ - -Dalfresco.content.sso.redirect_uri=http://loalhost:8080/activiti-app/app/rest/integration/sso/confirm-auth-request - - - - activiti-oauth-spring - - - rad - spring - - - - ${aps.tomcat.opts.base} \ - -Dsecurity.oauth2.authentication.enabled=true \ - -Dsecurity.oauth2.client.registration.my-app.client-id=${oauth.client.id} \ - -Dsecurity.oauth2.client.registration.my-app.client-secret=${oauth.client.secret} \ - -Dsecurity.oauth2.client.registration.my-app.provider=aps-app \ - -Dsecurity.oauth2.client.provider.aps-app.issuer_uri=http://host.docker.internal:${keycloak.server.port}/realms/${keycloak.realm} - - - - rad-keycloak - - - rad - - - - - - 26.2 - 8081 - - - - - io.fabric8 - docker-maven-plugin - 0.46.0 - - - run-keycloak - test-compile - start - - - - keycloak/keycloak:${keycloak.server.version} - keycloak - - start-dev --import-realm - - admin - admin - - - ${keycloak.server.port}:8080 - - - custom - ${project.artifactId} - - - host.docker.internal:host-gateway - - - - ${project.basedir}/src/test/resources/keycloak-import:/opt/keycloak/data/import:ro - - - - - - - - - - - - - - ossrh-release - - true - - - - - maven-source-plugin - - - source - package - jar-no-fork - - - - - maven-javadoc-plugin - - - javadoc - package - jar - - public - - - - - - maven-gpg-plugin - - - sign - verify - sign - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - - ossrh - https://s01.oss.sonatype.org/ - true - - - - ossrh-deploy - deploy - deploy - - - - - - - - - - - activiti-releases - https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases - - - - + + 4.0.0 + + com.inteligr8.activiti + auth-activiti-app-ext + 2.0-SNAPSHOT + + Authentication & Authorization for APS + An Alfresco Process Service App extension providing improved authentication and authorization support. + https://git.inteligr8.com/inteligr8/auth-activiti-app-ext + + + + GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 + https://www.gnu.org/licenses/lgpl-3.0.txt + + + + + scm:git:https://git.inteligr8.com/inteligr8/auth-activiti-app-ext.git + scm:git:git@git.inteligr8.com:inteligr8/auth-activiti-app-ext.git + https://git.inteligr8.com/inteligr8/auth-activiti-app-ext + + + Inteligr8 + https://www.inteligr8.com + + + + brian.long + Brian Long + brian@inteligr8.com + https://twitter.com/brianmlong + + + + + 17 + 17 + 17 + + 25.1.1 + + + 10-2.2 + -Dspring.main.allow-circular-references=true \ + -Dhibernate.dialect=org.hibernate.dialect.PostgreSQLDialect \ + -Dauth-ext.oauth.enabled=true \ + -Dauth-ext.external.id=keycloak \ + -Dauth-ext.sync.group.translate.patterns=aps-admin \ + -Dauth-ext.sync.group.translate.replacements=Superusers \ + -Dauth-ext.group.admins.validate=true + 120000 + my-app + aps-app-public + + + + + + + + com.activiti + activiti-app + ${aps.version} + classes + provided + + + + com.activiti + aspose-transformation + + + org.alfresco.officeservices + aoservices + + + + com.ryantenney.metrics + metrics-spring + + + org.springframework.security.oauth + spring-security-oauth2 + + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + + + + + + + + + io.repaint.maven + tiles-maven-plugin + 2.40 + true + + + + + com.inteligr8.ootbee:beedk-aps-ext-rad-tile:1.1-SNAPSHOT + + + + + + + + + activiti-oauth-confidential + + + secret + + + + aps-app-confidential + a-secret + + + + activiti-oauth-legacy + + + rad + !spring + + + + ${aps.tomcat.opts.base} \ + -Dactiviti.identity-service.enabled=true \ + -Dactiviti.identity-service.realm=${keycloak.realm} \ + -Dactiviti.identity-service.auth-server-url=http://host.docker.internal:${keycloak.server.port} \ + -Dactiviti.identity-service.resource=${oauth.client.id} \ + -Dactiviti.identity-service.credentials.secret=${oauth.client.secret} \ + -Dactiviti.use-browser-based-logout=true \ + -Dalfresco.content.sso.redirect_uri=http://loalhost:8080/activiti-app/app/rest/integration/sso/confirm-auth-request + + + + activiti-oauth-spring + + + rad + spring + + + + ${aps.tomcat.opts.base} \ + -Dsecurity.oauth2.authentication.enabled=true \ + -Dsecurity.oauth2.client.registration.my-app.client-id=${oauth.client.id} \ + -Dsecurity.oauth2.client.registration.my-app.client-secret=${oauth.client.secret} \ + -Dsecurity.oauth2.client.registration.my-app.provider=aps-app \ + -Dsecurity.oauth2.client.provider.aps-app.issuer_uri=http://host.docker.internal:${keycloak.server.port}/realms/${keycloak.realm} + + + + rad-keycloak + + + rad + + + + + + 26.2 + 8081 + + + + + io.fabric8 + docker-maven-plugin + 0.46.0 + + + run-keycloak + test-compile + start + + + + keycloak/keycloak:${keycloak.server.version} + keycloak + + start-dev --import-realm + + admin + admin + + + ${keycloak.server.port}:8080 + + + custom + ${project.artifactId} + + + host.docker.internal:host-gateway + + + + ${project.basedir}/src/test/resources/keycloak-import:/opt/keycloak/data/import:ro + + + + + + + + + + + + + + ossrh-release + + true + + + + + maven-source-plugin + + + source + package + jar-no-fork + + + + + maven-javadoc-plugin + + + javadoc + package + jar + + public + + + + + + maven-gpg-plugin + + + sign + verify + sign + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + + ossrh + https://s01.oss.sonatype.org/ + true + + + + ossrh-deploy + deploy + deploy + + + + + + + + + + + activiti-releases + https://artifacts.alfresco.com/nexus/content/repositories/activiti-enterprise-releases + + + + diff --git a/src/main/java/com/activiti/extension/conf/AuthExtSpringComponentScanner.java b/src/main/java/com/activiti/extension/conf/AuthExtSpringComponentScanner.java index 250d24f..a72a673 100644 --- a/src/main/java/com/activiti/extension/conf/AuthExtSpringComponentScanner.java +++ b/src/main/java/com/activiti/extension/conf/AuthExtSpringComponentScanner.java @@ -1,35 +1,35 @@ -/* - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ -package com.activiti.extension.conf; - -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; - -/** - * A means for injecting packages to scan for the Spring context. - * - * @author brian@inteligr8.com - */ -@Configuration -@ComponentScan( - basePackages = { - "com.inteligr8.activiti.auth" - }, - nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class -) -public class AuthExtSpringComponentScanner { - -} +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +package com.activiti.extension.conf; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; + +/** + * A means for injecting packages to scan for the Spring context. + * + * @author brian@inteligr8.com + */ +@Configuration +@ComponentScan( + basePackages = { + "com.inteligr8.activiti.auth" + }, + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +public class AuthExtSpringComponentScanner { + +} diff --git a/src/main/java/com/inteligr8/activiti/auth/Bootstrapper.java b/src/main/java/com/inteligr8/activiti/auth/Bootstrapper.java deleted file mode 100644 index 6cb9ade..0000000 --- a/src/main/java/com/inteligr8/activiti/auth/Bootstrapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.inteligr8.activiti.auth; - -import java.util.Map; -import java.util.Map.Entry; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Component; - -import com.activiti.api.boot.BootstrapConfigurer; - -@Component("bootstrap.proxy") -@Primary -public class Bootstrapper implements BootstrapConfigurer { - - private final Logger logger = LoggerFactory.getLogger(this.getClass()); - - @Override - public void applicationContextInitialized(ApplicationContext applicationContext) { - Map bootstraps = applicationContext.getBeansOfType(BootstrapConfigurer.class); - bootstraps.remove("bootstrap.proxy"); - - this.logger.debug("Executing {} bootstrap configurers", bootstraps.size()); - for (Entry bootstrap : bootstraps.entrySet()) { - this.logger.trace("Executing bootstrap configurer: {}: {}", bootstrap.getKey(), bootstrap.getValue().getClass()); - bootstrap.getValue().applicationContextInitialized(applicationContext); - } - } - -}