Skip to content

fix: Correctly handle passwordless in MFA audit events#40607

Merged
codingllama merged 3 commits intomasterfrom
codingllama/pwdless-audit
Apr 17, 2024
Merged

fix: Correctly handle passwordless in MFA audit events#40607
codingllama merged 3 commits intomasterfrom
codingllama/pwdless-audit

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Do the following fixes:

  • Correctly render "mfa_auth_challenge.create" events without an user
  • Record the passwordless user in "mfa_auth_challenge.validate" events

Fixes #37826.

Changelog: Handle passwordless in MFA audit events

@codingllama
Copy link
Copy Markdown
Contributor Author

I think we just missed the passwordless corner-cases on #36953. FYI @Joerger.

Comment thread lib/auth/auth.go
clusterName = cn.GetClusterName()
}

// Take the user from the authData if the user param is empty.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code here is mainly a move from below, minus the user == "" logic you see here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for an "internal" func so we avoid shenanigans with defers reading named return variables, which can be harder to maintain over time.

@codingllama
Copy link
Copy Markdown
Contributor Author

Thanks for the quick reviews!

@codingllama codingllama added this pull request to the merge queue Apr 17, 2024
Merged via the queue into master with commit cfc3558 Apr 17, 2024
@codingllama codingllama deleted the codingllama/pwdless-audit branch April 17, 2024 13:36
@public-teleport-github-review-bot
Copy link
Copy Markdown

@codingllama See the table below for backport results.

Branch Result
branch/v15 Failed

codingllama added a commit that referenced this pull request Apr 17, 2024
* Record passwordless username in the mfa_auth_challenge.validate event

* Correctly render mfa_auth_challenge.create events without an user

* Update snapshots
github-merge-queue Bot pushed a commit that referenced this pull request Apr 17, 2024
* fix: Correctly handle passwordless in MFA audit events (#40607)

* Record passwordless username in the mfa_auth_challenge.validate event

* Correctly render mfa_auth_challenge.create events without an user

* Update snapshots

* Update snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passwordless audit events display undefined user

3 participants