Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
Comment thread
bedrin marked this conversation as resolved.
passphrase: ${{ secrets.PASSPHRASE }}
- name: GPG user IDs
run: |
Expand All @@ -33,9 +34,10 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Publish to GitHub Packages
run: mvn -P github,release -B deploy
env:
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Build with Maven
run: mvn -B clean package --file pom.xml -U
# run: mvn -B clean package jacoco:report --file pom.xml -U
Expand All @@ -28,15 +29,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 17, 18, 19, 20, 21 ]
os: [ ubuntu-22.04, windows-2022, macos-12 ]
# test against latest update of LTS Java versions >= 17:
java: [ 17, 21 ]
os: [ ubuntu-24.04, windows-latest, macos-latest ]
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build with Maven
run: mvn -B clean package --file pom.xml -U
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.io.File;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.URL;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Expand All @@ -62,7 +61,7 @@ public void testSpnegoWithForward() throws Exception {
SimpleKdcServer kdc = getKdc();
Assertions.assertNotNull(kdc);
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase(); // doesn't work without toLowerCse
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down Expand Up @@ -100,7 +99,7 @@ public void testSpnegoWithSuccessHandler() throws Exception {
SimpleKdcServer kdc = getKdc();
Assertions.assertNotNull(kdc);
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase(); // doesn't work without toLowerCse
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import javax.security.auth.kerberos.KerberosPrincipal;
import javax.security.auth.kerberos.KeyTab;
import java.io.File;
import java.net.InetAddress;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -67,7 +66,7 @@ public void testSpnegoClientNotInitiator() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "acceptOnly.keytab");
Expand Down Expand Up @@ -108,7 +107,7 @@ public void testSpnego() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down Expand Up @@ -157,7 +156,7 @@ public void testServerRequests() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down Expand Up @@ -194,7 +193,7 @@ public void testSpnegoWithPasswordOnServer() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
String serverPassword = "TestPassword";
Expand Down Expand Up @@ -231,7 +230,7 @@ public void testSpnegoWithForward() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down Expand Up @@ -274,7 +273,7 @@ public void testSpnegoWithSuccessHandler() throws Exception {

SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
String host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.URL;
import java.security.PrivilegedActionException;

Expand All @@ -42,7 +41,7 @@ public class BaseTomcatTest extends KerberosSecurityTestcase {
public void startTomcat() throws Exception {
SimpleKdcServer kdc = getKdc();
File workDir = getWorkDir();
host = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase(); // doesn't work without toLowerCse
host = "localhost";

String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");
Expand Down
Loading