voxpupuli / puppet-consul

A Puppet Module to Manage Consul
Apache License 2.0
121 stars 315 forks source link

legacy ACL v1 no longer working starting from Consul version 1.11 #588

Closed maxadamo closed 2 years ago

maxadamo commented 2 years ago

since the day I upgraded consul I get the following error:

Warning: Cannot retrieve ACLs: invalid return code 410 uri: /v1/acl/list?token=XXXXXXXXXXXXXXXXXX body: 
Error: /Stage[main]/Geant_consul::Consul/Consul_acl[neteng_token]: Could not evaluate: Session neteng_token create: invalid return code 410 uri: /v1/acl/create?token=

And if I query consul I get the following unequivocal output message:

Endpoint /v1/acl/list for the legacy ACL system was removed in Consul 1.11.
maxadamo commented 2 years ago

it has to do with my settings: I'm using legacy and now I need to upgrade.

maxadamo commented 2 years ago

I am re-opening this same issue because it's a real one, and the reason is explained at this link: Legacy ACL removal

Starting from versions 1.11, after migrating the tokens, I get this error:

# curl -X PUT http://127.0.0.1:8500/v1/acl/create?token=xxxxxxx-xxxxxxxx-xxxxxx
Endpoint /v1/acl/create for the legacy ACL system was removed in Consul 1.11

The temporary workaround is to downgrade to 1.10.x

jonesbrennan commented 2 years ago

I ran into this issue as well. The new list url is /v1/acl/policies. The output is also different and breaks the current consul_acl provider.

jonesbrennan commented 2 years ago

I was able to get things working with the current state of this module on Consul 1.11.4. I switched from using the acl provider to using the policy provider. The policy provider and the token provider worked and have the correct urls. @maxadamo maybe this will work for you too.

solarkennedy commented 2 years ago

Can one of you make a PR to the readme in the version matrix?

jonesbrennan commented 2 years ago

I updated the version matrix in README.md and created pull request #592.

solarkennedy commented 2 years ago

ty @jonesbrennan . Is that all that users need to do then, upgrade the puppet module >6.0.0?

jonesbrennan commented 2 years ago

The user needs to use the policies and tokens parameters instead of the acls parameter.

maxadamo commented 2 years ago

I should read the documentation more carefully before raising an issue! :facepalm: This is not an issue and the change in the README will suffice.