Skip to content

Docs for adding authentication are wrong #239

Description

@Alfred-Mountfield

The code snippets provided in the docs for adding authentication to the CuratorFramework suggest methods that don't exist i.e.

@BoostrapConfiguration
public class CustomCuratorFrameworkConfig {

  @Bean
  public CuratorFramework curatorFramework() {
    CuratorFramework curator = new CuratorFramework();
    curator.addAuthInfo("digest", "user:password".getBytes());
    return curator;
  }

}

And

@BoostrapConfiguration
public class DefaultCuratorFrameworkConfig {

  public ZookeeperConfig(CuratorFramework curator) {
    curator.addAuthInfo("digest", "user:password".getBytes());
  }

The CuratorFramework interface doesn't have a method called addAuthInfo, and the code snippet also has @BootstrapConfiguration spelled incorrectly.

Furthermore I think the initial code snippet wouldn't work as it would override the standard implementation in spring cloud zookeeper rather than extending it.

What is the currently suggested way for adding authentication information? I can see the CuratorFrameworkImpl and CuratorFrameworkFactory now have variables called authInfos that's set through the builder by calling authorization(List authInfos).

Is the suggested/correct way to add authentication now to override the curatorFramework bean from the ZookeeperAutoConfiguration and add that option within the builder? Does this still have to happen at the Bootstrapping phase?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions