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

Default secrets #41

Merged
merged 30 commits into from
Dec 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f0ebcb0
added checkbox to use default certs
Owen-Choh Dec 16, 2024
edc7299
added reminder message
Owen-Choh Dec 16, 2024
067944a
fix formatting and tests
Owen-Choh Dec 16, 2024
12a99ad
added helper function for url validation
Owen-Choh Dec 16, 2024
ed0436b
add boto3 to use aws services
Owen-Choh Dec 20, 2024
35f71ac
copied over lambda implementation
Owen-Choh Dec 20, 2024
3293b41
first commit of setting default secrets
Owen-Choh Dec 20, 2024
576b9c2
fix typo
Owen-Choh Dec 20, 2024
6a462ae
changes to optimise building of image
Owen-Choh Dec 20, 2024
9a853c9
forgot to remove unneeded function call
Owen-Choh Dec 20, 2024
35a427c
amend description of variables
Owen-Choh Dec 23, 2024
46193a1
fix description of Set_Default_Secrets
Owen-Choh Dec 23, 2024
ca79fe7
dont run Set_Default_Secrets when it is already fetched
Owen-Choh Dec 23, 2024
50a83d4
added button for debug purpose
Owen-Choh Dec 23, 2024
d4faaa4
code is working on local machine
Owen-Choh Dec 23, 2024
bcd955c
updated sample docker build command
Owen-Choh Dec 23, 2024
8f291f3
updating the add course run code
Owen-Choh Dec 24, 2024
6dd6eaa
updated edit and delete course
Owen-Choh Dec 24, 2024
09a81d2
update view course session and fix some typos
Owen-Choh Dec 24, 2024
23bd9de
amend default secret message
Owen-Choh Dec 24, 2024
22814db
fix typos with does_not_have_url
Owen-Choh Dec 24, 2024
86e372d
amend enrolment api calls
Owen-Choh Dec 24, 2024
28405e9
amend attendance api call
Owen-Choh Dec 24, 2024
ee6b734
amend assessment api call
Owen-Choh Dec 24, 2024
cdfed5a
amend to conform to pep8 style
Owen-Choh Dec 24, 2024
9f8278a
fix tests
Owen-Choh Dec 24, 2024
9120984
added warning to highlight difference in view enrolment api
Owen-Choh Dec 26, 2024
f9abc44
add description for encryption key checking logic
Owen-Choh Dec 26, 2024
053074b
add same description for key checking in encrypt function
Owen-Choh Dec 26, 2024
d83e42e
fixed view assessment api call
Owen-Choh Dec 26, 2024
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
Prev Previous commit
Next Next commit
dont run Set_Default_Secrets when it is already fetched
  • Loading branch information
Owen-Choh committed Dec 23, 2024
commit ca79fe71e558e6711617fe4d896586c775c7086f
8 changes: 6 additions & 2 deletions SSG-API-Testing-Application-v2/app/utils/streamlit_utils.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
from app.core.system.logger import Logger
from app.utils.string_utils import StringBuilder

from app.core.system.secrets import Set_Default_Secrets
from app.core.system.secrets import (Set_Default_Secrets, ENV_NAME_ENCRYPT, ENV_NAME_CERT, ENV_NAME_KEY)

LOGGER = Logger(__name__)

@@ -19,7 +19,11 @@ def init() -> None:

:return: None
"""
Set_Default_Secrets()
# if secrets has not been fetched, go and fetch it
if "secret_fetched" not in st.session_state:
st.session_state["secret_fetched"] = False
if not st.session_state["secret_fetched"]:
st.session_state["secret_fetched"] = Set_Default_Secrets()

if "uen" not in st.session_state:
st.session_state["uen"] = ""