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

feat: A&A Test to confirm that authorization is working as needed #480

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
3 changes: 3 additions & 0 deletions cumulus_lambda_functions/lib/uds_db/granules_db_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self):
base_url=os.getenv('ES_URL'),
port=int(os.getenv('ES_PORT', '443'))
)
self.__include_percolator = os.getenv('INCLUDE_PERCOLATOR', 'TRUE') == 'TRUE'
# self.__default_fields = {
# "granule_id": {"type": "keyword"},
# "collection_id": {"type": "keyword"},
Expand Down Expand Up @@ -130,6 +131,8 @@ def create_new_index(self, tenant, tenant_venue, es_mapping: dict):
self.__es.create_alias(new_index_name, read_alias_name)
self.__es.swap_index_for_alias(write_alias_name, current_index_name, new_index_name)

if not self.__include_percolator:
return
write_perc_alias_name = f'{DBConstants.granules_write_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
read_perc_alias_name = f'{DBConstants.granules_read_alias_prefix}_{tenant}_{tenant_venue}_perc'.lower().strip()
current_perc_alias = self.__es.get_alias(write_perc_alias_name)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jsonschema==4.23.0
jsonschema-specifications==2023.12.1
lark==0.12.0
mangum==0.18.0
mdps-ds-lib==1.1.1
mdps-ds-lib==1.1.1.dev000100
pydantic==2.9.2
pydantic_core==2.23.4
pygeofilter==0.2.4
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/.env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ CLIENT_ID=7a1fglm2d54eoggj13lccivp25
COGNITO_URL=https://cognito-idp.us-west-2.amazonaws.com
UNITY_URL=https://k3a3qmarxh.execute-api.us-west-2.amazonaws.com/dev
UNITY_STAGE=sbx-uds-dapa
COGNITO_USER_POOL_ID=us-west-2_aaa

Loading
Loading