Skip to content

why? service deny policy in ACL rule of anonymous ineffective #2816

Closed
@bomee

Description

@bomee

server and client both are 0.7.5

service "" {
  policy="deny"
}

curl http://host:8500/v1/catalog/services?token=anonymous
anonymous user still view all services info, isn't not safety?

Activity

slackpad

slackpad commented on Mar 23, 2017

@slackpad
Contributor

Hi - we'd need more details about your configuration to figure out what's going on.

bomee

bomee commented on Mar 23, 2017

@bomee
Author

I have read source code find

func (f *aclFilter) allowService(service string) bool {
	if service == "" || service == ConsulServiceID {
		return true
	}
	return f.acl.ServiceRead(service)
}

a magic code service == ConsulServiceID.What is the intention of this code?

slackpad

slackpad commented on Mar 23, 2017

@slackpad
Contributor

The Consul servers do the registration for that server on behalf of the cluster, so it was excluded from ACLs. That exception should be removed when enforceVersion8 is set, though, so I'll remove it.

added this to the 0.8.0 milestone on Mar 23, 2017
added a commit that references this issue on Mar 25, 2017
5480270
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Participants

      @slackpad@bomee

      Issue actions

        why? service deny policy in ACL rule of anonymous ineffective · Issue #2816 · hashicorp/consul