Skip to content

Commit

Permalink
Merge pull request #11 from zendern/random-cleanup
Browse files Browse the repository at this point in the history
Random cleanup
  • Loading branch information
zendern authored May 17, 2020
2 parents 5944229 + 258c7ce commit d754286
Show file tree
Hide file tree
Showing 34 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11']
java: ['8', '11', '14']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ the front runner for integration with Acme and is completely free.

See the [stable](https://micronaut-projects.github.io/micronaut-acme/latest/guide) or [snapshot](https://micronaut-projects.github.io/micronaut-acme/snapshot/guide) documentation for more information.

## Acme Utils ##
Since ACME servers do require some pre setup there is a acme-utils subproject that can be found [here](https://github.com/zendern/micronaut-acme/blob/master/examples/acme-utils). Which can help you create keys, create/deactivate accounts, etc.
## Acme Cli ##
Since ACME servers do require some pre setup there is a acme-cli subproject that can be found [here](https://github.com/micronaut-projects/micronaut-acme/tree/master/acme-cli). Which can help you create keys, create/deactivate accounts, etc.

## Example Application ##

See the [Examples](https://github.com/zendern/micronaut-acme/tree/master/examples/hello-world-acme) for more information.
See the [Examples](https://github.com/micronaut-projects/micronaut-acme/tree/master/examples/hello-world-acme) for more information.

## Snapshots and Releases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme;
package io.micronaut.acme;

import io.micronaut.context.annotation.ConfigurationProperties;
import io.micronaut.core.util.Toggleable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.background;
package io.micronaut.acme.background;

import io.micronaut.configuration.acme.AcmeConfiguration;
import io.micronaut.configuration.acme.services.AcmeService;
import io.micronaut.acme.AcmeConfiguration;
import io.micronaut.acme.services.AcmeService;
import io.micronaut.core.util.StringUtils;
import io.micronaut.runtime.event.ApplicationStartupEvent;
import io.micronaut.runtime.event.annotation.EventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* @author Nathan Zender
* @since 1.0
*/
package io.micronaut.configuration.acme.background;
package io.micronaut.acme.background;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.challenge.dns;
package io.micronaut.acme.challenge.dns;

/**
* TXT renderer needed for DNS Acme challenge server validation to be possible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.challenge.http.endpoint;
package io.micronaut.acme.challenge.http.endpoint;

/**
* Contains the details needed to satisfy a passing http-01 challenge from the acme challenge server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.challenge.http.endpoint;
package io.micronaut.acme.challenge.http.endpoint;

import io.micronaut.http.HttpStatus;
import io.micronaut.http.annotation.Controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
@Configuration
@Requires(property = "acme.challenge-type", value = "http")
package io.micronaut.configuration.acme.challenge.http;
package io.micronaut.acme.challenge.http;

import io.micronaut.context.annotation.Configuration;
import io.micronaut.context.annotation.Requires;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.events;
package io.micronaut.acme.events;

import java.security.KeyPair;
import java.security.cert.X509Certificate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* @author Nathan Zender
* @since 1.0
*/
package io.micronaut.configuration.acme.events;
package io.micronaut.acme.events;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@Configuration
@Requires(property = "acme.enabled", value = TRUE)
@Requires(property = ServerSslConfiguration.PREFIX + ".enabled", value = TRUE, defaultValue = FALSE)
package io.micronaut.configuration.acme;
package io.micronaut.acme;

import io.micronaut.context.annotation.Configuration;
import io.micronaut.context.annotation.Requires;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.services;
package io.micronaut.acme.services;

/**
* Acme scoped runtime exception to be used for anything Acme related.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.services;
package io.micronaut.acme.services;

import io.micronaut.configuration.acme.AcmeConfiguration;
import io.micronaut.configuration.acme.challenge.dns.TxtRenderer;
import io.micronaut.configuration.acme.challenge.http.endpoint.HttpChallengeDetails;
import io.micronaut.configuration.acme.events.CertificateEvent;
import io.micronaut.acme.AcmeConfiguration;
import io.micronaut.acme.challenge.dns.TxtRenderer;
import io.micronaut.acme.challenge.http.endpoint.HttpChallengeDetails;
import io.micronaut.acme.events.CertificateEvent;
import io.micronaut.context.event.ApplicationEventPublisher;
import io.micronaut.core.io.IOUtils;
import io.micronaut.core.io.ResourceResolver;
Expand Down Expand Up @@ -54,7 +54,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

import static io.micronaut.configuration.acme.AcmeConfiguration.ChallengeType;
import static io.micronaut.acme.AcmeConfiguration.ChallengeType;
import static java.nio.file.StandardOpenOption.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* @author Nathan Zender
* @since 1.0
*/
package io.micronaut.configuration.acme.services;
package io.micronaut.acme.services;
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.ssl;
package io.micronaut.acme.ssl;

import io.micronaut.configuration.acme.events.CertificateEvent;
import io.micronaut.acme.events.CertificateEvent;
import io.micronaut.context.annotation.Replaces;
import io.micronaut.http.server.netty.ssl.CertificateProvidedSslBuilder;
import io.micronaut.http.server.netty.ssl.ServerSslBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.micronaut.configuration.acme.ssl;
package io.micronaut.acme.ssl;

import io.netty.buffer.ByteBufAllocator;
import io.netty.handler.ssl.ApplicationProtocolNegotiator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* @author Nathan Zender
* @since 1.0
*/
package io.micronaut.configuration.acme.ssl;
package io.micronaut.acme.ssl;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.micronaut.configuration.acme
package io.micronaut.acme

import io.micronaut.context.ApplicationContext
import io.micronaut.core.io.socket.SocketUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.micronaut.configuration.acme
package io.micronaut.acme


import io.micronaut.http.HttpRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.micronaut.configuration.acme
package io.micronaut.acme

import io.micronaut.configuration.acme.background.AcmeCertRefresherTask
import io.micronaut.configuration.acme.services.AcmeService
import io.micronaut.acme.background.AcmeCertRefresherTask
import io.micronaut.acme.services.AcmeService
import io.netty.handler.ssl.util.SelfSignedCertificate
import spock.lang.Specification
import spock.lang.Stepwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.micronaut.configuration.acme
package io.micronaut.acme


import io.micronaut.http.HttpRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.micronaut.configuration.acme
package io.micronaut.acme


import io.micronaut.http.HttpRequest
Expand All @@ -7,13 +7,11 @@ import io.micronaut.http.annotation.Controller
import io.micronaut.http.annotation.Get
import io.netty.handler.ssl.util.InsecureTrustManagerFactory
import io.reactivex.Flowable
import org.shredzone.acme4j.util.KeyPairUtils
import spock.lang.Stepwise
import spock.util.concurrent.PollingConditions

import javax.net.ssl.HttpsURLConnection
import javax.net.ssl.SSLContext
import java.security.KeyPair
import java.security.SecureRandom
import java.security.cert.Certificate
import java.security.cert.X509Certificate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.micronaut.configuration.acme
package io.micronaut.acme


import io.micronaut.http.HttpRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.micronaut.configuration.acme.challenge.http.endpoint
package io.micronaut.acme.challenge.http.endpoint

import groovy.json.JsonSlurper
import io.micronaut.configuration.acme.AcmeBaseSpec
import io.micronaut.acme.AcmeBaseSpec
import io.micronaut.http.HttpRequest
import io.micronaut.http.HttpResponse
import io.micronaut.http.HttpStatus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.micronaut.configuration.acme.challenges
package io.micronaut.acme.challenges

import io.micronaut.configuration.acme.AcmeBaseSpec
import io.micronaut.acme.AcmeBaseSpec
import io.micronaut.http.HttpRequest
import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.micronaut.configuration.acme.challenges
package io.micronaut.acme.challenges

import io.micronaut.configuration.acme.AcmeBaseSpec
import io.micronaut.acme.AcmeBaseSpec
import io.micronaut.http.HttpRequest
import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.Controller
Expand Down
2 changes: 1 addition & 1 deletion acme/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


<logger name="org.shredzone" level="DEBUG" />
<logger name="io.micronaut.configuration.acme" level="DEBUG" />
<logger name="io.micronaut.acme" level="DEBUG" />
<logger name="org.testcontainers" level="INFO"/>
<logger name="com.github.dockerjava" level="WARN"/>
</configuration>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ subprojects { Project subproject ->
}

version project.projectVersion
group "io.micronaut"
group "io.micronaut.acme"

ext {
isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
Expand Down
4 changes: 2 additions & 2 deletions examples/hello-world-acme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ It contains a single endpoint found at `/helloWorld` but the important bits can
### Pre-reqs
1. You have created an account with Let's Encrypt
1. You have generated a domain key
1. acme-utils project can help with steps 1 and 2
1. See [here](../acme-utils/README.md)
1. acme-cli project can help with steps 1 and 2
1. See [here](../acme-cli/README.md)
1. You have purchased a domain name and have a way to configure DNS. In the AWS example below we will use Route53.

### Build and Deploy :
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world-acme/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@


<logger name="org.shredzone" level="DEBUG" />
<logger name="io.micronaut.configuration.acme" level="DEBUG" />
<logger name="io.micronaut.acme" level="DEBUG" />
</configuration>
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ developers=Nathan Zender
githubBranch=master
githubSlug=micronaut-projects/micronaut-acme
grailsVersion=3.2.9
groovyVersion=2.5.3
groovyVersion=2.5.11
logbackClassicVersion=1.2.3
micronautVersion=1.3.3
micronautTestVersion=1.1.0
Expand All @@ -14,7 +14,7 @@ micronautBuildVersion=1.0.0
objenesisVersion=1.4
htmlSanityCheckVersion=0.9.7
acmeVersion=2.6
spockVersion=1.2-groovy-2.5
spockVersion=1.3-groovy-2.5
projectDesc=Extensions to integrate Micronaut and Acme
projectUrl=http://micronaut.io
title=Micronaut Acme
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down

0 comments on commit d754286

Please sign in to comment.