Skip to content

Commit

Permalink
Remove trailing spaces in all files where whitespace is ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
stea-uw committed Apr 16, 2024
1 parent e0960bf commit bfebde9
Show file tree
Hide file tree
Showing 58 changed files with 88 additions and 151 deletions.
2 changes: 0 additions & 2 deletions README.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ and configure our Maven build environments to read from that repository. However
ever needed a local package included in our builds and we do not have a local repository solution in place. The use
of the local cache for this is a reasonable approach for now given that this application is only built locally by
a few users who have access to the build server.


9 changes: 4 additions & 5 deletions ansible/README
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ On the target:
/logs/cs/
/www/ (?)
/data/local/cs

3) tomcat config
a) configure tomcat to run as user=iamcert
b) assure that /etc/daemons/tomcat includes: -Dcs.properties.path=file:/data/local/cs
Expand All @@ -42,17 +42,16 @@ On the target:
Install
--------


1) Make the package. In base product directory: ( with a java 1.8 compiler )

$ mvn clean package

2) To install the service:
2) To install the service:
( host_type = eval | prod )

$ ./install.sh app <host_type>

3) To install the utilities:

$ ./install.sh util <host_type>

1 change: 0 additions & 1 deletion ansible/apache/http.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/cs*
RewriteRule ^(.*)$ https://{{ cluster_name }}/$1 [R,L]

3 changes: 0 additions & 3 deletions ansible/apache/https.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,3 @@ Options -MultiViews
order allow,deny
allow from all
</Location>



2 changes: 1 addition & 1 deletion ansible/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apps="cs"
ansible_ssh_group=iam-dev


[eval]
[eval]
iamtools-test11.s.uw.edu idle_wait_sec=10 wd_cron_offset=01

[eval:vars]
Expand Down
3 changes: 0 additions & 3 deletions ansible/install-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,3 @@

- name: pw notify crontab
cron: name="pwnotify" disabled={{cluster_type != 'prod'}} hour="01" minute="01" day="01" month="1,3,5,7,9,11" job="{{ cs_root }}/util/pw-notify.sh >> /dev/null 2>&1"



3 changes: 1 addition & 2 deletions cs.properties.eval
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EVAL certservice properties
# EVAL certservice properties
#
# cs will look for this file first in the cs directory
# if that is undefined or not found this installed copy will be used
Expand Down Expand Up @@ -44,4 +44,3 @@ cs.browserRoot=/cs
cs.certRoot=/cs/ws

cs.gws.urltemplate=https://eval.groups.uw.edu/group_sws/v3/group/u_weblogin_dns-owners_%s/effective_member

