Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
120cfa2
refactor(runtimes): modify CredentialsProvider Interface
yuxianrz Jun 9, 2025
1153438
feat(runtimes): add STS credential types to identity management
liramon1 Jun 10, 2025
54e0469
fix(runtimes): fix credentialsType
yuxianrz Jun 11, 2025
3ddab3c
fix(runtimes): fix iamSessions
liramon1 Jun 11, 2025
027a29b
fix(runtimes): remove error throwing from credentials provider
liramon1 Jun 12, 2025
024cdd6
feat(runtimes): add IAM credentials profile
liramon1 Jun 13, 2025
e778b84
feat(runtimes): add onGetIamCredential endpoint to identity server
liramon1 Jun 13, 2025
511d4b5
Merge branch 'feature/flare-iam' of github.com:aws/language-server-ru…
liramon1 Jun 13, 2025
3e4b901
feat(runtimes): add in IamLogout Logic and handlers
yuxianrz Jun 13, 2025
daaddc4
Merge remote-tracking branch 'origin' into feature/flare-iam
liramon1 Jun 16, 2025
c645ef8
fix(runtimes): delete iam profile when logout
yuxianrz Jun 16, 2025
3077881
Merge branch 'feature/flare-iam' of github.com:aws/language-server-ru…
yuxianrz Jun 16, 2025
ed32392
fix(runtimes): fix IAM credentials encryption
liramon1 Jun 17, 2025
d6ef1c5
fix(runtimes): fix circular dependency
yuxianrz Jun 19, 2025
a8121c5
refactor(runtimes): split SsoTokenChangedKind and CredentialsChangedKind
yuxianrz Jun 19, 2025
a560f9f
Merge branch 'feature/flare-iam' of github.com:liramon1/language-serv…
liramon1 Jun 20, 2025
9cf51be
Merge remote-tracking branch 'origin' into feature/flare-iam
liramon1 Jun 30, 2025
287d202
feat: add sts credentials support
yuxianrz Jul 1, 2025
90c6b3d
feat: replace profile deletion with iam invalidation
liramon1 Jul 1, 2025
f8b21f0
refactor: rename loginOnInvalidToken and add STS error codes
liramon1 Jul 1, 2025
1541461
refactor: rename GetIamCredentialOptions fields
liramon1 Jul 2, 2025
bee0605
refactor: remove assumeRole option
liramon1 Jul 2, 2025
8c6a636
chore: revert package json
liramon1 Jul 2, 2025
6213337
feat(runtimes): enable sts invalidation
yuxianrz Jul 2, 2025
6e2c22a
feat(runtimes): enable sts autorefresh
yuxianrz Jul 3, 2025
fb6972c
Merge remote-tracking branch 'origin' into feature/flare-iam
liramon1 Jul 7, 2025
99d4a83
refactor: revert unnecessary changes
liramon1 Jul 7, 2025
0450131
fix: pass local unit tests
liramon1 Jul 7, 2025
22f77b0
feat(runtimes): add support for IAM and STS credentials management
liramon1 Jul 7, 2025
d9c4753
chore: undo unnecessary changes
liramon1 Jul 7, 2025
9b072f7
refactor(runtimes): make type parameter optional in credentialsProvider
liramon1 Jul 7, 2025
1eadcff
Merge branch 'iam-management' into feature/flare-iam
liramon1 Jul 7, 2025
d494086
Merge branch 'auth-optional-type' into feature/flare-iam
liramon1 Jul 7, 2025
db626ab
fix: re-add IamCredentials change
liramon1 Jul 7, 2025
b093aec
feat: add credential_process to profile fields
liramon1 Jul 8, 2025
ee14279
refactor: revert empty profile
liramon1 Jul 9, 2025
306c2b0
chore: revert EmptyProfile change
liramon1 Jul 9, 2025
de57f17
feat: add support for IAM MFA
liramon1 Jul 9, 2025
a63c53b
refactor: split IamCredentialProfile into multiple profiles
liramon1 Jul 10, 2025
fbfb2d6
refactor: split IamCredentialProfile into multiple profiles
liramon1 Jul 10, 2025
56fc78a
chore: revert comment
liramon1 Jul 10, 2025
939241b
feat: add mfaCode to getIamCredentialParams
liramon1 Jul 10, 2025
e69aa7c
refactor: prefix IAM-related profiles with 'Iam'
liramon1 Jul 10, 2025
52b509b
refactor: prefix IAM-related profiles with 'Iam'
liramon1 Jul 10, 2025
13974a3
chore: revert comment change
liramon1 Jul 10, 2025
986d9da
Merge branch 'iam-management' into feature/flare-iam
liramon1 Jul 11, 2025
d38dbb7
refactor: move encryption into separate function and split credential id
liramon1 Jul 11, 2025
88bd95a
Merge branch 'iam-management' into feature/flare-iam
liramon1 Jul 11, 2025
0ef95ac
feat: add external_id field to profile
liramon1 Jul 11, 2025
5fb131f
feat: optionalize permission validation in GetIamCredentialOptions
liramon1 Jul 14, 2025
e6e0220
refactor: move MFA code retrieval into separate request
liramon1 Jul 14, 2025
f308b88
fix: add parameters to mfa request
liramon1 Jul 14, 2025
2713539
fix: naming changes
liramon1 Jul 15, 2025
5eb1ac3
fix: incorporate PR feedback
liramon1 Jul 17, 2025
38ab93b
fix: change IamCredential fields
liramon1 Jul 18, 2025
1f47bf1
Merge remote-tracking branch 'aws/main' into feature/flare-iam
liramon1 Jul 18, 2025
b1a13df
fix: add error message for failed caller identity
liramon1 Jul 22, 2025
30e3c7f
refactor: undo changes to Auth
liramon1 Jul 22, 2025
dd4fd2e
Merge remote-tracking branch 'origin' into feature/flare-iam
liramon1 Jul 23, 2025
c851573
fix: add mfaSerial to MfaCode output
liramon1 Jul 25, 2025
c44382f
feat: add credential override
liramon1 Jul 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions runtimes/protocol/identity-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,35 @@ export const AwsErrorCodes = {
E_SSO_TOKEN_EXPIRED: 'E_SSO_TOKEN_EXPIRED',
E_STS_CREDENTIAL_EXPIRED: 'E_STS_CREDENTIAL_EXPIRED',
E_SSO_TOKEN_SOURCE_NOT_SUPPORTED: 'E_SSO_TOKEN_SOURCE_NOT_SUPPORTED',
E_CALLER_IDENTITY_NOT_FOUND: 'E_CALLER_IDENTITY_NOT_FOUND',
E_MFA_REQUIRED: 'E_MFA_REQUIRED',
E_PERMISSION_DENIED: 'E_PERMISSION_DENIED',
E_TIMEOUT: 'E_TIMEOUT',
E_UNKNOWN: 'E_UNKNOWN',
E_CANCELLED: 'E_CANCELLED',
} as const

