acl: set minACLJWTAuthMethodVersion to 1.5.3 and adjust code comment

This commit is contained in:
Piotr Kazmierczak
2023-03-30 15:30:42 +02:00
parent f4e00566fa
commit 696d4d4d59
2 changed files with 3 additions and 6 deletions

View File

@@ -2803,8 +2803,8 @@ func (a *ACL) Login(args *structs.ACLLoginRequest, reply *structs.ACLLoginRespon
defer metrics.MeasureSince([]string{"nomad", "acl", "login"}, time.Now())
// This endpoint can only be used once all servers in all federated regions
// have been upgraded to 1.5.2 or greater, since JWT Auth method was
// introduced then.
// have been upgraded to minACLJWTAuthMethodVersion or greater, since JWT Auth
// method was introduced then.
if !ServersMeetMinimumVersion(a.srv.Members(), AllRegions, minACLJWTAuthMethodVersion, false) {
return fmt.Errorf("all servers should be running version %v or later to use JWT ACL auth methods",
minACLJWTAuthMethodVersion)

View File

@@ -60,10 +60,7 @@ var minACLAuthMethodVersion = version.Must(version.NewVersion("1.5.0-beta.1"))
// minACLJWTAuthMethodVersion is the Nomad version at which the ACL JWT auth method type
// was introduced. It forms the minimum version all federated servers must
// meet before the feature can be used.
//
// TODO: version constraint will be updated for until we reach 1.5.3, otherwise
// it's hard to test the functionality
var minACLJWTAuthMethodVersion = version.Must(version.NewVersion("1.5.3-dev"))
var minACLJWTAuthMethodVersion = version.Must(version.NewVersion("1.5.3"))
// minACLBindingRuleVersion is the Nomad version at which the ACL binding rules
// table was introduced. It forms the minimum version all federated servers