diff --git a/v2/account_claims.go b/v2/account_claims.go index 1f81b8d..15731d3 100644 --- a/v2/account_claims.go +++ b/v2/account_claims.go @@ -30,13 +30,14 @@ type AccountLimits struct { Imports int64 `json:"imports,omitempty"` // Max number of imports Exports int64 `json:"exports,omitempty"` // Max number of exports WildcardExports bool `json:"wildcards,omitempty"` // Are wildcards allowed in exports - Conn int64 `json:"conn,omitempty"` // Max number of active connections - LeafNodeConn int64 `json:"leaf,omitempty"` // Max number of active leaf node connections + DisallowBearer bool `json:"disallow_bearer,omitempty"` // User JWT can't be bearer token + Conn int64 `json:"conn,omitempty"` // Max number of active connections + LeafNodeConn int64 `json:"leaf,omitempty"` // Max number of active leaf node connections } // IsUnlimited returns true if all limits are unlimited func (a *AccountLimits) IsUnlimited() bool { - return *a == AccountLimits{NoLimit, NoLimit, true, NoLimit, NoLimit} + return *a == AccountLimits{NoLimit, NoLimit, true, false, NoLimit, NoLimit} } type NatsLimits struct { @@ -231,7 +232,7 @@ func NewAccountClaims(subject string) *AccountClaims { // errors if we add to the OperatorLimits. c.Limits = OperatorLimits{ NatsLimits{NoLimit, NoLimit, NoLimit}, - AccountLimits{NoLimit, NoLimit, true, NoLimit, NoLimit}, + AccountLimits{NoLimit, NoLimit, true, false, NoLimit, NoLimit}, JetStreamLimits{0, 0, 0, 0, 0, 0, 0, false}, JetStreamTieredLimits{}, } diff --git a/v2/operator_claims.go b/v2/operator_claims.go index 79d6b93..f806002 100644 --- a/v2/operator_claims.go +++ b/v2/operator_claims.go @@ -45,7 +45,6 @@ type Operator struct { AssertServerVersion string `json:"assert_server_version,omitempty"` // Signing of subordinate objects will require signing keys StrictSigningKeyUsage bool `json:"strict_signing_key_usage,omitempty"` - DisallowBearerToken bool `json:"disallow_bearer,omitempty"` GenericFields }