Skip to content

Commit

Permalink
Release 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zugazagoitia committed Jan 28, 2024
1 parent 14c588b commit a4f3472
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 46 deletions.
36 changes: 15 additions & 21 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

* [:heart: Sponsor Javalin](https://github.com/sponsors/tipsy)
* The main project webpage is [javalin.io](https://javalin.io)
* Chat on Discord: https://discord.gg/sgak4e5NKv
* License summary: https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
* Chat on Discord: <https://discord.gg/sgak4e5NKv>
* License summary: <https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)>

# SSL Plugin [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/javalin/javalin-ssl/main.yaml?branch=main&label=main&logo=githubactions&logoColor=white)](https://github.com/javalin/javalin-ssl/actions?query=branch%3Amain) [![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/javalin/javalin-ssl/main.yaml?branch=dev&label=dev&logo=githubactions&logoColor=white)](https://github.com/javalin/javalin-ssl/actions?query=branch%3Adev) [![Coverage](https://codecov.io/gh/javalin/javalin-ssl/branch/dev/graphs/badge.svg)](https://app.codecov.io/gh/javalin/javalin-ssl) [![javadoc](https://javadoc.io/badge2/io.javalin.community.ssl/ssl-plugin/javadoc.svg)](https://javadoc.io/doc/io.javalin.community.ssl/ssl-plugin)

Expand All @@ -15,24 +15,24 @@ If you're not familiar with the HTTPS protocol we have a great guide at the [Jav

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/javalin/javalin-ssl?label=Latest%20Release)](https://github.com/javalin/javalin-ssl/releases) [![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.reposilite.com%2Fsnapshots%2Fio%2Fjavalin%2Fcommunity%2Fssl%2Fssl-plugin%2Fmaven-metadata.xml&label=Latest%20Snapshot)](https://repo.reposilite.com/#/snapshots/io/javalin/community/ssl/ssl-plugin)


As simple as adding a dependency:

### Maven

```xml
<dependency>
<groupId>io.javalin.community.ssl</groupId>
<artifactId>ssl-plugin</artifactId>
<version>5.6.3</version>
<version>6.0.0</version>
</dependency>
```

### Gradle

```kotlin
implementation('io.javalin.community.ssl:ssl-plugin:5.6.3')
implementation('io.javalin.community.ssl:ssl-plugin:6.0.0')
```


## Configuration

You can pass a config object when registering the plugin
Expand All @@ -54,7 +54,7 @@ Javalin.create(config->{
```kotlin
Javalin.create { config ->
... // your Javalin config here
config.registerPlugin(SSL) {
config.registerPlugin(SslPlugin{
... // your SSL configuration here
it.pemFromPath("/path/to/cert.pem", "/path/to/key.pem")
}
Expand Down Expand Up @@ -110,6 +110,7 @@ If you want to verify the client certificates (such as mTLS) you can set the tru
In contrast to the identity configuration, you can load multiple certificates from different sources.

By adding a `TrustConfig` to the `SslPlugin` you will enable client certificate verification.

```java
config.plugins.register(new SslPlugin(ssl->{
ssl.pemFromPath("/path/to/cert.pem","/path/to/key.pem"); // Load our identity data
Expand All @@ -135,8 +136,8 @@ trustStoreFromClasspath("truststore.jks", "password"); // load a trust sto
trustStoreFromInputStream(inputStream, "password"); // load a trust store from the given input stream
```


#### Hot reloading

Certificate reloading is supported, if you want to replace the certificate you can simply call `SslPlugin.reload()` with the new configuration.

```kotlin
Expand All @@ -161,35 +162,28 @@ sslPlugin.reload {
trust.certificateFromPath("path/to/new/certificate.pem");
}
}
```


```

## Notes

- HTTP/2 **can** be used over an insecure connection.
- If Jetty responds with an `HTTP ERROR 400 Invalid SNI`, you can disable SNI verification by
* HTTP/2 **can** be used over an insecure connection.
* If Jetty responds with an `HTTP ERROR 400 Invalid SNI`, you can disable SNI verification by
setting `sniHostCheck = false`.
- Minimizing your jar can lead to issues, [more info](https://github.com/javalin/javalin-ssl/issues/59).
* Minimizing your jar can lead to issues, [more info](https://github.com/javalin/javalin-ssl/issues/59).

## Depends on

| Package | Version | License |
|-----------------------------------------------|---------|----------------------------------------------------------------------------------------------------------------------|
| [Javalin](https://github.com/javalin/javalin) | `5.6.3` | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) |
| [SSLContext Kickstart](https://github.com/Hakky54/sslcontext-kickstart) | `8.1.4` | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) |
| [Javalin](https://github.com/javalin/javalin) | `6.0.0` | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) |
| [SSLContext Kickstart](https://github.com/Hakky54/sslcontext-kickstart) | `8.3.0` | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) |

## Contributing

Contributions are welcome! Open an issue or pull request if you have a suggestion or bug report.

All development is carried out on the dev branch, main is only used for releases.


## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details




46 changes: 23 additions & 23 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/[email protected]
with:
distribution: 'zulu'
distribution: "zulu"
java-version: ${{ matrix.java_version }}
- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1
Expand All @@ -37,8 +37,8 @@ jobs:
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '17'
distribution: "temurin"
java-version: "17"

- name: Checkout Code
uses: actions/checkout@v4
Expand Down Expand Up @@ -71,39 +71,39 @@ jobs:
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"

- name: Generate version
uses: HardNorth/[email protected]
with:
version-source: file
version-file: build.gradle.kts
version-file-extraction-pattern: '(?<=version\s*=\s*"")\S+(?="")'
version-file-extraction-pattern: '(?<=version\s*=\s*")\S+(?=")'

- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Publish to Reposilite
uses: gradle/[email protected]
env:
MAVEN_NAME: '${{ secrets.MAVEN_NAME }}'
MAVEN_TOKEN: '${{ secrets.MAVEN_TOKEN }}'
ORG_GRADLE_PROJECT_signingKey: '${{ secrets.GPG_KEY }}'
ORG_GRADLE_PROJECT_signingPassword: '${{ secrets.GPG_PASSPHRASE }}'
ORG_GRADLE_PROJECT_signingKeyId: '${{ secrets.GPG_KEYID }}'
MAVEN_NAME: "${{ secrets.MAVEN_NAME }}"
MAVEN_TOKEN: "${{ secrets.MAVEN_TOKEN }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.GPG_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.GPG_PASSPHRASE }}"
ORG_GRADLE_PROJECT_signingKeyId: "${{ secrets.GPG_KEYID }}"
with:
arguments: publishMavenPublicationToReposiliteRepository

- name: Publish to Maven Central
if: "!contains(env.CURRENT_VERSION, 'SNAPSHOT')"
uses: gradle/[email protected]
env:
ORG_GRADLE_PROJECT_sonatypeUsername: '${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}'
ORG_GRADLE_PROJECT_sonatypePassword: '${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}'
ORG_GRADLE_PROJECT_signingKey: '${{ secrets.GPG_KEY }}'
ORG_GRADLE_PROJECT_signingPassword: '${{ secrets.GPG_PASSPHRASE }}'
ORG_GRADLE_PROJECT_signingKeyId: '${{ secrets.GPG_KEYID }}'
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}"
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.GPG_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.GPG_PASSPHRASE }}"
ORG_GRADLE_PROJECT_signingKeyId: "${{ secrets.GPG_KEYID }}"
with:
arguments: publishToSonatype closeAndReleaseStagingRepository

Expand Down Expand Up @@ -164,19 +164,19 @@ jobs:
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '17'
distribution: "zulu"
java-version: "17"

- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Publish to Reposilite
uses: gradle/[email protected]
env:
MAVEN_NAME: '${{ secrets.MAVEN_NAME }}'
MAVEN_TOKEN: '${{ secrets.MAVEN_TOKEN }}'
ORG_GRADLE_PROJECT_signingKey: '${{ secrets.GPG_KEY }}'
ORG_GRADLE_PROJECT_signingPassword: '${{ secrets.GPG_PASSPHRASE }}'
ORG_GRADLE_PROJECT_signingKeyId: '${{ secrets.GPG_KEYID }}'
MAVEN_NAME: "${{ secrets.MAVEN_NAME }}"
MAVEN_TOKEN: "${{ secrets.MAVEN_TOKEN }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.GPG_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.GPG_PASSPHRASE }}"
ORG_GRADLE_PROJECT_signingKeyId: "${{ secrets.GPG_KEYID }}"
with:
arguments: publishMavenPublicationToReposiliteRepository
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {

group = "io.javalin.community.ssl"
//Must be formatted following the RegEx: /version\s*=\s*"\S+"/g
version = "6.0.0-SNAPSHOT"
version = "6.0.0"

jacoco {
toolVersion = "0.8.8"
Expand All @@ -33,7 +33,7 @@ repositories {
}

dependencies {
val javalin = "6.0.0-beta.4"
val javalin = "6.0.0"
val sslContextKickstart = "8.3.0"

val annotations = "24.1.0"
Expand Down

0 comments on commit a4f3472

Please sign in to comment.