Commit Graph

14 Commits

Author SHA1 Message Date
Matthias Hanel
f487429d9e incorporated comments
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-01-29 13:25:02 -05:00
Matthias Hanel
2a34f0daee [added] field to varz output containing the operator jwt/claim
Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-01-29 12:32:40 -05:00
Matthias Hanel
dea9effa8d [added] support for StrictSigningKeyUsage and updated jwt library (#1845)
This will cause the server to not trust accounts/user signed by an
identity key

The boot strapping system account will assume the account is issued by
the operator.
If this is not desirable, the system account can be provided right away
as resolver_preload.

[fixes] crash when the system account uses signing keys and an update changes that key set.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2021-01-26 17:49:58 -05:00
Matthias Hanel
40e4659f25 Convert current time into time for locale before usage
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-08-31 18:46:26 -04:00
Matthias Hanel
b02b6215b6 Support locale for times in user jwt
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-08-28 16:01:00 -04:00
Matthias Hanel
431560b004 Update JWT and incorporate change of cidr ranges from string to array
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-08-27 23:11:54 -04:00
Matthias Hanel
6c61464915 [ADDED] Checks for CIDR blocks and connect time ranges specified in jwt (#1567)
because times stored are hh:mm:ss it is possible to end up with start > end where end is actually the next day.
jwt.go line 189

Also, ranges are based on the servers location, not the clients.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-08-20 13:28:16 -06:00
Matthias Hanel
547afa47d6 Pulling in updated jwtv2 and using server version stored in operator
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-06-01 18:08:50 -04:00
aricart
e7590f3065 jwt2 testbed 2020-06-01 18:00:13 -04:00
Matthias Hanel
aa1a768cce Move system account check to validateTrustedOperators
As a consequence of this change, certain unit tests had to actually
start the server and move to a memory resolver to keep the test simpler.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-05-19 15:39:18 -04:00
Derek Collison
ce22bc87a4 Make ReadOperatorJWT public for embedded use case. Fixes #1050
Signed-off-by: Derek Collison <derek@nats.io>
2019-07-01 11:14:21 -07:00
Derek Collison
5b42b99dc1 Allow operator to be inline JWT. Also preloads just warn on validation issues, do not stop starting or reloads.
We issue validation warnings now to the log.

Signed-off-by: Derek Collison <derek@nats.io>
2019-06-24 16:46:22 -07:00
Derek Collison
2d54fc3ee7 Account lookup failures, account and client limits, options reload.
Changed account lookup and validation failures to be more understandable by users.
Changed limits to be -1 for unlimited to match jwt pkg.

The limits changed exposed problems with options holding real objects causing issues with reload tests under race mode.
Longer term this code should be reworked such that options only hold config data, not real structs, etc.

Signed-off-by: Derek Collison <derek@nats.io>
2018-12-05 14:25:40 -08:00
Derek Collison
f4f3d3baf1 Updates for operator based configurations.
Added update to parse and load operator JWTs.
Changed to add in signing keys from operator JWT to list of trusted keys.
Added URL account resolver.
Added account claim updates by system messages.

Signed-off-by: Derek Collison <derek@nats.io>
2018-12-02 20:34:33 -08:00