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

Can I change SessionId to username when I start and end SSM Session? #151

Closed
seun9su opened this issue Jul 20, 2021 · 4 comments · Fixed by #155
Closed

Can I change SessionId to username when I start and end SSM Session? #151

seun9su opened this issue Jul 20, 2021 · 4 comments · Fixed by #155
Labels
enhancement New feature or request

Comments

@seun9su
Copy link

seun9su commented Jul 20, 2021

When session is activated using the AssumeRole function and SSM Session is connected, it is shown below.

❯ aws ssm start-session --target [instanceID]--region [region]

Starting session with SessionId: assumed-from-leapp-918e122ee2440c19b
sh-4.2$ exit
exit


Exiting session with sessionId: assumed-from-leapp-918e122ee2440c19b.


~ 20m 0s
❯

"assumed-from-leapp-918e122ee2440c19b" <- Can't I change this string to username?
For example, replace "assumed-from-leapp-918e122ee2440c19b" with "myname-918e122ee2440c19b"

@seun9su seun9su added the enhancement New feature or request label Jul 20, 2021
@andreacavagna01
Copy link
Contributor

With username you mean the session Alias?

@seun9su
Copy link
Author

seun9su commented Jul 21, 2021

With username you mean the session Alias?

The best method is to indicate the name of the IAM user who has the access key.
Because Leapp user can manipulate the session alias.
The reason why I want this feature is because when I connect to an instance with SSM Session, the Session History displaysarn:aws:sts::[accountid]:assumed-role/[role name]/assumed-from-leapp in the owner tab, so I don't know exactly who logged in.

스크린샷 2021-07-22 오전 10 32 16
스크린샷 2021-07-22 오전 10 35 47

The attached screenshot is cloudtrail log and session history.

@andreacavagna01
Copy link
Contributor

#155 There is an open pull request for that! thanks to @matthewriedel-flux

@ericvilla
Copy link
Contributor

@seun9su we've just merged the pull request mentioned by @andreacavagna01, and fixed a retro-compatibility bug.

@andreacavagna01 andreacavagna01 linked a pull request Jul 30, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants