Code Monkey home page Code Monkey logo

Comments (5)

caleblloyd avatar caleblloyd commented on August 24, 2024

Try upgrading to the 1.0.0 helm chart, then you can do something like this:

config:
  cluster:
    enabled: true
    replicas: 2
  merge:
    authorization:
      users:
      - user: my-user
        password: T0pS3cr3t
natsBox:
  contexts:
    default:
      merge:
        user: my-user
        password: T0pS3cr3t

from k8s.

caleblloyd avatar caleblloyd commented on August 24, 2024

Anonymous user access is automatically blocked as long as auth is properly configured

from k8s.

mojoscale avatar mojoscale commented on August 24, 2024

I am already using chart v1.0.0 and above did not work. So, i changed the values.yaml as suggested above, and after redeployment, I am still able to publish a message to the cluster without creds. Anything i could be doing wrong here?

from k8s.

caleblloyd avatar caleblloyd commented on August 24, 2024

Not sure. When I take the natsBox.contexts section out of the above example and publish a message anonymously from the nats-box container, I get Authorization Denied.

from k8s.

discostur avatar discostur commented on August 24, 2024

@caleblloyd didn't work for me either - NATs deploys the config and for me it looks correct, but it says

nats-server: /etc/nats-config/nats.conf:3:6: Cluster authorization does not allow multiple users

even in the config file i see just one authorization part. Then i just used the part from the helm chart:

    # apply to generated route URLs that connect to other pods in the StatefulSet
    routeURLs:
      # if both user and password are set, they will be added to route URLs
      # and the cluster authorization block
      user: USER
      password: PASSWORD
      # set to true to use FQDN in route URLs
      useFQDN: false
      k8sClusterDomain: cluster.local

and that works for me.

from k8s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.