Skip to content

Commit 0d11e7b

Browse files
author
gm2552
committed
Initial code commit.
1 parent d8ae6a5 commit 0d11e7b

8 files changed

Lines changed: 452 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121

2222
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2323
hs_err_pid*
24+
/.DS_Store
25+
/.project

pom.xml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
<?xml version="1.0"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.nhind</groupId>
5+
<artifactId>config-service-war</artifactId>
6+
<version>6.0-SNAPSHOT</version>
7+
<packaging>war</packaging>
8+
<name>NHIN-Direct Configuration Service Web Application Module</name>
9+
<description>NHIN-Direct Configuration Service Web Application Module</description>
10+
11+
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/config-service-war/${project.version}</url>
12+
13+
<scm>
14+
<url>https://nhin-d.googlecode.com/hg/java/config/config-service-war</url>
15+
<connection>scm:hg:https://nhin-d.googlecode.com/hg/nhin-d/java/config/config-service-war</connection>
16+
</scm>
17+
<prerequisites>
18+
<maven>3.0.0</maven>
19+
</prerequisites>
20+
<parent>
21+
<groupId>org.springframework.boot</groupId>
22+
<artifactId>spring-boot-dependencies</artifactId>
23+
<version>2.0.5.RELEASE</version>
24+
</parent>
25+
<developers>
26+
<developer>
27+
<name>Greg Meyer</name>
28+
<id>GM2552</id>
29+
<email>gm2552@cerner.com</email>
30+
<roles>
31+
<role>owner</role>
32+
</roles>
33+
</developer>
34+
</developers>
35+
<licenses>
36+
<license>
37+
<name>New BSD License</name>
38+
<url>http://nhindirect.org/BSDLicense</url>
39+
</license>
40+
</licenses>
41+
<dependencies>
42+
<dependency>
43+
<groupId>org.nhind</groupId>
44+
<artifactId>config-service-jar</artifactId>
45+
<version>6.0-SNAPSHOT</version>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.springframework.boot</groupId>
49+
<artifactId>spring-boot-starter-web</artifactId>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-data-jpa</artifactId>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-starter-security</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>postgresql</groupId>
61+
<artifactId>postgresql</artifactId>
62+
<version>8.4-701.jdbc4</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>commons-dbcp</groupId>
66+
<artifactId>commons-dbcp</artifactId>
67+
<version>1.4</version>
68+
<scope>runtime</scope>
69+
</dependency>
70+
<dependency>
71+
<groupId>org.apache.derby</groupId>
72+
<artifactId>derby</artifactId>
73+
<version>10.14.2.0</version>
74+
<scope>runtime</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>mysql</groupId>
78+
<artifactId>mysql-connector-java</artifactId>
79+
<version>5.1.47</version>
80+
<scope>runtime</scope>
81+
</dependency>
82+
<dependency>
83+
<groupId>org.postgresql</groupId>
84+
<artifactId>postgresql</artifactId>
85+
<version>42.2.5</version>
86+
<scope>runtime</scope>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.eclipse.jetty</groupId>
90+
<artifactId>test-jetty-servlet</artifactId>
91+
<version>8.2.0.v20160908</version>
92+
<scope>test</scope>
93+
</dependency>
94+
</dependencies>
95+
96+
<build>
97+
<plugins>
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-source-plugin</artifactId>
101+
<version>3.0.1</version>
102+
<executions>
103+
<execution>
104+
<goals>
105+
<goal>jar</goal>
106+
</goals>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-compiler-plugin</artifactId>
113+
<executions>
114+
<execution>
115+
<goals>
116+
<goal>testCompile</goal>
117+
</goals>
118+
<phase>compile</phase>
119+
</execution>
120+
</executions>
121+
<configuration>
122+
<fork>true</fork>
123+
<optimize>true</optimize>
124+
<showDeprecation>true</showDeprecation>
125+
<encoding>UTF-8</encoding>
126+
<source>1.8</source>
127+
<target>1.8</target>
128+
</configuration>
129+
</plugin>
130+
<!-- for releases only
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-javadoc-plugin</artifactId>
134+
<version>2.6.1</version>
135+
<configuration>
136+
<charset>UTF-8</charset>
137+
<docencoding>UTF-8</docencoding>
138+
<docfilessubdirs>false</docfilessubdirs>
139+
<detectJavaApiLink>false</detectJavaApiLink>
140+
<detectLinks>false</detectLinks>
141+
<source>1.8</source>
142+
<show>public</show>
143+
</configuration>
144+
<executions>
145+
<execution>
146+
<phase>package</phase>
147+
<id>attach-javadocs</id>
148+
<goals>
149+
<goal>jar</goal>
150+
</goals>
151+
</execution>
152+
</executions>
153+
</plugin>
154+
<plugin>
155+
<groupId>org.apache.maven.plugins</groupId>
156+
<artifactId>maven-gpg-plugin</artifactId>
157+
<executions>
158+
<execution>
159+
<id>sign-artifacts</id>
160+
<phase>package</phase>
161+
<goals>
162+
<goal>sign</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
-->
168+
169+
</plugins>
170+
</build>
171+
<distributionManagement>
172+
<site>
173+
<id>nhind-site</id>
174+
<name>NHIN Direct API publication site</name>
175+
<url>sftp://api.nhindirect.org/x/www/api.nhindirect.org/java/site/config/config-service/${project.version}</url>
176+
</site>
177+
<snapshotRepository>
178+
<id>sonatype-snapshot</id>
179+
<name>Sonatype OSS Maven SNAPSHOT Repository</name>
180+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
181+
<uniqueVersion>false</uniqueVersion>
182+
</snapshotRepository>
183+
<repository>
184+
<id>sonatype-release</id>
185+
<name>Sonatype OSS Maven Release Repositor</name>
186+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
187+
<uniqueVersion>false</uniqueVersion>
188+
</repository>
189+
</distributionManagement>
190+
</project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
name=SafeNeteTokenPro
2+
library=/usr/local/lib/libeTPkcs11.dylib
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#Used to set the passphrases to protect
2+
#keys when not using an HSM.
3+
direct.config.keystore.keyStorePassPhrase=H1TBr0s!
4+
direct.config.keystore.privateKeyPassPhrase=H1TCh1ckS!
5+
6+
#Enable and populate if you are using an HSM. The provided
7+
#values work for a Luna SA device using Slot0
8+
9+
#direct.config.keystore.hsmpresent=true
10+
#direct.config.keystore.keyStorePin=ChangeMe
11+
#direct.config.keystore.keyStoreType=Luna
12+
#direct.config.keystore.keyStoreSourceAsString=slot:0
13+
#direct.config.keystore.keyStoreProviderName=com.safenetinc.luna.provider.LunaProvider
14+
15+
datasource.databasePlatform=org.hibernate.dialect.DerbyDialect
16+
datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
17+
datasource.url=jdbc:derby:nhindconfig;create=true
18+
datasource.username=nhind
19+
datasource.password=nhind
20+
21+
22+
direct.config.security.user.name=admin
23+
direct.config.security.user.password={bcrypt}$2a$04$WQsYXSBOnycO1/7E9bKUVevWX3.Gxv2V6ZfYx9UKoy3lm9.4TjU7e
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Manifest-Version: 1.0
2+
Class-Path: config-service-jar-6.0-SNAPSHOT.jar spring-boot-starter-da
3+
ta-jpa-2.0.5.RELEASE.jar spring-boot-starter-2.0.5.RELEASE.jar spring
4+
-boot-2.0.5.RELEASE.jar spring-core-5.0.9.RELEASE.jar spring-jcl-5.0.
5+
9.RELEASE.jar spring-context-5.0.9.RELEASE.jar spring-aop-5.0.9.RELEA
6+
SE.jar spring-beans-5.0.9.RELEASE.jar spring-expression-5.0.9.RELEASE
7+
.jar spring-boot-autoconfigure-2.0.5.RELEASE.jar spring-boot-starter-
8+
logging-2.0.5.RELEASE.jar logback-classic-1.2.3.jar logback-core-1.2.
9+
3.jar slf4j-api-1.7.25.jar log4j-to-slf4j-2.10.0.jar log4j-api-2.10.0
10+
.jar jul-to-slf4j-1.7.25.jar javax.annotation-api-1.3.2.jar snakeyaml
11+
-1.19.jar spring-boot-starter-aop-2.0.5.RELEASE.jar aspectjweaver-1.8
12+
.13.jar spring-boot-starter-jdbc-2.0.5.RELEASE.jar HikariCP-2.7.9.jar
13+
spring-jdbc-5.0.9.RELEASE.jar spring-tx-5.0.9.RELEASE.jar javax.tran
14+
saction-api-1.2.jar hibernate-core-5.2.17.Final.jar jboss-logging-3.3
15+
.2.Final.jar hibernate-jpa-2.1-api-1.0.2.Final.jar javassist-3.22.0-G
16+
A.jar antlr-2.7.7.jar jandex-2.0.3.Final.jar classmate-1.3.4.jar dom4
17+
j-1.6.1.jar hibernate-commons-annotations-5.0.1.Final.jar spring-data
18+
-jpa-2.0.10.RELEASE.jar spring-data-commons-2.0.10.RELEASE.jar spring
19+
-orm-5.0.9.RELEASE.jar spring-aspects-5.0.9.RELEASE.jar spring-boot-s
20+
tarter-tomcat-2.0.5.RELEASE.jar tomcat-embed-core-8.5.34.jar tomcat-e
21+
mbed-el-8.5.34.jar tomcat-embed-websocket-8.5.34.jar spring-boot-star
22+
ter-web-2.0.5.RELEASE.jar spring-boot-starter-json-2.0.5.RELEASE.jar
23+
spring-web-5.0.9.RELEASE.jar jackson-databind-2.9.6.jar jackson-annot
24+
ations-2.9.0.jar jackson-core-2.9.6.jar jackson-datatype-jdk8-2.9.6.j
25+
ar jackson-datatype-jsr310-2.9.6.jar jackson-module-parameter-names-2
26+
.9.6.jar hibernate-validator-6.0.12.Final.jar validation-api-2.0.1.Fi
27+
nal.jar spring-webmvc-5.0.9.RELEASE.jar config-store-1.6.jar direct-p
28+
olicy-1.0.jar xstream-1.4.4.jar xmlpull-1.1.3.1.jar xpp3_min-1.1.4c.j
29+
ar bcprov-jdk15-140.jar mail-1.4.3.jar commons-logging-1.1.1.jar comm
30+
ons-io-1.4.jar commons-lang-2.5.jar jackson-jaxrs-1.7.5.jar jackson-c
31+
ore-asl-1.7.5.jar jackson-mapper-asl-1.7.5.jar direct-common-6.0-SNAP
32+
SHOT.jar dsn-1.4.3.jar activation-1.1.jar jdom-1.1.jar commons-codec-
33+
1.11.jar config-model-6.0-SNAPSHOT.jar commons-collections-3.1.jar dn
34+
sjava-2.0.8.jar spring-asm-3.0.4.RELEASE.jar spring-test-5.0.9.RELEAS
35+
E.jar commons-dbcp-1.4.jar commons-pool-1.6.jar jta-1.1.jar hibernate
36+
-3.2.7.ga.pom ehcache-2.10.5.jar asm-attrs-1.5.3.jar cglib-2.1_3.jar
37+
asm-1.5.3.jar geronimo-jpa_2.0_spec-1.0.jar hibernate-entitymanager-5
38+
.2.17.Final.jar byte-buddy-1.7.11.jar jboss-transaction-api_1.2_spec-
39+
1.0.1.Final.jar hibernate-annotations-3.3.1.GA.jar hibernate-3.2.6.ga
40+
.jar hibernate-commons-annotations-3.0.0.ga.jar jaxb-api-2.3.0.jar co
41+
mmons-collections4-4.2.jar commons-lang3-3.7.jar commons-text-1.4.jar
42+
mina-core-1.0.9.jar backport-util-concurrent-3.0.jar bcmail-jdk15-14
43+
0.jar camel-core-2.22.0.jar jaxb-core-2.3.0.1.jar jaxb-impl-2.3.0.1.j
44+
ar camel-spring-2.22.0.jar camel-mina-2.22.0.jar commons-net-3.6.jar
45+
postgresql-8.4-701.jdbc4.jar derby-10.4.1.3.jar
46+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:sec="http://www.springframework.org/schema/security"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:util="http://www.springframework.org/schema/util"
7+
xsi:schemaLocation="
8+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
10+
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
11+
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
12+
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
13+
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"
14+
default-autowire="byName">
15+
16+
<context:annotation-config />
17+
18+
<!-- The components scan loads the entity factory manager, entity and DAO object, SpringMVC resources,
19+
bundles processors, and keystore configuration. Configuration properties are found in properties/config.properties-->
20+
<context:component-scan base-package="org.nhindirect.config.springconfig, org.nhindirect.config.boot,
21+
org.nhindirect.config.store, org.nhindirect.config.resources" />
22+
<tx:annotation-driven transaction-manager="transactionManager" />
23+
24+
<context:property-placeholder location="classpath:properties/config.properties"/>
25+
26+
<!-- Exception translation bean post processor -->
27+
<bean
28+
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
29+
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
30+
destroy-method="close">
31+
<property name="driverClassName" value="${datasource.driverClassName}" />
32+
<property name="url" value="${datasource.url}" />
33+
<property name="username" value="${datasource.username}" />
34+
<property name="password" value="${datasource.username}" />
35+
</bean>
36+
37+
38+
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" />
39+
40+
<!-- Basic Auth configuration -->
41+
<sec:http auto-config='true'>
42+
<sec:intercept-url pattern="/**" access="hasRole('ROLE_USER')" />
43+
<sec:http-basic/>
44+
</sec:http>
45+
46+
<sec:authentication-manager>
47+
<sec:authentication-provider>
48+
<sec:user-service>
49+
<sec:user name="${direct.config.security.user.name}" password="${direct.config.security.user.password}" authorities="ROLE_USER" />
50+
</sec:user-service>
51+
</sec:authentication-provider>
52+
</sec:authentication-manager>
53+
54+
<!-- Camel Context for cache update and trust bundle processors -->
55+
<camelContext id="web-camel-context" xmlns="http://camel.apache.org/schema/spring">
56+
<template id="bundleRefresh" defaultEndpoint="seda:refresh-start"/>
57+
58+
<route id="refreshBundle">
59+
<from uri="seda:refresh-start"/>
60+
<bean ref="bundleRefreshProcessor"/>
61+
</route>
62+
63+
<route id="cache-refresher">
64+
<from uri="timer://cache-refresh?period=1h"/>
65+
<bean ref="bundleCacheUpdateProcessor"/>
66+
</route>
67+
68+
</camelContext>
69+
70+
</beans>

src/main/webapp/WEB-INF/web.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
5+
6+
7+
<servlet>
8+
<servlet-name>configservice</servlet-name>
9+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
10+
<load-on-startup>1</load-on-startup>
11+
</servlet>
12+
<servlet-mapping>
13+
<servlet-name>configservice</servlet-name>
14+
<url-pattern>/*</url-pattern>
15+
</servlet-mapping>
16+
17+
<!-- filter declaration for Spring Security -->
18+
<filter>
19+
<filter-name>springSecurityFilterChain</filter-name>
20+
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
21+
</filter>
22+
23+
<filter-mapping>
24+
<filter-name>springSecurityFilterChain</filter-name>
25+
<url-pattern>/*</url-pattern>
26+
</filter-mapping>
27+
</web-app>

0 commit comments

Comments
 (0)