ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.83k stars 2.96k forks source link

API.Authorizations configuration not effective or how to take effect #10333

Closed DDDJing closed 3 months ago

DDDJing commented 3 months ago

Checklist

Description

Installation method

docker

Version

Kubo version: 0.17.0-dev-e50135a Repo version: 12 System version: amd64/linux Golang version: go1.19.1

I would like to ask how to control access permissions to the 5001 API. I would like all requests to verify that Authorization is configured correctly in config, rather than requiring a specific user. What I want is that all 5001 API requests require authentication access to solve the problem of accessing my private files by configuring API addresses on the webui interface

{

API:{

Authorizations:{

Alice:{

"AuthSecret": "basic: alice: password123",

"AllowedPaths": ["/app/v0/id", "/app/v0/files"]

},

Bob:{

"AuthSecret": "bearer: secret token123",

"AllowedPaths": ["/app/v0"]

}

}

}

}

Please help.

### Tasks
aschmahmann commented 3 months ago

@DDDJing you seem to be running a fork of kubo v0.17.0 (released Nov 2022). The API.Authorizations feature was added in v0.25.0 (December 2023).

Going to close for now. Feel free to reopen if you're still experiencing this issue after updating to the latest kubo