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

MAT-7535 remove lambda-api-key #85

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<dependency>
<groupId>gov.cms.madie</groupId>
<artifactId>madie-java-models</artifactId>
<version>0.6.57-SNAPSHOT</version>
<version>0.6.58-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.cms.madie</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public ResponseEntity<String> changeOwnership(
HttpServletRequest request,
@PathVariable("id") String id,
@RequestParam(name = "userid") String userid,
@Value("${lambda-api-key}") String apiKey) {
@Value("${admin-api-key}") String apiKey) {
ResponseEntity<String> response = ResponseEntity.badRequest().body("Library does not exist.");

if (cqlLibraryService.changeOwnership(id, userid)) {
Expand All @@ -218,7 +218,7 @@ public ResponseEntity<String> grantAccess(
HttpServletRequest request,
@PathVariable("id") String id,
@RequestParam(required = true, name = "userid") String userid,
@Value("${lambda-api-key}") String apiKey) {
@Value("${admin-api-key}") String apiKey) {
ResponseEntity<String> response =
ResponseEntity.badRequest().body("Cql Library does not exist.");

Expand All @@ -237,7 +237,7 @@ public ResponseEntity<String> grantAccess(
@PreAuthorize("#request.getHeader('api-key') == #apiKey")
public ResponseEntity<List<Map<String, Object>>> getMeasureSharedWith(
HttpServletRequest request,
@Value("${lambda-api-key}") String apiKey,
@Value("${admin-api-key}") String apiKey,
@RequestParam(name = "measureids") String measureids) {
List<Map<String, Object>> results = new ArrayList<>();
String[] ids = StringUtils.split(measureids, ",");
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ okta:
issuer: ${OKTA_ISSUER:https://dev-18092578.okta.com/oauth2/default}
audience: ${OKTA_AUDIENCE:api://default}

lambda-api-key: ${LAMBDA_API_KEY:9202c9fa}
admin-api-key: ${ADMIN_API_KEY:0a51991c}

mongock:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class CqlLibraryControllerMvcTest {
private static final String TEST_USER_ID = "test-okta-user-id-123";
private static final String TEST_LIBRARYSET_ID = "test-okta-user-id-321";
private static final String TEST_API_KEY_HEADER = "api-key";
private static final String TEST_API_KEY_HEADER_VALUE = "9202c9fa";
private static final String TEST_API_KEY_HEADER_VALUE = "0a51991c";
private static final String MODEL = ModelType.QI_CORE.toString();

@MockBean private CqlLibraryRepository repository;
Expand Down
Loading