Skip to content

Commit d7219fc

Browse files
committed
Added: PoC code for builtin users auth
1 parent 9fb1eb2 commit d7219fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6029
-2
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# don't pass paths used by Shibboleth to Glassfish
2+
ProxyPassMatch ^/Shibboleth.sso !
3+
ProxyPassMatch ^/shibboleth-ds !
4+
ProxyPassMatch ^/error-documents !
5+
# pass everything else to Glassfish
6+
ProxyPass / ajp://localhost:8009/
7+
8+
#<Location /shib.xhtml>
9+
# AuthType shibboleth
10+
# ShibRequestSetting requireSession 1
11+
# require valid-user
12+
#</Location>
13+
14+
ErrorDocument 503 /error-documents/503.html
15+
Alias /error-documents /var/www/dataverse/error-documents
16+
17+
# From https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
18+
19+
RewriteEngine On
20+
# This will enable the Rewrite capabilities
21+
22+
RewriteCond %{HTTPS} !=on
23+
# This checks to make sure the connection is not already HTTPS
24+
25+
# expose 8181 from glassfish (https) as workaround for https://github.com/IQSS/dataverse/issues/2013
26+
#RewriteRule ^/api/access/datafile/?(.*) https://%{SERVER_NAME}:8181/api/access/datafile/$1 [R,L]
27+
# enforce https: https://github.com/IQSS/dataverse/issues/56
28+
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
29+
#
30+
# This rule will redirect users from their original location, to the same location but using HTTPS.
31+
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
32+
# The leading slash is made optional so that this will work either in httpd.conf
33+
# or .htaccess context
34+
35+
# [#GLASSFISH-20694] Glassfish 4.0 and jk Unable to populate SSL attributes - Java.net JIRA - https://java.net/jira/browse/GLASSFISH-20694
36+
#SSLOptions +StdEnvVars +ExportCertData

dev-env/conf/jhove/jhove.conf

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<jhoveConfig version="1.1"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig"
5+
xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig
6+
file:///usr/local/payara6/glassfish/domains/domain1/config/jhoveConfig.xsd">
7+
<jhoveHome>/usr/local/src/jhove</jhoveHome>
8+
<defaultEncoding>utf-8</defaultEncoding>
9+
<tempDirectory>/tmp</tempDirectory>
10+
<bufferSize>131072</bufferSize>
11+
<mixVersion>1.0</mixVersion>
12+
<sigBytes>1024</sigBytes>
13+
<module>
14+
<class>edu.harvard.hul.ois.jhove.module.AiffModule</class>
15+
</module>
16+
<module>
17+
<class>edu.harvard.hul.ois.jhove.module.WaveModule</class>
18+
</module>
19+
<module>
20+
<class>edu.harvard.hul.ois.jhove.module.PdfModule</class>
21+
</module>
22+
<module>
23+
<class>edu.harvard.hul.ois.jhove.module.Jpeg2000Module</class>
24+
</module>
25+
<module>
26+
<class>edu.harvard.hul.ois.jhove.module.JpegModule</class>
27+
</module>
28+
<module>
29+
<class>edu.harvard.hul.ois.jhove.module.GifModule</class>
30+
</module>
31+
<module>
32+
<class>edu.harvard.hul.ois.jhove.module.TiffModule</class>
33+
</module>
34+
<module>
35+
<class>edu.harvard.hul.ois.jhove.module.HtmlModule</class>
36+
</module>
37+
<module>
38+
<class>edu.harvard.hul.ois.jhove.module.AsciiModule</class>
39+
</module>
40+
<module>
41+
<class>edu.harvard.hul.ois.jhove.module.Utf8Module</class>
42+
</module>
43+
<!-- New modules for application/gzip and application/warc: -->
44+
<module>
45+
<class>edu.harvard.hul.ois.jhove.module.GzipModule</class>
46+
</module>
47+
<module>
48+
<class>edu.harvard.hul.ois.jhove.module.WarcModule</class>
49+
</module>
50+
<!-- A new 3rd-party module for image/png from mcgauth.com: -->
51+
<module>
52+
<class>com.mcgath.jhove.module.PngModule</class>
53+
</module>
54+
</jhoveConfig>

