This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JWT configuration to claw vagrant (#17)
* Add JWT configuration to claw vagrant Load the necessary configuration and generate the necessary keys to have JWT authentication work when a new claw vagrant box is brought up. * Add Syn config to Vagrant.
- Loading branch information
1 parent
e6faab3
commit 0d633be
Showing
7 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<sites version='1'> | ||
<site algorithm='RS256' encoding='PEM' path='/home/ubuntu/auth/public.key' default='true'/> | ||
</sites> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | ||
version="3.0"> | ||
|
||
<display-name>Fedora 4</display-name> | ||
|
||
<context-param> | ||
<param-name>contextConfigLocation</param-name> | ||
<param-value>WEB-INF/classes/spring/master.xml</param-value> | ||
</context-param> | ||
|
||
<listener> | ||
<listener-class>org.fcrepo.http.commons.FedoraContextLoaderListener</listener-class> | ||
</listener> | ||
|
||
<servlet> | ||
<servlet-name>jersey-servlet</servlet-name> | ||
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> | ||
|
||
<init-param> | ||
<param-name>javax.ws.rs.Application</param-name> | ||
<param-value>org.fcrepo.http.commons.FedoraApplication</param-value> | ||
</init-param> | ||
|
||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>jersey-servlet</servlet-name> | ||
<url-pattern>/rest/*</url-pattern> | ||
|
||
</servlet-mapping> | ||
|
||
<filter> | ||
<filter-name>ETagFilter</filter-name> | ||
<filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class> | ||
</filter> | ||
|
||
<filter-mapping> | ||
<filter-name>ETagFilter</filter-name> | ||
<url-pattern>/static/*</url-pattern> | ||
</filter-mapping> | ||
|
||
<security-constraint> | ||
<web-resource-collection> | ||
<web-resource-name>Fedora4</web-resource-name> | ||
<url-pattern>/*</url-pattern> | ||
</web-resource-collection> | ||
<auth-constraint> | ||
<role-name>*</role-name> | ||
</auth-constraint> | ||
<user-data-constraint> | ||
<transport-guarantee>NONE</transport-guarantee> | ||
</user-data-constraint> | ||
</security-constraint> | ||
<security-role> | ||
<role-name>islandora</role-name> | ||
</security-role> | ||
<login-config> | ||
<auth-method>BASIC</auth-method> | ||
<realm-name>fcrepo</realm-name> | ||
</login-config> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
algorithm: RS256 | ||
key_id: islandora_rsa_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
uuid: 7f805322-14df-4eac-bfa1-d2f800fccbe3 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- jwt | ||
id: islandora_rsa_key | ||
label: 'Islandora RSA Key' | ||
description: '' | ||
key_type: jwt_rs | ||
key_type_settings: | ||
algorithm: RS256 | ||
key_provider: file | ||
key_provider_settings: | ||
file_location: /home/ubuntu/auth/private.key | ||
key_input: none | ||
key_input_settings: { } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# Syn | ||
echo "Building Syn" | ||
|
||
HOME_DIR=$1 | ||
|
||
if [ -f "$HOME_DIR/islandora/configs/variables" ]; then | ||
. "$HOME_DIR"/islandora/configs/variables | ||
fi | ||
|
||
cd "$HOME_DIR" | ||
git clone https://github.com/jonathangreen/Syn.git | ||
cd Syn | ||
chown -R ubuntu:ubuntu "$HOME_DIR/Syn" | ||
sudo -u ubuntu ./gradlew build | ||
|
||
cp build/libs/islandora-syn-*-all.jar /var/lib/tomcat8/lib/ | ||
sed -i 's|</Context>| <Valve className="ca.islandora.syn.valve.SynValve"/>\n</Context>|g' /var/lib/tomcat8/conf/context.xml | ||
cp "$HOME_DIR/islandora/configs/Syn/web.xml" /var/lib/tomcat8/webapps/fcrepo/WEB-INF/web.xml | ||
cp "$HOME_DIR/islandora/configs/Syn/syn-settings.xml" /var/lib/tomcat8/conf/syn-settings.xml | ||
|
||
service tomcat8 restart |