Skip to content

Support Grafana "Anonymous Auth" option. #1537

Description

@emrygun

Users may want to deploy simple monitoring services without any authorization/authentication settings.
So, "Anonymous Auth" option with it's "Anonymous Organization Role" settings would be a useful and fast solution for that.

The GF_AUTH_ANONYMOUS_ENABLED and GF_AUTH_ANONYMOUS_ORG_ROLE container environment variables stands for them.

For the clarification of feature request, I'll share a rough code snippet for desired scenario.

        GenericContainer<?> container =
                new GenericContainer<>(ContainerUtils.getDockerImageName(properties))
                        .withEnv("GF_SECURITY_ADMIN_USER", properties.getUsername())
                        .withEnv("GF_SECURITY_ADMIN_PASSWORD", properties.getPassword())
                        //TODO: Anonymous Auth Configuration
                        .withEnv("GF_AUTH_ANONYMOUS_ENABLED", properties.getAnonymousAuthEnabled())
                        .withEnv("GF_AUTH_ANONYMOUS_ORG_ROLE", properties.getAnonymousOrgRole())
                        .withNetwork(Network.SHARED)
                        .withNetworkAliases(properties.getNetworkAlias(), GRAFANA_NETWORK_ALIAS)
                        .waitingFor(grafanaWaitStrategy);

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

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions