-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Neptune IAM authentication #152
Comments
You have the right idea. It would probably be as easy as adding 'custom_headers' to the options and passing that down the chain to build out a Request rather than a simple Url. We should probably change the title of this issue to "Allow Custom Headers" since sigv4 are just added headers and make the developer do the work at creating those headers outside of this package. Also this would allow any other custom header that may be needed in the future. The logic would also need to account for the synchronous workflow. |
👋 all if you agree we can close this and follow the additional headers query params on #153 |
I don't think it's as simple as custom headers because the content of the header (a cryptographic signature) is a function of the (hash of the) exact request being sent to the server, which gets modified fairly deep in the websocket lib. On the other hand, I have some code working that I haven't cleaned up yet for PR (and I only added it to the async pathway), but seems to be working on my Neptune instance. |
@copumpkin custom header injection should allow you to do this. If you inspect other tinkerpop drivers like the gremlin-python driver for example support iam auth through custom header injection. |
I'm looking into using this package with AWS Neptune and its IAM Authentication feature. Based on their sample code and asking around, my understanding is that for this to work, I'd need to use sigv4 to sign the initial WebSocket connection request.
It seems like the place I'd need to hook into is
gremlin-rs/gremlin-client/src/aio/connection.rs
Line 134 in 5b60055
Does that all sound reasonable? It doesn't seem like the interface is flexible enough today for me to inject that in, since I'd need a
Request
rather than theUrl
that code currently passes in. I'd be happy to make a PR to add an optional feature for this if someone can confirm I'm looking in the right places.The text was updated successfully, but these errors were encountered: