Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: jwt token nonce and expiration time #3967

Merged
merged 11 commits into from
Nov 27, 2024
Merged

fix: jwt token nonce and expiration time #3967

merged 11 commits into from
Nov 27, 2024

Conversation

cristaloleg
Copy link
Contributor

Fixes #2420

@cristaloleg cristaloleg added the kind:fix Attached to bug-fixing PRs label Nov 27, 2024
@cristaloleg cristaloleg self-assigned this Nov 27, 2024
api/rpc_test.go Outdated Show resolved Hide resolved
cmd/auth.go Outdated Show resolved Hide resolved
cmd/rpc.go Outdated Show resolved Hide resolved
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some tests borked

api/rpc/perms/permissions.go Outdated Show resolved Hide resolved
api/rpc_test.go Outdated Show resolved Hide resolved
cmd/auth.go Outdated Show resolved Hide resolved
cmd/rpc.go Outdated Show resolved Hide resolved
libs/authtoken/authtoken.go Show resolved Hide resolved
libs/authtoken/authtoken.go Outdated Show resolved Hide resolved
nodebuilder/node/node.go Outdated Show resolved Hide resolved
api/rpc/perms/permissions.go Outdated Show resolved Hide resolved
cmd/auth.go Outdated Show resolved Hide resolved
nodebuilder/node/node.go Outdated Show resolved Hide resolved
api/rpc/perms/permissions.go Outdated Show resolved Hide resolved
api/rpc_test.go Outdated Show resolved Hide resolved
cmd/rpc.go Outdated Show resolved Hide resolved
libs/authtoken/authtoken.go Show resolved Hide resolved
cmd/auth.go Outdated Show resolved Hide resolved
@renaynay renaynay self-requested a review November 27, 2024 19:06
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested manually as well

auth cmd only has --ttl flag so it's not a global flag. If it is not passed, ttl will be set to 0, disabling the TTL on the token (so it's eternal).

This PR preserves old behaviour but allows for TTLs on the tokens and also makes the token generated non-deterministic per secret.

@renaynay renaynay requested a review from walldiss November 27, 2024 19:10
@renaynay renaynay merged commit 28897c8 into main Nov 27, 2024
30 checks passed
@renaynay renaynay deleted the fix/extend-jwt-config branch November 27, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libs: Add expiry for JWT
4 participants