-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented aws iam auth (no tests yet)
- Loading branch information
1 parent
d073178
commit d97f793
Showing
6 changed files
with
196 additions
and
2 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
model/src/main/java/io/quarkus/vault/runtime/client/dto/auth/VaultAwsIamAuthBody.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.auth; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import io.quarkus.vault.runtime.Base64String; | ||
import io.quarkus.vault.runtime.client.dto.VaultModel; | ||
|
||
public class VaultAwsIamAuthBody implements VaultModel { | ||
|
||
public String role; | ||
|
||
@JsonProperty("iam_http_request_method") | ||
public String requestMethod; | ||
|
||
@JsonProperty("iam_request_url") | ||
public Base64String requestUrl; | ||
|
||
@JsonProperty("iam_request_body") | ||
public Base64String requestBody; | ||
|
||
@JsonProperty("iam_request_headers") | ||
public Base64String requestHeaders; | ||
|
||
public VaultAwsIamAuthBody( | ||
final String role, | ||
final String requestMethod, | ||
final Base64String requestUrl, | ||
final Base64String requestBody, | ||
final Base64String requestHeaders | ||
) { | ||
this.role = role; | ||
this.requestMethod = requestMethod; | ||
this.requestUrl = requestUrl; | ||
this.requestBody = requestBody; | ||
this.requestHeaders = requestHeaders; | ||
} | ||
} |
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
27 changes: 27 additions & 0 deletions
27
runtime/src/main/java/io/quarkus/vault/runtime/config/VaultAwsIamAuthenticationConfig.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,27 @@ | ||
package io.quarkus.vault.runtime.config; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
import io.quarkus.runtime.annotations.ConfigItem; | ||
|
||
@ConfigGroup | ||
public class VaultAwsIamAuthenticationConfig { | ||
|
||
/** | ||
* Aws iam authentication role that has been created in Vault to associate Vault policies, with | ||
* aws iam service accounts. This property is required when selecting | ||
* the aws iam authentication type. | ||
*/ | ||
@ConfigItem | ||
public String role; | ||
|
||
@ConfigItem | ||
public String region; | ||
|
||
@ConfigItem(defaultValue = "https://sts.amazonaws.com") | ||
public String stsUrl; | ||
|
||
@ConfigItem | ||
public Optional<String> vaultServerId; | ||
} |
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