-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Vault’s PKI secret engine
* Supports all endpoints of PKI secret engine, except prvileged endpoints. * Has complete test coverage for all endpoints and options.
- Loading branch information
Showing
60 changed files
with
3,471 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...lt/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICRLRotateData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKICRLRotateData implements VaultModel { | ||
public boolean success; | ||
} |
6 changes: 6 additions & 0 deletions
6
.../model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICRLRotateResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKICRLRotateResult extends AbstractVaultDTO<VaultPKICRLRotateData, Object> { | ||
} |
7 changes: 7 additions & 0 deletions
7
.../model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICertificateData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKICertificateData implements VaultModel { | ||
public String certificate; | ||
} |
9 changes: 9 additions & 0 deletions
9
...el/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICertificateListData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKICertificateListData implements VaultModel { | ||
public List<String> keys; | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICertificateListResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKICertificateListResult extends AbstractVaultDTO<VaultPKICertificateListData, Object> { | ||
} |
6 changes: 6 additions & 0 deletions
6
...odel/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKICertificateResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKICertificateResult extends AbstractVaultDTO<VaultPKICertificateData, Object> { | ||
} |
12 changes: 12 additions & 0 deletions
12
...ult/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigCABody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIConfigCABody implements VaultModel { | ||
|
||
@JsonProperty("pem_bundle") | ||
public String pemBundle; | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
...lt/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigCRLBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
public class VaultPKIConfigCRLBody extends VaultPKIConfigCRLData { | ||
} |
11 changes: 11 additions & 0 deletions
11
...lt/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigCRLData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIConfigCRLData implements VaultModel { | ||
|
||
public String expiry; | ||
|
||
public Boolean disable; | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
.../model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigCRLResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKIConfigCRLResult extends AbstractVaultDTO<VaultPKIConfigCRLData, Object> { | ||
} |
4 changes: 4 additions & 0 deletions
4
...t/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigURLsBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
public class VaultPKIConfigURLsBody extends VaultPKIConfigURLsData { | ||
} |
20 changes: 20 additions & 0 deletions
20
...t/model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigURLsData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIConfigURLsData implements VaultModel { | ||
|
||
@JsonProperty("issuing_certificates") | ||
public List<String> issuingCertificates; | ||
|
||
@JsonProperty("crl_distribution_points") | ||
public List<String> crlDistributionPoints; | ||
|
||
@JsonProperty("ocsp_servers") | ||
public List<String> ocspServers; | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
...model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIConfigURLsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKIConfigURLsResult extends AbstractVaultDTO<VaultPKIConfigURLsData, Object> { | ||
} |
37 changes: 37 additions & 0 deletions
37
...rc/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateCertificateBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIGenerateCertificateBody implements VaultModel { | ||
|
||
@JsonProperty("common_name") | ||
public String subjectCommonName; | ||
|
||
@JsonProperty("alt_names") | ||
public String subjectAlternativeNames; | ||
|
||
@JsonProperty("ip_sans") | ||
public String ipSubjectAlternativeNames; | ||
|
||
@JsonProperty("uri_sans") | ||
public String uriSubjectAlternativeNames; | ||
|
||
@JsonProperty("other_sans") | ||
public List<String> otherSubjectAlternativeNames; | ||
|
||
@JsonProperty("ttl") | ||
public String timeToLive; | ||
|
||
public String format = "pem"; | ||
|
||
@JsonProperty("private_key_format") | ||
public String privateKeyFormat = "pkcs8"; | ||
|
||
@JsonProperty("exclude_cn_from_sans") | ||
public Boolean excludeCommonNameFromSubjectAlternativeNames; | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...rc/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateCertificateData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIGenerateCertificateData implements VaultModel { | ||
|
||
public String certificate; | ||
|
||
@JsonProperty("issuing_ca") | ||
public String issuingCA; | ||
|
||
@JsonProperty("ca_chain") | ||
public List<String> caChain; | ||
|
||
@JsonProperty("private_key") | ||
public String privateKey; | ||
|
||
@JsonProperty("private_key_type") | ||
public String privateKeyType; | ||
|
||
@JsonProperty("serial_number") | ||
public String serialNumber; | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
.../main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateCertificateResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKIGenerateCertificateResult extends AbstractVaultDTO<VaultPKIGenerateCertificateData, Object> { | ||
} |
64 changes: 64 additions & 0 deletions
64
...ain/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateIntermediateCSRBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIGenerateIntermediateCSRBody implements VaultModel { | ||
|
||
@JsonProperty("common_name") | ||
public String subjectCommonName; | ||
|
||
@JsonProperty("organization") | ||
public String subjectOrganization; | ||
|
||
@JsonProperty("ou") | ||
public String subjectOrganizationalUnit; | ||
|
||
@JsonProperty("street_address") | ||
public String subjectStreetAddress; | ||
|
||
@JsonProperty("postal_code") | ||
public String subjectPostalCode; | ||
|
||
@JsonProperty("locality") | ||
public String subjectLocality; | ||
|
||
@JsonProperty("province") | ||
public String subjectProvince; | ||
|
||
@JsonProperty("country") | ||
public String subjectCountry; | ||
|
||
@JsonProperty("alt_names") | ||
public String subjectAlternativeNames; | ||
|
||
@JsonProperty("ip_sans") | ||
public String ipSubjectAlternativeNames; | ||
|
||
@JsonProperty("uri_sans") | ||
public String uriSubjectAlternativeNames; | ||
|
||
@JsonProperty("other_sans") | ||
public List<String> otherSubjectAlternativeNames; | ||
|
||
@JsonProperty("serial_number") | ||
public String subjectSerialNumber; | ||
|
||
public String format = "pem"; | ||
|
||
@JsonProperty("private_key_format") | ||
public String privateKeyFormat = "pkcs8"; | ||
|
||
@JsonProperty("key_type") | ||
public String keyType; | ||
|
||
@JsonProperty("key_bits") | ||
public Integer keyBits; | ||
|
||
@JsonProperty("exclude_cn_from_sans") | ||
public Boolean excludeCommonNameFromSubjectAlternativeNames; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...ain/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateIntermediateCSRData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIGenerateIntermediateCSRData implements VaultModel { | ||
|
||
public String csr; | ||
|
||
@JsonProperty("private_key") | ||
public String privateKey; | ||
|
||
@JsonProperty("private_key_type") | ||
public String privateKeyType; | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
...n/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateIntermediateCSRResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import io.quarkus.vault.runtime.client.dto.AbstractVaultDTO; | ||
|
||
public class VaultPKIGenerateIntermediateCSRResult extends AbstractVaultDTO<VaultPKIGenerateIntermediateCSRData, Object> { | ||
} |
73 changes: 73 additions & 0 deletions
73
...model/src/main/java/io/quarkus/vault/runtime/client/dto/pki/VaultPKIGenerateRootBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package io.quarkus.vault.runtime.client.dto.pki; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultPKIGenerateRootBody implements VaultModel { | ||
|
||
@JsonProperty("common_name") | ||
public String subjectCommonName; | ||
|
||
@JsonProperty("organization") | ||
public String subjectOrganization; | ||
|
||
@JsonProperty("ou") | ||
public String subjectOrganizationalUnit; | ||
|
||
@JsonProperty("street_address") | ||
public String subjectStreetAddress; | ||
|
||
@JsonProperty("postal_code") | ||
public String subjectPostalCode; | ||
|
||
@JsonProperty("locality") | ||
public String subjectLocality; | ||
|
||
@JsonProperty("province") | ||
public String subjectProvince; | ||
|
||
@JsonProperty("country") | ||
public String subjectCountry; | ||
|
||
@JsonProperty("alt_names") | ||
public String subjectAlternativeNames; | ||
|
||
@JsonProperty("ip_sans") | ||
public String ipSubjectAlternativeNames; | ||
|
||
@JsonProperty("uri_sans") | ||
public String uriSubjectAlternativeNames; | ||
|
||
@JsonProperty("other_sans") | ||
public List<String> otherSubjectAlternativeNames; | ||
|
||
@JsonProperty("serial_number") | ||
public String subjectSerialNumber; | ||
|
||
@JsonProperty("ttl") | ||
public String timeToLive; | ||
|
||
public String format = "pem"; | ||
|
||
@JsonProperty("private_key_format") | ||
public String privateKeyFormat = "pkcs8"; | ||
|
||
@JsonProperty("key_type") | ||
public String keyType; | ||
|
||
@JsonProperty("key_bits") | ||
public Integer keyBits; | ||
|
||
@JsonProperty("max_path_length") | ||
public Integer maxPathLength; | ||
|
||
@JsonProperty("exclude_cn_from_sans") | ||
public Boolean excludeCommonNameFromSubjectAlternativeNames; | ||
|
||
@JsonProperty("permitted_dns_domains") | ||
public List<String> permittedDnsDomains; | ||
|
||
} |
Oops, something went wrong.