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: refresh credential for each enrollment #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion functions/source/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
get_org_for_account, create_stack_set_instances, stack_set_instance_exists, delete_stack_set_instances
from honeycomb import send_honeycomb_event
from lacework import get_account_from_url, get_access_token, add_lw_cloud_account_for_cfg, \
lw_cloud_account_exists_in_orgs, delete_lw_cloud_account_in_orgs, update_lw_cloud_account_in_orgs
lw_cloud_account_exists_in_orgs, delete_lw_cloud_account_in_orgs, update_lw_cloud_account_in_orgs, \
setup_initial_access_token

HONEY_API_KEY = "$HONEY_KEY"
DATASET = "$DATASET"
Expand Down Expand Up @@ -108,6 +109,7 @@ def cfn_stack_set_processing(messages):
lacework_org_sub_account_names = os.environ['lacework_org_sub_account_names']
lacework_account_sns = os.environ['lacework_account_sns']
lacework_api_credentials = os.environ['lacework_api_credentials']
setup_initial_access_token(lacework_url, lacework_api_credentials)
access_token = get_access_token(lacework_api_credentials)

if access_token is None:
Expand Down