Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ConjurPropertySource Not only applied to the properties of a class. #75

Closed
1 of 3 tasks
bnasslahsen opened this issue Apr 5, 2023 · 0 comments · Fixed by #76
Closed
1 of 3 tasks

@ConjurPropertySource Not only applied to the properties of a class. #75

bnasslahsen opened this issue Apr 5, 2023 · 0 comments · Fixed by #76

Comments

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Apr 5, 2023

Summary

The @ConjurPropertySource annotation is Not only applied to the properties of a class.
It is applied to all the application properties, causing so many calls to conjur.

  • 377 REST API calls are made to conjur. These API calls tries to retrieve secret values for spring properties, not part of the ConjurPropertySource configuration.
  • A maximum of one REST API calls per secret be made in this case. (or a single bulk REST API call)

Steps to Reproduce

  1. Declare the annotation the class level:
@ConjurPropertySource(value={"data/bnl/ocp-apps/"})
public class ConjurSpringDbConfig extends DataSourceProperties {
    @Value("${url}")
     private byte[] url;
    @Value("${username}")
    private byte[] username;
}
  1. Start the application
  2. Go to conjur audit logs

Expected Results

*Only a single call should be made to the conjur API for retrieving a secret

Actual Results

Too many call are made to conjur for all the application properties, causing performance issues
image

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

  • conjur-sdk-springboot version 1.0.2

Environment setup

  • Running on macOS 13.2.1 / IntelliJ IDEA 2022.2
  • Java version: 11.0.15
  • spring-boot 2.7.10
  • conjur enterprise 12.9

Additional Information

Add any other context about the problem here.

bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 6, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 6, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 6, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 6, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 6, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 7, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 7, 2023
bnasslahsen added a commit to bnasslahsen/conjur-spring-boot-sdk that referenced this issue Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants