Annotation Type ConjurValue


  • @Documented
    @Target(FIELD)
    @Retention(RUNTIME)
    public @interface ConjurValue
    The @ConjurValue annotation is a Conjur native annotation intended for new Spring Boot applications. Injecting the annotation into your Spring Boot code allows you to retrieve a single secret from the Conjur Vault.

    Example usage:

    Given the path policy/my-application/database.password containing the configuration data pair database.password=mysecretpassword, the following @Configuration class uses ConjurValue).

     @Configuration
     public class AppConfig {
    
            @ConjurValues("policy/my-application/database.password")
            private String password;
     
            @Bean
            public TestBean testBean() {
                    TestBean testBean = new TestBean();
                    testBean.setPassword(password);
                    return testBean;
            }
     }
     
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String key
      Indicates the complete path of the variable.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String kind  
    • Element Detail

      • key

        String key
        Indicates the complete path of the variable.
        Returns:
        key.
      • kind

        String kind
        Default:
        "variable"