Nike-Inc / gimme-aws-creds

A CLI that utilizes Okta IdP via SAML to acquire temporary AWS credentials
Apache License 2.0
925 stars 263 forks source link

This corrects an issue with the validation of the org url and app url… #375

Closed magni2000 closed 1 year ago

magni2000 commented 1 year ago

… when using action-configure

This is correcting the logic that is used in the config.py file to validate if the url contains one of the valid okta domains.

Description

The updated code will not correctly validated that the url provided by the user for the okta org or the app url will contain one of the elements contained in the allowlist. The validation logic that is in the code will always return false.

Related Issue

bug fix discussed in https://github.com/Nike-Inc/gimme-aws-creds/issues/374

Motivation and Context

We currently utilize the --action-configure feature for our employees to properly configure gimme-aws-creds for the first time utilization. We can provide a work around, but would prefer to utilize the functionality provided by the project already.

How Has This Been Tested?

I was able to test with mutliple urls, both those that contain the one of the domains in the allow list and urls that do not contain those domains. The logic is now returning a proper true or false using the desired validation criteria.

Screenshots (if appropriate):

valdationscreenhot

Types of changes

Checklist:

magni2000 commented 1 year ago

@epierce can you review this pull request? It is a fix to bug that was introduced with a recent merge in November.

epierce commented 1 year ago

The changes look good and are working for me. Thanks!