redpanda-data / connect

Fancy stream processing made operationally mundane
https://docs.redpanda.com/redpanda-connect/about/
8.14k stars 840 forks source link

Authenticating with a token and user/pass in NATS JetStream resources #3010

Open ghstahl opened 6 days ago

ghstahl commented 6 days ago

should be part of this old one

Nats connecting by token

// Set a token
nc, err := nats.Connect("127.0.0.1", nats.Name("API Token Example"), nats.Token("mytoken"))
if err != nil {
    log.Fatal(err)
}
defer nc.Close()

// Do something with the connection

Current

 auth:
      nkey_file: ./seed.nk # No default (optional)
      nkey: "" # No default (optional)
      user_credentials_file: ./user.creds # No default (optional)
      user_jwt: "" # No default (optional)
      user_nkey_seed: "" # No default (optional)

I am currently using a token to connect which is handled by our AuthCallout.