diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e4770f409..da0d1187f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,19 @@ 1.9.0 (in-progress) =================== -* Java 8 only -* Dropped Tomcat 6 and Spring 3 modules -* [#479](https://github.com/Waffle/waffle/pull/479): Upgrade to Java 8 - using caffeine #304[@ben-manes](https://github.com/ben-manes). -* [#482](https://github.com/Waffle/waffle/pull/482): Remove Spring Security 3 #478[@hazendaz](https://github.com/hazendaz). -* [#483](https://github.com/Waffle/waffle/pull/483): Remove Tomcat 6 #323[@hazendaz](https://github.com/hazendaz). -* [#486](https://github.com/Waffle/waffle/pull/487): Upgrade to Servlet 3.0 in demos #471[@hazendaz](https://github.com/hazendaz). +* Breaking changes + * Requires Java 8+ + * Dropped Tomcat 6 and Spring 3 modules + * Increased Examples to servlet 3.0 + * Replaced guava with caffeine for caching + * All remainder guava usage uses standard java routines +* Changes + * [#479](https://github.com/Waffle/waffle/pull/479): Upgrade to Java 8 - using caffeine #304[@ben-manes](https://github.com/ben-manes). + * [#482](https://github.com/Waffle/waffle/pull/482): Remove Spring Security 3 #478[@hazendaz](https://github.com/hazendaz). + * [#483](https://github.com/Waffle/waffle/pull/483): Remove Tomcat 6 #323[@hazendaz](https://github.com/hazendaz). + * [#486](https://github.com/Waffle/waffle/pull/486): Upgrade to Servlet 3.0 in demos #471[@hazendaz](https://github.com/hazendaz). + * [#487](https://github.com/Waffle/waffle/pull/487): Updated guava joiner to string.join #304[@hazendaz](https://github.com/hazendaz). + * [#488](https://github.com/Waffle/waffle/pull/488): Use java.util.Base64 with java 8 #304[@hazendaz](https://github.com/hazendaz). + * [#490](https://github.com/Waffle/waffle/pull/490): Rewrite guava Files.write to java 7 FilesWrite #304[@hazendaz](https://github.com/hazendaz). 1.8.2 (12/31/2016) ================ diff --git a/Docs/GettingStartedWithWaffleAPI.md b/Docs/GettingStartedWithWaffleAPI.md index 9204ad8f1c..ecf7472e5e 100644 --- a/Docs/GettingStartedWithWaffleAPI.md +++ b/Docs/GettingStartedWithWaffleAPI.md @@ -35,6 +35,8 @@ Getting Started in Java Add `waffle-jna-1.8.2.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `guava-20.0.jar`, and `slf4j-api-1.7.22.jar` to your `CLASSPATH` or, if you use Maven, add the following to your `pom.xml`. +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar` and `slf4j-1.7.22.jar`. + ``` xml 1.8.2 diff --git a/Docs/ServletSingleSignOnSecurityFilter.md b/Docs/ServletSingleSignOnSecurityFilter.md index 686bb23c59..5147bb9c15 100644 --- a/Docs/ServletSingleSignOnSecurityFilter.md +++ b/Docs/ServletSingleSignOnSecurityFilter.md @@ -10,7 +10,9 @@ Configuring Web Servers The following steps are required to configure a web server with the Waffle Servlet Security Filter. These instructions work for Tomcat, Jetty, WebSphere and possibly others. -Package Waffle JARs, including `waffle-jna-1.8.2.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar` and `slf4j-1.7.22.jar` in the application's `lib` directory or copy them to your web server's lib. +Package Waffle JARs (1.8.2), including `waffle-jna-1.8.2.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar` and `slf4j-1.7.22.jar` in the application's `lib` directory or copy them to your web server's lib. + +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar` and `slf4j-1.7.22.jar`. Add a security filter to `WEB-INF\web.xml` of your application. diff --git a/Docs/spring/SpringSecurityAuthenticationProvider.md b/Docs/spring/SpringSecurityAuthenticationProvider.md index 4e309a58a2..0e1a36f4e4 100644 --- a/Docs/spring/SpringSecurityAuthenticationProvider.md +++ b/Docs/spring/SpringSecurityAuthenticationProvider.md @@ -28,7 +28,9 @@ We'll assume that Spring-Security is configured via `web.xml` with a filter chai ``` -Copy Waffle JARs, including `waffle-jna-1.8.1.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.21.jar` and `waffle-spring-security3-1.8.1.jar` in the application's `lib` directory along with Spring and Spring-Security JARs. Or, if you use Maven, add the following to your `pom.xml`: +Copy Waffle JARs, including `waffle-jna-1.8.1.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.21.jar` and `waffle-spring-security4-1.8.1.jar` in the application's `lib` directory along with Spring and Spring-Security JARs. Or, if you use Maven, add the following to your `pom.xml`: + +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar`, `slf4j-1.7.22.jar` and `waffle-spring-security4-1.9.0-SNAPSHOT.jar` ``` xml diff --git a/Docs/spring/SpringSecuritySingleSignOnFilter.md b/Docs/spring/SpringSecuritySingleSignOnFilter.md index c2ba55318b..dbb5204a9d 100644 --- a/Docs/spring/SpringSecuritySingleSignOnFilter.md +++ b/Docs/spring/SpringSecuritySingleSignOnFilter.md @@ -28,7 +28,9 @@ We'll assume that Spring-Security is configured via `web.xml` with a filter chai ``` -Copy Waffle JARs, including `waffle-jna-1.8.1.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.21.jar` and `waffle-spring-security3-1.8.1.jar` in the application's `lib` directory along with Spring and Spring-Security JARs. Or, if you use Maven, add the following to your `pom.xml`: +Copy Waffle JARs, including `waffle-jna-1.8.1.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.21.jar` and `waffle-spring-security4-1.8.1.jar` in the application's `lib` directory along with Spring and Spring-Security JARs. Or, if you use Maven, add the following to your `pom.xml`: + +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar`, `slf4j-1.7.22.jar` and `waffle-spring-security4-1.9.0-SNAPSHOT.jar` ``` xml diff --git a/Docs/tomcat/TomcatMixedSingleSignOnAndFormAuthenticatorValve.md b/Docs/tomcat/TomcatMixedSingleSignOnAndFormAuthenticatorValve.md index 08772ac8ba..b295c55381 100644 --- a/Docs/tomcat/TomcatMixedSingleSignOnAndFormAuthenticatorValve.md +++ b/Docs/tomcat/TomcatMixedSingleSignOnAndFormAuthenticatorValve.md @@ -10,6 +10,8 @@ The following steps are required to configure Tomcat with Waffle Mixed Authentic Place `waffle-jna-1.8.2.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.22.jar` and `waffle-tomcat[tomcat version]-1.8.2.jar` into your Tomcat's `lib` directory. It is *not* possible to place these files in `WEB-INF\lib`! +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar`, `slf4j-1.7.22.jar` and `waffle-tomcat[tomcat version]-1.9.0-SNAPSHOT.jar` + If you are using Eclipse, you can see which files tomcat is importing by going to Java Recources: `src / Libraries / Apache Tomcat vx.x`. If you've placed it in the tomcat directory and still don't see it, restart Eclipse. Add a valve and a realm to the application context. For an application, modify `META-INF\context.xml`. diff --git a/Docs/tomcat/TomcatSingleSignOnValve.md b/Docs/tomcat/TomcatSingleSignOnValve.md index 00e4239234..db8e12b477 100644 --- a/Docs/tomcat/TomcatSingleSignOnValve.md +++ b/Docs/tomcat/TomcatSingleSignOnValve.md @@ -10,6 +10,8 @@ The following steps are required to configure Tomcat with Waffle authenticator. Package Waffle JARs, including `waffle-jna-1.8.2.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, `slf4j-1.7.22.jar` and `waffle-tomcat[tomcat version]-1.8.2.jar` in the application's lib directory or copy them to Tomcat's lib. +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar`, `slf4j-1.7.22.jar` and `waffle-tomcat[tomcat version]-1.9.0-SNAPSHOT.jar` + Add a valve and a realm to the application context. For an application, modify `META-INF\context.xml`. ``` xml diff --git a/Docs/tomcat/TomcatWindowsLoginJAASAuthenticator.md b/Docs/tomcat/TomcatWindowsLoginJAASAuthenticator.md index 73a85697bd..48f5319435 100644 --- a/Docs/tomcat/TomcatWindowsLoginJAASAuthenticator.md +++ b/Docs/tomcat/TomcatWindowsLoginJAASAuthenticator.md @@ -10,6 +10,8 @@ The following steps are required to configure Tomcat with Waffle authenticator. Package Waffle JARs, including `waffle-jna-1.8.2.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, and `slf4j-1.7.22.jar` in the application's lib directory or copy them to Tomcat's lib. +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar` and `slf4j-1.7.22.jar`. + Add a JAAS realm to the application context. Modify `META-INF\context.xml`. ``` xml diff --git a/Docs/wildfly/WildFlySecurityDomain.md b/Docs/wildfly/WildFlySecurityDomain.md index ffbe93b188..66a4d0e49c 100644 --- a/Docs/wildfly/WildFlySecurityDomain.md +++ b/Docs/wildfly/WildFlySecurityDomain.md @@ -10,6 +10,8 @@ The following steps are required to configure WildFly with Waffle authenticator. Include the Waffle JARs, `waffle-jna-1.8.1.jar`, `guava-20.0.jar`, `jna-4.2.2.jar`, `jna-platform-4.2.2.jar`, and `slf4j-1.7.21.jar` in your war's `WEB-INF\lib` directory. Alternatively you may place them in the `standalone/lib/ext` folder within the wildfly installation. +- For latest snapshot instead use `waffle-jna-1.9.0-SNAPSHOT`, `caffeine-2.3.5.jar`, `jna-4.3.0.jar`, `jna-platform-4.3.0.jar` and `slf4j-1.7.22.jar`. + Create a security domain using the Waffle `WindowsLoginModule`. It is recommended you keep the principal and role formats to `fqn`. ```xml diff --git a/Source/JNA/waffle-distro/pom.xml b/Source/JNA/waffle-distro/pom.xml index a568df7688..800046eb7a 100644 --- a/Source/JNA/waffle-distro/pom.xml +++ b/Source/JNA/waffle-distro/pom.xml @@ -38,7 +38,6 @@ 2.3.5 - 21.0 4.3.0 1.1.9 1.7.22 @@ -172,11 +171,6 @@ ${logback.version} runtime - - com.google.guava - guava - ${guava.version} - com.github.ben-manes.caffeine caffeine diff --git a/Source/JNA/waffle-jna/pom.xml b/Source/JNA/waffle-jna/pom.xml index ae718e915d..06fa32dc8d 100644 --- a/Source/JNA/waffle-jna/pom.xml +++ b/Source/JNA/waffle-jna/pom.xml @@ -38,7 +38,6 @@ 2.3.5 - 21.0 4.3.0 3.1.0 1.7.22 @@ -77,11 +76,6 @@ ${slf4j.version} true - - com.google.guava - guava - ${guava.version} - com.github.ben-manes.caffeine caffeine diff --git a/Source/JNA/waffle-jna/src/main/java/waffle/util/WaffleInfo.java b/Source/JNA/waffle-jna/src/main/java/waffle/util/WaffleInfo.java index f681ab7571..810afc12c9 100644 --- a/Source/JNA/waffle-jna/src/main/java/waffle/util/WaffleInfo.java +++ b/Source/JNA/waffle-jna/src/main/java/waffle/util/WaffleInfo.java @@ -16,6 +16,8 @@ import java.io.IOException; import java.io.StringWriter; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -34,7 +36,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; -import com.google.common.io.Files; import com.sun.jna.Platform; import com.sun.jna.platform.WindowUtils; import com.sun.jna.platform.win32.LMJoin; @@ -331,7 +332,7 @@ public static void main(final String[] args) { final File f; if (show) { f = File.createTempFile("waffle-info-", ".xml"); - Files.write(xml, f, StandardCharsets.UTF_8); + Files.write(f.toPath(), xml.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND); Desktop.getDesktop().open(f); } else { WaffleInfo.LOGGER.info(xml); diff --git a/Source/JNA/waffle-spring-security4/src/main/java/waffle/spring/GrantedAuthorityFactory.java b/Source/JNA/waffle-spring-security4/src/main/java/waffle/spring/GrantedAuthorityFactory.java index 1d346bd8ec..e98125b1d1 100644 --- a/Source/JNA/waffle-spring-security4/src/main/java/waffle/spring/GrantedAuthorityFactory.java +++ b/Source/JNA/waffle-spring-security4/src/main/java/waffle/spring/GrantedAuthorityFactory.java @@ -1,7 +1,7 @@ /** * Waffle (https://github.com/Waffle/waffle) * - * Copyright (c) 2010-2016 Application Security, Inc. + * Copyright (c) 2010-2017 Application Security, Inc. * * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse * Public License v1.0 which accompanies this distribution, and is available at