Clem-Fern / rtabby-web-api

Tabby Web API for Config Sync
GNU Affero General Public License v3.0
60 stars 4 forks source link

not able to access the "login" URL, error 404 #27

Open TomErnst1972 opened 2 months ago

TomErnst1972 commented 2 months ago

hi,

I set up the the docker image while using "sqlite-minimal" According to the documentation I should be able to go to (in my case) http://192.168.1.231:8080/login but I receive an 404...

I'd like to use only local users, without any third-party auth provider...

docker logs follows:

[root@pve-thinkstation rtabby-web-api]$ docker logs rtabby-web-api 
[2024-08-12T12:15:52Z INFO  rtabby_web_api] Running v0.4.2
[2024-08-12T12:15:52Z INFO  rtabby_web_api] users.yml loaded => 1 users found
[2024-08-12T12:15:52Z INFO  rtabby_web_api] Binding HTTP Listener on 0.0.0.0:8080
[2024-08-12T12:15:52Z INFO  rtabby_web_api] Starting HTTP Listener on 0.0.0.0:8080
[2024-08-12T12:15:52Z INFO  actix_server::builder] starting 12 workers
[2024-08-12T12:15:52Z INFO  actix_server::server] Actix runtime found; starting in Actix runtime
[2024-08-12T12:16:13Z INFO  rtabby-web-api] 192.168.1.183 "GET /login HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 0.000024
[root@pve-thinkstation rtabby-web-api]$ 

Can you point me in the right direction please?

br, Tom

TomErnst1972 commented 2 months ago

this is my config/users.yml:

[root@pve-thinkstation rtabby-web-api]$ cat config/users.yml 
users:
    - name: 'Tom'
      token: '7fa02f65-b34a-46d8-acc0-01bd5fcaea22'

this is the docker-compose.yml

[root@pve-thinkstation rtabby-web-api]$ cat docker-compose.yml 
services:
  rtabby:
    container_name: rtabby-web-api

    image: ghcr.io/clem-fern/rtabby-web-api:sqlite-minimal
    user: "1000:1000"

    cap_add:
      - "CAP_DAC_OVERRIDE"
    cap_drop: ['ALL']
    read_only: true

    ports:
      - "8080:8080"
    environment:
      - DATABASE_URL=sqlite:///config/db.sqlite
      - HTTPS_CALLBACK=true
    volumes:
      - ./config:/config
    networks:
      - frontend
networks:
  frontend:
    name: rtabby_net_frontend
Clem-Fern commented 2 months ago

Hey @TomErnst1972

login endpoint is only exposed when using third party login feature. In your case, the only thing you have to do after adding your token into users.yml is to configure Tabby to use your synchronisation service.

I should probably update readme to make it clearer about this ^^'