2 changes: 1 addition & 1 deletion cs.properties.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EVAL certservice properties
# EVAL certservice properties
#
# cs will look for this file first in the cs directory
# if that is undefined or not found this installed copy will be used
Expand Down
2 changes: 1 addition & 1 deletion cs.properties.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EVAL certservice properties
# EVAL certservice properties
#
# cs will look for this file first in the cs directory
# if that is undefined or not found this installed copy will be used
Expand Down
27 changes: 13 additions & 14 deletions src/main/java/edu/washington/iam/tools/WebClient.java.dist
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class WebClient {

private final Logger log = LoggerFactory.getLogger(getClass());
private final ReentrantReadWriteLock locker = new ReentrantReadWriteLock();

// connection params
private String certFile = null;
private String keyFile = null;
Expand All @@ -85,16 +85,16 @@ public class WebClient {
private boolean initialized = false;
private DocumentBuilder documentBuilder;

//
private String soapHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
"xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" " +
//
private String soapHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
"xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" " +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
"<soap:Body>";
private String soapTrailer = "</soap:Body></soap:Envelope>";

// "SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
// "SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
// "xmlns:tns=\"http://ssl.ws.epki.comodo.com/\" " +


Expand All @@ -104,7 +104,7 @@ public class WebClient {
connectionManager.closeIdleConnections(30, TimeUnit.SECONDS);
}


public Element doSoapRequest(String url, String action, String body)
throws SocketTimeoutException, WebClientException {

Expand All @@ -116,7 +116,7 @@ public class WebClient {
HttpConnectionParams.setConnectionTimeout(httpParams, queryTimeLimit);
HttpConnectionParams.setSoTimeout(httpParams, queryTimeLimit);
DefaultHttpClient httpclient = new DefaultHttpClient((ClientConnectionManager)connectionManager, httpParams);
// httpclient.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
// httpclient.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);

// log.debug(" url: " + url);
// log.debug("content: [" + soapHeader + body + soapTrailer + "]");
Expand All @@ -126,14 +126,14 @@ public class WebClient {

StringEntity strent= new StringEntity(soapHeader + body + soapTrailer);
strent.setContentType("text/xml; charset=utf-8");
httppost.setEntity(strent);
httppost.setEntity(strent);

HttpResponse response = httpclient.execute(httppost);

if (response.getStatusLine().getStatusCode()>=400) {
log.error("soap error: " + response.getStatusLine().getStatusCode() + " = " + response.getStatusLine().getReasonPhrase());
return null;
}
}
HttpEntity entity = response.getEntity();

// null is error - should get something
Expand All @@ -144,7 +144,7 @@ public class WebClient {
// log.debug("got " + entity.getContentLength() + " bytes");
// parse response text
Document doc = documentBuilder.parse(entity.getContent());

Element ele = XMLHelper.getElementByName(doc.getDocumentElement(), "Body");
if (ele == null) {
log.error("no body element");
Expand Down Expand Up @@ -293,7 +293,7 @@ public class WebClient {
String feature = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
domFactory.setFeature(feature, false);
documentBuilder = domFactory.newDocumentBuilder();

} catch (ParserConfigurationException e) {
log.error("javax.xml.parsers.ParserConfigurationException: " + e);
}
Expand Down Expand Up @@ -335,4 +335,3 @@ public class WebClient {
}

}

5 changes: 2 additions & 3 deletions src/main/java/edu/washington/iam/ws/cabroker/exception/mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class=$1
exit 1
}

case $class in
*Exception )
case $class in
*Exception )
;;
*) class="${class}Exception";
;;
Expand Down Expand Up @@ -51,4 +51,3 @@ public class $class extends Exception {
}
}
END

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- certificate broker
-- certificate broker
---

