Raphtory icon indicating copy to clipboard operation
Raphtory copied to clipboard

How to implement authentication for RaphtoryServer(Rust version)

Open aviplayer opened this issue 9 months ago • 2 comments

I tried to find any recommended way on how to implement authentication but no code or any other option found Also tried to find how to add custom hook, to implement custom authentication, but also was't able Any hint or link to the code on how to add/implement authentication?

aviplayer avatar May 11 '24 17:05 aviplayer

Hi @aviplayer - currently this isn't supported, but we are going to be looking into this soon to add as a default within Raphtory.

For the meantime we would recommend hiding the graphql service behind some external authentication services (whitelisting etc.)

If you have any suggestions on how you would like this implemented we are all ears :)

miratepuffin avatar May 13 '24 16:05 miratepuffin

I implemented temporary solution based on unique graph name plus secret. They are sha256 encoded. This is graph name. But I think you can allow to add middle ware(hook), which has access to request headers and params. I think this will be enough to implement custom authentication.

aviplayer avatar May 15 '24 20:05 aviplayer

Hay @aviplayer - we have just merged SSO integration with the graphql server - I shall be releasing a new version later today - if you would like to give it a test https://github.com/Pometry/Raphtory/pull/1629

miratepuffin avatar Jun 04 '24 10:06 miratepuffin