Skip to content
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

consul: long list of todos #28

Open
noahehall opened this issue Jan 14, 2023 · 0 comments
Open

consul: long list of todos #28

noahehall opened this issue Jan 14, 2023 · 0 comments

Comments

@noahehall
Copy link
Contributor

noahehall commented Jan 14, 2023


Security Note: Explicitly allowing intentions:write on the token you provide to a service instance at registration time opens up a significant additional vulnerability. Although you may trust the service team to define which inbound connections they accept, using a combined token for registration allows a compromised instance to to redefine the intentions which allows many additional attack vectors and may be hard to detect. We strongly recommend only delegating intentions:write using tokens that are used by operations teams or orchestrators rather than spread via application config, or only manage intentions with management tokens.




# works
dig server.us-east.mesh.nirv.ai
dig server.us-east.search

# doesnt works: 
dig @127.0.0.1 -p 8600 consul.service.search SRV
dig @127.0.0.1 -p 8600 consul.service.mesh.nirv.ai SRV

; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> @127.0.0.1 -p 8600 consul.service.mesh.nirv.ai SRV
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

pretty sure haproxy is calling consul DNS instead of the local envoy proxy to figure out vaults uri
we need to point haproxy to the local envoy sidecar and not to consul dns


## todo
# consul kv put consul/configuration/db_port 5432
# consul kv get consul/configuration/db_port
# dig @127.0.0.1 -p 8600 consul.service.consul
# consul catalog services -tags
# consul services register svc-db.hcl
# curl 172.17.0.1:8500/v1/status/leader  #get the leader
# consul cmd cmd cmd --help has wonderful examples, thank me later
# curl --request GET http://127.0.0.1:8500/v1/agent/checks

# this only works if the consul server is bootstrapped
# doesnt work if your trying to bootstrap a greenfield server
 healthcheck:
       <<: *service-healthcheck
       test: consul catalog nodes | grep $CONSUL_NODE_PREFIX || exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: THE GRID
Development

No branches or pull requests

1 participant