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

Login failed events are not emitted when MFA is enabled #36837

Closed
rosstimothy opened this issue Jan 17, 2024 · 2 comments
Closed

Login failed events are not emitted when MFA is enabled #36837

rosstimothy opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
audit-log Issues related to Teleports Audit Log bug mfa Issues related to Multi Factor Authentication

Comments

@rosstimothy
Copy link
Contributor

Expected behavior:

A login failed event is emitted for every failed login attempt

Current behavior:

  • When I login with MFA enabled and enter an incorrect password there is no login failure event emitted
  • When I login with MFA enabled and tap an incorrect key there is no login failure event emitted
  • When I login with MFA disabled and enter an incorrect password there is an event emitted
@yonathanpy
Copy link

There might be specific settings that control whether failed login events are logged or not. Look for options related to logging, auditing, or event generation, +Examine the audit logs or security logs of the system. These logs often provide more detailed information about authentication events, including failed attempts,ome MFA systems have specific behavior when it comes to logging failed attempts,

import logging

def authenticate_user(username, password, mfa_code):
# Your authentication logic here

# Example: Check if authentication failed
if not authentication_successful(username, password, mfa_code):
    # Log the failed login attempt
    logging.error(f"Failed login attempt for user {username}")
    return False

# Authentication succeeded
return True

@codingllama
Copy link
Contributor

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log bug mfa Issues related to Multi Factor Authentication
Projects
None yet
Development

No branches or pull requests

4 participants