-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: support unique credential cookie names #560
Merged
limhjgrace
merged 17 commits into
aws-observability:main
from
limhjgrace:unique-cred-cookie
Jul 8, 2024
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
667519b
feat: support unique credential cookie names
limhjgrace fae705a
chore: Update unique credential cookie name doc
limhjgrace 3613b05
Update src/dispatch/Authentication.ts
limhjgrace b8c4da8
Update src/dispatch/Authentication.ts
limhjgrace b97d3c0
Update src/sessions/SessionManager.ts
limhjgrace 5c3467e
fix: Set cookie name in constructor instead of retrieving at runtime
limhjgrace 9685cb3
feat: use unique cookies for identity keys
limhjgrace 6b796c0
fix: Pass in uniqueCookie boolean as param to Cognito client
limhjgrace 09312e8
fix: Set unique cookie in unit test
limhjgrace 2a035d6
chore: Smoke tests for unique cred cookies
limhjgrace c673402
fix: Uncomment cd.yaml sections and remove unnecessary additional sni…
limhjgrace ef47fdb
fix: Remove unnecessary param
limhjgrace 83e0e7b
fix: Remove setting cookies to unique in html
limhjgrace bb1dc90
Merge branch 'main' into unique-cred-cookie
limhjgrace 97d71b1
fix: Fix prettier formatting
limhjgrace f2c5612
fix: Refactor CognitoidentityClientConfig
limhjgrace c3e2e61
fix: Fix importing Orchestration
limhjgrace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
src/events/* | ||
src/events/* | ||
**/src/loader-npm-rum.ts | ||
**/src/loader-npm-rum-2.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
smoke/smoke-test-application-NPM-CJS/src/loader-npm-rum-2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// @ts-nocheck | ||
const { AwsRum, AwsRumConfig } = require('aws-rum-web'); | ||
|
||
let awsRum; | ||
|
||
try { | ||
const config: AwsRumConfig = { | ||
sessionSampleRate: 1, | ||
identityPoolId: $IDENTITY_POOL_2, | ||
endpoint: $ENDPOINT, | ||
telemetries: ['performance', 'errors', 'http', 'interaction'], | ||
allowCookies: true, | ||
enableXRay: true, | ||
cookieAttributes: { | ||
unique: true | ||
} | ||
}; | ||
|
||
const APPLICATION_ID: string = $MONITOR_ID_2; | ||
const APPLICATION_VERSION: string = '1.0.0'; | ||
const APPLICATION_REGION: string = $REGION; | ||
|
||
awsRum: AwsRum = new AwsRum( | ||
APPLICATION_ID, | ||
APPLICATION_VERSION, | ||
APPLICATION_REGION, | ||
config | ||
); | ||
} catch (error) { | ||
console.log(error); | ||
throw error; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
smoke/smoke-test-application-NPM-ES/src/loader-npm-rum-2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// @ts-nocheck | ||
import { AwsRum, AwsRumConfig } from 'aws-rum-web'; | ||
|
||
let awsRum; | ||
|
||
try { | ||
const config: AwsRumConfig = { | ||
sessionSampleRate: 1, | ||
identityPoolId: $IDENTITY_POOL_2, | ||
endpoint: $ENDPOINT, | ||
telemetries: ['performance', 'errors', 'http', 'interaction'], | ||
allowCookies: true, | ||
enableXRay: true, | ||
cookieAttributes: { | ||
unique: true | ||
} | ||
}; | ||
|
||
const APPLICATION_ID: string = $MONITOR_ID_2; | ||
const APPLICATION_VERSION: string = '1.0.0'; | ||
const APPLICATION_REGION: string = $REGION; | ||
|
||
awsRum: AwsRum = new AwsRum( | ||
APPLICATION_ID, | ||
APPLICATION_VERSION, | ||
APPLICATION_REGION, | ||
config | ||
); | ||
} catch (error) { | ||
console.log(error); | ||
throw error; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit(blocking): Pass the entire config, and put these inside the
CognitoIdentityClientConfig
object.