Skip to content

Commit

Permalink
Preparing for RC4. New pooling code, moved a class. Added some CLI st…
Browse files Browse the repository at this point in the history
…uff (which has no impact on the rest of the code). Updating documentation.
  • Loading branch information
jjg-123 committed Jul 3, 2018
1 parent 3a2113d commit c2d98d2
Show file tree
Hide file tree
Showing 65 changed files with 1,058 additions and 456 deletions.
12 changes: 9 additions & 3 deletions oa4mp-client-loader-oauth1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,19 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<version>8.0.11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
<version>42.2.2.jre7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions oa4mp-client-oauth1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<version>8.0.11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
<version>42.2.2.jre7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.4.0</version>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion oa4mp-client-oauth2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.4.0</version>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
12 changes: 9 additions & 3 deletions oa4mp-client-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
<version>42.2.2.jre7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<version>8.0.11</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static ConnectionPool setupPGConnectionPool(String databaseName, String s
"localhost",
5432,
"org.postgresql.Driver",
false);
false, "");
return new ConnectionPool(x);
}

Expand All @@ -124,7 +124,7 @@ public static ConnectionPool setupMySQLConnection(String databaseName, String sc
"localhost",
3306,
"com.mysql.jdbc.Driver",
false);
false,"");
return new ConnectionPool(x);
}

Expand Down
4 changes: 2 additions & 2 deletions oa4mp-co-oidc/buildNumber.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
#Mon Jun 18 11:49:30 CDT 2018
buildNumber\\d*=1427
#Tue Jul 03 12:22:59 CDT 2018
buildNumber\\d*=1558
123 changes: 0 additions & 123 deletions oa4mp-co-oidc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,130 +19,7 @@
<name>OAuth 2/Open ID Connect support for CO-Manage</name>
<packaging>jar</packaging>
<dependencies>
<!-- <dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-server-oauth2</artifactId>
<version>3.6-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>-->
<!-- <dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-server-oauth2</artifactId>
<version>3.6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-server-api</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0-m01</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-server-loader-oauth2</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security</groupId>
<artifactId>ncsa-security-core</artifactId>
<version>3.6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security.delegation</groupId>
<artifactId>ncsa-security-delegation-common</artifactId>
<version>3.6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>oa4mp-server-test</artifactId>
<version>3.6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security.delegation</groupId>
<artifactId>ncsa-security-oauth-2.0</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security</groupId>
<artifactId>ncsa-security-util</artifactId>
<version>3.6-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security</groupId>
<artifactId>ncsa-security-servlet</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.myproxy</groupId>
<artifactId>myproxy-logon</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>edu.uiuc.ncsa.security.delegation</groupId>
<artifactId>ncsa-security-oauth-1.0a</artifactId>
<version>3.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>-->
</dependencies>

<build>
Expand Down
4 changes: 2 additions & 2 deletions oa4mp-oidc-twofactor/buildNumber.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#maven.buildNumber.plugin properties file
#Mon Jun 18 11:49:29 CDT 2018
buildNumber\\d*=941
#Tue Jul 03 12:22:57 CDT 2018
buildNumber\\d*=1035
4 changes: 2 additions & 2 deletions oa4mp-server-admin-oauth2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.4.0</version>
<version>2.2.5</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<version>8.0.11</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,59 @@ public OA2AdminClientCommands(MyLoggingFacade logger, String defaultIndent, Stor
}

@Override
public String getName() {
return " admins";
}
public String getName() {
return " admins";
}


@Override
protected void longFormat(Identifiable identifiable) {
protected void longFormat(Identifiable identifiable) {
super.longFormat(identifiable);
AdminClient client = (AdminClient) identifiable;
sayi("issuer=" + client.getIssuer());
sayi("vo=" + client.getVirtualOrganization());
}
AdminClient client = (AdminClient) identifiable;
sayi("issuer=" + client.getIssuer());
sayi("vo=" + client.getVirtualOrganization());
}

@Override
public void extraUpdates(Identifiable identifiable) {
public void extraUpdates(Identifiable identifiable) {
AdminClient client = (AdminClient) identifiable;
String secret = client.getSecret();
String input;
boolean askForSecret = true;
String secret = client.getSecret();
String input;
boolean askForSecret = true;


while (askForSecret) {
input = getInput("enter a new secret or return to skip.", secret);
if (isEmpty(input)) {
sayi("Nothing entered. Client secret entry skipped.");
break;
}
if (input.equals(secret)) {
sayi(" Client secret entry skipped.");
break;
}
// input is not empty.
secret = DigestUtils.sha1Hex(input);
client.setSecret(secret);
askForSecret = false;
}
while (askForSecret) {
input = getInput("enter a new secret or return to skip.", secret);
if (isEmpty(input)) {
sayi("Nothing entered. Client secret entry skipped.");
break;
}
if (input.equals(secret)) {
sayi(" Client secret entry skipped.");
break;
}
// input is not empty.
secret = DigestUtils.sha1Hex(input);
client.setSecret(secret);
askForSecret = false;
}
String issuer = getInput("Give the issuer", client.getIssuer());
if(!isEmpty(issuer)){
if (!isEmpty(issuer)) {
client.setIssuer(issuer);
}
String vo = getInput("Give the VO", client.getVirtualOrganization());
if(!isEmpty(vo)){
if (!isEmpty(vo)) {
client.setVirtualOrganization(vo);
}

}
}


@Override
protected void showDeserializeHelp() {
super.showDeserializeHelp();
say("NOTE that for clients, the assumption is that you are supplying the hashed secret, not the actual secret.");
say("If you need to create a hash of a secret, invoke the create_hash method on the secret");
}

}
Loading

0 comments on commit c2d98d2

Please sign in to comment.