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

🐛 Session not invalidated on org switch #251

Merged

Conversation

AlainODea
Copy link
Contributor

Problem Statement

Issue #239 states:

Describe the bug
The ~/.okta/.current_session file is used even if the org is switched. This can lead to dangerous surprises.

To Reproduce
Steps to reproduce the behavior:

1. Run `okta-aws test sts-get-caller-identity`

2. Change OKTA_ORG in ~/.okta/config.properties

3. Run `okta-aws test sts-get-caller-identity`

4. See STS output for previous OKTA_ORG and no auth prompts

Expected behavior
Session should not be org-aware. If I have a non-expired session on the new OKTA_ORG setting, it should be reused. If not, I should be prompted for authentication.

Screenshots
N/A

Additional context
v1.0.5

Solution

  • Add OKTA_ORG to .current-session on save

  • If OKTA_ORG is missing, reuse session (backwards-compatibility)

  • If OKTA_ORG is present and matches, reuse session

  • If OKTA_ORG is present and non-matching, invalidate session

Resolves #239

 - Add OKTA_ORG to .current-session on save

 - If OKTA_ORG is missing, reuse session (backwards-compatibility)

 - If OKTA_ORG is present and matches, reuse session

 - If OKTA_ORG is present and non-matching, invalidate session

Resolves oktadev#239
@AlainODea
Copy link
Contributor Author

@nbarbettini you up for reviewing this?

@AlainODea AlainODea merged commit 6de7692 into oktadev:master Dec 12, 2018
@AlainODea AlainODea deleted the ao-BUG-session-not-invalidated-org-switch branch January 12, 2019 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants