Class AppRole
- java.lang.Object
-
- de.stklcode.jvault.connector.model.AppRole
-
public final class AppRole extends Object
Vault AppRole role metamodel.- Since:
- 0.4.0
- Author:
- Stefan Kalscheuer
-
-
Constructor Summary
Constructors Constructor Description AppRole()
Construct emptyAppRole
object.AppRole(String name, String id, Boolean bindSecretId, List<String> secretIdBoundCidrs, List<String> policies, Integer secretIdNumUses, Integer secretIdTtl, Integer tokenTtl, Integer tokenMaxTtl, Integer period)
Construct completeAppRole
object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AppRoleBuilder
builder(String name)
GetAppRoleBuilder
instance.Boolean
getBindSecretId()
List<String>
getBoundCidrList()
Deprecated.UsegetSecretIdBoundCidrs()
instead, as this parameter is deprecated in Vault.String
getBoundCidrListString()
Deprecated.UsegetSecretIdBoundCidrsString()
instead, as this parameter is deprecated in Vault.String
getId()
String
getName()
Integer
getPeriod()
List<String>
getPolicies()
String
getPoliciesString()
List<String>
getSecretIdBoundCidrs()
String
getSecretIdBoundCidrsString()
Integer
getSecretIdNumUses()
Integer
getSecretIdTtl()
Integer
getTokenMaxTtl()
Integer
getTokenTtl()
void
setBoundCidrList(List<String> boundCidrList)
Deprecated.UsesetSecretIdBoundCidrs(List)
instead, as this parameter is deprecated in Vault.void
setPolicies(List<String> policies)
void
setSecretIdBoundCidrs(List<String> secretIdBoundCidrs)
-
-
-
Constructor Detail
-
AppRole
public AppRole()
Construct emptyAppRole
object.
-
AppRole
public AppRole(String name, String id, Boolean bindSecretId, List<String> secretIdBoundCidrs, List<String> policies, Integer secretIdNumUses, Integer secretIdTtl, Integer tokenTtl, Integer tokenMaxTtl, Integer period)
Construct completeAppRole
object.- Parameters:
name
- Role name (required)id
- Role ID (optional)bindSecretId
- Bind secret ID (optional)secretIdBoundCidrs
- Whitelist of subnets in CIDR notation (optional)policies
- List of policies (optional)secretIdNumUses
- Maximum number of uses per secret (optional)secretIdTtl
- Maximum TTL in seconds for secrets (optional)tokenTtl
- Token TTL in seconds (optional)tokenMaxTtl
- Maximum token TTL in seconds, including renewals (optional)period
- Duration in seconds, if set the token is a periodic token (optional)
-
-
Method Detail
-
builder
public static AppRoleBuilder builder(String name)
GetAppRoleBuilder
instance.- Parameters:
name
- Role name.- Returns:
- AppRole Builder.
- Since:
- 0.8
-
getName
public String getName()
- Returns:
- the role name
-
getId
public String getId()
- Returns:
- the role ID
-
getBindSecretId
public Boolean getBindSecretId()
- Returns:
- bind secret ID
-
getBoundCidrList
@Deprecated public List<String> getBoundCidrList()
Deprecated.UsegetSecretIdBoundCidrs()
instead, as this parameter is deprecated in Vault.- Returns:
- list of bound CIDR subnets
-
setBoundCidrList
@Deprecated public void setBoundCidrList(List<String> boundCidrList)
Deprecated.UsesetSecretIdBoundCidrs(List)
instead, as this parameter is deprecated in Vault.- Parameters:
boundCidrList
- list of subnets in CIDR notation to bind role to
-
getBoundCidrListString
@Deprecated public String getBoundCidrListString()
Deprecated.UsegetSecretIdBoundCidrsString()
instead, as this parameter is deprecated in Vault.- Returns:
- list of subnets in CIDR notation as comma-separated
String
-
getSecretIdBoundCidrs
public List<String> getSecretIdBoundCidrs()
- Returns:
- list of bound CIDR subnets
- Since:
- 0.8 replaces
getBoundCidrList()
-
setSecretIdBoundCidrs
public void setSecretIdBoundCidrs(List<String> secretIdBoundCidrs)
- Parameters:
secretIdBoundCidrs
- List of subnets in CIDR notation to bind secrets of this role to.- Since:
- 0.8 replaces
setBoundCidrList(List)
-
getSecretIdBoundCidrsString
public String getSecretIdBoundCidrsString()
- Returns:
- List of subnets in CIDR notation as comma-separated
String
- Since:
- 0.8 replaces
getBoundCidrListString()
()}
-
getPoliciesString
public String getPoliciesString()
- Returns:
- list of policies as comma-separated
String
-
getSecretIdNumUses
public Integer getSecretIdNumUses()
- Returns:
- maximum number of uses per secret
-
getSecretIdTtl
public Integer getSecretIdTtl()
- Returns:
- maximum TTL in seconds for secrets
-
getTokenTtl
public Integer getTokenTtl()
- Returns:
- token TTL in seconds
-
getTokenMaxTtl
public Integer getTokenMaxTtl()
- Returns:
- maximum token TTL in seconds, including renewals
-
getPeriod
public Integer getPeriod()
- Returns:
- duration in seconds, if specified
-
-