Custom Authentication and Authorization in IPFS Kubo

Hi everyone! I have a question regarding IPFS private networks. I’m currently studying them for a project and need to conduct a Proof of Concept (PoC) that involves implementing a private network using IPFS Kubo. Additionally, I need to customize IPFS Kubo by adding authentication and authorization to all open admin APIs and CLI commands. Is this feasible, and how challenging would it be?

Thank you for any help!

  • Low effort: set up and leverage built-in API.Authorizations in Kubo configuration (note: this is only applied to RPC API port, not Gateway)

  • If you need more advanced control, you could put Kubo behind some middleware that expects Authorization header when hitting RPC or Gateway ports.