Skip to content

Latest commit

 

History

1,019 Commits

Folders and files

Ziggy using the ziti-sdk-jvm

The Ziti SDK for JVM enables Java and other developers to easily and securely connect their applications to backend services over Ziti networks.

The recommended way to use the OpenZiti SDK for Java in your project is to add the dependency using your favorite build tool. Our artifacts are hosted on Maven Central, so add repo(if needed) and dependency to your project. Make sure to use latest version from the top of this page.

<project>
   ....
   <repositories>
      ....
      <repository>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>Maven Central</name>
          <url>https://repo.maven.apache.org/maven2/</url>
       </repository>
   </repositories>
   ....
   <dependencies>
      ...
      <dependency>
         <groupId>org.openziti</groupId>
         <artifactId>ziti</artifactId>
         <version>[0,)</version>
      </dependency>
   </dependencies>
   ....
</project>
repositories {
    ...
    mavenCentral()
}
...
dependencies {
   ...
   implementation 'org.openziti:ziti:+' // TODO fix version
}

Every artifact published to Maven Central is accompanied by a detached PGP signature (the .asc file next to the artifact). To check a signature, first make sure the fingerprint of the signing key matches one of the fingerprints listed here, since this file is the authenticated source for them.

Releases Key ID Fingerprint
0.25.0 and later 50F7E3AF69BDDDA1 1548 22DE 7AC6 47A1 0EAE 4100 50F7 E3AF 69BD DDA1
0.24.0 and earlier (key retired) 1F48CBDE8E60E1E1 B1AF F043 67E6 B44A 888B 814C 1F48 CBDE 8E60 E1E1
# fetch the signing key and compare the fingerprint it prints with the table above
# (for the current key, keys.openpgp.org works in place of keyserver.ubuntu.com)
gpg --keyserver keyserver.ubuntu.com --recv-keys 154822DE7AC647A10EAE410050F7E3AF69BDDDA1
gpg --fingerprint 154822DE7AC647A10EAE410050F7E3AF69BDDDA1

# download the jar and its signature from Maven Central, then verify
gpg --verify ziti-<version>.jar.asc ziti-<version>.jar

gpg reports a good signature only if the artifact is unmodified and was signed by the key you imported. It also warns that the key is not certified with a trusted signature; this is expected, since the fingerprint comparison above is what establishes trust. The retired key expired on 2023-03-25, so gpg adds a note that it has expired, but still reports a good signature for releases up to 0.24.0.

Once you check out the project from GitHub, you can build it using gradle:

./gradlew build

# install into your local maven cache
./gradlew :ziti:install
  • allows to develop applications that connect to services on NetFoundry Ziti Service mesh
  • strong identity support
  • transparent use -- in seamless mode connections to network resources are intercepted and routed over Ziti network for any Ziti service that identity has access to
  • written in Kotlin with Java-friendly API
  • read more in our docs

See background here

Java SDK provides a way to enroll and generate identity file. The default identity format for Java SDK is Java KeyStore stored as .p12/.pfx files, however it can use identity JSON files generated by ziti-enroller as well.

Enrolling creates two(or more) entries in Java KeyStore:

private key entry
client SSL private key/certificate identifying the application instance. this entry is stored with ziti://<controller_addr>/<id> alias (pkcs#12 - friendly name)
rootCA
root CA certificates used to validate Ziti controller and routers

Note:

This allows enrolling and storing multiple identity keys and certificates in a single key store (pkcs#12 file). However, typically an application instance would only have a single enrollment or identity

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.