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

auth: add sessionDuration to aws_loginWithBrowser #914

Merged

Conversation

nkomonen-amazon
Copy link
Contributor

We want to know about the previous sessionDuration, if there is one, the next time we log in to the same SSO session due to something like expiration.

We will use this in CloudWatch to alarm on if we are seeing a scenario like BuilderID emitting another aws_loginWithBrowser less than 90 days after the previous aws_loginWithBrowser.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

We want to know about the previous sessionDuration, if there is one, the next time we log
in to the same SSO session due to something like expiration.

We will use this in CloudWatch to alarm on if we are seeing a scenario like
BuilderID emitting another `aws_loginWithBrowser` less than 90 days after the previous
`aws_loginWithBrowser`.

Signed-off-by: nkomonen-amazon <[email protected]>
@nkomonen-amazon nkomonen-amazon force-pushed the sessionDurationLoginWithBrowser branch from c1e4291 to a5c435e Compare November 14, 2024 04:36
@nkomonen-amazon nkomonen-amazon merged commit 8e1a0ce into aws:main Nov 14, 2024
8 checks passed
@nkomonen-amazon nkomonen-amazon deleted the sessionDurationLoginWithBrowser branch November 14, 2024 14:45
nkomonen-amazon added a commit to aws/aws-toolkit-vscode that referenced this pull request Nov 14, 2024
…er` (#6013)

Depends on aws/aws-toolkit-common#914

## Problem

On the condition of:

- SSO session is BuilderID or Internal Amazon IdC
- Subsequent login for same SSO session happened earlier than 90 days
(the expected session expiration)

We need to know on the client side to be able to report this information
so that CloudWatch alarms can consume this.

## Solution

By adding the existing sessionDuration field, which is `currentTime -
whenThePreviousSessionWasCreated`, to `aws_loginWithBrowser` we will
have all the information we need to alarm on.


---

<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Signed-off-by: nkomonen-amazon <[email protected]>
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.

2 participants