Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #295 from jpkrohling/HAWKULAR-194
Browse files Browse the repository at this point in the history
HAWKULAR-194 - Added support for consuming Keycloak events
  • Loading branch information
jmazzitelli committed Jul 9, 2015
2 parents c3625c1 + ee3ec00 commit b4cb050
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 2 deletions.
27 changes: 27 additions & 0 deletions dist/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
<include>org.hawkular.alerts:hawkular-actions-email</include>
<include>org.hawkular.metrics:hawkular-metrics-api-jaxrs</include>
<include>org.hawkular.commons:hawkular-commons-embedded-cassandra-ear</include>
<include>org.hawkular.accounts:hawkular-accounts-events-backend:war</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
<unpack>false</unpack>
Expand All @@ -137,6 +138,8 @@
<includes>
<include>org.hawkular.agent:hawkular-monitor:zip:module</include>
<include>org.hawkular.bus:hawkular-bus-ra-wf-module:zip:module</include>
<include>org.hawkular.accounts:hawkular-accounts-keycloak-event-listener-rest:zip:module</include>
<include>org.hawkular.accounts:hawkular-accounts-keycloak-event-listener-jms:zip:module</include>
</includes>
<unpack>true</unpack>
<fileMode>0644</fileMode>
Expand All @@ -155,6 +158,30 @@
<useTransitiveDependencies>false</useTransitiveDependencies>
<useTransitiveFiltering>false</useTransitiveFiltering>
</dependencySet>

<!-- Keycloak Event Listeners -->
<dependencySet>
<outputDirectory>${hawkular.dist.zip.root.dir}/modules/org/hawkular/keycloak/events/rest/main</outputDirectory>
<includes>
<include>org.hawkular.accounts:hawkular-accounts-keycloak-event-listener-rest:jar</include>
</includes>
<outputFileNameMapping>hawkular-accounts-keycloak-event-listener-rest.jar</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
<useProjectAttachments>false</useProjectAttachments>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useTransitiveFiltering>false</useTransitiveFiltering>
</dependencySet>
<dependencySet>
<outputDirectory>${hawkular.dist.zip.root.dir}/modules/org/hawkular/keycloak/events/jms/main</outputDirectory>
<includes>
<include>org.hawkular.accounts:hawkular-accounts-keycloak-event-listener-jms:jar</include>
</includes>
<outputFileNameMapping>hawkular-accounts-keycloak-event-listener-jms.jar</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
<useProjectAttachments>false</useProjectAttachments>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useTransitiveFiltering>false</useTransitiveFiltering>
</dependencySet>
</dependencySets>

</assembly>
Expand Down
19 changes: 19 additions & 0 deletions dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
<artifactId>hawkular-accounts</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-events-backend</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
Expand Down Expand Up @@ -141,6 +146,20 @@
<version>${version.org.hawkular.accounts}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-keycloak-event-listener-jms</artifactId>
<version>${version.org.hawkular.accounts}</version>
<classifier>module</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-keycloak-event-listener-rest</artifactId>
<version>${version.org.hawkular.accounts}</version>
<classifier>module</classifier>
<type>zip</type>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"accountTheme" : "hawkular",
"adminTheme" : "hawkular",
"defaultRoles" : [ "user" ],
"eventsListeners" : [ "hawkular-jms", "jboss-logging" ],
"users" : [ {
"id" : "28026b36-8fe4-4332-84c8-524e173a68bf",
"username" : "jdoe",
Expand Down
1 change: 1 addition & 0 deletions dist/src/main/resources/configuration/hawkular-realm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"loginTheme" : "hawkular",
"accountTheme" : "hawkular",
"adminTheme" : "hawkular",
"eventsListeners" : [ "hawkular-jms", "jboss-logging" ],
"roles" : {
"realm" : [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"providers": [
"classpath:${jboss.server.config.dir}/providers/*"
"classpath:${jboss.server.config.dir}/providers/*",
"module:org.hawkular.keycloak.events.rest",
"module:org.hawkular.keycloak.events.jms"
],

"eventsListener": {
"hawkular-rest": {
"excludes": [ "REFRESH_TOKEN", "CODE_TO_TOKEN", "LOGIN" ]
},
"hawkular-jms": {
"excludes": [ "REFRESH_TOKEN", "CODE_TO_TOKEN", "LOGIN" ]
}
},

"admin": {
"realm": "master"
},
Expand Down
7 changes: 7 additions & 0 deletions dist/src/main/resources/wildfly/patches/standalone.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@
<admin-object use-java-context="true" enabled="true" class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:/topic/HawkularAvailData" pool-name="HawkularAvailData">
<config-property name="PhysicalName">HawkularAvailData</config-property>
</admin-object>
<admin-object use-java-context="true" enabled="true" class-name="org.apache.activemq.command.ActiveMQTopic" jndi-name="java:/topic/HawkularAccountsEvents" pool-name="HawkularAccountsEvents">
<config-property name="PhysicalName">HawkularAccountsEvents</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
Expand Down Expand Up @@ -297,6 +300,10 @@
<xsl:attribute name="name">hawkular.metrics.waitForService</xsl:attribute>
<xsl:attribute name="value">&#36;{hawkular.metrics.waitForService:True}</xsl:attribute>
</property>
<property>
<xsl:attribute name="name">hawkular.events.listener.rest.endpoint</xsl:attribute>
<xsl:attribute name="value">http://&#36;{jboss.bind.address:127.0.0.1}:&#36;{jboss.http.port:8080}/hawkular-accounts-events-backend/events</xsl:attribute>
</property>
<xsl:choose>
<xsl:when test="$kettle.build.type='dev'">
<property>
Expand Down
25 changes: 24 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<version.commons.io>2.4</version.commons.io>
<version.gnu.getopt>1.0.13</version.gnu.getopt>
<version.org.apache.activemq>5.10.0</version.org.apache.activemq>
<version.org.hawkular.accounts>1.0.6</version.org.hawkular.accounts>
<version.org.hawkular.accounts>1.0.8.Final</version.org.hawkular.accounts>
<version.org.hawkular.agent>0.2.3</version.org.hawkular.agent>
<version.org.hawkular.alerts>0.2.1.Final</version.org.hawkular.alerts>
<version.org.hawkular.availCreator>${project.version}</version.org.hawkular.availCreator>
Expand All @@ -109,12 +109,35 @@
<type>war</type>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-events-backend</artifactId>
<version>${version.org.hawkular.accounts}</version>
<type>war</type>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-api</artifactId>
<version>${version.org.hawkular.accounts}</version>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-keycloak-event-listener-jms</artifactId>
<version>${version.org.hawkular.accounts}</version>
<classifier>module</classifier>
<type>zip</type>
</dependency>

<dependency>
<groupId>org.hawkular.accounts</groupId>
<artifactId>hawkular-accounts-keycloak-event-listener-rest</artifactId>
<version>${version.org.hawkular.accounts}</version>
<classifier>module</classifier>
<type>zip</type>
</dependency>

<dependency>
<groupId>org.hawkular.agent</groupId>
<artifactId>hawkular-monitor</artifactId>
Expand Down

0 comments on commit b4cb050

Please sign in to comment.