// Permissions
export const PermissionSets = {
Q: [
'q:StartConversation',
'q:SendMessage',
'q:GetConversation',
'q:ListConversations',
'q:UpdateConversation',
'q:DeleteConversation',
'q:PassRequest',
'q:StartTroubleshootingAnalysis',
'q:StartTroubleshootingResolutionExplanation',
'q:GetTroubleshootingResults',
'q:UpdateTroubleshootingCommandResult',
'q:GetIdentityMetaData',
'q:GenerateCodeFromCommands',
'q:UsePlugin',
'codewhisperer:GenerateRecommendations',
],
}

export interface AwsResponseErrorData {
awsErrorCode: string
}
Expand Down Expand Up @@ -253,22 +276,29 @@ export type IamCredentialId = string // Opaque identifier

export interface GetIamCredentialOptions {
callStsOnInvalidIamCredential?: boolean
validatePermissions?: boolean
permissionSet?: string[]
credentialOverride?: IamCredentials
}

export const getIamCredentialOptionsDefaults = {
callStsOnInvalidIamCredential: true,
validatePermissions: true,
permissionSet: PermissionSets.Q,
credentialOverride: undefined,
} satisfies GetIamCredentialOptions

export interface GetIamCredentialParams {
profileName: string
options?: GetIamCredentialOptions
}

export interface GetIamCredentialResult {
export interface IamCredential {
id: IamCredentialId
kinds: ProfileKind[]
credentials: IamCredentials
}

export interface GetIamCredentialResult {
credential: IamCredential
updateCredentialsParams: UpdateCredentialsParams
}

Expand All @@ -282,12 +312,13 @@ export const getIamCredentialRequestType = new ProtocolRequestType<

// getMfaCode
export interface GetMfaCodeParams {
mfaSerial: string
profileName: string
mfaSerial?: string
}

export interface GetMfaCodeResult {
code: string
mfaSerial: string
}

export const getMfaCodeRequestType = new ProtocolRequestType<
Expand Down Expand Up @@ -318,7 +349,7 @@ export const invalidateSsoTokenRequestType = new ProtocolRequestType<

// invalidateStsCredential
export interface InvalidateStsCredentialParams {
profileName: string
iamCredentialId: IamCredentialId
}

export interface InvalidateStsCredentialResult {
Expand Down
10 changes: 5 additions & 5 deletions runtimes/runtimes/auth/standalone/encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ export async function encryptIamResultWithKey(
request: GetIamCredentialResult,
key: string
): Promise<GetIamCredentialResult> {
request.credentials = {
accessKeyId: await encryptObjectWithKey(request.credentials.accessKeyId, key),
secretAccessKey: await encryptObjectWithKey(request.credentials.secretAccessKey, key),
...(request.credentials.sessionToken
? { sessionToken: await encryptObjectWithKey(request.credentials.sessionToken, key) }
request.credential.credentials = {
accessKeyId: await encryptObjectWithKey(request.credential.credentials.accessKeyId, key),
secretAccessKey: await encryptObjectWithKey(request.credential.credentials.secretAccessKey, key),
...(request.credential.credentials.sessionToken
? { sessionToken: await encryptObjectWithKey(request.credential.credentials.sessionToken, key) }
: {}),
}
if (!request.updateCredentialsParams.encrypted) {
Expand Down