Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c882252
Merge master into feature/cloudformation
aws-toolkit-automation Nov 7, 2025
5657bc1
Merge master into feature/cloudformation
aws-toolkit-automation Nov 8, 2025
09b66ad
feat(cloudformation): Add comprehensive CloudFormation LSP integration
kddejong Nov 10, 2025
89434cb
Add changelog entry for CloudFormation LSP integration
kddejong Nov 10, 2025
dbe22cc
Merge master into feature/cloudformation
aws-toolkit-automation Nov 10, 2025
a1ffdb5
Merge master into feature/cloudformation
aws-toolkit-automation Nov 10, 2025
e005c2a
Merge master into feature/cloudformation
aws-toolkit-automation Nov 11, 2025
e19e476
Merge branch 'feature/cloudformation' into feature/cloudformation
laileni-aws Nov 11, 2025
d5a5bd9
feat(cloudformation): Additional CloudFormation features and improvem…
kddejong Nov 11, 2025
44672d9
feat(cloudformation): Additional CloudFormation features and improvem…
kddejong Nov 11, 2025
22d26ee
Merge master into feature/cloudformation
aws-toolkit-automation Nov 12, 2025
0564319
Merge master into feature/cloudformation
aws-toolkit-automation Nov 13, 2025
f7832bc
Merge master into feature/cloudformation
aws-toolkit-automation Nov 13, 2025
3189a1d
Merge master into feature/cloudformation
aws-toolkit-automation Nov 14, 2025
69ece07
Merge master into feature/cloudformation
aws-toolkit-automation Nov 15, 2025
4ad0d5c
Merge master into feature/cloudformation
aws-toolkit-automation Nov 15, 2025
97636a1
Merge branch 'feature/cloudformation' into feature/cloudformation
manodnyab Nov 17, 2025
32babee
Merge pull request #8275 from kddejong/feature/cloudformation
manodnyab Nov 17, 2025
4a5cd22
Merge master into feature/cloudformation
aws-toolkit-automation Nov 18, 2025
1225595
Merge master into feature/cloudformation
aws-toolkit-automation Nov 18, 2025
371d23b
feat(cloudformation): Update CloudFormation feature with latest chang…
kddejong Nov 18, 2025
b5ac5d6
Merge master into feature/cloudformation
aws-toolkit-automation Nov 19, 2025
9bc923d
Merge master into feature/cloudformation
aws-toolkit-automation Nov 19, 2025
f49a07f
Merge master into feature/cloudformation
aws-toolkit-automation Nov 19, 2025
dd1ba33
Merge master into feature/cloudformation
aws-toolkit-automation Nov 19, 2025
923a920
fix(cloudformation): fix a few testing issues for CloudFormation chan…
kddejong Nov 19, 2025
c8809c6
Merge pull request #8315 from aws/feature/cloudformation
manodnyab Nov 19, 2025
bf6e485
fix(toolkit): flaky test cases (#8327)
laileni-aws Nov 19, 2025
4646030
Merge branch 'feature/smus' into autoMerge/feature/smus
laileni-aws Nov 19, 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
packages/core/src/codewhisperer/ @aws/codewhisperer-team
packages/core/src/amazonqFeatureDev/ @aws/earlybird
packages/core/src/awsService/accessanalyzer/ @aws/access-analyzer
packages/core/src/awsService/cloudformation/ @aws/cfn-dev-productivity
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ Unlike the user setting overrides, not all of these environment variables have t

- `SSMDOCUMENT_LANGUAGESERVER_PORT`: The port the ssm document language server should start debugging on

#### CloudFormation LSP

- `__CLOUDFORMATIONLSP_PATH`: for aws.dev.cloudformationLsp.path
- `__CLOUDFORMATIONLSP_CLOUDFORMATION_ENDPOINT`: for aws.dev.cloudformationLsp.cloudformationEndpoint

#### CI/Testing

- `GITHUB_ACTION`: The name of the current GitHub Action workflow step that is running
Expand Down
1 change: 1 addition & 0 deletions packages/core/scripts/test/launchTestUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ async function getVSCodeCliArgs(params: {
['DEVELOPMENT_PATH']: projectRootDir,
['AWS_TOOLKIT_AUTOMATION']: params.suite,
['TEST_DIR']: process.env.TEST_DIR,
['JAVA_HOME']: process.env.JAVA_HOME,
...params.env,
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

export const ResourceIdentifierDocumentationUrl =
'https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html'
80 changes: 80 additions & 0 deletions packages/core/src/awsService/cloudformation/auth/credentials.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import { Disposable } from 'vscode'
import { LanguageClient } from 'vscode-languageclient/node'
import { StacksManager } from '../stacks/stacksManager'
import { ResourcesManager } from '../resources/resourcesManager'
import { CloudFormationRegionManager } from '../explorer/regionManager'
import globals from '../../../shared/extensionGlobals'
import * as jose from 'jose'
import * as crypto from 'crypto'

export const encryptionKey = crypto.randomBytes(32)

export class AwsCredentialsService implements Disposable {
private authChangeListener: Disposable
private client: LanguageClient | undefined

constructor(
private stacksManager: StacksManager,
private resourcesManager: ResourcesManager,
private regionManager: CloudFormationRegionManager
) {
this.authChangeListener = globals.awsContext.onDidChangeContext(() => {
void this.updateCredentialsFromActiveConnection()
})
}

async initialize(client: LanguageClient): Promise<void> {
this.client = client
await this.updateCredentialsFromActiveConnection()
}

private async updateCredentialsFromActiveConnection(): Promise<void> {
if (!this.client) {
return
}

const credentials = await globals.awsContext.getCredentials()
const profileName = globals.awsContext.getCredentialProfileName()

if (credentials && profileName) {
const encryptedRequest = await this.createEncryptedCredentialsRequest({
profile: profileName.replaceAll('profile:', ''),
region: this.regionManager.getSelectedRegion(),
accessKeyId: credentials.accessKeyId,
secretAccessKey: credentials.secretAccessKey,
sessionToken: credentials.sessionToken,
})

await this.client.sendRequest('aws/credentials/iam/update', encryptedRequest)
}

void this.stacksManager.reload()
void this.resourcesManager.reload()
}

async updateRegion(): Promise<void> {
await this.updateCredentialsFromActiveConnection()
}

private async createEncryptedCredentialsRequest(data: any): Promise<any> {
const payload = new TextEncoder().encode(JSON.stringify({ data }))

const jwt = await new jose.CompactEncrypt(payload)
.setProtectedHeader({ alg: 'dir', enc: 'A256GCM' })
.encrypt(encryptionKey)

return {
data: jwt,
encrypted: true,
}
}

dispose(): void {
this.authChangeListener.dispose()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*!
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import { LanguageClient } from 'vscode-languageclient/node'
import {
ParsedCfnEnvironmentFile,
ParseCfnEnvironmentFilesParams,
ParseCfnEnvironmentFilesRequest,
} from './cfnEnvironmentRequestType'

export async function parseCfnEnvironmentFiles(
client: LanguageClient,
params: ParseCfnEnvironmentFilesParams
): Promise<ParsedCfnEnvironmentFile[]> {
const result = await client.sendRequest(ParseCfnEnvironmentFilesRequest, params)
return result.parsedFiles
}
Loading
Loading