Skip to content
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

[Investigate] Kibana audit logging: Capture session expiration #119490

Closed
arisonl opened this issue Nov 23, 2021 · 3 comments · Fixed by #122419
Closed

[Investigate] Kibana audit logging: Capture session expiration #119490

arisonl opened this issue Nov 23, 2021 · 3 comments · Fixed by #122419
Labels
enhancement New value added to drive a business result Feature:Security/Audit Platform Security - Audit Logging feature impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@arisonl
Copy link
Contributor

arisonl commented Nov 23, 2021

This is the [investigate] counterpart of #119487 for the case of a "silent" expiration (case 2b in the linked issue).

@arisonl arisonl added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Nov 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jportner jportner added enhancement New value added to drive a business result Feature:Security/Audit Platform Security - Audit Logging feature labels Nov 23, 2021
@jportner
Copy link
Contributor

jportner commented Nov 23, 2021

@thomheymann suggested that we could start with logging just the session ID for the "silent" expiration (e.g., the session is cleaned up when the user doesn't have the browser open / hasn't actually taken an action to log out)

@azasypkin mentioned that we use deleteByQuery to clean up sessions:

const { body: response } = await this.options.elasticsearchClient.deleteByQuery(
{
index: this.indexName,
refresh: true,
body: { query: { bool: { should: deleteQueries } } },
},
{ ignore: [409, 404] }
);

I mentioned we could use the _source parameter to determine which sessions were deleted, but even though that is documented, it appears that parameter doesn't actually do anything. I've reached out to the Elasticsearch team to inquire about this, but it seems like it's not a bug, rather an error in the docs. Edit: turns out this is a docs bug, I opened elastic/elasticsearch#80962 to fix it

As a fall-back, we could do a two-step operation (search, then bulk-delete).

@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Nov 23, 2021
@thomheymann
Copy link
Contributor

As a fall-back, we could do a two-step operation (search, then bulk-delete).

When changing deleteByQuery to a two-step operation using search and bulk-delete we should consider a throttling / worker queue mechanism in order to avoid performance issues when this operation is run against large datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Security/Audit Platform Security - Audit Logging feature impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants