Bad credentials when trying to login to accounts.fp.o directly #13645
Labels
No labels
announcement
anubis
authentication
aws
backlog
blocked
bodhi
ci
cloud
communishift
copr
database
day-to-day
dc-move
deprecated
dev
discourse
dns
downloads
easyfix
epel
firmitas
forgejo_migration
Gain
High
Gain
Low
Gain
Medium
gitlab
greenwave
hardware
help wanted
high-trouble
koji
koschei
lists
low-trouble
medium-trouble
mirrorlists
monitoring
Needs investigation
odcs
OpenShift
ops
outage
packager_workflow_blocker
pagure
permissions
Priority
Needs Review
Priority
Next Meeting
Priority
🔥 URGENT 🔥
Priority
Waiting on Assignee
Priority
Waiting on External
Priority
Waiting on Reporter
rabbitmq
release-monitoring
releng
request-for-resources
s390x
security
SMTP
sprint-0
sprint-1
src.fp.o
staging
unfreeze
waiverdb
websites-general
wiki
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
9 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
infra/tickets#13645
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of request
This happens regularly to me it seems. Whenever I go directly to https://accounts.fedoraproject.org and try to login, I get a
If I then go to something else like bodhi and get logged in via id.fp.o, credentials works and I am golden.
I am pretty sure that then I can go back to accounts.fp.o and manage to log back in, but trying it now, it doesn't work. I am sure I do have ways to get logged in to accounts.fp.o with some weird hopping from one site to another, but I do not have one at hand to report.
Anyway, can we get the
Unauthorized: bad credentials.weirdness fixed somehow?Affected Service or System
accounts.fp.o
Deadline
No response
Additional Context or Error Logs
No response
As discussed in
#admin:fedoraproject.org, this has been a very persistent problem and also very hard to track down. I can also vouch for having hit this, and also, it only seems to affectaccounts.fedoraproject.orglogin; usually I am able to log in fine with other OIDC login prompts.Yeah, we keep thinking this is gone, but then it comes back.
It's really hard to isolate. There's never any errors in noggin logs or ipa logs, but the problem has to be somewhere between those two things.
@abompard any ideas? Can we enable more logging in noggin perhaps?
I've tried digging through the logs, I've reached something that may be suspicious:
It looks like it's IPA's OTP module that rejects the login attempt, but it sends an
Access-Acceptfollowed by anAccess-Rejecta second later. AI suggests that's because a login retry is attempted too fast by some component along the way and OTP tokens can't be reused, hence the failure. But I'm not finding evidence of retries being attempted by either noggin or the IPA python API.I'm going to ask for help with the IPA folks because I don't see how I could get more info here.
I hit this many times today, then after waiting about half an hour the next login worked straight away.
@abompard I'm going to talk nonsense for a sec because I don't know anything about these systems. But I recall that recently things were switched from pointing at a single IPA server to all of them, because the load was not getting distributed across the cluster. Is it possible that the request is now getting sent
ntimes because there arenservers configured? (Rather than just picking one randomly?) So one succeeds and one fails?Yeah I looked at that and the attempts all happened on ipa01 (with an independent request on ipa03, none on ipa02)
So, I did a 'ipactl restart' on ipa01 and @mwinters was able to auth multiple times in a row. So, that makes me think it's something that goes wrong over time on the ipa server end.
I looked and there's a 389-ds update pending that fixes https://redhat.atlassian.net/browse/RHEL-252645 which might be related?
Since I first noticed this happening, something new happened today which never happened before. Sharing here in case it is useful for debugging purposes.
First, somewhere around 1:30 PM US Eastern, I got the same old message:
But then, I tried again after waiting a few minutes. It hung for a while. Then I noticed the tab title changed to say
IPA Error. The page appeared to still be loading. Then, it showed this page:I waited a few minutes, since I was chatting in
#admin:fedoraproject.org. I refreshed, and then everything was working. My profile page loaded normally.Weird behavior, but thought I would share. This all would have happened in the last ~10 minutes or so before I wrote this comment.
FWIW I saw that same IPA error once today too. That happened after I managed to log in successfully.
@jflory7 I wondering if that wasn't at the same time as @kevin was restarting the IPA.
I've managed to reproduce it so I've collected the logs and opened an IPA ticket: https://codeberg.org/freeipa/freeipa/issues/10104
Today I started seeing
ipa: ERROR: cannot connect to 'ldapi://%2Frun%2Fslapd-FEDORAPROJECT-ORG.socket':and it is only happening on ipa01. Also the direct access to LDAP using ldapsearch works fine, so it's only when using ipa calls. Sometimes it goes through, sometimes it doesn't. To me that looks like some limit on requests, but I'm not sure when that would be set.@zlopez wrote in #13645 (comment):
This was related to latest update of 389-ds package (which was done only on ipa01), I opened an issue for this https://redhat.atlassian.net/browse/RHEL-297618.
I know we looked at the otp theory in a previous ticket and discarded it, but perhaps we were wrong and that is the underlying issue. It does seem like all the folks having problems do have otp's enrolled.
I have had this issue and I do have OTP enrolled. Sometimes it works, sometimes it doesn’t. I’ve never found a common pattern.
I used to wonder if this was somehow related to OTP replay / retry behavior within the 30s window, but could never figure out why everyone would be retrying or hitting wrong codes on the first try.
Looking at the Codeberg logs though, the two
ipa-otpd.socketcalls are exactly 1 second apart (10:17:35 -> 10:17:36) from two different KDC worker PIDs. In MIT Kerberos (sendto_kdc.c),k5_sendtohas a hardcoded 1s wait (service_fds(..., 1000)) before it tries the next transport or does a second pass.If LDAP takes right around a second to process the preauth,
kinititself probably fires a second request. The first one already succeeded and updated the token watermark in 389-ds, so the second one immediately gets rejected as an OTP replay, and the whole login fails.Might be worth running
kinitwithKRB5_TRACE=/dev/stderrin staging to see ifsendto_kdcis indeed firing that 1s retransmit.I don't have any problem with
kinitanywhere, so I'm not sure if this will show the problem. Also I didn't hear from people about any issue on staging. This is happening only on production and only when the request is not going through ipsilon. But what you found looks interesting. I wonder why they are two KDC workers.Just tested it out in staging and I can't reproduce it there, but that could be caused by the amount of data in database. In production we have a lot more users and groups than on staging.
The kinit is done by the IPA API on the same machine, it's possible that it takes a different path (unix socket maybe?).
I am still hitting this issue. My usual way of breaking through is brute-forcing. It varies, but if I keep trying enough in a 5-minute window with enough 2FA codes, I will eventually get through. It does feel like somewhere, there is a bad server in the cluster. I feel like @sheikhlimon has a plausible theory to explore, but this also may not be related to Kerberos either.
I use Kerberos tickets on my laptop and I don't run into this issue when acquiring the ticket, I do run into it on machines that I don't use a ticket on. I just keep trying until I get in. I've never seen a common set of conditions when it is happening.
@jflory7 The bad server might just be ipa01 (where those journal logs were from). If so, brute-forcing probably just ends up eventually landing you on ipa02 or ipa03 instead.
So just to clarify since more folks are seeing this over time.
(These are all what I think to be true)
Our current guess is that it's the communication around ipa-otpd. (Thats what the upstream freeipa bug @abompard filed is about).
I'll see if I can get more attention on the upstream bug next week.