Repository navigation
Fall-back mechanism issue #224
Replies: 6 comments 2 replies
|
Hi, thanks for reporting, I'll push a fix for the "fallback period" parsing issue. Regarding fallback users: Even if you're getting the fallback banner message your next login attempt might be handled by a different tac_plus-ng worker process which hasn't yet experienced backend failure. Also, IOS seems to start a new session for each password request, and as ssh transmits the user name you will not be queried for a new one. In case the daemon returns an authentication error IOS falls back to local authentication. This apparently happens (but shouldn't), and I might have a closer look at that next weekend. Cheers, Marc |
|
ddbd87a might fix that issue, at least partially. I still see IOS-XE falling back to local, despite tac_plus-ng returning FAIL and not ERROR. |
|
Hi Mark, I have cloned your latest tac_plus-ng commit and tested the fallback mechanism again. Here are the results of my tests and some suggested improvements: First of all, the "fallback period" parsing issue has been successfully resolved, running tac_plus-ng with I found that, in order to use the emergency user emergency1 defined in the tac_plus-ng configuration file during fallback, it is necessary to also define the same user on the NAS local user database. Both configurations must match (username, password, and privilege level). Configuration of the emergency1 user on the Cisco NAS device: Configuration of the emergency1 user on tac_plus-ng : The emergency profile (to ensure the privilege level matches) : To perform the test, I made the LDAP server unreachable by modifying its FQDN in the MAVIS configuration. First, I attempted to SSH using an LDAP user called sammy. What I observed is that the system prompted me to enter the password three times, indicating that the password was incorrect (although the password is actually correct, but LDAP is unreachable). According to the authentication logs, tac_plus-ng correctly detected that the LDAP server was unreachable from the first authentication attempt. However, it still prompted for the password up to the configured maximum number of attempts (3 in my case). Then it indicates that emergency accounts are currently enabled; however, it does not prompt for an emergency username. Instead, it directly asks for the password while keeping the original LDAP username. That is why I need to terminate the current SSH session and open a new one using the emergency user (emergency1), within 60 seconds; otherwise, the fallback will be automatically disabled Case 1: Login with emergency1 before the 60-second timeout authentication logs : Case 2: Login with the emergency user (emergency1) after 60 seconds Improvement Suggestions:
I have also encountered an issue with advanced filtering of Cisco "show" commands before entering the fallback mechanism, but I did not expect such responsiveness to my questions and reports I really appreciate it. To keep this discussion focused on the fallback mechanism, I will open a separate report regarding the "show" command filtering issue later. |
|
Hi, there's no need to replicate a tac_plus-ng 'fallback-only' user to the device's local database. The fallback-only flag just tells the daemon to skip the user until the backend has failed. That's transparent to the device, and it shouldn't mark the TACACS+ server as dead ("show tacacs" should confirm that the server isn't alive). I've seen this too, with IOS-XE, and I think the client implementation is broken. The ssh password issue is just the way ssh works, and there's nothing that can be done about this on the tac_plus-ng side. The ssh client transmits the user name to the ssh server, so the server only queries for the password (and runs a new TACACS+ session for each authentication attempt). Finally, adding a threshold for backend errors looks non-trivial. That would require state sync (backend error time-stamps, mostly) between tac_plus-ng processes. Cheers, Marc |
|
Hi, thanks for reporting back! I'll think about adding a MAVIS module to implement some backend-failure threshold. No promises, this may or may not happen. Regarding the SSH issue: The device adds the username (the one the SSH client did send) to the initial AUTHEN/START packet, without querying the user. Even if you're using Putty, the "Login as:" prompt doesn't originate from the SSHD you're connecting to, but from the client itself. You could probably try to limit the password queries (ip ssh authentication retires 0), but the SSH TACACS+ support just isn't identical to console or telnet access. Cheers, Marc |
|
Hi, I've added the 'error' mavis module in 1be10cc. Untested, for now. It should track consecutive authentication errors and translate the ERROR status to FAIL until a configured threshold is reached. Cheers, Marc |



Hi,
there's no need to replicate a tac_plus-ng 'fallback-only' user to the device's local database. The fallback-only flag just tells the daemon to skip the user until the backend has failed. That's transparent to the device, and it shouldn't mark the TACACS+ server as dead ("show tacacs" should confirm that the server isn't alive). I've seen this too, with IOS-XE, and I think the client implementation is broken.
The ssh password issue is just the way ssh works, and there's nothing that can be done about this on the tac_plus-ng side. The ssh client transmits the user name to the ssh server, so the server only queries for the password (and runs a new TACACS+ session for each authentication…