public final class AppRoleBuilder extends Object
Constructor and Description |
---|
AppRoleBuilder(String name)
Construct
AppRoleBuilder with only the role name set. |
Modifier and Type | Method and Description |
---|---|
AppRole |
build()
Build the AppRole role based on given parameters.
|
AppRoleBuilder |
withBindSecretID()
Bind role to secret ID.
|
AppRoleBuilder |
withBindSecretID(Boolean bindSecretId)
Set if role is bound to secret ID.
|
AppRoleBuilder |
withBoundCidrList(List<String> boundCidrList)
Set bound CIDR blocks.
|
AppRoleBuilder |
withCidrBlock(String cidrBlock)
Add a CIDR block to list of bound blocks.
|
AppRoleBuilder |
withId(String id)
Add custom role ID.
|
AppRoleBuilder |
withoutBindSecretID()
Do not bind role to secret ID.
|
AppRoleBuilder |
withPeriod(Integer period)
Set renewal period for generated token in seconds.
|
AppRoleBuilder |
withPolicies(List<String> policies)
Add given policies.
|
AppRoleBuilder |
withPolicy(String policy)
Add a single policy.
|
AppRoleBuilder |
withSecretIdNumUses(Integer secredIdNumUses)
Set number of uses for sectet IDs.
|
AppRoleBuilder |
withSecretIdTtl(Integer secredIdTtl)
Set default sectet ID TTL in seconds.
|
AppRoleBuilder |
withTokenMaxTtl(Integer tokenMaxTtl)
Set maximum token TTL in seconds.
|
AppRoleBuilder |
withTokenTtl(Integer tokenTtl)
Set default token TTL in seconds.
|
public AppRoleBuilder(String name)
AppRoleBuilder
with only the role name set.name
- Role namepublic AppRoleBuilder withId(String id)
id
- the IDpublic AppRoleBuilder withBindSecretID(Boolean bindSecretId)
bindSecretId
- the display namepublic AppRoleBuilder withBindSecretID()
withBindSecretID(Boolean)
public AppRoleBuilder withoutBindSecretID()
withBindSecretID(Boolean)
public AppRoleBuilder withBoundCidrList(List<String> boundCidrList)
boundCidrList
- List of CIDR blocks which can perform loginpublic AppRoleBuilder withCidrBlock(String cidrBlock)
cidrBlock
- the CIDR blockpublic AppRoleBuilder withPolicies(List<String> policies)
policies
- the policiespublic AppRoleBuilder withPolicy(String policy)
policy
- the policypublic AppRoleBuilder withSecretIdNumUses(Integer secredIdNumUses)
secredIdNumUses
- the number of usespublic AppRoleBuilder withSecretIdTtl(Integer secredIdTtl)
secredIdTtl
- the TTLpublic AppRoleBuilder withTokenTtl(Integer tokenTtl)
tokenTtl
- the TTLpublic AppRoleBuilder withTokenMaxTtl(Integer tokenMaxTtl)
tokenMaxTtl
- the TTLpublic AppRoleBuilder withPeriod(Integer period)
period
- period in secondspublic AppRole build()
Copyright © 2016–2018. All rights reserved.