If there is a user that sends a request to STS requesting for credentials:
AWS.config.credentials = new AWS.WebIdentityCredentials({
RoleArn: 'arn:aws:iam::{id}:role/{role}',
WebIdentityToken: idToken,
RoleSessionName: VALUE
});
Next, if the user sends a request to a private API Gateway endpoint, and if it uses RoleSessionName, it gives me the details as to who the person is that makes the request. Now, can we avoid other users to assume this identity by using the same RoleSessionName?
Is there a best way to authenticate users using STS and IAM roles? If yes what it is?