Search code examples
amazon-web-servicesfull-text-searchgremlinopensearchneptune

How to make a gremlin fulltext search query when fine grained control is enabled in opensearch domain


How to query using gremlin when fine grained access control is enabled in opensearch domain?

g.withSideEffect("Neptune#fts.endpoint", "your-es-endpoint-URL")
  .V()
      .tail(100)
      .has("name", "Neptune#fts mark*")            <== # Limit the search on name

I have tried using endpoint url as username:password@osendpoint.

Don’t know how to send this request with basic auth, tried giving username and password in the query itself like

g.withSideEffect("Neptune#fts.endpoint", "your-es-endpoint-URL").withSideEffect("Neptune#fts.username", "username").withSideEffect("Neptune#fts.password", "password")
  .V()
      .tail(100)
      .has("name", "Neptune#fts mark*")            <== # Limit the search on name

Doesn’t work, I am new to this, may be doing it totally wrong, please let me know how to do it

I tried putting the username password in url itself, and tried giving as args in gremlin query


Solution

  • You need to have IAM authentication enabled on your Neptune cluster. And you need to be using an IAM role (with your client) that has permissions to also access your OpenSearch cluster: https://docs.aws.amazon.com/neptune/latest/userguide/full-text-search-fgac.html