LXD API not authorized

I am using an http client to send request to a remote LXD API

when I send a GET request to “/” I get a success response:

{"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":["/1.0"]}

If I send a request to “/1.0” I also get a valid response, something that looks like this:

{"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":{"api_extensions":["storage_zfs_remove_snapshots","container_host_s
hutdown_timeout","container_stop_priority","container_syscall_filtering","auth_pki","container_last_used_at","etag","patch", .....}

However if I request “/1.0/instances” I get a not authorized error:

{"type":"error","status":"","status_code":0,"operation":"","error_code":403,"error":"not authorized","metadata":null}

From the first 2 requests I thought that the connection between the client and the API server is working, however trying to get “/1.0/instances” makes me doubting if even the connection is working.

Any idea why is this happening?

BTW: I authorized the client from the api server using root user (and everything I did in the server including the lxd installation, was by ROOT user) so maybe this has something to do with it?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.