skywalker_101010
skywalker_101010
Explore posts from servers
ATApache TinkerPop
Created by skywalker_101010 on 2/28/2024 in #questions
Docker yaml authentication settings (gremlinserver.authentication) question
Does anyone have any experience setting up authentication on Docker by using the supplied .yaml file? I'm having trouble passingin a map to properly set one of the options: gremlinserver.authentication.config. Additional info, but not related to the my main problem: I have a file with the contents of username/password pairs which follow the schema: username:password (sha256) This file is located within the docker instance at: /etc/opt/janusgraph/janusgraph-credentials-server.properties However, gremlin server expects credentialsDb as a map and docker wants a string. Therefore I seem unable to configure this property. Here are the relevant parts of my docker .yaml file:
services:
janusgraph:
image: docker.io/janusgraph/janusgraph:latest
restart: "on-failure"
container_name: janusgraph-server-1
environment:
JANUS_PROPS_TEMPLATE: cql
janusgraph.storage.hostname: 192.168.1.44
janusgraph.storage.port: 9042
janusgraph.storage.username: cassandra
janusgraph.storage.password: cassandra
janusgraph.query.batch.enabled: true
janusgraph.query.batch.limited: false
janusgraph.index.search.elasticsearch.interface: REST_CLIENT
gremlinserver.evaluationTimeout: 180000
gremlinserver.authentication.authenticator: org.apache.tinkerpop.gremlin.server.auth.SimpleAuthenticator
gremlinserver.authentication.config: {"credentialsDb": "/etc/opt/janusgraph/janusgraph-credentials-server.properties"} # <--- Source of problem
ports:
- "8182:8182"
networks:
- web
healthcheck:
test: ["CMD", "bin/gremlin.sh", "-e", "scripts/remote-connect.groovy"]
interval: 10s
timeout: 30s
retries: 3
volumes:
- /home/user/janusgraph-credentials-server.properties:/etc/opt/janusgraph/janusgraph-credentials-server.properties:ro
services:
janusgraph:
image: docker.io/janusgraph/janusgraph:latest
restart: "on-failure"
container_name: janusgraph-server-1
environment:
JANUS_PROPS_TEMPLATE: cql
janusgraph.storage.hostname: 192.168.1.44
janusgraph.storage.port: 9042
janusgraph.storage.username: cassandra
janusgraph.storage.password: cassandra
janusgraph.query.batch.enabled: true
janusgraph.query.batch.limited: false
janusgraph.index.search.elasticsearch.interface: REST_CLIENT
gremlinserver.evaluationTimeout: 180000
gremlinserver.authentication.authenticator: org.apache.tinkerpop.gremlin.server.auth.SimpleAuthenticator
gremlinserver.authentication.config: {"credentialsDb": "/etc/opt/janusgraph/janusgraph-credentials-server.properties"} # <--- Source of problem
ports:
- "8182:8182"
networks:
- web
healthcheck:
test: ["CMD", "bin/gremlin.sh", "-e", "scripts/remote-connect.groovy"]
interval: 10s
timeout: 30s
retries: 3
volumes:
- /home/user/janusgraph-credentials-server.properties:/etc/opt/janusgraph/janusgraph-credentials-server.properties:ro
9 replies
ATApache TinkerPop
Created by skywalker_101010 on 2/17/2024 in #questions
Dynamic select within query not working.
Any insights or help would be greatly appreciated. I have to pass a list of lists in the format below. Hundreds of them which is why I'm trying to iterate in a single query. Please explain why accessing element 0 within the row data works here: g.inject([['2011-12-01', 3873], ['2023-12-02', 3946], ['2023-12-03', 3997]]). unfold().as('row'). coalesce( select('row').limit(local, 1).unfold() ) But nesting the select within the query to return a matching Vertex does not: g.inject([['2011-12-01', 3873], ['2023-12-02', 3946], ['2023-12-03', 3997]]). unfold().as('row'). coalesce( __.V().hasLabel('UsdValue').has('date', select('row').limit(local, 1).unfold()) ) Ultimately trying to create an if/then exists query but I can't get it to even match.
3 replies