-
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.
Support providing explicit options to VaultTransitSecretEngine sign &…
… verifySignature The `VaultTransitSecretEngine.sign` and `VaultTransitSecretEngine.verifySignature` now have variants that take a `SignVerifyOptions` value. `SignVerifyOptions` allows specifying the following options from the Vault API: * `hashAlgorithm` (aka `hash_algorithm`) * `signatureAlgorithm` - (aka `signature_algorithm`) * `prehashed` * `marshalingAlgorithm` - (aka `marshaling_algorithm`) Some of these options (e.g. `hashAlgorithm`, `signatureAlgorithm` and `prehashed`) can be configured for specific transit keys via Quarkus config. The explicit options provided via `SignVerifyOptions` take precedence over any conifgured values.
- Loading branch information
Showing
7 changed files
with
220 additions
and
12 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
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
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
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
45 changes: 45 additions & 0 deletions
45
extensions/vault/runtime/src/main/java/io/quarkus/vault/transit/SignVerifyOptions.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,45 @@ | ||
package io.quarkus.vault.transit; | ||
|
||
public class SignVerifyOptions { | ||
|
||
private String signatureAlgorithm; | ||
private String hashAlgorithm; | ||
private Boolean prehashed; | ||
private String marshalingAlgorithm; | ||
|
||
public String getSignatureAlgorithm() { | ||
return signatureAlgorithm; | ||
} | ||
|
||
public SignVerifyOptions setSignatureAlgorithm(String signatureAlgorithm) { | ||
this.signatureAlgorithm = signatureAlgorithm; | ||
return this; | ||
} | ||
|
||
public String getHashAlgorithm() { | ||
return hashAlgorithm; | ||
} | ||
|
||
public SignVerifyOptions setHashAlgorithm(String hashAlgorithm) { | ||
this.hashAlgorithm = hashAlgorithm; | ||
return this; | ||
} | ||
|
||
public Boolean getPrehashed() { | ||
return prehashed; | ||
} | ||
|
||
public SignVerifyOptions setPrehashed(Boolean prehashed) { | ||
this.prehashed = prehashed; | ||
return this; | ||
} | ||
|
||
public String getMarshalingAlgorithm() { | ||
return marshalingAlgorithm; | ||
} | ||
|
||
public SignVerifyOptions setMarshalingAlgorithm(String marshalingAlgorithm) { | ||
this.marshalingAlgorithm = marshalingAlgorithm; | ||
return this; | ||
} | ||
} |
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
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