Skip to content

Commit

Permalink
Rename session expiration usage data
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Aug 31, 2021
1 parent f7730fc commit fb0850b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ describe('Security UsageCollector', () => {
enabledAuthProviders: ['basic'],
loginSelectorEnabled: false,
httpAuthSchemes: ['apikey'],
sessionIdleTimeoutMinutes: 60,
sessionLifespanMinutes: 43200,
sessionIdleTimeoutInMinutes: 60,
sessionLifespanInMinutes: 43200,
};

describe('initialization', () => {
Expand Down Expand Up @@ -106,8 +106,8 @@ describe('Security UsageCollector', () => {
enabledAuthProviders: [],
loginSelectorEnabled: false,
httpAuthSchemes: [],
sessionIdleTimeoutMinutes: 0,
sessionLifespanMinutes: 0,
sessionIdleTimeoutInMinutes: 0,
sessionLifespanInMinutes: 0,
});
});

Expand Down Expand Up @@ -489,8 +489,8 @@ describe('Security UsageCollector', () => {

expect(usage).toEqual({
...DEFAULT_USAGE,
sessionIdleTimeoutMinutes: 123,
sessionLifespanMinutes: 456,
sessionIdleTimeoutInMinutes: 123,
sessionLifespanInMinutes: 456,
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ interface Usage {
authProviderCount: number;
enabledAuthProviders: string[];
httpAuthSchemes: string[];
sessionIdleTimeoutMinutes: number;
sessionLifespanMinutes: number;
sessionIdleTimeoutInMinutes: number;
sessionLifespanInMinutes: number;
}

interface Deps {
Expand Down Expand Up @@ -108,14 +108,14 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens
},
},
},
sessionIdleTimeoutMinutes: {
sessionIdleTimeoutInMinutes: {
type: 'long',
_meta: {
description:
'The global session idle timeout expiration that is configured, in minutes (0 if disabled).',
},
},
sessionLifespanMinutes: {
sessionLifespanInMinutes: {
type: 'long',
_meta: {
description:
Expand All @@ -138,8 +138,8 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens
authProviderCount: 0,
enabledAuthProviders: [],
httpAuthSchemes: [],
sessionIdleTimeoutMinutes: 0,
sessionLifespanMinutes: 0,
sessionIdleTimeoutInMinutes: 0,
sessionLifespanInMinutes: 0,
};
}

Expand Down Expand Up @@ -173,8 +173,8 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens
);

const sessionExpirations = config.session.getExpirationTimeouts(); // get global expiration values
const sessionIdleTimeoutMinutes = sessionExpirations.idleTimeout?.asMinutes() ?? 0;
const sessionLifespanMinutes = sessionExpirations.lifespan?.asMinutes() ?? 0;
const sessionIdleTimeoutInMinutes = sessionExpirations.idleTimeout?.asMinutes() ?? 0;
const sessionLifespanInMinutes = sessionExpirations.lifespan?.asMinutes() ?? 0;

return {
auditLoggingEnabled: legacyAuditLoggingEnabled || ecsAuditLoggingEnabled,
Expand All @@ -184,8 +184,8 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens
authProviderCount,
enabledAuthProviders,
httpAuthSchemes,
sessionIdleTimeoutMinutes,
sessionLifespanMinutes,
sessionIdleTimeoutInMinutes,
sessionLifespanInMinutes,
};
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5497,13 +5497,13 @@
}
}
},
"sessionIdleTimeoutMinutes": {
"sessionIdleTimeoutInMinutes": {
"type": "long",
"_meta": {
"description": "The global session idle timeout expiration that is configured, in minutes (0 if disabled)."
}
},
"sessionLifespanMinutes": {
"sessionLifespanInMinutes": {
"type": "long",
"_meta": {
"description": "The global session lifespan expiration that is configured, in minutes (0 if disabled)."
Expand Down

0 comments on commit fb0850b

Please sign in to comment.