Skip to content

Cherry picks for v2.10.15 RC.11#5430

Closed
wallyqs wants to merge 11 commits intorelease/v2.10.15from
downstream/v2.10.15
Closed

Cherry picks for v2.10.15 RC.11#5430
wallyqs wants to merge 11 commits intorelease/v2.10.15from
downstream/v2.10.15

Conversation

kozlovic and others added 11 commits May 16, 2024 09:33
PR #4255 added code in generateClientInfoJSON to set the proper
info Host/Port/TLSAvailable/TLSRequired fields to send to clients.

However, this was requiring a lock but more importantly was computing
the listener's host/port everytime, which is not necessary since
this is immutable because we don't support the change during a config
reload.

Also, the TLSRequired field was set based on the server TLSConfig's
InsecureSkipVerify value, which is irrelevant for a server. The
mere presence of a TLSConfig (c.srv.websocket.tls being true) is
enough.

I have modified the TestWSReloadTLSConfig test to verify that the
tls block cannot be removed and no_tls set to true, which means
that tls value can't change. I also added check for the info's
Host/Port/TLSAvailable/TLSRequired values.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
With the JWT library update, there is now a `jwt.ConnectionTypeInProcess`
connection type that can be added to the list of allowed connection
types when defining an user. If the list is not empty and does not
have this type, an "in process" connection will not be allowed.

Conversely, it is now possible to limit a user to be used only for
in process connections (or several types based on the content of
the list).

Possible solution for #5387

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
We had a bug that was reported that was not handling a block scope where
the terminating '}' was on a new line.

Resolves: #5396 

Signed-off-by: Derek Collison <derek@nats.io>

---------

Signed-off-by: Derek Collison <derek@nats.io>
Co-authored-by: Waldemar Quevedo <wally@synadia.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from
0.22.0 to 0.23.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golang/crypto/commit/905d78a692675acab06328af80cdfe0b681c8fc7"><code>905d78a</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="https://github.com/golang/crypto/commit/ebb717d630028d3e29c90c55d73cb6de90d53c3e"><code>ebb717d</code></a>
ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response</li>
<li><a
href="https://github.com/golang/crypto/commit/0da2a6a1bbc8e689a335bea68b5cc0e3e8728854"><code>0da2a6a</code></a>
openpgp: fix function name in comment</li>
<li><a
href="https://github.com/golang/crypto/commit/5defcc193aabc79299b09bc1e2e30445a3f78d4e"><code>5defcc1</code></a>
sha3: fix Sum results for SHAKE functions on s390x</li>
<li>See full diff in <a
href="https://github.com/golang/crypto/compare/v0.22.0...v0.23.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/crypto&package-manager=go_modules&previous-version=0.22.0&new-version=0.23.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Under some conditions during a rollout, messages that were already acked
or double acked (ack sync), would have been redelivered to a consumer.
Also includes fixes for `TestJetStreamClusterScaleConsumer` for consumer
rescaling.

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
Co-authored-by: Derek Collison <derek@nats.io>
Most of these were introduced by consideration of an atomic for leader status. This approach was abandoned.

Signed-off-by: Derek Collison <derek@nats.io>
Added the leafnode remote configuration parameter `first_info_timeout`
which is the amount of time that a server creating a leafnode
connection will wait for the initial INFO from the remote server.

Resolves #5417

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
…to set needSync.

Signed-off-by: Derek Collison <derek@nats.io>
1. Pull term from tav.idx even with no voted peer on recovery.
2. If we have no pterm or pindex after recovery inherit from empty WAL and tav.idx.
3. Clear wtv if we fail to write the tav.idx file.

Signed-off-by: Derek Collison <derek@nats.io>
Includes improvements for streams rescaling:

- When scaling up and down we keep same leader so no reason to tear
everything down and then back up.
We do make sure when we scale down to one to tear down cluster specific
subs etc.

---------

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
Co-authored-by: Derek Collison <derek@nats.io>
@wallyqs wallyqs requested a review from a team as a code owner May 16, 2024 16:43
@wallyqs
Copy link
Copy Markdown
Member Author

wallyqs commented May 16, 2024

closing in favor of #5429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants