Skip to content

Commit ba271c6

Browse files
committed
CLDSRV-815: Remove redundant accountDisplayName field
Remove accountDisplayName field from server access logs as it was redundant with accountName. Both fields were populated from the same source (authInfo.getAccountDisplayName()) and always contained identical values.
1 parent 689cd00 commit ba271c6

4 files changed

Lines changed: 0 additions & 8 deletions

File tree

lib/utilities/serverAccessLogger.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ function logServerAccess(req, res) {
413413
// Analytics
414414
action: params.analyticsAction ?? undefined,
415415
accountName: params.analyticsAccountName ?? undefined,
416-
accountDisplayName: authInfo?.getAccountDisplayName() ?? undefined,
417416
userName: params.analyticsUserName ?? undefined,
418417
httpMethod: req.method ?? undefined,
419418
bytesDeleted: params.analyticsBytesDeleted ?? undefined,

schema/server_access_log.schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
"description": "Requester account display name.",
2828
"type": ["string", "null"]
2929
},
30-
"accountDisplayName": {
31-
"description": "Requester account display name.",
32-
"type": ["string", "null"]
33-
},
3430
"userName": {
3531
"description": "Requester IAM display name, or null if the requester is not an IAM user.",
3632
"type": ["string", "null"]

tests/functional/aws-node-sdk/test/serverAccessLogs/testServerAccessLogFile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ describe('Server Access Logs - File Output', async () => {
118118
// 'pid': '', // UNKNOWN
119119
'action': 'REQUIRED', // DYNAMIC
120120
'accountName': 'Bart', // STATIC
121-
'accountDisplayName': 'Bart', // STATIC
122121
'userName': null, // TODO: Add test with IAM user to get a non null userName.
123122
// 'clientPort': '', // UNKNOWN
124123
'httpMethod': 'REQUIRED', // DYNAMIC

tests/unit/utils/serverAccessLogger.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ describe('serverAccessLogger utility functions', () => {
803803
// Verify analytics fields
804804
assert.strictEqual(loggedData.action, 'ObjectGet');
805805
assert.strictEqual(loggedData.accountName, 'testAccount');
806-
assert.strictEqual(loggedData.accountDisplayName, 'testAccount');
807806
assert.strictEqual(loggedData.userName, 'testUser');
808807
assert.strictEqual(loggedData.httpMethod, 'GET');
809808
assert.strictEqual(loggedData.bytesDeleted, 0);
@@ -890,7 +889,6 @@ describe('serverAccessLogger utility functions', () => {
890889

891890
assert.strictEqual(mockLogger.write.callCount, 1);
892891
const loggedData = JSON.parse(mockLogger.write.firstCall.args[0].trim());
893-
assert.strictEqual('accountDisplayName' in loggedData, false);
894892
assert.strictEqual('requester' in loggedData, false);
895893
assert.strictEqual('signatureVersion' in loggedData, false);
896894
assert.strictEqual('authenticationType' in loggedData, false);

0 commit comments

Comments
 (0)