Class AppRoleBuilder


  • @Deprecated
    public final class AppRoleBuilder
    extends Object
    Deprecated.
    As of 0.9 in favor of AppRole.Builder.
    A builder for vault AppRole roles..
    Since:
    0.4.0
    Author:
    Stefan Kalscheuer
    • Constructor Detail

      • AppRoleBuilder

        public AppRoleBuilder​(String name)
        Deprecated.
        Construct AppRoleBuilder with only the role name set.
        Parameters:
        name - Role name
    • Method Detail

      • withId

        public AppRoleBuilder withId​(String id)
        Deprecated.
        Add custom role ID. (optional)
        Parameters:
        id - the ID
        Returns:
        self
      • withBindSecretID

        public AppRoleBuilder withBindSecretID​(Boolean bindSecretId)
        Deprecated.
        Set if role is bound to secret ID.
        Parameters:
        bindSecretId - the display name
        Returns:
        self
      • withSecretIdBoundCidrs

        public AppRoleBuilder withSecretIdBoundCidrs​(List<String> secretIdBoundCidrs)
        Deprecated.
        Set bound CIDR blocks.
        Parameters:
        secretIdBoundCidrs - List of CIDR blocks which can perform login
        Returns:
        self
        Since:
        0.8 replaces withBoundCidrList(List)
      • withSecretBoundCidr

        public AppRoleBuilder withSecretBoundCidr​(String secretBoundCidr)
        Deprecated.
        Add a CIDR block to list of bound blocks for secret.
        Parameters:
        secretBoundCidr - the CIDR block
        Returns:
        self
        Since:
        0.9
      • withTokenPolicies

        public AppRoleBuilder withTokenPolicies​(List<String> tokenPolicies)
        Deprecated.
        Add given policies.
        Parameters:
        tokenPolicies - the token policies
        Returns:
        self
        Since:
        0.9
      • withTokenPolicy

        public AppRoleBuilder withTokenPolicy​(String tokenPolicy)
        Deprecated.
        Add a single policy.
        Parameters:
        tokenPolicy - the token policy
        Returns:
        self
        Since:
        0.9
      • withSecretIdNumUses

        public AppRoleBuilder withSecretIdNumUses​(Integer secretIdNumUses)
        Deprecated.
        Set number of uses for secret IDs.
        Parameters:
        secretIdNumUses - the number of uses
        Returns:
        self
      • withSecretIdTtl

        public AppRoleBuilder withSecretIdTtl​(Integer secretIdTtl)
        Deprecated.
        Set default secret ID TTL in seconds.
        Parameters:
        secretIdTtl - the TTL
        Returns:
        self
      • withEnableLocalSecretIds

        public AppRoleBuilder withEnableLocalSecretIds​(Boolean enableLocalSecretIds)
        Deprecated.
        Enable or disable local secret IDs.
        Parameters:
        enableLocalSecretIds - Enable local secret IDs?
        Returns:
        self
        Since:
        0.9
      • withTokenTtl

        public AppRoleBuilder withTokenTtl​(Integer tokenTtl)
        Deprecated.
        Set default token TTL in seconds.
        Parameters:
        tokenTtl - the TTL
        Returns:
        self
      • withTokenMaxTtl

        public AppRoleBuilder withTokenMaxTtl​(Integer tokenMaxTtl)
        Deprecated.
        Set maximum token TTL in seconds.
        Parameters:
        tokenMaxTtl - the TTL
        Returns:
        self
      • withTokenBoundCidrs

        public AppRoleBuilder withTokenBoundCidrs​(List<String> tokenBoundCidrs)
        Deprecated.
        Set bound CIDR blocks for associated tokens.
        Parameters:
        tokenBoundCidrs - List of CIDR blocks which can perform login
        Returns:
        self
        Since:
        0.9
      • withTokenBoundCidr

        public AppRoleBuilder withTokenBoundCidr​(String tokenBoundCidr)
        Deprecated.
        Add a CIDR block to list of bound blocks for token.
        Parameters:
        tokenBoundCidr - the CIDR block
        Returns:
        self
        Since:
        0.9
      • withTokenExplicitMaxTtl

        public AppRoleBuilder withTokenExplicitMaxTtl​(Integer tokenExplicitMaxTtl)
        Deprecated.
        Set explicit maximum token TTL in seconds.
        Parameters:
        tokenExplicitMaxTtl - the TTL
        Returns:
        self
      • withTokenNoDefaultPolicy

        public AppRoleBuilder withTokenNoDefaultPolicy​(Boolean tokenNoDefaultPolicy)
        Deprecated.
        Enable or disable default policy for generated token.
        Parameters:
        tokenNoDefaultPolicy - Enable default policy for token?
        Returns:
        self
        Since:
        0.9
      • withTokenNumUses

        public AppRoleBuilder withTokenNumUses​(Integer tokenNumUses)
        Deprecated.
        Set number of uses for generated tokens.
        Parameters:
        tokenNumUses - number of uses for tokens
        Returns:
        self
        Since:
        0.9
      • wit0hTokenPeriod

        public AppRoleBuilder wit0hTokenPeriod​(Integer tokenPeriod)
        Deprecated.
        Set renewal period for generated token in seconds.
        Parameters:
        tokenPeriod - period in seconds
        Returns:
        self
        Since:
        0.9
      • withTokenType

        public AppRoleBuilder withTokenType​(Token.Type tokenType)
        Deprecated.
        Set type of generated token.
        Parameters:
        tokenType - token type
        Returns:
        self
        Since:
        0.9
      • build

        public AppRole build()
        Deprecated.
        Build the AppRole role based on given parameters.
        Returns:
        the role