dev-env/conf/jhove/jhoveConfig.xsd

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- JHOVE - JSTOR/Harvard Object Validation Environment -->
3+
<!-- Copyright 2004-2007 by JSTOR and the President and Fellows of Harvard College -->
4+
<!-- JHOVE configuration file schema, Rel. 1.4 (2007-04-10) -->
5+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6+
targetNamespace="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig"
7+
elementFormDefault="qualified" attributeFormDefault="unqualified">
8+
<xs:element name="jhoveConfig">
9+
<xs:annotation>
10+
<xs:documentation>The JHOVE configuration file consists of the JHOVE home directory, optional temporary directory and buffer size, an unbounded, ordered set of modules, followed by an optional unbounded set of output handlers. It has a single required attribute, version, which specifies the schema version to which a configuration file conforms.</xs:documentation>
11+
</xs:annotation>
12+
<xs:complexType>
13+
<xs:sequence>
14+
<xs:element name="jhoveHome" type="xs:string">
15+
<xs:annotation>
16+
<xs:documentation>JHOVE home directory.</xs:documentation>
17+
</xs:annotation>
18+
</xs:element>
19+
<xs:element name="defaultEncoding" type="xs:string" minOccurs="0">
20+
<xs:annotation>
21+
<xs:documentation>Default character encoding used by the output handlers.</xs:documentation>
22+
</xs:annotation>
23+
</xs:element>
24+
<xs:element name="tempDirectory" type="xs:string" minOccurs="0">
25+
<xs:annotation>
26+
<xs:documentation>Optional directory in which temporary files are created. Default value is the current working directory.</xs:documentation>
27+
</xs:annotation>
28+
</xs:element>
29+
<xs:element name="bufferSize" type="xs:nonNegativeInteger" minOccurs="0">
30+
<xs:annotation>
31+
<xs:documentation>Optional buffer size used for buffered I/O. Defeault value is 131072.</xs:documentation>
32+
</xs:annotation>
33+
</xs:element>
34+
<xs:element name="mixVersion" type="xs:string" minOccurs="0">
35+
<xs:annotation>
36+
<xs:documentation>The version of the MIX schema to be used in metadata output. Default value is "0.2".</xs:documentation>
37+
</xs:annotation>
38+
</xs:element>
39+
<xs:element name="sigBytes" type="xs:nonNegativeInteger" minOccurs="0">
40+
<xs:annotation>
41+
<xs:documentation>The number of initial bytes to search when matching internal signatures.</xs:documentation>
42+
</xs:annotation>
43+
</xs:element>
44+
<xs:element name="module" maxOccurs="unbounded">
45+
<xs:annotation>
46+
<xs:documentation>A module consists of a fully package qualified class name, followed by an optional initialization parameter.</xs:documentation>
47+
</xs:annotation>
48+
<xs:complexType>
49+
<xs:sequence>
50+
<xs:element name="class" type="xs:string">
51+
<xs:annotation>
52+
<xs:documentation>A class consists of the fully package qualified class name for the module. Note that the class must be found on the Java CLASSPATH at the time that JHOVE is invoked.</xs:documentation>
53+
</xs:annotation>
54+
</xs:element>
55+
<xs:element name="init" type="xs:string" minOccurs="0">
56+
<xs:annotation>
57+
<xs:documentation>A module initialization value is passed to the module once at the time it is first instantiated.</xs:documentation>
58+
</xs:annotation>
59+
</xs:element>
60+
<xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded">
61+
<xs:annotation>
62+
<xs:documentation>A module parameter value that is passed to the module immediately prior to each invocation of the parse() method.</xs:documentation>
63+
</xs:annotation>
64+
</xs:element>
65+
</xs:sequence>
66+
</xs:complexType>
67+
</xs:element>
68+
<xs:element name="outputHandler" minOccurs="0" maxOccurs="unbounded">
69+
<xs:annotation>
70+
<xs:documentation>An output handler consists of a fully package qualified class name.</xs:documentation>
71+
</xs:annotation>
72+
<xs:complexType>
73+
<xs:sequence>
74+
<xs:element name="class" type="xs:string">
75+
<xs:annotation>
76+
<xs:documentation>A class consists of the fully package qualified class name for the output handler. Note that the class must be found on the Java CLASSPATH at the time that JHOVE is invoked.</xs:documentation>
77+
</xs:annotation>
78+
</xs:element>
79+
<xs:element name="init" type="xs:string" minOccurs="0">
80+
<xs:annotation>
81+
<xs:documentation>A handler initialization value that is passed to the class at the time it is first instantiated.</xs:documentation>
82+
</xs:annotation>
83+
</xs:element>
84+
<xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded">
85+
<xs:annotation>
86+
<xs:documentation>A handler parameter value that is passed to the module immediately prior to each invocation of the showHeader() method.</xs:documentation>
87+
</xs:annotation>
88+
</xs:element>
89+
</xs:sequence>
90+
</xs:complexType>
91+
</xs:element>
92+
<xs:element name="logLevel" minOccurs="0">
93+
<xs:annotation>
94+
<xs:documentation>Logging level.</xs:documentation>
95+
</xs:annotation>
96+
<xs:simpleType>
97+
<xs:restriction base="xs:string">
98+
<xs:enumeration value="OFF"/>
99+
<xs:enumeration value="CONFIG"/>
100+
<xs:enumeration value="INFO"/>
101+
<xs:enumeration value="WARNING"/>
102+
<xs:enumeration value="SEVERE"/>
103+
<xs:enumeration value="FINE"/>
104+
<xs:enumeration value="FINER"/>
105+
<xs:enumeration value="FINEST"/>
106+
<xs:enumeration value="ALL"/>
107+
</xs:restriction>
108+
</xs:simpleType>
109+
</xs:element>
110+
</xs:sequence>
111+
<xs:attribute name="version" type="xs:string" use="required">
112+
<xs:annotation>
113+
<xs:documentation>The version attribute specifies the schema version to which a configuration file conforms.</xs:documentation>
114+
</xs:annotation>
115+
</xs:attribute>
116+
</xs:complexType>
117+
</xs:element>
118+
</xs:schema>

dev-env/conf/keycloak/builtin-users-spi/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-env/conf/keycloak/builtin-users-spi/.idea/compiler.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-env/conf/keycloak/builtin-users-spi/.idea/jarRepositories.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-env/conf/keycloak/builtin-users-spi/.idea/misc.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-env/conf/keycloak/builtin-users-spi/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)