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

Gitea with a Sub-Path: U2F Token Does Not Work With Chrome/Chromium, Does Work With Firefox #14412

Closed
2 of 6 tasks
uli-heller opened this issue Jan 21, 2021 · 9 comments
Closed
2 of 6 tasks
Labels

Comments

@uli-heller
Copy link
Contributor

uli-heller commented Jan 21, 2021

I've searched the issues for "fido chrome" and did not find a proper existing issue, so here is a new one...

  • Gitea version (or commit ref): 1.13.1 and 1.14.0+dev-575-g1c230f69d
  • Git version: 2.25.1
  • Operating system: ubuntu-20.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I've setup a gitea instance. It runs on ubuntu-20.04 behind an apache2 httpd reverse proxy.
My HW token (a solo key) works perfectly within firefox, but not within chrome or chromium.
Using the token with chrome on try.gitea.io works without an issue. Any idea?

Screenshots

image

@6543 6543 added the type/bug label Jan 21, 2021
@zeripath
Copy link
Contributor

if this works on try - the suspicion has to fall upon the configuration of your server.

Now interestingly the error screen doesn't seem to report an error properly - there should be an errorcode interpretation here.

However the reload points to what the underlying issue.

There is a timeout error reported.

I suspect your server time is incorrect.

@uli-heller
Copy link
Contributor Author

uli-heller commented Jan 22, 2021

@zeripath : Thx for looking into this!

The server time is in sync with my local computer:

uli@ulicsl:~/git/datenschutz$ ssh gitea date; date
Fri 22 Jan 2021 07:58:52 AM CET
Fr 22. Jan 07:58:52 CET 2021

My local computer syncs via NTP and TOTP works for various other sites, so I guess the local time is fine.

On the other hand: It works for my gitea when using firefox. This shouldn't work when time sync is an issue, or should it?

@cortices
Copy link

cortices commented Jan 25, 2021

I'm getting the same results in Safari 14 (which has native U2F support) trying to add a U2F key as well.
My instance is running behind an nginx reverse proxy, and served over HTTPS, which is terminated by nginx and forwarded locally over HTTP to the gitea docker container.

@uli-heller
Copy link
Contributor Author

I changed my setup a little bit, now it works with chrome:

  • remove the sub-path and restart gitea and apache2 httpd reverse proxy
  • try to login using the token:
    • now the token blinks red -> push the button
    • now I'm getting the error page again
  • remove the token (was added when sub-path was active)
  • add the token again
  • works OK with chrome

@uli-heller uli-heller changed the title U2F Token Does Not Work With Chrome/Chromium, Does Work With Firefox Gitea with a Sub-Path: U2F Token Does Not Work With Chrome/Chromium, Does Work With Firefox Jan 25, 2021
@uli-heller
Copy link
Contributor Author

@cortices : Are you using a sub-path, too?

@cortices
Copy link

I am not using a subpath. I just tested and found it is working with both Chrome and Firefox, so the bug is Safari-specific. I will open a separate issue.

@cortices
Copy link

By the way your issue here seems to be a duplicate of #10231 : #10231 (comment)

@uli-heller
Copy link
Contributor Author

uli-heller commented Jan 25, 2021

@cortices : Thx. I tried to set these properties:

[U2F]
APP_ID = https://hetzner-de.daemons.point.com
TRUSTED_FACETS = https://hetzner-de.daemons.point.com

and activated the sub-path again. Unfortunately, the hw token doesn't work with chrome. So maybe I'm facing a different issue?

@lunny lunny mentioned this issue Dec 15, 2021
3 tasks
@6543
Copy link
Member

6543 commented Jan 14, 2022

#17957

@6543 6543 closed this as completed Jan 14, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants