Skip to content

Commit

Permalink
acl: set minACLJWTAuthMethodVersion to 1.5.3 and adjust code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pkazmierczak committed Mar 30, 2023
1 parent f4e0056 commit 696d4d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nomad/acl_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions nomad/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 696d4d4

Please sign in to comment.