-
Notifications
You must be signed in to change notification settings - Fork 8
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
Default secrets #41
Merged
Merged
Default secrets #41
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f0ebcb0
added checkbox to use default certs
Owen-Choh edc7299
added reminder message
Owen-Choh 067944a
fix formatting and tests
Owen-Choh 12a99ad
added helper function for url validation
Owen-Choh ed0436b
add boto3 to use aws services
Owen-Choh 35f71ac
copied over lambda implementation
Owen-Choh 3293b41
first commit of setting default secrets
Owen-Choh 576b9c2
fix typo
Owen-Choh 6a462ae
changes to optimise building of image
Owen-Choh 9a853c9
forgot to remove unneeded function call
Owen-Choh 35a427c
amend description of variables
Owen-Choh 46193a1
fix description of Set_Default_Secrets
Owen-Choh ca79fe7
dont run Set_Default_Secrets when it is already fetched
Owen-Choh 50a83d4
added button for debug purpose
Owen-Choh d4faaa4
code is working on local machine
Owen-Choh bcd955c
updated sample docker build command
Owen-Choh 8f291f3
updating the add course run code
Owen-Choh 6dd6eaa
updated edit and delete course
Owen-Choh 09a81d2
update view course session and fix some typos
Owen-Choh 23bd9de
amend default secret message
Owen-Choh 22814db
fix typos with does_not_have_url
Owen-Choh 86e372d
amend enrolment api calls
Owen-Choh 28405e9
amend attendance api call
Owen-Choh ee6b734
amend assessment api call
Owen-Choh cdfed5a
amend to conform to pep8 style
Owen-Choh 9f8278a
fix tests
Owen-Choh 9120984
added warning to highlight difference in view enrolment api
Owen-Choh f9abc44
add description for encryption key checking logic
Owen-Choh 053074b
add same description for key checking in encrypt function
Owen-Choh d83e42e
fixed view assessment api call
Owen-Choh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
FROM python:3.12 | ||
|
||
WORKDIR /app | ||
EXPOSE 80 | ||
|
||
COPY . . | ||
COPY requirements.txt requirements.txt | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Below is an example command to run to set these environment variables needed for default secrets function to be set | ||
# For more variables, just extend the command with --build-arg <ARG name>=<your value> | ||
# For more info, see https://docs.docker.com/build/building/variables/#arg-usage-example | ||
# docker build --build-arg SECRET_PATH="/sample/app/test" --build-arg SECRET_ENCRYPTION_KEY_PATH="/sample/app/test/encrypt" --build-arg SECRET_CERT_PATH="/sample/app/test/cert" --build-arg SECRET_KEY_PATH="/sample/app/test/key" --build-arg ROLE_ARN="arn:aws:iam::767397936445:role/SampleAppRetrieveSecret" --build-arg REGION_NAME="ap-southeast-1" -t ssg/sample-app-test . | ||
|
||
ARG SECRET_PATH='' | ||
ENV SECRET_PATH=$SECRET_PATH | ||
|
||
ARG SECRET_ENCRYPTION_KEY_PATH='' | ||
ENV SECRET_ENCRYPTION_KEY_PATH=$SECRET_ENCRYPTION_KEY_PATH | ||
|
||
ARG SECRET_CERT_PATH='' | ||
ENV SECRET_CERT_PATH=$SECRET_CERT_PATH | ||
|
||
ARG SECRET_KEY_PATH='' | ||
ENV SECRET_KEY_PATH=$SECRET_KEY_PATH | ||
|
||
ARG ROLE_ARN='' | ||
ENV ROLE_ARN=$ROLE_ARN | ||
|
||
ARG REGION_NAME='' | ||
ENV REGION_NAME=$REGION_NAME | ||
|
||
|
||
COPY . . | ||
|
||
ENTRYPOINT ["streamlit", "run", "Home.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,11 +46,11 @@ def _prepare(self, runId: int, crn: str, session_id: str) -> None: | |
.with_param("courseReferenceNumber", crn) \ | ||
.with_param("sessionId", session_id) | ||
|
||
def execute(self) -> requests.Response: | ||
def execute(self, cert_pem, key_pem) -> requests.Response: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can i confirm course session attendance do not need encryption key? |
||
""" | ||
Executes the HTTP request and returns the response object. | ||
|
||
:return: requests.Response object | ||
""" | ||
|
||
return self.req.get() | ||
return self.req.get(cert_pem, key_pem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can i confirm view assessment do not need encryption key?