Fetch Authentication headers with Selenium #84
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.
These changes add a new function, sw-update-headers, which runs a
headless Chrome browser to scrape the required Authentication headers
for checking in and stores them in Parameter Store. The check-in lambda
then pulls these headers from the Parameter Store on invocation and uses
them to (hopefully) check in successfully.
Right now the sw-update-headers lambda is triggered every hour, but it
could be improved to run on check-in failures or something.
I had to fight a lot with the correct Python/Selenium/Chromium
versions on Lambda. This exact combination of Python 3.6 and the
Chromedriver was the only one I could get to work. So we're stuck on 3.6
until this is resolved.
Based on the work in https://github.com/byalextran/southwest-checkin
Closes #83