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

Add API key authentication to data node endpoints #262

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions openapi/data-node/components/securitySchemes/ApiKeyAuth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: apiKey
in: header
name: X-API-Key
7 changes: 6 additions & 1 deletion openapi/data-node/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,9 @@ paths:
/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/Note/{noteId}:
$ref: paths/notes@{noteId}.yaml
/healthCheck:
$ref: ../commons/paths/healthCheck.yaml
$ref: ../commons/paths/healthCheck.yaml

components:
securitySchemes:
ApiKeyAuth:
$ref: components/securitySchemes/ApiKeyAuth.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/annotationStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ post:
summary: Create an annotation store
description: Create an annotation store with the ID specified
operationId: createAnnotationStore
security:
- ApiKeyAuth: []
parameters:
- in: query
name: annotationStoreId
Expand Down Expand Up @@ -42,6 +44,8 @@ get:
summary: List the annotation stores in a dataset
description: Returns the annotation stores
operationId: listAnnotationStores
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ get:
summary: Get an annotation store
description: Returns the annotation store specified
operationId: getAnnotationStore
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -34,6 +36,8 @@ delete:
summary: Delete an annotation store
description: Deletes the annotation store specified
operationId: deleteAnnotationStore
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ post:
summary: Create an annotation
description: Create an annotation
operationId: createAnnotation
security:
- ApiKeyAuth: []
parameters:
- in: query
name: annotationId
Expand Down Expand Up @@ -48,6 +50,8 @@ get:
summary: List the annotations in an annotation store
description: Returns the annotations in an annotation store
operationId: listAnnotations
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/annotations@{annotationId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ get:
summary: Get an annotation
description: Returns the annotation specified
operationId: getAnnotation
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -40,6 +42,8 @@ delete:
summary: Delete an annotation
description: Deletes the annotation specified
operationId: deleteAnnotation
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ post:
summary: Create a dataset
description: Create a dataset with the name specified
operationId: createDataset
security:
- ApiKeyAuth: []
parameters:
- in: query
name: datasetId
Expand Down Expand Up @@ -35,6 +37,8 @@ get:
summary: Get all datasets
description: Returns the datasets
operationId: listDatasets
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/datasets@{datasetId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ get:
summary: Get a dataset by ID
description: Returns the dataset for a given ID
operationId: getDataset
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -28,6 +30,8 @@ delete:
summary: Delete a dataset by ID
description: Deletes the dataset for a given ID
operationId: deleteDataset
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/fhirStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ post:
summary: Create a FHIR store
description: Create a FHIR store with the ID specified
operationId: createFhirStore
security:
- ApiKeyAuth: []
parameters:
- in: query
name: fhirStoreId
Expand Down Expand Up @@ -42,6 +44,8 @@ get:
summary: List the FHIR stores in a dataset
description: Returns the FHIR stores
operationId: listFhirStores
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/fhirStores@{fhirStoreId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ get:
summary: Get a FHIR store
description: Returns the FHIR store specified
operationId: getFhirStore
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -34,6 +36,8 @@ delete:
summary: Delete a FHIR store
description: Deletes the FHIR store specified
operationId: deleteFhirStore
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ post:
summary: Create a note
description: Create a note
operationId: createNote
security:
- ApiKeyAuth: []
parameters:
- in: query
name: noteId
Expand Down Expand Up @@ -48,6 +50,8 @@ get:
summary: List notes
description: Returns the notes in a FHIR store
operationId: listNotes
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/notes@{noteId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ get:
summary: Get a note
description: Returns the note specified
operationId: getNote
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -40,6 +42,8 @@ delete:
summary: Delete a note
description: Deletes the note specified
operationId: deleteNote
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/patients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ post:
summary: Create a FHIR patient
description: Create a FHIR patient
operationId: createPatient
security:
- ApiKeyAuth: []
parameters:
- in: query
name: patientId
Expand Down Expand Up @@ -48,6 +50,8 @@ get:
summary: List the Patients in a FHIR store
description: Returns the Patients in a FHIR store
operationId: listPatients
security:
- ApiKeyAuth: []
parameters:
- in: query
name: limit
Expand Down
4 changes: 4 additions & 0 deletions openapi/data-node/paths/patients@{patientId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ get:
summary: Get a FHIR patient
description: Returns the FHIR patient specified
operationId: getPatient
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand All @@ -40,6 +42,8 @@ delete:
summary: Delete a FHIR patient
description: Deletes the FHIR patient specified
operationId: deletePatient
security:
- ApiKeyAuth: []
responses:
'200':
description: Success
Expand Down