create table certificate (
Expand Down Expand Up @@ -51,4 +51,3 @@ create table db_ts (
cert_update_time bigint
);
ALTER TABLE public.db_ts OWNER TO ca;

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

select svreq.reqno,request_date,dn,expire_date from svreq,svcrt where svreq.reqno=svcrt.reqno and svreq.status=2 and svcrt.status=0 limit 20;

2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cs.properties
cs-secrets.properties
cs-secrets.properties
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ managed by UW-IT. You are receiving this message because you requested this cert
certificate's common name or one of its alternative names. Requests for changes to the contact list for your DNS name(s) should be emailed to
[email protected]. "/>
</bean>




Expand Down
11 changes: 4 additions & 7 deletions src/main/webapp/WEB-INF/velocity/browser/cert.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*#

##
## cert detail
## cert detail
##


Expand Down Expand Up @@ -111,7 +111,7 @@ $!{cert.pemCert}
</script>
</button>
<button id="pkcsButton" dojoType="dijit.form.Button" type="button">
Get PKCS7
Get PKCS7
<script type="dojo/method" event="onClick" args="evt">
window.location = "$root$vers/pkcs7/${cert.cn}.pkcs7?id=${cert.id}"
</script>
Expand Down Expand Up @@ -153,10 +153,10 @@ $!{cert.pemCert}
#set ( $displayEv = $dateFormatter.format($ev.eventTime) )
<tr><td>$displayEv</td><td>
#if ($ev.event==1)
Requested by
Requested by
#end
#if ($ev.event==2)
Renewed by
Renewed by
#end
#if ($ev.event==3)
Revoked by
Expand All @@ -165,6 +165,3 @@ $!{cert.pemCert}
#end
</table>
#end



3 changes: 0 additions & 3 deletions src/main/webapp/WEB-INF/velocity/browser/certgone.vm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@
<div>
The certificate authority reports that it no longer maintains certificate ${id}.
</div>



7 changes: 3 additions & 4 deletions src/main/webapp/WEB-INF/velocity/browser/certs.vm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getCert(id) {
#pageStart

<p class="title">
#if ($seluw && $selic)
#if ($seluw && $selic)
#elseif ($seluw) UWCA
#elseif ($selic) InCommon
#end
Expand All @@ -60,7 +60,7 @@ Certificates matching (*<tt>$selname</tt>*)
<tr><th>no.</th><th>CA</th><th>CA&nbsp;id</th><th>CN (<i>altNames</i>)</th><th>status</th><th>expires</th></tr>

#foreach ( $cert in $certs )

#set ($cas='uw')
#if ($cert.ca==2) #set ($cas='ic') #end

Expand All @@ -70,7 +70,7 @@ Certificates matching (*<tt>$selname</tt>*)
#if ($cert.status==3) #set ($crtcl='reqip') #end
#if ($cert.status==5) #set ($crtcl='reqex') #end

#if ($cert.expires)
#if ($cert.expires)
#set ( $displayExp = $dateFormatter.format($cert.expires) )
#else
#set ($displayExp='')
Expand Down Expand Up @@ -114,4 +114,3 @@ Certificates matching (*<tt>$selname</tt>*)
</div>
<div class="status">$!{status}
</div>

1 change: 0 additions & 1 deletion src/main/webapp/WEB-INF/velocity/browser/err-owner.vm
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ If you think...
</div>
<div class="status">${status}
</div>

5 changes: 2 additions & 3 deletions src/main/webapp/WEB-INF/velocity/browser/new_ic.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*#

##
## new incommon request
## new incommon request
##

## InCommon cert request
Expand All @@ -26,7 +26,7 @@

<tr><th colspan="3">Request InCommon certificate</th></tr>
<tr><td title="The PEM text of yout certificate request">CSR (PEM)</td>
<td><input class="csrbox" label="iclabel" title="ictitle" id="ic_csr" rows="6" cols="66" dojoType="dijit.form.SimpleTextarea"
<td><input class="csrbox" label="iclabel" title="ictitle" id="ic_csr" rows="6" cols="66" dojoType="dijit.form.SimpleTextarea"
style="border: 1px inset #202020;">
</input></td>
<td></tr>
Expand Down Expand Up @@ -116,4 +116,3 @@
<div id="icResult"></div>

</div>

3 changes: 1 addition & 2 deletions src/main/webapp/WEB-INF/velocity/browser/new_uw.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*#

##
## new uwca request
## new uwca request
##

## UW cert request
Expand Down Expand Up @@ -104,4 +104,3 @@
<div id="uwResult"></div>

</div>

1 change: 0 additions & 1 deletion src/main/webapp/WEB-INF/velocity/browser/nologin.vm
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ and ask them to send the attribute "<tt>eduPersonPrincipalName</tt>" (ePPN) to u
</div>
<div class="status">$!{status}
</div>

3 changes: 1 addition & 2 deletions src/main/webapp/WEB-INF/velocity/browser/verify.vm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<script type="dojo/on" data-dojo-event="keyup" args="evt">
checkDnsLookup();
</script>

</input></td>
</tr>
<tr><td>Status</td>
Expand All @@ -44,4 +44,3 @@
</script>
</button>
</div>

2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/velocity/crumbs.vm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function crumbSearch() {
}

</script>


<form action="javascript:crumbSearch()">
<table class="crumbtop" cellpadding="0" cellspacing="0" width="100%" id="crumbbox" onKeyPress="hotkey(event)">
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/WEB-INF/velocity/definitions.vm
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
#set ( $nowrap = 'nowrap="nowrap"' )
#set ( $waitCursor = 'document.body.style.cursor="wait";' )
#set ( $defaultCursor = 'document.body.style.cursor="default";' )


3 changes: 1 addition & 2 deletions src/main/webapp/WEB-INF/velocity/empty.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*#

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

## groups webservice (really simple error page)

Expand All @@ -40,4 +40,3 @@

</body>
</html>

1 change: 0 additions & 1 deletion src/main/webapp/WEB-INF/velocity/innerhtml/certs.vm
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@
</cert>
#end
</certs>

1 change: 0 additions & 1 deletion src/main/webapp/WEB-INF/velocity/innerhtml/dns.vm
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
<p>$sub NOT an owner of the domain.
#end
</div>

Loading

0 comments on commit bfebde9

Please sign in to comment.