Skip to content

Commit

Permalink
Oci Tls Manager Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
trentjeff committed Sep 22, 2023
1 parent 24c530b commit c812217
Show file tree
Hide file tree
Showing 26 changed files with 1,023 additions and 206 deletions.
11 changes: 5 additions & 6 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -922,12 +922,11 @@
<artifactId>helidon-integrations-oci-metrics</artifactId>
<version>${helidon.version}</version>
</dependency>
<!-- TODO -->
<!-- <dependency>-->
<!-- <groupId>io.helidon.integrations.oci</groupId>-->
<!-- <artifactId>helidon-integrations-oci-tls-certificates</artifactId>-->
<!-- <version>${helidon.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>io.helidon.integrations.oci</groupId>
<artifactId>helidon-integrations-oci-tls-certificates</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.integrations.oci.metrics</groupId>
<artifactId>helidon-integrations-oci-metrics-cdi</artifactId>
Expand Down
1 change: 1 addition & 0 deletions integrations/oci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
<module>metrics</module>
<module>oci-secrets-config-source</module>
<module>sdk</module>
<module>tls-certificates</module>
</modules>
</project>
111 changes: 18 additions & 93 deletions integrations/oci/tls-certificates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>io.helidon.integrations.oci</groupId>
<artifactId>helidon-integrations-oci-project</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>3.2.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -58,29 +58,24 @@
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<optional>true</optional>
<!-- <optional>true</optional>--> <!-- needed for jakarta.inject.Provider -->
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-metadata</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-api</artifactId>
<groupId>io.helidon.webserver</groupId>
<artifactId>helidon-webserver</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-tls</artifactId>
<artifactId>helidon-common-key-util</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-key-util</artifactId>
<artifactId>helidon-common-service-loader</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.oci.sdk</groupId>
Expand All @@ -90,17 +85,25 @@
<groupId>io.helidon.fault-tolerance</groupId>
<artifactId>helidon-fault-tolerance</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.scheduling</groupId>
<artifactId>helidon-scheduling</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-yaml</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.scheduling</groupId>
<artifactId>helidon-scheduling</artifactId>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-metadata</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.helidon.inject.configdriven</groupId>
<artifactId>helidon-inject-configdriven-runtime</artifactId>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-metadata-processor</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<!-- needed to actually use OCI SDK -->
Expand Down Expand Up @@ -145,84 +148,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>
<arg>-Ainject.ignoreUnsupportedAnnotations=true</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.inject.configdriven</groupId>
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.inject.configdriven</groupId>
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.helidon.builder</groupId>
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.inject.configdriven</groupId>
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.List;
import java.util.Objects;

import io.helidon.common.Prioritized;
import io.helidon.common.pki.PemReader;
import io.helidon.integrations.oci.sdk.runtime.OciExtension;
import io.helidon.integrations.oci.tls.certificates.spi.OciCertificatesDownloader;
Expand All @@ -43,7 +44,16 @@
* Implementation of the {@link OciCertificatesDownloader} that will use OCI's Certificates Service to download certs.
*/
@Singleton
class DefaultOciCertificatesDownloader implements OciCertificatesDownloader {
public class DefaultOciCertificatesDownloader implements OciCertificatesDownloader, Prioritized {

/**
* Service loader based constructor.
*
* @deprecated this is a Java ServiceLoader implementation and the constructor should not be used directly
*/
@Deprecated
public DefaultOciCertificatesDownloader() {
}

@Override
public Certificates loadCertificates(String certOcid) {
Expand Down Expand Up @@ -121,4 +131,9 @@ static String toVersion(String eTag,

return String.valueOf(Arrays.hashCode(certs));
}

@Override
public int priority() {
return DEFAULT_PRIORITY;
}
}
Loading

0 comments on commit c812217

Please sign in to comment.